Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronized input with output signal DAQ with labview

I have a program with labview.

I applied a SIN signal to a resistor using AO and I read voltage of this resistor using AI.

When I merge input and output signals in Labview they have a diiference phase.

How can I solve this problem?

please find the aatched file

 

Download All
0 Kudos
Message 1 of 6
(4,181 Views)

Hello,

 

Express VIs are not really designed for more advanced DAQ tasks such as synchronization. I would suggest using the lower level DAQmx VIs for this sort of task and also for going forward as you will definitely need them for more complex acquisitions.

 

Synchronization is quite a big topic and I would recommend the tutorials on ni.com for a good overview.

 

This can be found here:

http://zone.ni.com/devzone/cda/tut/p/id/5434

 

With more detail on synchronization here:

http://zone.ni.com/devzone/cda/tut/p/id/4322#toc4

 

Also the examples in the example finder are very useful. This is found under Help --> Find Examples.

Navigate to, Hardware Input and Output --> DAQmx --> Synchronization.

 

Let me know how you get on and if you have any more questions don't hesitate to ask.

Nick
0 Kudos
Message 2 of 6
(4,173 Views)

Thank you

 

I run Fig 2 - Multi-Function-Synch AI-AO in http://zone.ni.com/devzone/cda/tut/p/id/4322#toc4.

but it has a error. would you please help me?

please found the attached file

0 Kudos
Message 3 of 6
(4,166 Views)

Hello,

 

Sure,

 

From what I can see there is that you have added a control to the source of the analogue input task timing VI. Firstly, to ensure synchronization you must make sure that both tasks share the same sample clock, so if you set the sample clock source on the analogue input task the same source must be set for the output task. You can see this in FIG 2 because the analogue input sample clock is set to the output task sample clock - they both have the same sample clock : the built-in analogue output sample clock. 

 

The reason for your error is that you are trying to set the source of the analogue input sample clock to that of the built in analogue input sample clock. If you were to change this to a different clock source such as one coming in on a PFI line it will work fine. If you wish to use the built in analogue input sample clock just leave the source terminal unwired.

 

Does this solve you problem?

 

Nick
0 Kudos
Message 4 of 6
(4,159 Views)

Thank you again

 

But I want to have 2 sample clock 1- for AI 10kHz 2- fo AO 5kHz.

so must I delete /DEv2/a1/sampleclock?

 

0 Kudos
Message 5 of 6
(4,156 Views)

Altai Krai,

 

Check out this LabVIEW example. It uses two sample clocks at different rates for AI and AO.

 

Go to the example finder.  Click on Hardware Input and Output » DAQmx » Synchronization » Multi-Function

 

From there you can choose between several examples.  Multi-Function-Synch AI-AO.vi may be the best one for you.

 

 

Daniel 

Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(4,135 Views)