03-02-2020 09:59 AM
I am trying to compile a custom device written in Labview to send and receive data within an array via TCP/IP..
The data is generated via another program, and is sent as an array string in the JSON format. [1,2,3,4,5..] etc...
I can successfully write something to receive the incoming data via Labvew, but I am struggling to get it working in veristand.
So far as I understand it, Veristand only supports channels created as doubles. So presumably I cant just create and array of doubles and send that back to veristand as a channel? Is there anyway to get Veristand to work with a channel as an Array rather than a simple double?
03-05-2020 02:51 AM - edited 03-05-2020 02:52 AM
Veristand Support waveform channels. you can try that. Also if you are using asynchronous custom device, you get an option for custom command in the event structure. You can use any one of them to transfer an array of data to/from LabVIEW host application to the veristand custom device.
03-06-2020 06:02 AM
I attach some LabVIEW snippets of what I am trying to achieve. The Client veristand will send and recieve JSON data to the server which in this example simply echoes back the data. In reality the server will be a separate machine running the unreal engine.
Along with the data arrays, I would also like to send string messages to it (to spawn in entities etc) so this sounds like a job for the event structure, but how do I create for example a front end GUI in Veristand to send/receive the arrays when they are not supported?
03-10-2020
12:44 AM
- last edited on
01-07-2025
12:24 PM
by
Content Cleaner
Hi,
I think I understood your task correctly. And it is possible in this way. You need to create a top level LabVIEW code to communicate with the custom device. This code can be a separate EXE, or it can be a custom tool which you can launch from the VeriStand workspace window.
To learn how to create a custom tool please follow this link -
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YFZiCAO&l=en-US
To communicate with the custom device, you need to use the VIs from the Custom Device Communication palette available here -
The way to use these VIs are very simple, you need to give the IP address of the Veristand Gateway(Typically the PC you used to setup the base communication to the RT/deployed code, if this is the same PC you are running the top level code, you can use the IP address as local host, else if you are running the top level code in same network but a from a different PC than the VeriStand running from, you can give the IP address of the PC running the VeriStand) and the custom device path to open the reference. then you can write commands and get the response back from the custom device.
You can select the polymorphic instance to choose between a string message or a byte array message. you can make your own command format and based on that have different types of data.