LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping track of test data to write to CSV file

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(2,631 Views)

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.

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 6
(2,623 Views)

Hello,

 

A Memory VI is probably the best: here is an example of the most simple Memory VI possible:

VGF set.PNG

VGF get.PNG

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!

0 Kudos
Message 3 of 6
(2,621 Views)

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?

0 Kudos
Message 4 of 6
(2,616 Views)
Solution
Accepted by topic author QRP

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.....

0 Kudos
Message 5 of 6
(2,613 Views)

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.

0 Kudos
Message 6 of 6
(2,603 Views)