08-07-2024 09:08 AM
Hello, I have somewhat of a general understanding regarding LabVIEW however I feel others are without a doubt way more experience in it then me, regardless I want to create a system that can log the current time whenever a button is pressed on (that logged time can be expressed on a string indicator) and log the current time whenever a button is pressed off.
08-07-2024 09:17 AM
@TyTibbs wrote:
Hello, I have somewhat of a general understanding regarding LabVIEW however I feel others are without a doubt way more experience in it then me, regardless I want to create a system that can log the current time whenever a button is pressed on (that logged time can be expressed on a string indicator) and log the current time whenever a button is pressed off.
I would simply configure an Event Structure with a value change Event for your button. The Time of the Event is available from the left side data node and represents when the Event fires, rather than when the Event starts processing, There is a Time to string primitive on the String Manipulation palette.
08-07-2024 09:41 AM - edited 08-07-2024 09:46 AM
@JÞB wrote:
@TyTibbs wrote:
Hello, I have somewhat of a general understanding regarding LabVIEW however I feel others are without a doubt way more experience in it then me, regardless I want to create a system that can log the current time whenever a button is pressed on (that logged time can be expressed on a string indicator) and log the current time whenever a button is pressed off.
I would simply configure an Event Structure with a value change Event for your button. The Time of the Event is available from the left side data node and represents when the Event fires, rather than when the Event starts processing, There is a Time to string primitive on the String Manipulation palette.
Someone will point out that the node outputs the millisecond timer tick.
Bonus points for the community member that actually writes the lvlib to convert ms tick to Timestamp.
Note you will need an AE that stores; the timestamp when ms was 0 , and the latest ms timer value when called.
Init would call get Timestamp and a 0ms Wait to get ms value now and subtract those milliseconds from current Timestamp to get t0
Get Timestamp from ms would:
This tells you the time of the button presses rather than the time the Event processes.