08-19-2020 08:44 AM
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)?
08-19-2020 10:25 AM - edited 08-19-2020 10:28 AM
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