08-26-2015 09:50 AM - edited 08-26-2015 09:52 AM
Hello,
I am pretty new to LabView. I am trying to carry out data acquisition on a reactor here using CDAQ. I am on the process of writing a code that would operate sequentially: heat up, hold the heat for a certain peroid of time specified by the user and cool down. I am facing lots of error due to my ignorance in LabView Environment. Right now, I am trying to get reaction time from the user and carry out the function in a while loop for that specified amount of time and stop the function after the time elapses. This was pretty straight forward, however, I want to specify the elapsed time during the run in hh:min format but I am not quite sure how to do it. I did some research over this but did not get any clarity. Any guidance would be great!!
Thanks. I have attached that part of my code for you to understand better.
Solved! Go to Solution.
08-26-2015 09:54 AM - edited 08-26-2015 09:56 AM
I can't open your code because I only have LV2014, but I can point you in the right direction. I'm going to start to see why Snippets are so helpful on here I think.
Are you showing the timestamp in some other form already? If so, is that indicator a string, or a Timestamp indicator? If it's a Timestamp indicator, you can easily change the Display Format to be what you want. If it's a string, then you'll have to use your own string manipulation to display it the way you want.
If you aren't showing the timestamp at all yet, then maybe you are just asking how to get the elapsed time in the first place. The Elapsed Time VI is very helpful in this case (Timing palette).
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-26-2015 09:59 AM - edited 08-26-2015 10:03 AM
Here is the screen shot of my original code for your reference. I am not using time stamp. I am trying to get it from the elapsed time function. The output is by default seconds and so i used a simply mathematical formula to change it to hh and minutes, howere, I am not sure how to display this value now as a single output.
08-26-2015 10:05 AM
Aha. All you need is a numeric indicator. Right click the indicator on the front panel after you've made it and click Display Format. Change the display format to Relative Time and voila!
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
08-26-2015 10:12 AM - edited 08-26-2015 10:19 AM
just to add, format string of relative time>>click radio button "Advance editing mode">>>insert Format string "%<%H:%M>t"...no need for the extra functions
08-26-2015 10:12 AM
Oh my god, it worked. So simple. I think I am just out of my mind.
Thanks.