Hello,
I am looking to develop a system that samples a number of data channels at ~50KS/s, reading the data into a buffer. Every 10ms I want to read just a few samples to check if a condition threshold has been passed - eg the pressure has gone above 10kPa.
If the condition has occured, I want to read all the contents of the buffer so I then have the condition of the system for the last ~5seconds leading up to the event.
- I have set a Task up to read a finite number of samples at 50Ks/s into a buffer which works out to be 5s long.
- Every few milliseconds I use the Read command to just read the most recent bit of data, so I set the 'read number of samples' to 100 or so.
If the process routine detects an error it creates an event which issues a Read command with teh 'read number of samples' set to -1, ie all.
The problem is though, will the Read All command then sit there for 5seconds gathering a buffer full of data when what I want it to do is give me the last 5 seconds of data?
I hope this makes sense, I would appreciate any thoughts.
Best regards,
Martin