02-08-2010 05:31 AM
Hello everyone,
I am acquiring data from 4 analog inputs ai0:3 ( voltage ) in a continuous mode, display the data (charts and graphs) and stream the data to TDMS files in a consumer loop.
The same time I want to have the ability to save '' time windows'' of my acquisition. For example, I wanna be probing ai1:2 and when the voltage exceeds a certain value , i.e 0.5V, I can trigger with an analog reference and get a certain amount of samples (finite samples) after the trigger and before that ( pre- trigger samples). I am aware of how I can achieve that, a NI example is most helpful : http://sine.ni.com/devzone/cda/epd/p/id/4840 .
The problem is this : I do not want to stop the continuous acquisition which is already undergoing. If I try to start a new task ( somehow '' copy & paste '' the example) I get , as expected, error -50103, "specified resource is reserved".
So, is there any way of achieving this task without having to bump into this resources reserving problem? And if there is not a way could you suggest a way to perform this pre-trigger and trigger sampling?
Please, find attached a snapshot of the code. I am using a PCI-6254 with two SCB-68.
Thank you very much and looking forward for you advice!!
Best regards,
Panos
Solved! Go to Solution.
02-09-2010 04:08 AM
03-02-2010 05:19 AM
muks wrote:
Have you seen this?
Hello muks,
Sorry for the delayed response. The information in this link were very useful. So, it seems to me that I must 'wrap' all the measurements I want to perform with those analog channels into one single task in order to avoid the reserved resources problem.
Thank you very much!
Panos
03-02-2010 05:40 AM