LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to match data type to foreign data server (Supersparc architecture) for TCP/IP client in Labview?

I have to talk to a data server out on the net. It uses a Supersparc processor architecture and I have to match this byte order for data consistency. This default size is 32 bits, therefore it seems like I should use a data type of long int or unsigned long int. How do I implement this in Labview code? Some code examples would be appreciated.

Thank you,

Guy
0 Kudos
Message 1 of 2
(2,560 Views)
Guy,

In the Functions » Advanced » Data Manipulation there a function called Swap Words. This will exchange the high and low 16 bits of a number.
Also, since the data coming in over TCP/IP will be a string initially, you will need to either use Unflatten From String fuction or a type cast to a specific data type.
For TCP examples, take a look at the shipping examples for TCP. That is the best place to look first.
If you have any other questions, I would suggest being more specific with the issue at hand. You may want to add what kind of data you are expecting, how much of it, and how fast you expect it. I would also add what you want to accomplish in LabVIEW. Just reading a TCP stream is easy, but I have to assume that you want to do something with what you rea
d.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(2,560 Views)