JoshuaDAQ Posted January 19, 2012 Share Posted January 19, 2012 Hi, i'm a newbie here and I'm still not too familiar with the forums so I apologise in advance if this has been asked before. I use DAQFactory to control the analog output of LabJack U6. I can only increase the voltage with certain interal by continuously clicking the button . how can I make voltage increment automatically ? Thank you very much! Link to comment Share on other sites More sharing options...
AzeoTech Posted January 19, 2012 Share Posted January 19, 2012 Use a sequence. The script would look something like this: while(out[0] < 5) out = out[0] + 0.1 delay(1) endwhile The above sequence will increment a channel (or variable) by 0.1 every second until it reaches 5. Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 19, 2012 Author Share Posted January 19, 2012 Thank God! You give me a big help! Bless you! Link to comment Share on other sites More sharing options...
JoshuaDAQ Posted January 26, 2012 Author Share Posted January 26, 2012 Can I make a button to change the interval of the increase. For example , I dont want to increase by 0.1, I click the button and type into 0.01 or 0.2. Is it possible ? Link to comment Share on other sites More sharing options...
AzeoTech Posted January 26, 2012 Share Posted January 26, 2012 Sure, create a global variable to store the step, probably by creating a sequence marked Auto-Start and doing a line like this: global stepSize = 0.1 Then in the sequence, replace the 0.1 with stepSize. Then in a button, select the Set To Action, and have it edit the stepSize variable. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.