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
  • Overview
  • Public Request with Reply Purpose
  • Public Request with Reply usage example
  • Public Request with Reply VI
  • Public Request with Reply Typedefs
  • Public Request with Reply MHL Cases
  • Public Request with Reply Folders
  1. Worker APIs

Public Requests w/Reply

Worker APIs

PreviousCreating Public RequestsNextCreating Public Requests w/Reply

Last updated 7 months ago

Overview

Purpose
Message Type
Icon Glyph
File Prefix

Send message to Worker from external source, and wait for reply from Worker

Synchronous

rwr_

The images below are taken from the example project.

Public Request with Reply Purpose

A Public Request with Reply is a message that can be sent to a Worker from an external source, such as from a Worker's Caller (within a Workers application), from another LabVIEW application or framework, or from TestStand. The VI that sends the message will wait until a Reply message is received back from the Worker that the Request message was sent to.

Public Request with Reply usage example

Public Request with Reply VI

Data in

Data that will be sent along with the message. By default, this is a typedef that has the same filename as the Public Request VI.

Message Priority

Show in Debugger?

timeout (ms)

The time in milliseconds that the VI will wait until it receives a Reply message back from the Worker it sent the Request message to. A value of -1 means that this VI will wait indefinitely.

Reply Data out

Data that was sent back from the Worker that the Request message was sent to.

Public Request with Reply Typedefs

Public Request with Reply typedefs are created with the same icon and filename as their matching Public Request with Reply VI. Their purpose is to provide a custom container (cluster) for the data that will be sent along with the message to the Public Request with Reply's MHL case.

Two typedefs are created for every Public Request with Reply. The first (green icon glyph) is for the Request message that is being sent from the external source to the Worker. The second (purple icon glyph) is for the Reply message that is being sent back to the Request with Reply VI.

Public Request with Reply MHL Cases

Public Request with Reply Folders

The image below demonstrates the use of a Public Request with Reply VI sending a message from a MHL case of Worker A to a MHL case of Worker C, and receiving data back from Worker C. In order for the a Public Request with Reply VI to know which instance of Worker C to send a message to, the Worker's must be wired to the top-left input terminal of the Public Request with Reply VI.

A Public Request with Reply VI is required to be wired in-line with a Caller's , as shown in the block diagram image above. The Public Request with Reply VI will send a message to the Worker who's data wire is connected to its top-left input terminal. The message will be received by the Worker's MHL case that has the same name as the Request VI. The Public Request with Reply VI will then wait until it receives a Reply message back from the Worker that it sent the Request message to, or until a timeout duration has been exceeded.

Every Public Request with Reply VI filename takes the prefix: rwr_ (request with reply). Every Public Request with Reply VI icon contains a green/purple glyph in its bottom-right corner. An example of a Public Request with Reply VI is shown below.

The of the message (default is Normal) can be set to either Low, Normal or High.

When this flag is TRUE, then meta-data about this message will be sent to the .

For every Public Request with Reply, a MHL case will be created to receive the message sent by the Public Request with Reply VI. Public Request with Reply MHL cases will automatically be added to the Worker's case structure section called --- PUBLIC API CASES ---. To convert the data sent with the message to its specific data type, a Variant to Data node is required at the beginning of every Public Request with Reply MHL case (this will automatically be added to the MHL case when the MHL case is created by the ).

Public Request with Reply VIs created by the are added to a Worker's Public API >> Request w/Reply folder. Their scope is set to public because they are designed to be used from code that is external to the Worker that owns them.

priority
Workers Debug Server
Public API Builder tool
Public API Builder tool
Workers Fundamentals
Handle
Main Data Wire
A Public Request with Reply is a message that can be sent to a Worker from an external source. The VI that sends the message will wait until a Reply message is received back from the Worker that the Request message was sent to.
Worker A : Main.vi - Public Request with Reply VI example
Worker C : rwr_Get Counter Value.vi
Worker C : Main.vi - Public Request (with Reply) MHL cases
Public Request with Reply folder structure within a Worker