06-06-2011 10:06 AM
All you have to do to do that is to take the value out of the greater or equal on the array size and feed it into the loop that keeps track of what step you are on and have it rest the index back to zero when the profile is done. See the attached vi.
06-06-2011 10:52 AM
That seems to cause the sequence to remain stuck on the first selection rather than cycle through the different selections repeatedly.
06-06-2011 11:43 AM
I needed to change the logic on the true false case for the index counter. Here is a fixed copy.
06-06-2011 12:04 PM
Brilliant, Many thanks for all of your help!
It is much appreciated.
06-06-2011 12:17 PM
That is what we are here for.
You are welcome
06-17-2011 07:13 AM
Hi,
I have a few more questions regarding that VI.
Is it possible to have a single preliminary stage for a specificed time which is not included in the repeated series of sequences?
I have it set up to run 3 modules on the cDAQ, is it possible to have an extra stop button which integrates all 3 loops so they stop together.
The elapsed time shows where each module is in the sequence. How do i put in an overall Elapsed time from when the VI first runs.
The sequence that is currently setup:
Time 1: 11000000, Time 5: 00011000, Time 7: 01000010, Time 12: 00000000 etc. When i change this and save the file it always reverts back to that setup. How can i save different sequences to file.
Cheers
06-17-2011 08:20 AM
@ucbeoha wrote:
Hi,
I have a few more questions regarding that VI.
Is it possible to have a single preliminary stage for a specificed time which is not included in the repeated series of sequences?
I have it set up to run 3 modules on the cDAQ, is it possible to have an extra stop button which integrates all 3 loops so they stop together.
The elapsed time shows where each module is in the sequence. How do i put in an overall Elapsed time from when the VI first runs.
The sequence that is currently setup:
Time 1: 11000000, Time 5: 00011000, Time 7: 01000010, Time 12: 00000000 etc. When i change this and save the file it always reverts back to that setup. How can i save different sequences to file.
Cheers
Is it possible to have a single preliminary stage for a specificed time which is not included in the repeated series of sequences?
It is possible. I am not sure what you mean here exactly though. Do you just want to have a sync step or a delay? Since you have an event structure you could add an event that is sent to all three loops to make them all do something.
I have it set up to run 3 modules on the cDAQ, is it possible to have an extra stop button which integrates all 3 loops so they stop together.
If you take the first stop button and add an event to look for that one button in all three loops then it would stop all three loops. You do not need a stop button for each loop only one.
The elapsed time shows where each module is in the sequence. How do i put in an overall Elapsed time from when the VI first runs.
This would be much the same as the timing that we did for the rest of the vi. only you would need a loop with a timer that shows the time. I would use a while loop with an event structure so that you can still push one stop button to get every loop to stop at the same time.
The sequence that is currently setup:
Time 1: 11000000, Time 5: 00011000, Time 7: 01000010, Time 12: 00000000 etc. When i change this and save the file it always reverts back to that setup. How can i save different sequences to file.
This one is more complacated. You will need to save the cluster array to a file and read it and place it back into the cluster array on open. There are many ways to do this but you are going to have to find your own way. You may need encryption, you will need to allow for the operator to pick which file they would like to use. There are many things that you will have to do. I have a version fo this for sale that is finished and with nice graphics and a touch screen interface take a look at this.
http://forums.ni.com/t5/LabVIEW/Decal-Custom-Control/m-p/1544212
I show some of the interface to my finished product on this discussion.
06-18-2011 12:12 PM
Hi,
Thanks for your advice.
I have sorted out the elapsed time, and i have tried to add an overall stop boolean by using the first loop's stop boolean to control all of the other loops.
I like the way that the front panel retains the individual stop buttons for each module but at the moment i havn't got the overall stop boolean controlling the rest, rather it is a pre-requisite to the other stop booleans working.
'It is possible. I am not sure what you mean here exactly though. Do you just want to have a sync step or a delay? Since you have an event structure you could add an event that is sent to all three loops to make them all do something.'
What i am trying to do for is at the start of a run for each module independently is have a stage that will set the valves to a by-pass setting (01001000) for different times for each module depending on the user specification.
So i need this stage to be out of the repeated loop as i only want it to occur at the beginning (time 0 seconds) for a specific time.
06-20-2011 07:11 AM
So when you click the stop button below the array what do you want to happen? Do you want a start and stop individually for each loop?
If you want an initialization step we just need to make the loop slightly more sophisticated. Lets take care of a few more things first.
Do you want this initialization step so that a user can click a button to put it into this state or will it automatically happen when the press start?
06-20-2011 07:29 AM
Ideally i would have the 1 main stop button to switch all digital outputs off (rather than stopping them where they are in the sequence).
Along with that it would be useful to have the individual stop buttons below each array to halt the sequence at a particular point (while the VI was still running)
The initialization step should run automatically at the beginning of the VI when the user presses start.
Though for each module the time length of this initialization step is different so the time settings for these pre-sequence steps must be independently controllable (as are all of the time settings for the 3 modules now)