Table Of Contents

Sending Messages Between Systems

Last Modified: September 27, 2018

Communicate between systems by publishing messages to topics. Messages support both synchronous and asynchronous reads.

You can find the Messages API on the Skyline palette in LabVIEW. Example use cases for Messages include the following:
  • Sending a warning message to all managed systems
  • Sending status updates from one system to another
  • Sending a keyword to trigger an event among one or more managed systems
The following procedure describes a generic workflow between two systems using Messages in LabVIEW. For more details on using Messages in NXG, refer to the SystemLink Data Services for LabVIEW NXG manual. To access the message service through an HTTP API, refer to the Messages HTTP API documentation.
  1. On both the sender and the receiver, use Open to open a synchronous or asynchronous messaging connection.
  2. On the receiver(s), subscribe to a topic by specifying a string with Subscribe. The message session will receive a copy of any message published to this topic.
  3. On the sender, send a message using Publish.
    1. Enter a string in the message input.

      To send other data types and structures as a message, flatten them to JSON.

    2. Enter the topic string in the topic input.
    All subscribers to the topic will receive a copy of the published message.
  4. If you want to stop receiving messages published to a certain topic, use Unsubscribe on the receiver.
  5. On both systems, use Close to close the messaging connection.

Recently Viewed Topics