PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing AI Tasks with Multiple PXI 4303/53 devices

I posted a couple years ago after we upgraded an existing application to PXIe 4303/4353 devices. Now I'm working a new application (LabVIEW 2022Q3, 32-bit on Win10/11) with that same hardware that requires 1-3 AI tasks (expected to operate at 50Hz, 500Hz and 5,000Hz) that have channels assigned from among ~8 PXIe-4303/53 devices. Specifically, the 50Hz task may include (pseudo-syntax) PXI1Slot3/ai0-5, PXI1Slot4/ai13-15, and PXI1Slot6/ai28-31. All of the devices are in a single 18 slot PXI chassis (1085/1095).

 

The original application handled a single AI Task (single acq speed) with multiple channels from multiple devices without issue. This was very convenient! I built an example to verify that I could create 4 (verifying the documentation rather than just working for the 3 tasks required for my app) tasks on a SINGLE device (see attached). However, as soon as I attempt to modify any of the Tasks to use multiple devices, the code produces an error (I'll get the exact error code tomorrow when I can get access to the hardware). I assume this is because I'm using the "Onboard Clock" by default, which would need to be routed over the backplane for use on multiple devices.

 

I'm looking for example code to sync multiple channels on multiple 4303/4353 devices, and I'm coming up empty. I couldn't find any in the shipping LabVIEW examples nor with a Google search. Am I missing something? It seems like there used to be lots of synchronization examples in the first 10-15 years of PXI.

 

Issue #2

If you look at the attached code, the flat sequence structure used to loosely synchronize the Start operations among tasks will need to be upgraded. Is the best approach to set all tasks to look for a digital trigger from a single source, and after STARTing (technically ARMing??) each task to activate the digital trigger explicitly in software? Or is there a better/simpler way?

 

Thanks in advance for your ideas and suggestions.

0 Kudos
Message 1 of 4
(311 Views)

Good thing is that there are multiple timing engines on the 4303 card i.e., multiple simultaneous tasks,

santo_13_0-1732594074555.png

 

But 4353 is a scanned ADC card and probably has only one timing engine, i.e., only one hardware timed task

 

What this means is that a true flexibility of any channel group synchronized capture is challenge or may be impossible.

 

I did not get to investigate in detail but at a high level you need to use advanced synchronization techniques if you want it to be synchronized to the clock level.

 

Here are some articles to read - https://www.ni.com/en/support/documentation/supplemental/10/synchronization-explained.html

https://www.ni.com/en/support/documentation/supplemental/06/timing-and-synchronization-features-of-n...

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 4
(283 Views)

When I add a single channel from a different module to 1 of the AI Tasks, LabVIEW provides the following error:

 

Error -89137 occurred at DAQmx Start Task.vi:7220005

Possible reason(s):

Specified route cannot be satisfied, because it requires resources that are currently in use by another route.

Property: RefClk.Src
Source Device: PXI1Slot4
Source Terminal: PXIe_Clk100

Required Resources in Use by
Source Device: PXI1Slot4
Source Terminal: None
Destination Device: PXI1Slot4
Destination Terminal: RefClockInternal

Required Resources Also in Use by
Source Device: PXI1Slot4
Source Terminal: None
Destination Device: PXI1Slot4
Destination Terminal: RefClockInternal

Required Resources Also in Use by
Source Device: PXI1Slot4
Source Terminal: None
Destination Device: PXI1Slot4
Destination Terminal: RefClockInternal

Task Name: _unnamedTask

0 Kudos
Message 3 of 4
(255 Views)

I found an example of AI synchronization. For whatever reason it was not available in my LV2022Q3 instance (any of them!). I had to go back to an older version of LabVIEW to find it. I have attached it here for easy reference.

0 Kudos
Message 4 of 4
(236 Views)