LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Another LV newbie question

I am receiving some binary data from my device. The device send a block of
data based on a structure which has 16bit ints, bytes and character strings
etc all mixed.

What is the best way to decode it. In C, I can just include the structure
def and point to the starting memory location.


vishi
0 Kudos
Message 1 of 2
(2,408 Views)
Hi,
you must use "Functions->File I/O->Read file.vi".
This VI allows you to read any kind of data from your file. To specify the data type you have to wire some constant to the "byte stream type" input node. The type of this constant (or control) specifies the type of data will be read from the file.
To read such data like you described in the question you have to use clusters.
You have to create cluster of your 16bit ints, bytes and character strings in proper order and wire it to the VI's input node. Hope this will help.

Good luck.

Oleg Chutko.
0 Kudos
Message 2 of 2
(2,408 Views)