Implementing Channel Block Reading and Writing in Inline Custom Devices
- Updated2025-10-27
- 3 minute(s) read
Implementing Channel Block Reading and Writing in Inline Custom Devices
Modify an inline model interface custom device to use block data references to read and write channel data.
In an inline custom device, you can read or write channel data for multiple channels at a time using block data references. Block reading and writing is useful for custom devices with a large number of channels, as this technique runs faster than channel-by-channel access. Block reading and writing also simplifies your code, as referencing, reading and writing to a large number of channels individually can become large and complex.
- Get Channel Block Data References VI
- Get Channel Values by Block Data Reference VI
- Set Channel Values by Block Data Reference VI
-
Modify the Initialize case to obtain block data references.

1 Get Custom Device Channel List VI and Get Channel Block Data References VI—Replaces the For Loop and Get Channel Data Reference VI that attains Read Access channel data references in the inline model interface custom device template.
Get Custom Device Channel List VI and Get Channel Block Data References VI work together as follows:- Get Custom Device Channel List VI returns an array of all the input channel references of the custom device.
- Get Channel Block Data References VI uses this array to generate Block Data Refs for the input channels, or an array of 32-bit data references, and sets the Access to Read, allowing you to use the references to get channel data.
- Get Channel Block Data References VI also returns the initial channel values as Values Array, which is used later in the Execute Model case.
2 Get Custom Device Channel List VI and Get Channel Block Data References VI—Replaces the For Loop and Get Channel Data Reference VI that attains Write Access channel data references in the inline model interface custom device template. Works similarly for output channels.
Get Custom Device Channel List VI and Get Channel Block Data References VI work together as follows:
- Get Custom Device Channel List VI returns an array of all the output channel references of the custom device.
- Get Channel Block Data References VI uses this array to generate Out Block Refs for the input channels, or an array of 32-bit data references, and sets the Access to Write, allowing you to use the references to write data to the channels.
- Get Channel Block Data References VI also returns the initial channel values as Values Array, which is used later in the Execute Model case.
3 Block Data Refs and Values Array—Stored in a cluster for use in the Execute Model case. The refs and array are of both the input and output channels. -
Modify the Execute Model case to read and write channel data with block
references.

1 Get Channel Values by Block Data Reference VI—Uses the stored In Block Refs of the input channels to simultaneously get the value for each input channel.
2 Do Model Calculation Flat Sequence Structure—Sums all values in the Input Values array and saves them to the Output Values array.
3 Input Values and Output Values—Bundles arrays.
4 Set Channel Values by Block Data Reference VI—Uses the Block Data Refs of the output channels to simultaneously write the updated values, which are contained in Output Values array to the output channels.
Related Information
- Inline Model Interface Custom Devices
An inline model interface custom device executes inline with the VeriStand Engine's Primary Control Loop (PCL), which processes data acquired from hardware inputs and sends the processed values to hardware outputs without latency.
- Custom Device API Library
The Custom Device API library is a LabVIEW library that contains type definitions, template VIs, and the LabVIEW API a custom device needs to interact with VeriStand.