VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Communication via Instrument Addon to a LabVIEW Model (for Unicode UTF-16)

The device I need to communicate with uses Unicode UTF-16 for all communications. The Instrument Addon does not support this, and I burned 3 hours trying to get all the perquisites installed so I could modify the Instrument Addon source code but was unsuccessful.

 

A possible solution (besides an external gateway such as a cRIO doing all the conversion, which does work well) is to use a LabVIEW model that the Instrument Addon would communicate with that does all the translation. I have code that works fine outside VeriStand, modified it for proper use in VeriStand. Does not work...as I feared, VeriStand wants to connect to all devices in the "Custom Devices" before calling the models and I can't find a way to configure a delay or to call the models in parallel.

 

Has anyone tried using Instrument Addon to communicate with a model and was successful? 

0 Kudos
Message 1 of 5
(1,472 Views)

Any custom device can only communicate with other custom devices or models via VeriStand Engine FIFO in the form of double data. I am not sure how you want to map Insturment Addons with your model, but you can configure the initial state of the model to be paused (Step 4 in Adding and Configuring a Model)then use Model Command to start the model during runtime.

The source code for Instruments Addon is indeed pretty complicated as it uses LVOOP to cover different physical layers. If you have a working LabVIEW code, integrating it into a new Custom Device might be much easier than modifying a complex custom device. I think GitHub - NIVeriStandAdd-Ons/RMXVisaControl is a good reference.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 5
(1,464 Views)

The problem is with the instrument Addon...it wants to communicate immediately, and since the Model isn't running, it can't connect via TCP. But...via UDP it should not care. I can't get UDP to connect via localhost so I'd like to try on my RT system, but I discovered the Instrument Addon downloaded from VI Package manager does not support PharLap ETS...there is a version that supports 2020R4 AND PharLap...but I can't find it. Why the heck did NI take it out?????

 

So, I have a Linux-based target to try it on. Had to rebuild my virtual machine and went to install the Instrument Addon from the VI Package manager and....it seems NI's site is down for this since nothing shows-up in the package manager.

 

One problem atter another. I've been doing this for 28 years...I really get tired of all the issues I have with NI. I'm about out of patience.

0 Kudos
Message 3 of 5
(1,403 Views)

All previously built versions can be accessed from the Release page in Github.

The last version that supports Pharlap is Release Instrument Addon Custom Device 20.5.0

 

Unfortunately, changing the default behavior of deployment does require modification and rebuild from the source code.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 4 of 5
(1,396 Views)

Thanks, that helped.

 

I was unable to communicate between the VeriStand Instrument Addon and a LabVIEW model via TCP, but UDP worked on a Linux machine (only tested via cRIO). Seems PharLap can't communicate with another NIC with the same network ID (not address)...it keeps using ARP to find the other NIC but the othr NIC will not respond. Interestingly, on Linux, there is NO communication between the NICs (one is 192.168.1.10, the other at 192.168.1.11)...seems Linux keeps it internal since it knows they are on the same network ID? I have a ProfiShark and used WireShark to determine there were no actual UDP packets between the NICs. Whatever, at least it works on Linux...for PharLap, will need to use the Instrument Addon with serial communications with the LabVIEW model (BTW, the communications are ASCII, the model converts to Unicode and communicates with another device).

0 Kudos
Message 5 of 5
(1,369 Views)