Reading and Writing Waveforms in the Custom Device Engine
- Updated2025-10-27
- 2 minute(s) read
Reading and Writing Waveforms in the Custom Device Engine
Use waveforms in custom devices to publish waveform data or read waveform data from other sources in the VeriStand Engine.
- Open your waveform custom device in LabVIEW.
-
Use the VIs on the Waveform Data palette to open a write
session to the waveform in the RT Driver VI of your custom
device.
VI Description Get Waveform Data Reference Generates a data reference to a specific waveform. If you want to write multiple waveforms, call this VI once per waveform and build an array of data references. Open Waveform Session Opens a write session for one or multiple waveforms. You should specify the delta t (dt), or time interval in seconds between any two points in the signal. For example, the dt of a 10 kHz waveform is 0.0001 seconds. Start Waveform(s) Provides a start time (t0) that defines when the first sample is written. Readers of the waveform in the VeriStand Engine and on the host computer will receive this value. If you want to read data from another waveform or from the DAQmx API, the t0 is provided. However, if you want to read waveform data from an FPGA, you must calculate the t0 yourself. Write Waveform(s) Writes an array of waveform samples. Call this VI repeatedly as you generate data for the waveform. You can write as much or as little data at a time as you want. If you opened a write session for multiple waveforms, this VI writes to each waveform simultaneously. Close Waveform Session Closes the write session. -
Use the VIs on the Waveform Data palette to implement a read
session from the waveform in the RT Driver VI of your custom
device.
VI Description Get Waveform Data Reference Generates a data reference to a specific waveform. If you want to read multiple waveforms, call this VI once per waveform and build an array of data references.
Open Waveform Session Opens a read streaming session for one or multiple waveforms.
Read Waveform(s) Returns an array of values from the waveform whenever any waveform source publishes data. Call this VI repeatedly to read data as it is published.
Close Waveform Session Closes the waveform streaming session.
Related Information
- Adding Custom Device Channels and Waveforms
Add channels and waveforms to a custom device by using the appropriate VI within a Custom Device Library VI that runs on the host computer.
- Other Considerations for Reading and Writing Waveforms in a Custom Device Engine
When reading and writing waveforms in a custom device, you should try to avoid data loss, identify the value source when reading from multiple waveforms, and calculate the start time of a read operation.