Connecting to MS9710C by Anritsu in Python
Instrument Card
The MS9710C provides excellent wavelength accuracy, waveform shape, and new features
Device Specification: here
Manufacturer card: ANRITSU
Anritsu Has Testing Solutions for Automotive, Government, Data Center, & IoT Industries. Test Solutions for IoT Devices, Government Radar, Automotive, & Signal Integrity.
- Headquarters: JAPAN
- Yearly Revenue (millions, USD): 670
- Vendor Website: here
Connect to the MS9710C in Python
Read our guide for turning Python scripts into Flojoy nodes.
PROTOCOLS > SCPI
In this script, we first import the AnritsuMS9710C
class from pymeasure.instruments.anritsu
. Then, we create an instance of the AnritsuMS9710C
class by providing the instrument’s address (e.g., "TCPIP::192.168.1.1::INSTR"
).
Next, we perform a single sweep using the single_sweep()
method of the spectrum analyzer. This method sends the command to initiate a spectrum sweep and waits for the sweep to complete.
After that, we use the measure_peak()
method to measure the peak of the spectrum and get the trace marker. The method sets the peak search mode to “PEAK” and returns the wavelength and power of the peak.
Finally, we read the scan saved in memory slot A using the read_memory()
method. This method retrieves the wavelength and power values from the memory slot and returns them as numpy arrays.
Note: Make sure to replace "TCPIP::192.168.1.1::INSTR"
with the actual address of your Anritsu MS9710C Spectrum Analyzer.