VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Read String Output Using NI Veristand Instruments Addon Custom Device RS-232

Hi, I am trying to read back data from serial/RS-232 using NI Veristand Instruments Addon Custom Device for NI Github. My device is always outputting data (response), no command needed. I am having issue parsing the data to the data format, and thinking to get the whole string data instead. Any suggestions how to do this? The data format allowed seems to be number only.

 

Alternatively, any example on how to use this Instrument Addon Custom Device (with RS-232 configuration)?

0 Kudos
Message 1 of 2
(1,175 Views)

Hi,

The Instrument Addon Custom Device was not made for response only messages because the push rate from the physical instrument and the periodic rate of a defined message in the addon won’t be perfectly timed, so in time, the buffers will get out of sync.

The Instrument Addon can format data from responses into:
- different number formats using LabVIEW syntax;
- by comparing the data received with an expected string and giving a 1 for match, 0 for not finding a match;
- by type casting the data;
- by translating the data into an Enum.

Unfortunately the Instrument Addon cannot return the data in string format, as the VeriStand channels data type is of type Double (DBL).

There is a documentation on how to set the main parameters of the Instrument Addon inside the GIT repository or inside the installation location of the custom device at the path shown in the Instrument Addon's Main Page in VeriStand System Explorer: "C:\Users\Public\Documents\National Instruments\NI VeriStand (Year)\Custom Devices\Instrument Addon\Windows\Quick Start Documentation\Instrument Addon Quick Start.html".

Also, if you click inside System Explorer on the Instrument Addon pages (Command, Response, etc.) you can check the top side of the pages for explanations and info regarding the parameters of each section.

Best regards,
Paul

0 Kudos
Message 2 of 2
(1,142 Views)