Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control keithley 6221 to change the frequency of a wave at intervals via visa write

Hello,

I'm very new to LabVIEW. I'm trying to control keithley 6221 to generate a desired sine wave of which the frequency changes at intervals (e.g. 10s).

Now I can use commands below just to generate a sine wave, but i don't know how to change the frequency of the wave 10 seconds later. 

 

SOUR:WAVE:FUNC SIN                      ‘ Select sine wave.
SOUR:WAVE:FREQ 1e3                      ‘ Set frequency to 1kHz.
SOUR:WAVE:AMPL 1e-2                     ‘ Set amplitude to 10mA.
SOUR:WAVE:DUR:TIME 10                 ‘ 10 second duration.
SOUR:WAVE:RANG BEST                  ‘ Select best fixed source range.
SOUR:WAVE:ARM                              ‘ Arm waveform.
SOUR:WAVE:INIT                                ‘ Turn on output, trigger waveform.
SOUR:WAVE:ABOR                            ‘ Stop generating waveform. 

 

Does anybody know how can I do it?

I'll be glad to get any help.

Thanks!

0 Kudos
Message 1 of 2
(3,798 Views)
You put a while loop around the VISA Write that is sending the frequency command and place a delay/wait function inside the loop is the basic technique.

Have you looked for a driver? Help>Find Instrument Drivers.
0 Kudos
Message 2 of 2
(3,795 Views)