12-06-2024 10:30 AM
I posted recently here about an application I'm developing in LV2022Q3, 32-bit on Win10 using multiple PXIe-4302/3 and 4353 devices in PXI-1085/95 chassis. The application has multiple AI Tasks running at different speeds. Note that PXIe-4302/3 devices each have 4 timing engines, so they can support up to 4 simultaneous tasks/operations (so long as there is no channel overlap between tasks). The 4353 type has only 1 timing engine.
I am currently developing examples of all the configurations that the application is expected to support so I can prove that they work and refine the overall approach without the "overhead" of the whole application. In my recent post I eventually found the example I was seeking, but it failed to properly identify the AI Start Trigger terminal of the master task, which is needed as the trigger source for all (only 1 in the example provided below) slave tasks. I fixed the "Get Get AI Start Trigger Terminal Name.vi" code such that it works properly if a 4353 device is the master. However, the same code fails if a 4303 device is the master with the following error:
The code is included below. As you can see, I am 1) defining the AI channel(s) 2) setting the sample clock 3) syncing the clock with the 100 MHz source and 4) setting the sync type before querying the terminal. How is this task not yet reserved? All that remains is to START the task, but slave tasks must be started BEFORE the master task (which means the trigger source must be defined) to ensure that all tasks start simultaneously.
Any ideas or suggestions as to why this approach does not work with 4303 device as master?
12-06-2024 05:06 PM
I don't have a new enough LV version at hand to open the code, but it sounds like you need to make a call to "DAQmx Control Task" to reserve or commit the task prior to querying and starting. See this link about the DAQmx Task State Model for a little more info. And even more details have been discussed in the forums over the years.
I would recommend "commit" as that covers as much overhead as possible prior to start.
-Kevin P
12-06-2024 07:22 PM
It worked after I reserve the task.
Reference: 当在我的cDAQ或者SCXI机箱中查询端子时为什么会报错-200983
The second generation cDAQ chassis includes three analog input timing engines, which allows three sample clock timed analog input tasks.
By default, once a task has been reserved, the DAQmx driver selects one of the available timing engines for the current task. If the driver has not selected a timing engine, the timing and triggering related properties are not readable.
Before querying any properties related to the assigned timing engine, you need to manually reserve the task or assign a timing engine yourself.
You can reserve a task using the DAQmx Control Task function:
You can manually assign a timing engine using the Sample Timing Engine property node. The different timing engines are assigned as follows: 0 for te0, 1 for te1, and 2 for ai:
Note: This error also occurs with some SCXI tasks, which can be reserved using the same method.