04-25-2017 07:49 PM
Hi everyone,
Here I am asking for help on the dynamic sequence input control. To be specific, I have 4 Boolean controls, labeled as A,B,C and D. In a cycle number N using a for loop, for example, we may need 10 sub cycles for A and B on for 5 sec, 10 sub cycles A and C or DA for 2 sec and so on so forth. The number of the sub-cycles and sequences could be different each time. So do you have an easy way to achieve this in Labview? We have our hardware programmed with labview and used for a while for fixed recipes already, for this upgrade purpose, it would be much more convenient to keep everything in this environment.
Thanks in advance
Solved! Go to Solution.
04-25-2017 08:21 PM
I don't complete understand what you are describing. But it sounds like what you want is a State Machine architecture. Search the forums and LabVIEW examples. Look at File >> New ..... and look for a template for that.
04-25-2017 08:25 PM
I wonder if you could describe how you want to input the number of cycles? It sounds like you already have working code for 'fixed recipes', which I'm guessing might involve file I/O or block diagram constants. Do you want to have a dialog or some numeric controls to set the number of subcycles and duration, for example?
04-25-2017 08:29 PM
Sorry for the confusion and thanks for your help. Here I describe it as following:
Total Cycle : N times (through a for loop)
Sub cycle1: n1 times with A first on for 1 sec, then B on for 5 sec.
Sub cycle2: n2 times with B first on for 3 sec, then A on for 2 sec;
Sub cycyle3: n3 times with A first on for 1 sec, then C for 1 sec, then D for 10 sec.
...
The sub cycle(n) is not fixed and the Boolean sequence could be changeable.
Hope this time I make myself clear
Best
04-25-2017 08:33 PM
04-25-2017 08:35 PM
I just want the time and sequence are all input as controllable
04-25-2017 08:46 PM
All of that would be part of an array control.
The state machine would iterate through all the steps, and iterate through each line of the arrays as you progress.
04-25-2017 09:23 PM
04-25-2017 09:27 PM
Thank you for your help, but I am using Labview 2013, and I cannot open your ctrl file. It seems close to what I need.
04-25-2017 09:34 PM