05-31-2009 11:01 AM
Dear Labviewer's. We have an instrument which is controlled by a labview program. The program consists of a bunch of operations in sequences and every operation is implemented using staced/flat sequences. At a given point in the sequence, I want to ramp a external furnace(owen) to a given temperature, during a period of 5-10 minutes, to do so, i made a subvi that works for this purpose (using a while loop). If I put the subvi in the structure (stacked/flat sequence) the overall process holds there until my subvi is finished, but I want the overall process to progress to the next sequence just after the subvi starter. How do I implement that?
Any help is highly appreciated
Optimistic regards
Morgan
Solved! Go to Solution.
05-31-2009 11:34 AM - edited 05-31-2009 11:39 AM
Pollman wrote:The program consists of a bunch of operations in sequences and every operation is implemented using staced/flat sequences.
This is a very poor program design and it seems you are starting to understand why. 😉 Sequences must finish in order and there is no escape. They also force rigid and unmaintainable code that does not scale well.
One of the wonderful features of LabVIEW is the fact that it can do many things in paralell, so what you need to do is implement a clean state machine with a UI loop and one or two parallel loops linked e.g. with a queue. One of the loops would do the ramping. Look at the design patterns available as templates or do a search for "state machine" here in the forum. ALso have a look at the JKI state machine, for example.
It is impossible to give more detailed advice without seeing your actual code. If you don't mind, please attach it here so we get a better idea about your problems. 😉
05-31-2009 12:15 PM
06-01-2009 04:40 AM
Tanks a lot for your reply. Yes, it might be a bad design but it has been working very well as it is. But now I encounter the drawbacks :). Anyway, I will make an another loop for now, as suggested, and learn more about state mashines. Maybe a redesign would be better.
Tanks
Regards
Morgan