The Workers Main VI

Workers Fundamental Concepts

A Workers QMH is located on the block diagram of the its 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 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 - 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

  • Error - Any errors received by this VI will be forwarded to the Workers Debug Server.

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

Last updated