LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a network shared variable of type cluster into Labwindows CVi

Hi,

 

I need to read a network shared variable (updated in Labview) in LabWindows CVi. The network shared variable is an array of clusters.

 

How do i do this?

 

Please help.

 

Thanks,

Alifiya

0 Kudos
Message 1 of 3
(3,723 Views)

Hello Alifiya - 

 

Currently, CVI does not support reading an array of structures from a single network variable.  You will most likely need to break out each array element into it's own network variable, and write them all individually.  To see how to read structs (clusters) in CVI, check out the example 3DSimReader.

 

Let me know if you have any other questions

 

NickB

National Instruments 

0 Kudos
Message 2 of 3
(3,706 Views)

Actually - there is another possible workaround...

 

In LV (certainly not my expertise...), you could flatten the array of clusters to a byte array, send the byte array , and finally reconstitute the elements in CVI.  I created the following array of clusters, and then flattened it to a byte array:

 

lvtesting.png 

 

The code that parses this very specific byte array is attached below (you will of course have to modify it to fit your needs - the memory window in CVI can be a huge help here).  Take a look at it, and feel free to let me know if you have any questions.

 

NickB

National Instruments 

0 Kudos
Message 3 of 3
(3,703 Views)