01-09-2018 11:22 AM
How can I set the value of an input channel from an asynchronous custom device in VeriStand 2016? The input channel belongs to the custom device in my case. The Set Channel Value by Data Reference documentation says, "This VI should only be called in the Execute Model case of a Model Inline Custom Device, or in the Read Data from Hardware or Write Data to Hardware cases of a Hardware Inline Custom Device. Do not use this VI outside an Inline Custom Device." So I don't think I can use this VI.
Thank you,
Steve K
Solved! Go to Solution.
01-09-2018 02:05 PM
Asynchronous Custom Devices communicate with the VeriStand engine using RT FIFOs instead of the Read/Write Channel By Reference VIs.
There is more info in the VeriStand 2017 Help here:
A common architecture is to create an Inline custom device which then launches asynchronous loops. This will have extra overhead and complexity versus creating a standard asynchronous custom device, but we do have some tools available to get started. There is an Inline-Asynchronous Custom Device library as well as a LabVIEW project template wizard which will generate an example custom device here:
VeriStand Development Tools VIPC
01-09-2018 02:21 PM
I want to set the value of an input channel from inside the asynchronous custom device. For example, the RT FIFO channel value will be non-zero, then I want the custom device to return it to zero after doing something.
01-09-2018 02:29 PM
My apologies - I read your question too quickly.
Using an input channel as a "flag" as you describe is a common reason to use an inline-asynchronous architecture. I don't think there's a way to do this using a purely asynchronous custom device.
01-09-2018 03:47 PM
IMHO, a simple requirement like this shouldn't drive a complex design, but oh well.
Thanks for confirming input channels can't be written from async devices.
-Steve K
01-09-2018 04:01 PM
I do not disagree. If you do need this functionality I highly recommend looking at the template/libraries I linked above if you haven't seen them already. They provide a significant head start to designing an inline + asynchronous custom device.
01-10-2018 02:16 AM
Basically this library: https://github.com/NIVeriStandAdd-Ons/VeriStand-Addon-Inline-Async-API
Examples: https://github.com/NIVeriStandAdd-Ons/VeriStand-Addon-Inline-Async-APIs-Example
~Jiri
CLA, CTA
01-10-2018 03:42 AM
If you stumbled on this thread, the trick in the inline custom device is to obtain Write references to the Input channels you want to write, as mentioned here: https://forums.ni.com/t5/NI-VeriStand/Set-input-value-from-Custom-Device/m-p/3115637/highlight/true#....