Welcome to the Industrial Automation website!

NameDescriptionContent
HONG  KANG
E-mail  
Password  
  
Forgot password?
  Register
当前位置:

Tektronix AFG1022 Function Generator

来源: | 作者:FAN | 发布时间 :2025-11-21 | 575 次浏览: | 🔊 Click to read aloud ❚❚ | Share:

Select trigger source: TRIGger: SURce EXTernal (external trigger, trigger signal connected to TRIG IN interface of Rear panel);

Set trigger edge: TRIGger: EDGE RISING (rising edge trigger);

Execute software trigger: TRIGger: IMMediate (immediately trigger output once);

Trigger delay: TRIGger: DELay 0.1 (output delayed by 0.1 seconds after triggering).

(3) Setting up storage and calling

The current instrument configuration (waveform, parameters, modulation, etc.) can be saved to the internal storage area (supporting 10 user settings), and can be directly called later:

Save settings: SYSTem: SETup: SAVE "SET1", 1 (Save current settings as "SET1", Store location 1);

Call settings: SYSTem: SETup: LOAD 1 (setting to call storage location 1);

Delete setting: SYSTem: SETup: DELETE 1 (delete storage location 1 setting).

3. Multi channel control (AFG1022 has 2 channels)

Two channels are independently controllable, and channel 2 can be distinguished by adding 2 in the command. The example is as follows:

Channel 2 waveform selection: SOURce2: WAVEform TRIangle (Channel 2 outputs triangular waves);

Channel 2 frequency setting: SOURce2: FREQ 2000 (channel 2 frequency 2kHz);

Channel synchronization: SOURce: SYNC: STATe ON (synchronizes channel 2 with channel 1 in phase).


Interface configuration and communication implementation

1. Supported communication interfaces

AFG1022 provides two programming interfaces to meet different testing system requirements:

Advantages of Interface Type Standard Protocol Hardware Requirements

GPIB IEEE 488.2 requires GPIB cards (such as NI GPIB-US-HS) with strong anti-interference capabilities, suitable for industrial environments

USB-TMC USB 2.0 High Speed+USBTMC standard USB cable (A-B type) plug and play, no additional hardware required

2. Communication parameter configuration

GPIB interface: default address is 22, baud rate is 115200, data bit is 8, stop bit is 1, checksum is None; The address can be modified by the command: SYSTem: GPIB: DDRess 23 (set to 23).

USB-TMC interface: No manual parameter configuration is required, the system automatically recognizes it as a "USBTMC device" and can be directly connected through the VISA library (the resource name is usually USB0:: 0x0699:: 0x0368: C012345:: 0:: INSTR).

3. Typical Communication Example (Python+pyvisa)

Taking "Generate 1kHz sine wave and query amplitude" as an example, the steps are as follows:

Install dependency library: pip install pyvisa pyvisa py;

Write code:

python

Import pyvisa # Import VISA library

# 1. Initialize Resource Manager

rm = pyvisa.ResourceManager()

# 2. Connect AFG1022 (resource name can be queried through rm.list_desources())

afg = rm.open_resource("USB0::0x0699::0x0368::C012345::0::INSTR")

# 3. Send command: Channel 1 outputs a 1kHz sine wave with an amplitude of 5Vpp

Afg.write ("SOURce: WAVEform SINusoid") # Select sine wave

Afg.write ("SOURce: FREQuency 1000") # Frequency 1kHz

Afg.write ("SOURce: VOLTage: AMPlity 5") # amplitude 5Vpp

Afg. write (": OUTPut: STATe ON") # Enable output

# 4. Query the current amplitude

amplitude = afg.query(":SOURce:VOLTage:AMPlitude?")

Print (f "Current amplitude: {amplitude} Vpp")

# 5. Close connection

afg.close()

rm.close()

Generating


Error handling and debugging

1. Error code query and parsing

When the instrument executes a command error (such as parameter out of range, syntax error), an error code will be recorded, which can be queried and located through the command:

Query error: SYSTem: ERRor? (Return format: -221, "Parameter out of range");

Common error code parsing:

Error code, error description, possible causes, and solutions

-221 Parameter out of range Check if the parameter is within the specified range (e.g. frequency ≤ 120MHz)

-102 Syntax error command syntax error check command spelling (e.g. SOURce: FREQ mistakenly written as SOURce: FRE)

-256 Calibration required: The instrument has not been calibrated and the accuracy of the parameters cannot be guaranteed. Execute the calibration command (SYSTem: CALibrate) or contact after-sales service

0 No error command executed successfully-

2. Status Register and Status Query

By reading the status register, the current working status of the instrument can be obtained (such as whether it is outputting or triggering):

Operation status query: Status: Operation: CONDition? (Return 1 indicates normal operation, 0 indicates standby);

Event status query:: Status: EVENT: CONDition? (Return the event status code, such as 8 indicating trigger completion).

3. Debugging tools

Command echo: When enabled: SYSTem: ECHO ON, the instrument will return the received command for confirmation of whether the command was sent correctly;

Grammar check: Before sending a command, you can check the syntax using the command SYSTem: HECK: CMD (e.g. SYSTem: HECK: CMD ": SOURce: FREQ 1000");

Timeout setting: Set a timeout in the VISA library (recommended ≥ 1000ms) to avoid communication interruption caused by long command execution time (such as afg. timeout=2000).


Appendix Resources

Command index: a complete list of commands classified by "Source", "Trigger", and "System", including parameter descriptions and examples;

  • YASKAWA SGMPH-04AAA61D-OY 200V 400W Servo Motor
  • YASKAWA SGMPH-08A1A41 750W Servo Motor with Gearbox
  • OMRON C60K-CDR-D K-Type CPU PLC
  • OMRON CS1W-AD081-V1 Analog Input Module
  • OMRON CP1H-X40DT-D Compact PLC
  • OMRON 3G3SV-BB007-E 0.75kW Inverter
  • YASKAWA SGDH-10DE-OY 1kW Servo Pack
  • OMRON C60H-C5DR-DE-V1 SYSMAC CPU PLC
  • OMRON C60H-C5DR-DE-V1 SYSMAC CPU PLC
  • OMRON 3G3MV-P10CDT3-E RS422/485 Inverter PLC Board
  • OMRON C200PC-ISA02-DRM-E SYSMAC Board PLC with Floppy & Operator Panel
  • OMRON 3G3SV-BB007-E 0.75kW Inverter
  • OMRON CP1H-X40DT-D Compact PLC
  • OMRON CS1W-AD081-V1 Analog Input Module
  • OMRON C60K-CDR-C K-Type CPU PLC
  • YASKAWA SGMPH-08A1A41 750W Servo Motor with Gearbox
  • YASKAWA SGMPH-04AAA61D-OY 200V 400W Servo Motor
  • OMRON CJ1W-DA041 Analog Output Module
  • OMRON C60H-C5DR-DE-V1 SYSMAC CPU PLC
  • OMRON 3G3MV-P10CDT3-E RS422/485 Inverter PLC Board
  • OMRON C200PC-ISA02-DRM-E SYSMAC Board PLC
  • Omron CQM1H-MAB42 Analog I/O Board
  • Omron C200PC-ISA02-DRM-E SYSMAC Board
  • Oriental Motor ARD-C CM10-1 Stepping Driver
  • EVA 915.85.003 Embedded CPU Module
  • Omron C60H-C1DR-DE-V1 PLC CPU
  • TE.CO TFX 4G10 Industrial Power Cable
  • Siemens 6SL3120-2TE15-0AA4 Motor Module
  • Emerson SolaHD SDN10-24-100P Power Supply
  • PARKER HPD2S5N/K005 Servo Drive
  • Danfoss VLT 3008 Variable Speed Drive
  • Saia Burgess Controls PCD4.H31 PLC CPU
  • OMRON C200HW-PRT21 Profibus DP Slave Unit
  • OMRON TJ1-ML04 Trajexia Motion Controller
  • Schneider Electric Pre-Wired PLC Control Box
  • Allen Bradley 1336-L8E AC Drive
  • Siemens 6ES7123-1GB60-0AB0 PLC Module
  • Automation Direct D3-08B-1 PLC Chassis 8 Slot
  • OMRON 3G3XV-A2007 VFD 0.75kW 220V
  • STOBER F102SG0230MO20 Gear Drive Technology
  • Saia PCD4.H32 PCD4 Series PLC
  • Omron NSJ12-TS01B-G5D NSJ Terminal
  • Biticino MA250 T7314A Megatiker Circuit Breaker
  • Omron ZX-LDA41 ZX-LD300L Laser Sensor
  • Siemens 6ES7511-1AK02-0AB0 CPU 1511-1 PN
  • Saia Burgess Controls SBC PCD PLC Module
  • Siemens 6ES5 244-3AA21 S5 Temperature Module
  • Omron NSJ5-SQ01-DRM NSJ Controller
  • Omron NT15S-SF121B-E Programmable Terminal
  • Yaskawa CIMR-F7Z4045 45kW VFD AC Drive
  • AB 1494U-D100 Smart Motor Controller
  • Omron NA5-7W001B-V1 Touch Screen HMI
  • Fanuc A16B-1000-0400/01A CNC Control Board
  • Omron CV2000-CPU01-EV1 PLC CPU Unit
  • Eaton XV-102-B4-35TQRF-10-PLC Touch Panel
  • Siemens 6FX1121-3BB01 SINUMERIK Board
  • SCE M68-2000 2 Axis CNC Servo Controller
  • Omron R88M-K20030T-BS2 AC Servo Motor
  • Omron G3NH-4150B Solid State Relay
  • BITICINO MA250 T7313A Megatiker PLC Disconnector
  • IFM 2MSTR AS-i PROFIBUS DP Gateway
  • Danfoss VLT 3022 175H1238 Variable Speed Drive
  • PASABAN MTC-3052 FAST I/O Module
  • Allen Bradley 1746-A7 SLC 500 Chassis
  • Mitsubishi NF1600-SEW MCCB
  • Schneider LTMR100EBD Motor Management Controller
  • Yokogawa AIP121-S3 Analog Input Module
  • Siemens 6ES7135-4LB02-0AB0 ET200S AO Module
  • Motor Power SKA DDR 148-240 Torque Motor
  • OMRON CS1H-CPU63-EV1 PLC CPU Unit
  • ABB UFC921A101 Main Control Board
  • ABB UFC921A Main Control Unit
  • ABB UFC911B108 Drive Main Control Unit
  • ABB UFC911B106 Drive Main Control Unit
  • ABB UFC911B101 Drive Main Control Unit
  • ABB UFC765AE102 Drive Control Interface Board
  • ABB UFC762AE101 I/O and Communication Extension Board
  • ABB UFC760BE41 I/O and Communication Extension Board
  • ABB UFC760BE145 I/O and Communication Extension Module
  • ABB UFC721BE101 Fieldbus Communication Adapter Module
  • ABB UFC721AE101 3BHB002916R0101 Network Interface
  • ABB UFC718AE101 HIEE300936R0101 Communication Module
  • ABB UDC920BE01 3BHE034863R0001 Communication Module
  • GE IS420UCSCH1A-F-VO.1-A Controller Module
  • GE UCSC H1 IS420UCSCH1A Controller Station Card
  • ABB UCD240A101 3BHE022287R0101 Process Controller
  • ABB UCD224A103 Process I/O Module
  • ABB UCD224A102 Analog Input Module
  • WOODWARD 9907-838 Load Sharing Module
  • B&R X20CP1485-1 Industrial PC CPU Module
  • ELAU MC-4/11/22/400 4-Axis Servo Drive
  • ELAU C600/10/1/1/1/00 Configurable Safety Relay
  • BENTLY 60R/SIM01 Proximitor Power Supply
  • BENTLY 60R/PPM01 Protection Processing Module
  • BENTLY 60R/PNL01 Operator Control Panel
  • BENTLY 60R/PIM01 Panel Interface Module
  • BENTLY 60R/INP07 Isolated DC Input Module
  • BENTLY 60R/INP01 4-Channel Analog Input Module
  • BENTLY 60R/CMM01 Communication Multiplexer Module
  • BENTLY 60R/CHA02 System Chassis Rack Enclosure
  • BENTLY 60R/CGW01 Condition Monitoring Gateway
  • Pacific Scientific P70360-SDN Servo Motor
  • HONEYWELL 05701-A-0284 Signal Conditioner
  • YOKOGAWA NFCP501-W05 Pressure Transmitter
  • ABB CI541V1 3BSE0146666R1 Control Interface
  • ABB DSTC176 57310001-KT Terminal Base Unit
  • ABB DSDP170K02 3BSE019925R1 Analog Input Module
  • ABB DSBC173 57310001-KH Terminal Base Unit
  • ABB DSAI130K01 5730-030-UC Thermocouple Input
  • ABB DSRF182 57310255-AL Relay Output Module
  • ABB SC520 3BSE003816R1 Compact PLC
  • ABB DSDP140A 57160001-ACT Analog Input Module
  • ABB DSAI130 57120001-P Analog Input Module
  • ABB SCYC55830 3AFE58063282 MCCB
  • Fireye 95DSS3-1CEX UV Flame Scanner
  • ABB DSDP170 57160001-ADF Analog Input Module
  • ABB CI532 3BSC140120R1 Communication Interface
  • ABB DSAO120A 3BSE018293R1 Analog Output Module
  • ABB CI869K01 3BSE049110R1 Ethernet Interface
  • ABB CI522A 3BSE018460R1 PROFIBUS DP Master
  • GUTOR OP6257 Rectifier Control Unit
  • Meggitt C327845-11 Gas Shutoff Valve
  • ABB SACO64D4 4-Pole Digital Annunciator Unit
  • ABB CI522AK04 3BSE018451R1 PROFIBUS DP Module
  • ABB DSAI130DK01 3BSE020828R1 Temperature Input Module
  • ABB CI546 3BSE012610R1 PROFIBUS DP Master Module
  • ABB SC510 3BSE003832R1 Compact PLC Controller
  • ABB CI540 3BSE001077R1 PROFIBUS DP Slave Module