04-30-2014 11:06 PM
Hi,
I'm trying to make a vi that either increases or decreases the output voltage from my DAQPad-6259. Right now, the vi that I made requires the user to manuall switch between the increasing or decreasing cases.
I'm wondering how I can make this thing run autonomously until I make the program stop. This is definitely a very newbie question but I can't seem to figure an efficient way of handling this problem.
I'd appreciate any help that you guys can give.
Cheers.
Desperate person
Solved! Go to Solution.
04-30-2014 11:41 PM
I'm not entirely sure what it is that you are trying to do but if you want to get the program to run continuously (Without needing the run continuously button) then simply put a while loop around all of the program so far and fit it with a stop button. That should mean that until you press the stop button the program will either run so that the voltage changes in the up or down direction.
Although on that note I might reccommend using a single DAQ function placed outside of the case structure, this will resolve or prevent a number of issues if you simply pass the results from the increasing or decreasing out of the case structure to the single DAQ.
05-01-2014 12:55 AM
To make Your application run continously and shift between the 2 cases, You'll need to add a While loop, and a shift register.
The value of the boolean in Your shift register is then inverted for every iteration of the loop. Like so:
/B
05-01-2014 10:28 AM
You might want to have a good read about how State Machines work.
05-01-2014 10:33 AM
05-05-2014 03:37 AM
Thank you for your response.This is exactly what I was looking for. Thank you for your help. I guess what was lacking was the shift register. Thanks again for your help 😄
BCL@Servodan wrote:
To make Your application run continously and shift between the 2 cases, You'll need to add a While loop, and a shift register.
The value of the boolean in Your shift register is then inverted for every iteration of the loop. Like so:
/B