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
  1. Fundamental Concepts

What is a Worker?

Workers Fundamental Concepts

PreviousChange LogNextImportant Terms

Last updated 11 months ago

Concept definition

What is a Worker and why is the framework called “Workers” ? In a company, there exists a worker hierarchy, with every worker in the company being an ‘asynchronous’ entity, meaning that everyone in the company works independently (usually) on their own tasks that they have been assigned. These tasks are usually assigned from another worker (their manager), who exists above them in the management hierarchy. Their manager will ask them to perform certain tasks, based on the worker’s own unique set of skills, and the worker will report back to their manager when their tasks are complete. In addition, each worker may also be a manager and delegate work to their own assistants or ‘sub-workers’ that exist below them in the company's worker hierarchy. At the top of the company is the CEO, he is the head worker of the company, and his team of top-level managers (who are also in-fact workers) each have a specific task and a team of workers below them.

Similarly to how people are arranged into worker hierarchies in a company, Workers provides you with a way to create a LabVIEW application that follows the same asynchronous hierarchy… multiple processes each possessing a unique skill-set, working on some task alone, communicating to each other through the hierarchy, yet working all together at the same time.

Framework definition

The Worker concept here (also known as an Actor in other frameworks) is represented as a modular QMH in the framework.

In more specific LVOOP terms, a Worker is a QMH and its supporting code that is encapsulated in a class, which inherits from the common ancestor class Worker.lvclass.

As with a regular QMH, you assign your Workers a specific task, e.g. as a user interface or data logger, acquisition module, etc., but because a Worker is modular, you can easily re-use your Workers again in multiple projects, or even use multiple instances of them within the same application.

Good to know

For developers without LVOOP experience, you can simply think of a Worker's class as a really cool library that has its own data-type.

Project Contents

You can create new Workers and add them to your LabVIEW projects using the tool. A new Worker created by the tool contains only the following items:

New Worker.lvclass

This is the Worker itself: a class that contains your Worker's VIs and typedefs, i.e. *.vi and *.ctl files. Because every Worker is a LabVIEW class, the Worker takes the extension *.lvclass.

New Worker.ctl

Initialization Data.ctl

Initialization Data.ctl is a typedef that is used to pass data into the Worker's MHL when the Worker is initialized.

Response Cases.ctl

Main.vi

New Worker.ctl is a typedef that is private to the Worker and its VIs and is represented by the Worker's . Here you can add any data elements that you wish to store between the Worker's Message Handling Loop (MHL) iterations.

Response Cases.ctl is a typedef that holds multiple MHL case names belonging to a Worker's Caller, and is used to register Public Response messages so that asynchronous messages can be sent from the Worker to its Caller. (see Section ).

This VI is referred to as a Workers Main VI and contains the Worker's QMH (see ). This VI is a reentrant shared-clone.

The Workers Main VI
Create/Add Worker
Main Data Wire
Response Cases.ctl