LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Synchronization between analog input with a trigger and an output same device"

 

Hello,

I'm using a NI 6363 card and developing in LabVIEW. I'm performing an analog input acquisition that starts automatically with an analog trigger. In parallel, and on the same card, I'm generating an analog output signal.

I would like to synchronize both operations so that the analog output generation starts exactly when the analog input acquisition is triggered.

Here are more details:

  • The analog input task is triggered by a rising edge on an analog voltage channel.

  • The analog output should start at the same moment the acquisition begins.

  • Both tasks run with different sampling rates.

  • I'm programming this in LabVIEW.

  • The analog output is a pre-defined waveform.

My question is:
How can I synchronize the start of both tasks if they have different sampling rates? Can I still share a start trigger between the two tasks in this case?

Has anyone dealt with this kind of setup? Any advice or example code would be appreciated.

Thanks in advance!

 

0 Kudos
Message 1 of 8
(1,191 Views)

Hi 

Check the NI Example Finder Analong Ouput, 

 

you can see how to configure the trigger of the Analog Output to learn about how labview deals with triggering.

 

There is also another trend on Forum Solved: Simultaneous analog input and output - NI Community

where you can find more information about how to solve your problem.

LVNinja_0-1747167401813.png

 

Message 2 of 8
(1,172 Views)

Hi ,

Thank you for your response. I have a question regarding triggers in LabVIEW: is it possible to use the same trigger for both an analog input and an analog output? If so, could you please explain how to configure this?

 

0 Kudos
Message 3 of 8
(975 Views)

Try these two examples:
DAQmx\Analog Output\Voltage - Finite Output.vi

DAQmx\Analog Input\Voltage - Finite Input.vi

 

Configure each/both examples to use a digital start trigger: <your USB device>/PFI0

 

Run each example. The examples are armed and will begin outputting and acquiring the instant the digital trigger is received on PFI0.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 4 of 8
(956 Views)

Hello,

thank you

I'm using an analog trigger, and the board refused to work when I applied the same trigger to both (AI and AO).

I’ve tried other approaches, but what I need is for the generation to start after the acquisition begins.

I’ve attached an image showing that the analog output starts before the analog input.

Does anyone have a solution or idea on how to resolve this?

Thanks in advance!

0 Kudos
Message 5 of 8
(948 Views)

Did you mean 'push a button' when you said "analog trigger"?

Your image doesn't show that analog output begins before acquisition; it shows that one task is started before the other. Rather than debate what the image shows, attach your code to help the community help you.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 6 of 8
(942 Views)

Hi,

No, the acquisition starts when I detect a predetermined voltage.

I used the same trigger on both tasks, but it refuses, saying that the task is already reserved. How can I use the same trigger for both tasks: acquisition and generation?

 

0 Kudos
Message 7 of 8
(890 Views)

You can configure the AO task to use an internal digital signal that your AI system will generate when its analog trigger condition is satisfied.  Here's an incomplete, minimal screencap to illustrate:

 

Kevin_Price_0-1747311831820.png

 

 

-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.
Message 8 of 8
(883 Views)