07-06-2009 07:10 PM
I am using the Simple LabVIEW OI as the model for my TestStand user interface.
The sequence sends a User Message to the OI to request the string array of tests to run.
But I am having great difficulty making this string array data available to the event callback VI.
I do not want to use a global variable and so my unsuccessful method so far has been as follows:
1. Use a Refnum to the Array and pass it into the Config Event Callbacks VI via the cluster
2. The "Selected Tests" in the input cluster in the Config Event Callbacks VI is a generic Control Refnum
3. This Selected Tests (at the bottom) is then bundled and passed into the User Parameter
4. But how do I convert the Selected Tests Control refnum back into the original string array in the actual callback?
???????
Also if there is anyone that can suggest a better way of doing this then please let me know.
The bottom line is - how to get the latest data into the event callback function when it is called?
Many thanks,
Ronnie
Solved! Go to Solution.
07-07-2009 02:27 AM
Hi,
You need to make sure your cluster order matches your input cluster order.
Select the input control and select Cluster Order. Set the Selected Tests as the fifth item.
Regards
Ray Farmer
07-07-2009 11:14 AM
Hi Ray,
The 'Selected Tests' array refnum is #4 in the cluster order and matches all the way through - so I think that's OK.
In the final diagram above, I can get the Selected Tests cluster from the 'User Parameter', but it is still in the form of a refnum.
My problem is a lack of understanding in how to convert this 'Selected Tests' refnum back to the original data type (a string array).
Basically I want to get the string array from the 'Selected Tests' refnum.
As you can see from above I tried to use a property node. I've also tried to 'cast' the refnum to a 'more specific class' by choosing 'Array' but it's still ends up as a refnum.
I hope you see what I mean?
Thanks,
Ronnie
07-07-2009 04:00 PM