Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

AFG3022 USB comms lock up / freeze

Questions in this forum area are community supported. Tektronix does not regularly monitor or guarantee responses in this area.
Post Reply
mattb5906
Posts: 5
Joined: February 20th, 2012, 1:23 am

AFG3022 USB comms lock up / freeze

Post by mattb5906 » February 10th, 2013, 2:22 am

Hi,

I’m writing a set of customised instrument drivers in LabVIEW for the AFG3022 arbitrary/function generator and I am having problems with the USB comms locking up after a few times of running the following sequence. The only way to get the instrument communicating again is to power off and power back on again (closing LabVIEW; unplugging USB; or shutting down and restarting PC doesn't work).
Also when I run the following sequence, it takes a two or more runs to set the instrument to the parameters I have specified even though *OPC=1 and there are no reported errors.

Sent commands = Black
Received response = Red

Find device using VISA Find Resource
Open connection to VISA resource
*CLS
*ESR?;
0
*IDN?;
TEKTRONIX,AFG3022,C010013,SCPI:99.0 FV:3.2.3
*ESR?;
0
*ESR?;
0
SOURce1:FREQuency:CONCurrent:STATe 0;
*OPC?;
1
*ESR?;
0
SOURce1:FUNCtion:SHAPe SINusoid;
*OPC?;
1
SOURce1:FREQuency:CW 3000.000000;
*OPC?;
1
SOURce1:VOLTage:LEVel:IMMediate:AMPLitude 0.500000;
*OPC?;
1
SOURce1:VOLTage:LEVel:IMMediate:OFFSet 0.100000;
*OPC?;
1
SOURce1:PHASe:ADJust 25.000000 DEG;
*OPC?;
1
*OPC?;
1
*ESR?;
0
OUTPut1:IMPedance INFinity;
*OPC?;
1
*ESR?;
0
SOURce2:FUNCtion:SHAPe SINusoid;
*OPC?;
1
SOURce2:FREQuency:CW 2000.000000;
*OPC?;
1
SOURce2:VOLTage:LEVel:IMMediate:AMPLitude 0.800000;
*OPC?;
1
SOURce2:VOLTage:LEVel:IMMediate:OFFSet 0.060000;
*OPC?;
1
SOURce2:PHASe:ADJust 85.000000 DEG;
*OPC?;
1
*OPC?;
1
*ESR?;
0
OUTPut2:IMPedance 1.620E+3;
*OPC?;
1
*ESR?;
0
OUTPut1:STATe 1;
*OPC?;
1
*ESR?;
0
OUTPut2:STATe 0;
*OPC?;
1
*ESR?;
0
Close VISA resource

First run:
CH1
Shape: sinusoid
Frequency: 3.000kHz
Amplitude: 1.000Vpp
Offset: 200mV
Phase: 25deg
Impedance: High Z
Output state: On

CH2
Shape: sinusoid
Frequency: 2.000kHz
Amplitude: 1.552Vpp
Offset: 116mV
Phase: 85deg
Impedance: 1.62k ohms
Output state: Off

Second run:
CH1
Shape: sinusoid
Frequency: 3.000kHz
Amplitude: 500.0mVpp
Offset: 100mV
Phase: 25deg
Impedance: High Z
Output state: On

CH2
Shape: sinusoid
Frequency: 2.000kHz
Amplitude: 800.0mVpp
Offset: 60mV
Phase: 85deg
Impedance: 1.62k ohms
Output state: Off

The instrument has the latest available firmware installed: 3.2.3 Apr 16 2011.
I have tried the same sequence on multiple computers with same problems. I have also tried it without the semicolon at the end of each command (I know it's for separating multiple commands in a single write, but I tried it with them anyway :)).

Any ideas on why this is happening would be great.

Many thanks,
Matt

mattb5906
Posts: 5
Joined: February 20th, 2012, 1:23 am

Fixed

Post by mattb5906 » February 15th, 2013, 3:34 am

I have found that setting the output impedance AFTER configuring the waveform can mess up the offset and amplitude values depending on their previous values. Changed it so that this is done before and it all works consistently now.
The comms freeze is due to manually clearing the USB buffer before every write. Once I ommited this, it all worked without any lock ups :D
Tried on AFG3022 and AFG3022B

Post Reply

Return to “Older and Obsolete Signal Sources”

Who is online

Users browsing this forum: No registered users and 1 guest