KWaris Posted April 15, 2012 Report Share Posted April 15, 2012 I created a cluster containg 10 indicators of different types. I then created the array of this cluster. Each row of the array represents the data of each cycle. Here is the problem. Say the first control in the first row of the array is start time. When I programatically add (lets say time) to this cell using insert into array function, All the cells in 'start time' column fill with this number. I think there might be some option to stop the array from doing this which I am not familiar with. Any comments? Please find attached this control 6286_Operation Result Array.ctl Quote Link to comment
ned Posted April 15, 2012 Report Share Posted April 15, 2012 Can you attach a VI that demonstrates what you're doing, and not just the control? Quote Link to comment
asbo Posted April 15, 2012 Report Share Posted April 15, 2012 There is not a way to do this. If you populate one element of a cluster, the rest must have values. If you leave them unspecified, it will default to whatever is set for that field. Using this behavior, you can set the default to sentinel values (e.g., NaN for a DBL) which allows you to detect "defaultness". 1 Quote Link to comment
stevem Posted April 16, 2012 Report Share Posted April 16, 2012 Hi Austin, I can't view your control (haven't switched to 2011 yet). It should of course, be a type definition. Attached is an example of a technique I use when dealing with arrays of clusters. In essence, you just: Work with one element of the array at a time. Change one cluster item while maintaining the value of the other cluster items. Replace the array element. I hope this gives you some ideas on how to implement your requirements. steve Array of Clusters.vi Control 1.ctl Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.