08-23-2012 07:59 AM - edited 08-23-2012 08:01 AM
Hi, I'm new to Labview. I have a state machine in my front panel that executes a series of tests. In each test I update the panel indicators with status. My question is, how is the best way to keep track of the test data that my indicators are loaded with during the test so that at the end of the test I can bundle the test data into a cluster and send it to another VI to write my CSV file. I already have a VI that writes the CSV file, but the problem is keeping track of the data that my indicators have. It would be nice if you could just get the data stored in the indicators, but I realize there is no output node 😃 Any ideas on the best painless approach to this?
Thanks, Rob
Solved! Go to Solution.
08-23-2012 08:04 AM
Since you're using a state machine, just create a big cluster (aka super cluster) that stores your data in a shift register. You can update your indicators by unbundling the cluster.
08-23-2012 08:11 AM
Hello,
A Memory VI is probably the best: here is an example of the most simple Memory VI possible:
One advice: always use typedef for the enumerate control and the cluster when you use this kind of VI because you are going to have these controls everywhere and when you start to have a big program you are happy to be able to change them all at once if you want to.
Hope it helps!
08-23-2012 08:40 AM
Thanks for your responses. I will try just that 😃
BTW, you mentioned typedefs on my enum variables. In my state machine I have an enum variable that I have duplicated several times because each state will update the shift register with the next state. It's a pain, if I want to add a new state to the enum variable because I have to change 10 enums to add the same thing. Is this what you were refering too 😃 How would I link them together to do as you suggested?
08-23-2012 08:53 AM
Yes, It is exactly what typedef are for:
Right click on your control and select make typedef.
A new window will open with only your control in it. You can save that control and then use it everywhere. When you edit the typedef, all the controls of that type will change as well.
Basically you create your own type like "U8 numéric", "boolean" or "string" except yours can be the type "cluster of all the data on my front panel", "All the action my state machine can do", etc.....
08-23-2012 09:20 AM
Very Cool Thanks. That works Great! Hey thanks for taking the time to respond. This software is so amazing that you can spend hours just trying to figure out how things work. Thanks again guys.