06-16-2017 02:19 PM
Hi,
In my vi, I'm trying to record the exact time when I pressed the "start" button, which sends a signal to a relay. Could someone point me to the right function in the labview to use? I tried several in the "Timing" module but most of them seem to be too complex.
Thank you!!
06-16-2017 02:30 PM
Get Date/Time in Seconds
06-16-2017 05:19 PM
Or if you are not into Event based programming you can poll in a loop.
06-17-2017 12:08 PM - edited 06-17-2017 12:18 PM
@Cheeseki wrote:
In my vi, I'm trying to record the exact time when I pressed the "start" button, which sends a signal to a relay.
Terms like "exact time" do not exist in programming, you always need to specify what kind of jitter is acceptable. (Seconds? milliseconds? nanoseconds?). Also there is slight (and possibly random) delay between the time the start button is pressed and the relay reacts. Which time is more important?
Are you interested in absolute time (date, time) or e.g. a relative time of other event (other button presses, system response, etc.) compared to this button press.
What are you doing with the time information? For example are you waiting for a system response?
Is this on plain Windows, RT, or FPGA? Is this a button on your front panel or a physical button connected to your DAQ hardware?
Until we have a much clearer picture of your application, we cannot answer the question.
06-19-2017 09:00 AM
Hi altenbach,
Thank you for the reply. The relay will trigger out an accident in the system, and the temperature, pressure, O2 concentration etc will response to the accident. The time when the relay reacts is of interest but can it be recorded because of the random time delay? As to the accuracy, seconds will be fine.
It is on plain windows.
Thank you!
06-19-2017 09:01 AM
Hi aputman,
Thank you for the reply! I'll try it with the system.
06-19-2017 09:02 AM
Hi RTSLVU,
Thank you for the reply! I'll try it.
06-19-2017 12:08 PM
So, the button press basically defines "time zero" for the remaining measurements and absolute "date&time" is less important. You still have not told us about your hardware, but if you would do a hardware timed acquisition on all channels, and also measure the relay output on one of them, you'll have everything on the same accurate time base and you can analyze everything later.
06-19-2017 03:45 PM
@aputman wrote:
Get Date/Time in Seconds
aputnam, Look at the left hand side node
06-19-2017 04:09 PM