From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multirate sync 9223 9215 and 9213 in cdaq 9188

Solved!
Go to solution

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

multirate_sync_cdaq9188.png  

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 5
(3,371 Views)
Solution
Accepted by topic author Roy.a

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(3,339 Views)

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

 

 

0 Kudos
Message 3 of 5
(3,305 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,295 Views)

Oh no! It was my mistake in understanding! 

 

Thanks for clarifying..

0 Kudos
Message 5 of 5
(3,288 Views)