Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI 5406 external triggering and VB6

I am currently using a PXI 5406 function generator where I need it to produce a sine wave based on the leading edge of a single channel encoder.  I need to do this in VB6.  I would like to have the output sinewave frequency from the function generator follow the input frequency from the square wave of the encoder.  So for every edge that is produced by the encoder, there should be an edge produced by the function generator.  After following all the FGEN examples that are included, I can't seem to do this at all with burst mode or stepped mode as I thought I could.  Is this possible to do?  If it is, I would like to have a VB guru maybe include some code that can steer me into the right direction.  All I am looking for is the frequency following feature of the function generator.  As far as the amplitude of the sinewave it could be 1 Vpp.  I will change this programmatically later on. 
0 Kudos
Message 1 of 2
(6,203 Views)
Hi Big Guy
Unfortunately, the NI 5406 does not have a “frequency following feature of the function generator”.  The Direct Digital Synthesis timing engine of the module is running at a predetermined frequency, which can be changed on the fly programmatically only.  The programming can be done on the fly by changing the frequency or through a frequency list where the module is triggered through the list of frequencies according to the trigger mode.  The module has no hardware to generate a sine wave that follows the frequency of a repetitive trigger coming in.
 
The module can only phase lock to signals greater than 1 MHz, in 1 MHz increments up to 20 MHz.   But, in this case, we can guarantee that the rising edge of the reference clock signal will coincide with a sine wave rising edge.
 
I don’t think there is a module that will do exactly as you specify.  I could use an AWG to generate sine wave based on an incoming trigger, but the actual period of the sine wave (essentially its frequency) will not change, there will just be a constant voltage until the next trigger and another single cycle of a sine wave.
 
Jerry
0 Kudos
Message 2 of 2
(6,190 Views)