Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

My code is not responsive to function generator

I am currently using an Agilent 33120A 15MHZ Function generator and when I change the parameters (amplitude, frequency, etc.), my code does not reflect the changes. What I am doing wrong?

0 Kudos
Message 1 of 3
(3,771 Views)
Can you attach a snippet (please look up snippet in the help) of the block diagram? I'm posting from my phone.
0 Kudos
Message 2 of 3
(3,766 Views)

You ar sampling at 1 Sample/second.  Unless you are adjusting a DC offset, you are not going to see any changes.

 

Nyquist states that in order to see a frequency, you need to sample at more than twice the frequency you want to see.  So if you are generating a 1kHz sine wave, you need to sample at least 2kHz.  I recommend something more like 5x to 10x.  So for the 1kHz wave, I would sample at more like 10kHz.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(3,744 Views)