From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize 2 function generators

I have created a VI that outputs a sine wave on 2  5421 function generators. The amplitudes can be adjusted on the fly. The problem I am having is trying to keep the 2 signals in phase. I have tried all different combinations of triggering but it always seems to bring up errors/ doesn't work.

 

I have attached my code with out any triggering.

 

 

Any advice would be great on how to align the phases or any better ways to create the sine wave. Eventually what i want to do is to create 2 sine waves one at 0.1V then the second sine wave is at 1 V then a second later the first sine waves amplitude increases to 0.2V and the second decreases to 0.8V and so on untill they have both switched amplitudes.

 

 

0 Kudos
Message 1 of 2
(2,194 Views)

Hi there, 

It may be useful for you to look at some examples from the labview example finder. If you search for "NI-Fgen synchronize" there are examples of a few different methods of synchronising signals between modules using TClk

A good place to start would be:
Fgen Arb Synchronize (TClk).vi (also found here: https://decibel.ni.com/content/docs/DOC-8227#comment-15098 )
Fgen Arb Synchronize Master Trigger (TClk).vi
Fgen Arb Synchronize Multiple Rates (TClk).vi

These can be found by clicking Help in the LabVIEW toolbar then Find Examples... then in the Search tab type in "NI-Fgen Synchronize" and scroll through to the above named examples. 

I believe the functions listed in the Triggering and Synchronisation section of this manual will be of use:
http://digital.ni.com/manuals.nsf/websearch/38233C10B9BCA40286256ED2007EA1DD

You can also refer to 

Programming»NI-TClk Synchronization Help in the NI Signal Generators Help http://digital.ni.com/manuals.nsf/websearch/4FD742EBC070AFEF862578F400734EE5

Here is some further information on NI-TClk
http://www.ni.com/white-paper/3675/en/

I believe if you are using PCI modules (not PXI) then to use NI-TClk to synchronise between two modules you will need an RTSI cable to link them. If yuo are usign PXI 5421 modules then you should not need that cable. 

I hope this helps

Tim, CLD, CTD
National Instruments (UK & Ireland)
________________________________________________
"No problem is insoluble in all conceivable circumstances"
0 Kudos
Message 2 of 2
(2,150 Views)