LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sequence

Solved!
Go to solution
Hello, I have a question about one sequence. I stop my program and I'd like restart where I stopped. How do I do that? Thanks
0 Kudos
Message 1 of 9
(3,009 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(3,005 Views)

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?

0 Kudos
Message 3 of 9
(2,995 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 9
(2,988 Views)

Thank you very much.

I will try that :manhappy:

0 Kudos
Message 5 of 9
(2,981 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 9
(2,951 Views)

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:

0 Kudos
Message 7 of 9
(2,914 Views)

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

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 9
(2,908 Views)
Solution
Accepted by topic author junim97

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

 VIStatus.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 9 of 9
(2,898 Views)