11-25-2024 05:51 PM - edited 11-25-2024 05:54 PM
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.
11-25-2024 10:12 PM - edited 11-25-2024 10:12 PM
Good thing is that there are multiple timing engines on the 4303 card i.e., multiple simultaneous tasks,
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
11-26-2024 01:29 PM
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
12-02-2024 09:46 AM
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.