Workers for LabVIEW
HomeDownload Follow ProjectAbout
  • Welcome to Workers for LabVIEW
  • What's New in v5.0
    • Upgrading to v5.0
    • New Features
      • Development Tools
      • Functional Changes
      • API Changes
      • Example Projects
      • Change Log
  • Fundamental Concepts
    • What is a Worker?
    • Important Terms
    • The Workers Main VI
      • Default Framework Cases
    • subWorker Types
    • Initialization Sequence
    • Shutdown Sequence
    • Priority Queue
    • Launcher VIs
  • Worker APIs
    • Overview
    • Local Requests
      • Creating Local Requests
    • Public Requests
      • Creating Public Requests
    • Public Requests w/Reply
      • Creating Public Requests w/Reply
    • Public Responses
      • Creating Public Responses
      • Registering Public Responses
    • Case Labels
    • Deleting API Items
  • Workers Tools
    • Workers Tools Menu
      • Create/Add Worker
        • Removing Workers
        • Creating Worker Templates
        • Troubleshooting
      • Workers Debug Server
        • Workers Application Manager
          • Right click menu
        • Worker Message Logs
          • Right click menu
        • Settings
        • Troubleshooting
      • Worker Call-Chain Viewer
      • Worker User Library
        • Config File Editor
      • RT Worker Convert
      • Public API Builder
        • Public Requests
        • Public Requests w/Reply
        • Public Responses
        • Override MHL Cases
      • Create Launcher VI
      • Create Worker Base Class
      • Change Inheritance
      • MHL Case Viewer
      • Change Worker Properties
    • Quickdrop Shortcuts
      • Show Private Data (Ctrl+0)
      • Create MHL Case tool (Ctrl+9)
      • Go To MHL Case (Ctrl+8)
  • Getting Started
    • Creating your first application
    • Example Projects
  • Legal
    • Disclaimer
    • Licenses
Powered by GitBook
On this page
  • Event Handling Loop
  • Message Handling Loop
  1. Fundamental Concepts

The Workers Main VI

Workers Fundamental Concepts

PreviousImportant TermsNextDefault Framework Cases

Last updated 1 year ago

A Workers QMH is located on the block diagram of the its Main VI (Main.vi) and is designed in the style of the LabVIEW QMH Template. The block diagram of a Worker's Main VI is shown below:

A Worker's Main.vi is a re-entrant shared clone, meaning that you can have multiple instances of them running simultaneously.

Event Handling Loop

The event handling loop (EHL) at the top of the Main VI is optional, and can be used to handle both front panel and user events, much like in the LabVIEW QMH template.

Message Handling Loop

Every Worker's Main VI is required to have a message handling loop (MHL). Workers send messages to each other via message queues, and these messages are dequeued within a Worker's MHL.

A Worker's MHL can receive messages sent from the Worker's EHL, sent from cases within itself, or sent from external Workers (or VIs) that have access to the Worker's message queue.

A Worker's MHL is shown below, and contains the following parts within a while loop:

  • Dequeue Message.vi - This VI dequeues messages from the Worker's message queue.

  • Data - Data (as a variant) can be sent along with a message. This data can then be retrieved within a case of the case structure.

  • Case Structure - The cases of the case structure are selected by a string. This string is contained within the message received by the Worker's Dequeue Message.vi.

  • Worker.ctl - The blue wire corresponds to a Worker's private data cluster, contained within a shift register in the MHL.

Error Handler.vi - Any errors received by this VI will be forwarded to the .

Workers Debug Server
The block diagram of a Worker's Main VI
Parts of a Workers MHL