LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronizing function generator outputs

I am a grad student learning Labview for use in research.  What I am trying to do right now is figure out how to sync up two function generators that are generating a simple sine wave output.  I am using a stanford research systems ds345.  I setup the code so that each machine is set to an external clock and I have attached the corresponding cables on the machines to sync up their clocks, but I am still not seeing a good synchronization of the phases of the waves.  I have attached my simple practice code and I would appreciate any suggestions with this.

 

My ultimate goal here is to create a program that is turning the two sine waves on and off in sync (or real close to it) while having the sine waves being in opposite phase with each other.  The frequency of the waves will also be changing to different values when the sine waves are turned back on.

0 Kudos
Message 1 of 3
(4,096 Views)

Ace02,

 

I believe that you are missing triggers for your waveform generation.  Triggering would allow you to match up phases the way your application requires.  Looking at your current code, I can't see any triggering set up, so right now there is no way to determine phase, all you have set is a sample clock.  I haven't used that particular instrument myself, so I can't comment on how to actually configure triggering, but I would recommend looking into that.

 

Regards,

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 2 of 3
(4,058 Views)

hi

put the instruments in wait for trigger state and use GET command, (group execute trigger) , they will be synchronized

n

0 Kudos
Message 3 of 3
(4,051 Views)