09-27-2011 01:51 AM
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
09-27-2011 03:41 AM
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.
09-27-2011 08:00 AM
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
09-27-2011 08:55 AM - edited 09-27-2011 08:55 AM
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?
09-27-2011 09:32 AM
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?
09-27-2011 04:48 PM
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