Example Code

Register VeriStand Workspace Tool Event for Send Workspace Tool Message VI

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW
  • Veristand

Code and Documents

Attachment

Download All

Description

Overview

This example builds upon the VeriStand shipping template for custom workspace tools found at <Program Files>\National Instruments\LabVIEW XX\examples\NI Veristand\Workspace.  This example adds the capability to register and receive events from the NI VeriStand - Send Workspace Tool Message VI included in the Workspace Automation palette within LabVIEW.

 

 

Description

The VeriStand API for LabVIEW includes a VI that allows for direct communication to a custom workspace tool.  This NI VeriStand - Send Workspace Tool Message VI can be used within LabVIEW or a VeriStand Custom Device to trigger an event and/or send data to the workspace tool.  This allows the user to send certain events or data from VeriStand to the workspace tool that is visible to the user while they are running a VeriStand project.  To modify this example, simply add additional cases within the event structure case that registers these events.  This example can be used with both instances of the NI VeriStand - Send Workspace Tool Message VI (String or Byte Array).  The Test VI only has a string example implemented.

 

Workspace Tool.png

 

Requirements

Software

  • LabVIEW 2012 or compatible
  • VeriStand 2012 or compatible

Hardware

  • None

 

Steps to Implement or Execute Code

  1. Open Workspace Tool with Event Messages.vi
  2. Observe the changes made to the shipping template (shown in green) and add any additional commands the tool should respond to
  3. Add this custom workspace tool to VeriStand using the Adding a Custom Tool to the NI VeriStand Workspace tutorial
  4. Deploy and run the NI VeriStand project and open the custom workspace tool
  5. Open Workspace Tool Test.vi
  6. Add the file paths to the VeriStand project and the custom workspace tool
  7. Run the Workspace Tool Test.vi and send a valid message to the workspace tool

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

Justin D.

Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.