05-17-2013 11:08 AM
Thank you for your quick response.
I'm trying to understand the vi. Can you please tell me if I get it right?
When pressing start, the DAQmx is started. ( Event 1: start)
As long as no other button is pressed, the data will be acquired and displayed on the two charts ( Event 0: timeout)
When STOP LOGGING is pressed, the data will be no longer aqcuired, but will still be kept in the array. ( Event 2: stop log)
After STOP is pressed, the program will be terminated.
When pressing SAVE, the data will be saved to the specified location.
I don't fully understand what notes you wrote in the program: "keep zero timeout" , "set timeout to zero" , "set timeout to infinite (-1)" and "keep current timeout". Can you explain this to me, please?
Best regards,
Dries
05-17-2013 12:03 PM - edited 05-17-2013 01:16 PM
DriesM wrote:I don't fully understand what notes you wrote in the program: "keep zero timeout" , "set timeout to zero" , "set timeout to infinite (-1)" and "keep current timeout". Can you explain this to me, please?
The next timeout for the event structure is decided in each event and placed in a shift register. If start is pressed the timeout is set to zero and the timeout case executes continuously (replacing your inner loop). Firing other events sets the timeout to infinity (-1), stopping the acq.
05-18-2013 05:26 AM
Thank you for the information.
I will try if it works as soon as possible and will keep you posted 🙂
Thanks!
Kind regards,
Dries
05-22-2013 08:12 AM - edited 05-22-2013 08:12 AM
@altenbach: I have tested the .vi.
Thes start, stop and save buttons work perfect. However, whenever the programming is running and acquireing measurements, both of the charts are constantly flashing.
The image on the charts are black for around 1 second. Then for about 0.1 second I can see the measured data on the chart. Afterwards the chart becomes black again for 1 second and the whole proces repeats itself until the measurements are finished.
( only the image on the charts in flashing, and not my whole screen)
What could be the cause of this?
I've added the vi in attachment.
Best regards,
Dries
05-22-2013 08:40 AM - edited 05-22-2013 08:46 AM
Why do you clear the history in the timeout case? That should probably happen in the start case!
(Sorry, that was my mistake. I don't have DAQ so I could not test and I must have grabbed the wrong event case for that 😉 Only spent a few minutes on this...).
You could also make a seperate event case with a "clear history" button. In that same case, you also might want to cleat the upper 2D array. Right now it grows forever and you will run out of memory at one point.
I would also try to avoid overlapping objects on the front panel.
05-22-2013 09:21 AM