Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Query Start Terminal of Master Task as Trigger Source for Slave Tasks

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:

 

AI Start Trigger Terminal Issue Error.png

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?

0 Kudos
Message 1 of 3
(80 Views)

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

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 3
(51 Views)

It worked after I reserve the task.

ZYOng_0-1733534472623.png

 

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.

-------------------------------------------------------
Control Lead | Intelline Inc
Message 3 of 3
(43 Views)