From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

VeriStand Stimulus Profile API in LabVIEW

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

Overview

The example shows how to use the Stimulus Profile API (non-Legacy) to interact with Real-Time Sequences developed for NI VeriStand. This is example is written in LabVIEW 2013 and developed for VeriStand 2013. This example is specifically written for the Engine demo that ships with NI VeriStand.

Description

This example shows how to use the Stimulus Profile API with Real-Time Sequences. It was specifically written for the Engine Demo that ships with NI VeriStand. In the example I've slightly modified the simple Sequence to allow us to pass data to some parameter channels from a Real-Time Sequence to test.

Key sections in the example:

1. Get Parameter Information from Real-Time Sequence for all non-reference parameters

2. Set values for specific parameters

3. Create Stimulus Session and deploy Sequences to the Target

4. Get Names of all deployed Sequences ([Sequence file name]:[#ofiterations])

5. Start each sequence one at a time in Parallel and periodically check the status

6. Once each Sequence is done check the return value (Pass Value: Boolean)

7. Update an array once each sequence is done.

Requirements

Software

  • VeriStand 2013 or compatible
  • LabVIEW 2013 or compatible

Hardware

  • N/A

Steps to Implement or Execute Code

  1. Extract the Engine Demo Stimulus Profile API folder
  2. Deploy the Engine Demo VeriStand project included with VeriStand. (C:\Users\Public\Public Documents\National Instruments\NI VeriStand 2013\Examples\Stimulus Profile\Engine Demo)
  3. Open the Stimulus Profile API.vi inside the folder

Additional Information or Resources


VeriStand Stimulus API.PNGSet Sequence Parameters.PNG

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


Kyle Hartley
Senior Embedded Software Engineer

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

Contributors