|Download Help (Windows Only)|
Parent Topic: Planning a Custom Device
Channel and waveform items are the mechanisms by which a custom device exchanges data with the rest of the NI VeriStand system. Waveforms differ from channels in that NI VeriStand always sends channel data to the host computer, but NI VeriStand only streams waveform data upon request.
The example below shows a custom device with two channels and two waveforms.
Channels perform single-point acquisition, an immediate, non-buffered operation that occurs at the rate at which the system runs. All channels are either 64-bit floating point numbers (LabVIEW DBLs) or waveforms. No other data types are currently supported. However, as you write code for a custom device, you can use LabVIEW's various data conversion functions to convert other types of data to 64-bit floating point numbers. For example, if the LabVIEW API for a third-party device calls for Boolean data to enable a channel or filter, you can use a DBL channel with the assumption that 0 = FALSE and !0 = TRUE.
|Note You also can use the Register Custom Device Engine Events VI to configure engine events and design a communication mechanism to handle data of different types. Alternatively, you can use other remote communication methods, such as TCP and UDP. However, these are advanced programming methods. It is often easier to coerce data to 64-bit floating-point numbers and use custom device channels.|
You can create input and output channels. Input channels get data from the rest of the NI VeriStand system. Output channels send data to the rest of the system. An operator can map each input channel to a single data source. However, an output channel can map to any number of sinks, such as simulation model inputs.
There are three common use cases for a custom device channel:
Best practice is to implement channels with general use-cases in mind. For example, if you are writing a custom device to interface with third-party hardware, consider adding custom device channels for every physical channel of the hardware device and give the custom device operator the ability to remove channels while configuring the custom device in the system definition file.
Mapping Channels in NI VeriStand
Acquire signals as waveforms when you need to read at rates faster than the rate at which the system runs.