02-02-2016 01:26 AM
I have a main vi, it consits of a state machine. The Settings State of the state machine is supposed to pop-out the SubVI which will allow me to choose what Analog channels to use. However my problem is that, when I close my subVI the changes I've done does not apply to my main VI.
02-02-2016 02:24 AM
02-02-2016 02:25 AM
I need to change the Channel for Analog Input, I can choose Analog Channel In 1, or Analog Channel In 2, or I can display them both in my waveform graph
02-02-2016 02:26 AM - edited 02-02-2016 02:27 AM
Of course not. You are not passing the data out. You will also need to stop your task, set the sample rate again, and then restart it. And you will want to store your number of samples to read in a shift register.
Edit: Looking at your code again, I think you will benefit from not having your initialization outside of the state machine. That should be moved into your settings state and replace what you currently have in there.
02-02-2016 02:38 AM
What functions do I need to pass my data? Part of this program is that you dont need to press the stop button. So when I close the settings pop-up window, the changes I applied (selecting a different channel from Analog In) will automatically apply once I press the Acquire button once again.
02-02-2016 02:42 AM
@jamison.suade wrote:What functions do I need to pass my data?
You already did it once at the start of the VI.
02-02-2016 02:55 AM
02-02-2016 03:03 AM
I'm refering on what functions do I need to pass, something like references.
02-02-2016 03:20 AM
@jamison.suade wrote:I'm refering on what functions do I need to pass, something like references.
You need to pass the values you set in the settings VI out of the settings VI, just like you did with the first call to it.