Showing results for 
Search instead for 
Did you mean: 

Synchronizing Function Generator with AC Power Source


I am using a BK Precision 4052 Function Generator with a BK Precision 9801 AC Power Source. I am trying to synchronize the two devices. I am doing this by telling the power supply to output a 5V TTL signal when it turns on. I then have the function generator waiting for a trigger so that it can start outputting its waveform. When I run my LabView program, the function generator signal is very random. It sometimes starts before the power supply waveform, sometimes after, and sometimes it is synchronized. However, when I manually turn on the power supply by pressing the ON/OFF button, the waveforms are synchronized every time. Does anyone know of something that I can add to my LabView program that may help me to synchronize the two just as they do when I manually turn on the power supply? I will attach the portion of my program that involves these two devices.

0 Kudos
Message 1 of 3

You attached just a picture, which is harder to be sure what it does especially when you don't have a lot of labels, but here's what it looks like your code does:


Frame 1: Sets everything up, including the function generator being ready to trigger

Frame 2: Enables the AC power output, which should trigger the function generator

Frame 3: Constantly (hundreds of times per second) sends a signal that turns the output on and closes the connection repeatedly until "Enable output" goes to False, at which point both supplies turn off one time.


Frame 3 doesn't make sense to me.  I think maybe you want an Event case in there that only does something when you push the button?


You also might need to have a delay added between frames 1 and 2.  Just because you've sent the "ON" signal to the function generator doesn't mean it's ready to accept a trigger a microsecond later, it might need a bit to get ready.

0 Kudos
Message 2 of 3

Frame 3 is only there so that I can switch off the output of the two devices with a push of a button rather than manually.  I have also tried that delay that you suggested.  When the delay is there the function generator for some reason turns on and outputs however many milliseconds earlier the delay is than the power supply.

0 Kudos
Message 3 of 3