Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ module (NI PXIe-6363, PXI): individual triggers for concurrent but separate, time-sensitive measurements (AI) / outputs (AO) in DAQmx

Dear NI-DAQ experts,

 

We use a NI PXIe-6363 DAQ module in a NI PXIe-1082 PXI chassis and a NI PXIe-6544 HSDIO module to generate the backplane triggers (to be received by the DAQ). LabView 2015 (32bit) with DAQmx is in use.

 

Objective: individual triggers for concurrent but separate, time-sensitive measurements (AI) / outputs (AO) shall be used in DAQ tasks. All the action happens within 2 us, hence having two consecutive tasks is not possible(?).

 

Status: See attached (simplified image) of VI. I tried to start two individual DAQmx tasks which have separate triggers defined. The triggers are send correctly and the code seems to work with only one task running at the same time. I suspect the "shared" sample clock to be the issue. I always get errors when running this VI (= two concurrent DAQmx tasks).

 

Question: Is it possible to carry out two DAQmx tasks concurrently? If combined into one task, how can I assign the triggers to the individual actions (PXI_TRG_0 to AO, PXI_TRG_1 to AI)? 

 

 

Thanks a lot!

 

Timo

0 Kudos
Message 1 of 4
(5,486 Views)

 

1. Yes, you can definitely run an AI task and an AO task concurrently on the same board.  (Note however that you can't have two separate clocked AI tasks or two AO tasks concurrently on the same board.  You would need to put all the AI channels in a single task, likewise for AO.) 

 

2. In your AI task, you need to call DAQmx Start *before* you call DAQmx Read.

 

3. In both your AI and AO tasks, you are only reading/writing a single sample value.  You're going to need to be using arrays or waveforms for your clocked task.

 

4. You are erasing any errors in the AI and AO tasks before merging them with another error cluster which would appear to be the source of the visible error.  You've been having others due to #'s 2 & 3 above, you just weren't being made aware of them.

 

5. In LabVIEW, go to the Help menu and choose "Find Examples...".  Search for both the input and output examples containing the words "Voltage" and "Finite".   You can use these as known-good code to guide you in troubleshooting your own.  Especially when you can't physically get to your backplane trigger signals to verify them with a scope.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
Message 2 of 4
(5,468 Views)

Dear Kevin,

 

Thanks for your reply and hints. I made the according changes (see screenshot). However, I keep getting "Error -229770 occurred at DAQmx Create Channel" for both the AI and AO task. Even after rebooting the system. The error is created at both "Create Task" locations. I cannot find a reference to this error code.

 

The idea:

AOUT - single channel, negative ramp (or any waveform with finite elements / 1D vector). Starts at received HW trigger (TRG0).

AIN - single channel, either measures single value or finite number, relevant starting from received HW trigger (TRG1). 

 

Could I place the two tasks into one and assign a specific hardware trigger to each the AO and AI? Could it be caused by the shared sample clock resource?

 

P.S.: Alternatively, I thought of starting both AI/AO at the same time and using a reference trigger on AI to mark the spot where relevant samples are coming in. How is this done best? Thanks a lot!

 

Best wishes,

Timo

0 Kudos
Message 3 of 4
(5,456 Views)

 

No, you definitely can't combine the AI and the AO into a single task.  It's correct (and necessary) to make them into separate tasks as you've been doing.

 

I dropped down an error ring constant and it shows a whole bunch of error codes surrounding -229770 that all carry the exact same error message, "Internal Software Error occurred in MIG software. Please contact National Instruments Support."    Here's help on the neighboring error -229771.  

Especially note the suggestion to be sure to run with Administrator rights when you install DAQmx.   Maybe you need to reinstall DAQmx?

 

I need to take back part of my last message -- I saw the erasing glyph on the DAQmx Clear calls and wrongly took it as a call to "Clear Errors" which has a similar graphic.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 4 of 4
(5,449 Views)