subWorker Types

Workers Fundamental Concepts

Good to know

The images in this section are taken from the Workers Fundamentals example project.

Statically-Linked subWorkers

Whenever you add a Worker to another Worker using the Create/Add Worker tool, you will be adding the Worker as a statically-linked subWorker.

The Main VI of a statically-linked subWorker will appear below the QMH of the Worker that you are adding the subWorker to, as shown below.

Main VIs of statically-linked subWorkers located below a Worker's QMH (Workers Fundamentals example project)

Within an application's Worker call-chain hierarchy diagram, you can identify statically-linked subWorkers as subWorkers without an outer dashed line. The Workers in the red box below represent the statically-linked subWorkers in the block diagram above.

Statically-linked subWorkers of Worker A.

Dynamically Loaded subWorkers

Workers can also be integrated into a Worker's call-chain hierarchy at run-time, by loading a Worker dynamically from another Worker by using the Workers palette VI: Dynamically Load Worker v2.vi. This VI is used within the Dynamically Load Worker Public API VIs. An example of a Worker that is loaded dynamically at run-time is shown in the image below. Here you can see that Worker D is loaded dynamically by another Worker, and its returned Worker object is stored in the Main Data Wire of the Caller.

Worker D is dynamically loaded from Worker A (Workers Fundamentals example project)

Within a Workers call-chain hierarchy diagram, you can identify a dynamically loaded subWorker as a subWorker with an outer dashed line. The Worker in the red box below represents the dynamically loaded subWorker in the block diagram above.

Dynamically loaded subWorker of Worker A

Dynamically loaded Workers are loaded with LabVIEW's Start Asynchronous Call node, using flags: 0x100 flag (Call and Collect) and 0x40 (Enable simultaneous calls on reentrant VIs).

Last updated