01-04-2016 03:47 PM
Hi,
I am trying to synchronize three different modules (NI 9223, NI 9215 and NI9213) each acquiring data at different sampling rates (e.g. 9223 = 1000hz, 9215 =100hz and 9215 = 2hz) and write separate data files for my task. I am using a ethernet cDAQ-9188 and all modules are in single chassis. There is an external trigger (which comes from an external source) to start acquiring data which is hardwired connected to PFI0 channel in the chasis. What I want to do is: whenever the trigger is high, acquire 10seconds of data according to different sampling rates mentioned and write in separate data files. I have followed the procedure mentioned in http://www.ni.com/tutorial/5376/en/
Here is a snapshot of the block diagram
Now, the problem I am facing is the "medium rate data (NI 9215)" and the "Thermocouple data (NI 9213)" is acquired and written immediately after I start the running the labview program. The fast rate data (NI 9223) is not written and waiting for the trigger signal. And then it throws up an error 200284. If I just do a finite rate sampling on NI 9223 alone (without adding/trying to sync with other modules) with waiting for trigger it works without any problem.
Labview files are attached.
Any suggestions highly appreciated and Wish you all Happy new Year.
Thanks,
Roy
Solved! Go to Solution.
01-05-2016 03:07 AM
Hi Roy,
the "medium rate data (NI 9215)" and the "Thermocouple data (NI 9213)" is acquired and written immediately after I start the running the labview program.
Yes.
You forgot to set a start trigger with those DAQmx tasks!
And then it throws up an error 200284.
The error description says something like "use a higher timeout value". Did you try this?
01-06-2016 11:18 AM
Hi GerdW,
Thanks for your response and suggestion. Adding separate start triggers for NI 9215 and NI 9213 worked with same source (PFI0), however initially didn't think about it as after going through the tutorial (http://www.ni.com/tutorial/5376/en/) it seemed like the salve tasks (9215 and 9213) would wait for the master task (9223) trigger and then only start acquiring data. And I thought that is why I had them read later in the sequence.
Also, one more thing the error 200284 was fixed after using -1 as time out value using which it reads data as soon as it is available. Ideally, time out would be 10 (samples per channel/sampling rate = 10 for this case). What was suggested in the error dialogue box to use a higher time out value didn't help though!
Any thoughts? I know now it works but still trying to understand why and how it works in detail.
Best,
Roy
01-06-2016 11:55 AM
Hi Roy,
the error 200284 was fixed after using -1 as time out value using which it reads data as soon as it is available. … What was suggested in the error dialogue box to use a higher time out value didn't help though!
You know the meaning of using the value "-1" for timeout?
Infact it means "wait forever", which I would interpret as "higher timeout value than 10"… 😄
Ideally, time out would be 10 (samples per channel/sampling rate = 10 for this case).
Ideally you would reserve more time than is needed/expected for your DAQ task. You don't want to get into errors because the sample rate engine needs 10µs (or so) more than expected…
01-06-2016 12:44 PM
Oh no! It was my mistake in understanding!
Thanks for clarifying..