07-29-2009 12:04 AM
Dear Friends,
I have a small problem, I want to run my labview program for specified amount of time, Say for example it might be 1 hour or 5 hours or 10 minutes or even milliseconds(The time will be specified by the user).
How to write programs for this
And I want to get the system time in an instance, how it can be achieved,
Could you please help me?
Regards,
Rathan
07-29-2009 12:40 AM
Hi Rathan,
you can use the "Get Date/Time in Seconds" function to get the system time. How complex is your program? You can use a parallel running queue with a timeout connected which represents your run time. If the queue timed out you can quit all other tasks to exit your program.
Mike
07-29-2009 04:44 AM
Hello,
Can you post a picture of your VI. You can use the timeout functions as my friend has said. there are yet other alternatives too... But it needs understanding of your VI ..
Regards,
Nizy...
07-29-2009 05:35 AM
hi..
u can use timestamp function to get the system time...
also to run a program for specified time u can use elaped time function which will give the output after the specified time will elapsed.it will be in boolean...
so that can be used to stop youe while loop if you are using it in program.
07-30-2009 03:21 AM
Hi,
Herewith my screenshot attached. There are thre inputs thres, tempX, xValue, it is in side the while loop.'xValue' will be acquired every iteration, It will be saved through shift register and acquired to 'tempX' for the next iteration, 'thres' is a constant value. I'm doing some logic, and calculating the dvalue and convert it to a string and concatenate it with end of line character, then after writing it into a file.
In the logic, inside of the functional logic I'm assigning some values dValue, if the logic is true or else dvalue will be 0
What I require is I don't want to write the dValue in to a file, if it is equal to zero. Could you please help me, how to tackle this problem?
Thanks.
Regards,
Rathan