10-30-2014 07:23 AM
Solved! Go to Solution.
10-30-2014 07:31 AM
Please provide more information. What sequence are you talking about? What did you try up til now? What does "stop" mean for you (does it e.g. include a reboot of the system)?
Quite puzzling,
Norbert
10-30-2014 07:36 AM
Hello,
Thank you for your help.
I'm sending you my program.
I apreciate if you could take a look.
I have 4 tanks that are always moving the fluid between themself.
For example:
If stop my program between tank 3 and 4, how do I do to the program restart where it stopped?
10-30-2014 07:43 AM
I am sorry, but i dont see any sequential flow in your application. All i see are five concurrent running loop with a lot of race conditions.
You should start working with a state machine. In this case, you can add a "shutdown" case which saves the last active state to file. An "init" case (which is static first case for execution) loads that file, resets it and proceeds to the next (saved) state for execution.
This will work if init indeed can initialize everything for every case.
Norbert
10-30-2014 07:48 AM
Thank you very much.
I will try that :manhappy:
10-30-2014 10:03 AM
In general, to continue where you quit, you need to save some status to a file which you read back at the start of the program.
/Y
10-31-2014 10:08 AM
Hi,
I'm sending my program with the flat sequence so you can see what I want to do.
Have the program running and I control the level of the tanks with those numbers controlers. But in my process I'll have pressure transmitters, level sensors and etc instead numbers controlers.
So... If I stop the program when the liquid are moving from tank 3 and tank 4 my EV34 and my B34 have to be on when I restart the program.
Thanks! :manhappy:
10-31-2014 10:14 AM
A sequence structure is NOT a statemachine. In fact, it makes things even worse compared to your original VI.....
That being said, i urge you to go through the available online material for LV or better to attend a LV class at NI.
Norbert
10-31-2014 10:37 AM - edited 10-31-2014 10:39 AM
The absolutely easiest is to combine the values you want to save to a cluster and use Read/Write to binary file.
Then you'll notice that the saved values is of no help as your program writes to the booleans in every loop in every test, so you need to implement some way to jump to your active tank. A State machine comes to mind.
Also your top loop can cause your tanks to run twice, depending on what the values is of Tank4 when you start. That's probably not what you want.
Meh, that snippet became strange ... anyhow, you need to start with something similar to the binary read in the lower right and finish with a similar Write.
/Y