01-26-2015 02:30 PM
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
01-26-2015 04:25 PM
Show us how you are building your data and sending it to the shared variable.
01-26-2015 05:15 PM
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?
01-26-2015 05:52 PM
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.