Thanks a lot for your help, Mike! The case structure is working perfectly to timestamp a button press event.
I tried to melt this part with my data aquisition process, which is checking a digital input line for signal change.
Every time the signal changes, a boolean led is blinking.
So I tried to connect the boolean led in my daq while loop to the write loop containing the case structure.
I´ve got two boolean leds now, one in the daq while loop and one in the case structure.
If I got a signal change on my digital in port, only the one in my daq while loop is blinking, the one in the case structure for timestamping this event is not blinking, and so no timestamp data is written.
I tried a to use only one while loop for both daq aquisition and write, but it didn´t work.
How can I send the boolean event (led blink) in my while loop to the case structure?
Can anyone tell me what I´m doing wrong or how to accomplish this task?
Kind regards,
Thomas