From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

acquiring data in one phase of a state machine and saving it in another

I am acquring my readings in one phase of a state machine. I then stop my readings and ask if the user would like to save these values.

If the answer is no, control transfers to another state that ends the program.

If the answer is yes, control transfers to the state that asks for the file name, etc.

How do I get the array I created to save in another phase of my state machine?

Thanks

Terry
0 Kudos
Message 1 of 3
(2,307 Views)
The method I prefer is to use a shift register on the while loop to update the data in the state machine. Typically, I use a cluster to hold all of the data, then you can bundle or unbundle as needed in each of the states. Each state will, of course, need the cluster wire to pass through it.
>

"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 3
(2,307 Views)
Terry,

A state machine by definition uses Shift Registers to pass data from state to state.

A little twist that I use, is that I throw all of my data into a single shift register, bundling and unbundling as I need the data or store it. This is actually quite easy to implement, and results in a very flexible and scaleable state machine.

If you have trouble with the shift register, or with my tip, either post here, or email me.
0 Kudos
Message 3 of 3
(2,307 Views)