LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shared Variable based on Array of cluster

Hello,

 

I've created a shared variable which is based on an array of cluster (typedef). The cluster only contians two double elements for x-y coordinates of a point.

 

Everything seems working until I found the shared variable can only hold the first two elements when I pass an array to it.

Are there any settings I've missed?

 

Thanks

 

Yan

 

point typedef.png

 

shared variable.png

0 Kudos
Message 1 of 4
(2,888 Views)

Show us how you are building your data and sending it to the shared variable.

0 Kudos
Message 2 of 4
(2,874 Views)

Data is simply created and directly sent to SV.

 

The difference during defining the SV is:

 

Normally, when define an array SV, it allows to change the "Number of elements" (default as "2").

However, when define a typedef array SV, the option is gone. Does it then use the default number "2" as the number of elements?

 

regular array SV.png

 

typedef array SV.png

0 Kudos
Message 3 of 4
(2,860 Views)

You defined the Shared Variable as a Single Element FIFO.  That means it can only hold 1 element.

 

What can be confusing is that you defined your shared variable as an array of clusters, as opposed to the cluster itself.  If this was a multi-element instead of single element FIFO, then you could theoretically wind up with an array of arrays (of clusters).  I don't know if the shared variable engine can handle that.  In general, you can't have an array of arrays in LabVIEW.

0 Kudos
Message 4 of 4
(2,853 Views)