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
  • Step 1: Create MHL case in Caller to receive Response message
  • Step 2: Register Caller's MHL Response case with the Worker
  • Step 3: Convert Public Response message data to correct data type
  1. Worker APIs
  2. Public Responses

Registering Public Responses

Worker APIs

PreviousCreating Public ResponsesNextCase Labels

Last updated 1 year ago

A Worker is not coupled to its Caller and therefore a Worker's Caller must register to receive Public Response messages from a Worker. It is up to the Caller to decide whether or not it wants to receive one or more Public Response messages from a Worker.

To register to receive a Public Response message, let's look at the example in the example project of how Worker B sends a Public Response message to Worker A.

Now would be a great time to open the example project which can be found in the .

The following steps explain how the Public Response message from Worker B was registered with Worker A.

Step 1: Create MHL case in Caller to receive Response message

Select Add to Response Cases Section (shown below) so that the tool will create a MHL case and add it to the ---RESPONSE CASES--- section of the Worker's MHL case structure.

Step 2: Register Caller's MHL Response case with the Worker

This allows Worker B to know which case of Worker A to send the Public Response message to.

Step 3: Convert Public Response message data to correct data type

In the MHL case that was created in Worker A to receive the Public Response message, place the Public Response VTD VI (from Worker B) and connect it to the Data terminal of the MHL case structure, as shown in the image below.

This completes the registration process for a Public API Response. Worker B can now send the Public Response message to its Caller (i.e. Worker A). Worker A will receive the Response message in the <Return Number> case of its MHL, and the data in the message will be converted to the correct data type by use of the Public Response VTD VI.

From the block-diagram of Worker A , open the. This tool can be activated from the block diagram of a Worker's Main VI, by use of the Quickdrop Shortcut: Ctrl+9.

In the Set Initialization Data VI for Worker B (you will find this VI in Worker A's <Initialize> MHL case as shown below), you need to wire the that was created for the MHL case in Step 1, to the name of the Public Response in the subWorker's Initialization Data.vi cluster (outlined in red below).

Create MHL Case tool
Case Label
Workers Fundamentals
Workers Fundamentals
Workers tools menu
Registering Public Responses - 60 second video tutorial
Create MHL Case tool - demonstrating how to create a MHL case to receive a Response message
Worker A : Main.vi - Registering a subWorker's Public Response message with its Caller
Worker B : rspvtd_Return number.vi in MHL case of Worker A