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
  • Options
  • Select Type of Worker
  • Name of your New Worker
  • Inherit from:
  • Create non-reentrant Worker for real-time targets
  • Worker Alias
  • Icon Header
  • Icon Preview
  • Parent folder of new Worker's folder
  • Add the Worker as a subWorker to the Worker selected below
  • Open Hierarchy Viewer
  • Advanced
  • Tasks performed by the tool
  1. Workers Tools
  2. Workers Tools Menu

Create/Add Worker

Workers Tools Menu

PreviousWorkers Tools MenuNextRemoving Workers

Last updated 1 year ago

The Create/Add Worker tool allows you to build up the statically-linked Worker call-chain hierarchy of a Workers application.

Options

Select Type of Worker

First you must select the type of Worker you want to create. Here you can select:

  • Worker with EHL - The Worker's Main VI will contain an Event Handling Loop. Select this option if you need your Worker to handle events. E.g. events from front panel elements.

  • Worker without EHL - The Worker's Main VI will not contain an Event Handling Loop. This option is preferred if you do not need your Worker to handle events.

Good to know

If you select a Worker without EHL and then later on realize that you need to handle events, you can simple add an EHL yourself, copied from another Worker with an EHL.

Name of your New Worker

Select a name for your new Worker. This will be the name of the Worker's class. The name you select should be suitable to be a filename.

Inherit from:

Select the class you want to directly inherit your new Worker from. By default every Worker inherits from Worker.lvclass [Workers.lvlib].

Create non-reentrant Worker for real-time targets

This option only appears if a real-time target has been selected in the Workers tools menu. By default this flag is ticked, meaning that a Worker with a Main NR.vi will be created (the non-reentrant version of a Worker's Main.vi).

Worker Alias

The Worker's alias is what the Worker will be known as within a Workers application. This field is optional. If left blank, the Alias will be the same as the Name of your New Worker. If your Worker's name is long, you can create a shorter alias for your Worker. (This data is stored as a tag within the class's XML file).

Icon Header

A string for the header of your Worker's icon. Here you can also select the background and text color of the icon's header. (This data is stored as a tag within the class's XML file).

Icon Preview

What the icon of your Worker will look like, based on the header and text/background colors you choose.

Tip

Right clicking over the icon preview and selecting Copy header colors from class allows you to take the text/background icon colors from another Worker or Worker base class.

Parent folder of new Worker's folder

When a new Worker is created, its class file is put in a folder with the same name as the Worker. The 'parent' folder is one level above the folder that is created for the new Worker.

Add the Worker as a subWorker to the Worker selected below

When you select this flag, the new Worker you are creating (or if you select a Worker from the Add Exiting... tab) will be added as a statically-linked subWorker to the Worker you select directly below this field in the list titled Workers in (target).

Advanced

Tasks performed by the tool

A summary of the scripting tasks performed by the Create/Add Worker will now be provided. This summary is for when a new Worker is created by the tool and then added as a statically-linked subWorker to another Worker (which will become the Caller).

  1. The tool creates a new Worker from a template

  2. A typedef Statically-Linked subWorkers.ctl is created and added to the Caller (if it doesn't exist)

  3. Statically-Linked subWorkers.ctl is added to the Caller's private data cluster (if it doesn't exist)

  4. Setup Statically-Linked subWorkers.vi is created and added to the Caller (if it doesn't exist)

  5. Setup Statically-Linked subWorkers.vi is added to the Caller's Main VI block diagram (if it doesn't exist)

  6. Setup subWorker - *New Worker's Alias*.vi is created and added to the Caller.

  7. Setup subWorker - *New Worker's Alias*.vi is added to Setup Statically-Linked subWorkers.vi's block diagram

  8. Set Initialization Data - *New Worker's Alias*.vi is created and added to the Caller

  9. Set Initialization Data - *New Worker's Alias*.vi is added to the Caller's Main VI block diagram

  10. The new Worker's Main VI is added to the Caller's Main VI, below the Caller's QMH and the VI is wired up

The result of the steps above can be seen in the example below. Below (left) is a screenshot of the items are that created by the tool (highlighted in blue) when adding a new Worker (Worker B) to a pre-existing Worker (Worker A). Below (right) shows that Statically-Linked subWorkers.ctl has been added to Worker A's private data cluster.

The VIs within the red boxes in the block diagram below have been added by the Create/Add Worker tool.

  1. Setup Statically-Linked subWorkers.vi

  2. Worker B.lvclass : Main.vi

  3. Set Initialization Data - Worker B.vi

Worker from template - Create a new Worker from your own Worker template. See .

Open Hierarchy Viewer

Opens the tool.

Creating Worker Templates
Worker Hierarchy Viewer
Create/Add Worker tool
New items added to project by Create/Add Worker tool
Statically-Linked subWorkers.ctl added to Workers private data
Statically-linked subWorker additions to a Caller's Main VI