Operating on streamed data

Recommended Posts


I am sampling 2 analog channels at 20khz, looking for 1ms pulses (~ 10 pulses in a 5s window) and measuring the time between the pulses.

I have the streaming working and have the channels with 5s histories.

The plan is to run a function on the Channel's event to populate an array of timestamps.

I understand that the Channels' events are called when a block is transferred in streaming mode.

Is there a way to determine the size of the data array in a block, so that I operate only on fresh data in the channel's event?



Link to comment
Share on other sites

No as that is determined by the LabJack UD. However, you can get around it by using standard DAQFactory tools, namely subsetting by time. Simply use a variable to store the time of the last data point you processed, then you can just get the new data points by doing something like:

myChan[systime(), lastTime + 0.00001]

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.