PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate trigger after DAQmx AI Voltage Acquisition is complete and send to PXI backplane (NI PXIe-6363, NI PXIe-1082)

Dear all,

 

I would like to issue a trigger for a specific event to the PXI backplane (PXI Trigger Line 0..7) to other modules using a NI PXIe-6363 DAQ in a NI PXIe-1082 chassis.

 

However there are two issues:

1)  How is a trigger for the event "DAQmx AI Voltage Acquisition is complete" (general ... DAQmx task complete) issued?

 

The only allowable software-issued trigger is "Advanced trigger" which seems inappropriate here.

 

2) The "DAQmx Export Signal" VI only allows certain triggers and clocks to be exported. How can I generate any of the allowed events using the above event? Or do I need to use the DAQmx Connect / Disconnect Terminal VI?

 

Any help is appreciated. Thanks!

 

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

Hi Ideas-moose,

 

Is it possible to get a copy of your code? Would help us understand how the application has been built to communicate with other devices

 

What other modules need to be triggered from the "DAQmx AI Voltage Acquisition is complete"? Are you using the "DAQmx Is Task Done" function? 

 

I'll have a look into this further tomorrow.

 

Kind regards

Pete

Certified LabVIEW Architect
0 Kudos
Message 2 of 5
(4,168 Views)

Hi Pete,

 

A screenshot of the current LV code is attached.

 

For now a HS-DIO module (NI PXIe-6544) shall be triggered by this to proceed the scripted waveform output (script trigger received from PXI-backplane). This works fine for the DAQ start trigger and similar. Here are the steps:

 

0) Optional: Software trigger starts HSDIO script.

1) HSDIO generates part of a scripted waveform.

2) HSDIO sends Event marker trigger via backplane (PXI-TRG-1) to DAQ to start the ADC conversion.

3) Problem: DAQ shall send a trigger on another backplane port (PXI-TRG-2) back to HSDIO to signal that the ADC conversion is complete and HSDIO and proceed in its script (script trigger).

 

The DAQmx "Is Task Done" VI is not used but should work. However, how would I export the trigger to the backplane?

 

As a workaround: I thought of having another DAQmx task run in a while loop asserting the state of the "Is Task Done" VI and then send a start trigger but that is not elegant.

 

Any ideas? Thanks.

 

P.S.: I also get an Error -200474 quite often from the DAQmx which I believe has something to do with a timeout or that the trigger from the HSDIO (step 2) is not arriving there in time. I see the trigger on the oscilloscope when routing it to HSDIO PFI0).

 

Best wishes,

Timo

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

Hi Ideas-moose,

 

Does each section of code work (without errors) on its own? Does the DAQ code run without a trigger and read the correct information? 

 

You are right with the error most likely being caused by a timeout (default 10 sec) from not receiving the trigger from PXI Trig1.

 

The DAQ done vi should be within a While loop, it is usually used to check for errors whilst a task is running however you may be able to use "DAQmx Wait until done" and then trigger after the error cluster has been outputted (if there is no error then the task completed successfully therefore trigger can be sent)

 

In order to send a trigger across the backplane you may want to use something similar to this code but start the task after you know the DAQ task above has completed:

http://digital.ni.com/public.nsf/allkb/925A7B2946E6E769862571110027A316

 

Kind regards

Pete

Certified LabVIEW Architect
0 Kudos
Message 4 of 5
(4,139 Views)

Hi Pete,

 

Thanks for your help!

 

1) The sections run well by themselves. If I disable the start trigger on the DAQ no timeout occurs. So I will look into that.

 

2) I am aware of the DAQmx "Connect / Disconnect Terminal" VIs. Apart from that I encountered error messages when using the DAQmx "Connect / Disconnect Terminal" VIs. That is why I abandonded that route earlier.

 

3) I encountered problems when trying to do different DAQmx tasks in one i.e. having an analogue input and digital output task run in the same section (no individual initialisations). Do I need to start new tasks for each type of DAQmx action e.g. Analogue In, Digital Out, Counter Out etc.?

 

How can I minimise the time lag when the DAQmx "Is Task Done" boolean output needs to be asserted in software by a different DAQmx task to output the digital signals? If this is not possible it would be easiest to assert the boolean value of DAQmx "Is Task Done" and send it in SW to the HSDIO. What do you think?

 

Timo

0 Kudos
Message 5 of 5
(4,135 Views)