Skip to content

Connecting to Advantest R3767CG by Advantest in Python

Instrument Card

The Advantest R3765CG/R3767CG network analyzers are vector network analyzers that incorporate a new RF circuit analysis technique.

Advantest R3767CG

Device Specification: here

Manufacturer card: ADVANTEST

ADVANTEST

Advantest manufactures and sells semiconductor and component test system products and mechatronics-related products.

  • Headquarters: Japan
  • Yearly Revenue (millions, USD): 2940
  • Vendor Website: here

Connect to the Advantest R3767CG in Python

PROTOCOLS > SCPI

from pymeasure.instruments import Instrument
from pymeasure.instruments.validators import strict_range
class AdvantestR3767CG(Instrument):
""" Represents the Advantest R3767CG VNA. Implements controls to change the analysis
range and to retrieve the data for the trace.
"""
id = Instrument.measurement(
"*IDN?", """ Reads the instrument identification """
)
center_frequency = Instrument.control(
":FREQ:CENT?", ":FREQ:CENT %d",
"""Center Frequency in Hz""",
validator=strict_range,
values=[300000, 8000000000]
)
span_frequency = Instrument.control(
":FREQ:SPAN?", ":FREQ:SPAN %d",
"""Span Frequency in Hz""",
validator=strict_range,
values=[1, 8000000000]
)
start_frequency = Instrument.control(
":FREQ:STAR?", ":FREQ:STAR %d",
""" Starting frequency in Hz """,
validator=strict_range,
values=[1, 8000000000]
)
stop_frequency = Instrument.control(
":FREQ:STOP?", ":FREQ:STOP %d",
""" Stoping frequency in Hz """,
validator=strict_range,
values=[1, 8000000000]
)
trace_1 = Instrument.measurement(
"TRAC:DATA? FDAT1", """ Reads the Data array from trace 1 after formatting """
)
def __init__(self, adapter, name="Advantest R3767CG", **kwargs):
super().__init__(
adapter,
name,
**kwargs
)
# Tell unit to operate in IEEE488.2-1987 command mode.
self.write("OLDC OFF")

This code defines a class AdvantestR3767CG that represents the Advantest R3767CG VNA (Vector Network Analyzer). It inherits from the Instrument class provided by the pymeasure.instruments module.

The class has several attributes and methods:

  • id: This is a measurement attribute that reads the instrument identification using the SCPI command *IDN?.

  • center_frequency: This is a control attribute that allows you to get or set the center frequency of the VNA using the SCPI commands :FREQ:CENT? and :FREQ:CENT %d respectively. It has a validator strict_range that ensures the frequency is within the range of 300,000 Hz to 8,000,000,000 Hz.

  • span_frequency: This is a control attribute that allows you to get or set the span frequency of the VNA using the SCPI commands :FREQ:SPAN? and :FREQ:SPAN %d respectively. It has a validator strict_range that ensures the frequency is within the range of 1 Hz to 8,000,000,000 Hz.

  • start_frequency: This is a control attribute that allows you to get or set the starting frequency of the VNA using the SCPI commands :FREQ:STAR? and :FREQ:STAR %d respectively. It has a validator strict_range that ensures the frequency is within the range of 1 Hz to 8,000,000,000 Hz.

  • stop_frequency: This is a control attribute that allows you to get or set the stopping frequency of the VNA using the SCPI commands :FREQ:STOP? and :FREQ:STOP %d respectively. It has a validator strict_range that ensures the frequency is within the range of 1 Hz to 8,000,000,000 Hz.

  • trace_1: This is a measurement attribute that reads the data array from trace 1 after formatting using the SCPI command TRAC:DATA? FDAT1.

  • __init__: This is the constructor method of the class. It initializes the AdvantestR3767CG object by calling the constructor of the Instrument class and passing the adapter and name. It also sends the SCPI command OLDC OFF to the VNA to operate in IEEE488.2-1987 command mode.