12-11-2007 08:09 AM
12-11-2007 08:26 AM
12-11-2007 02:33 PM
12-11-2007 03:34 PM
There are a couple key problems.
1. Your top loop has a run condition with nothing wired to it.
2. All your loops create a DAQ task continually in side the loops.
You will want to set up a state machine architecture perhaps with several parallel loops. Each DAQ loop should have 4 states. 1. Create task 2. Run Task, 3. End task 4. Idle. Then the boolean when true can run the state 1 immediately followed by state 2. It continues to run state 2 while the boolean is true. When it goes false, it runs 3 then 4. It will continue to run 4 until the boolean goes true again. State 4 should also have a condition to end the loop whenever your master program stop button (One you create, NOT the abort button at the top of Labview.))
12-12-2007 09:14 AM
12-12-2007 11:01 AM
Pretty much, but I'm not sure we're exactly on the same wavelength so I'm attaching a simple example in LV 8.2.1. You add a shift register to the while loop, not the case structure.
THurst wrote:
Ok I sort of understand what you are stating and I see the examples but for the life of me cannot figure it out.
What causes case 1 & 2 to run and not cases 3 & 4 using just a boolean control? Does the boolean control need to be wired to case 1 & 2 when true and use the "not true" wired to cases 3 & 4? Did that make sense?
I am sure my confusion is something to do with the shift register which is a feature I do not fully understand or even how to add to a structure. I right click on the case and see no option to add shift register.
12-12-2007 11:26 AM
12-12-2007 12:24 PM
12-12-2007 02:46 PM - edited 12-12-2007 02:48 PM
Hi THurst,
I will like to step into the forum and suggest a more simple approach, if you can run this shipped example: “Cont Gen Voltage Wfm-Int Clk-Non Regeneration.vi”, and simply write a waveform with amplitude zero, before ending the task. This might be a good resource to look at: What is the Difference Between the DAQmx Stop Task.vi and DAQmx Clear Task.vi? , The screenshot might give you an idea, but basically you press the Boolean to change the amplitude of the sine wave to zero and then you stop the task.

I hope it helps
12-12-2007 05:03 PM
Thank you everyone for all your help. I was able to get what I needed from the earlier suggestions with state machine using enum and shift registers. The idea is to have three outputs
- one is just on with AO of 0.1 VDC
- Two others control seperate function generators.
When the respective boolean control is set to on the output is generated and when set to off it resets the AO to zero output. I was having trouble getting the resource released as it is the same resource.
I have attached the example.
Thank you again everyone.