API Overview¤
Although this package contains many classes and functions, the classes that you may typically create instances of are
- Config — if you want to load equipment registers and communicate with equipment
- Connection — if you are only interested in communicating with equipment
- Register — if you only want to load an equipment register
and there are enumeration classes and a Readings class.
Interfaces are available to communicate with equipment, Backends may be used to interface with equipment using external packages and possibly Resources may be available.
Tip
You do not need to create instances of these communication classes. Calling the Equipment.connect() or Connection.connect() method will automatically use the correct object for communication.
If you are using type annotations and/or an editor that supports code completion, you can annotate the type of the returned object to get support for these features, for example,
from msl.equipment import GPIB, Connection
device: GPIB = Connection("GPIB::22").connect()
The MSLConnectionError and MSLTimeoutError classes are raised if there are issues when communicating with equipment.
Command Line Interface¤
A command-line interface is also available to find equipment, validate XML files against the schema or start the web application. Validation and the web application require that the msl-equipment-validate and msl-equipment-webapp packages are installed.
To see the help, run
msl-equipment help
or to display the help for a specific command
msl-equipment help find
find¤
Run the find command to find equipment (and serial ports) that are available.
msl-equipment find
This will display a description about the type of interface, the equipment that was found for each interface and the address(es) that may be used to connect to the equipment.
Tip
If USB devices are attached to the computer and none are found, make sure you have followed the USB prerequisites and/or the GPIB prerequisites for your operating system.
ASRL Ports
COM1 [Intel PCI\VEN_8086&DEV_A13D&SYS_72141043&REV_31\3&14588619&1&B4]
COM2 [PI 18071105A VID:PID=0647:0100 SER=18071105A]
COM3 [Prolific VID:PID=067B:2303 LOCATION=1-8]
FTDI Devices
FTDI2::0x0403::0xfaf0::40874293 [APT Stepper Motor Controller]
FTDI2::0x0403::0xfaf0::27259213 [Brushed Motor Controller]
FTDI2::0x0403::0xfaf0::26007245 [Stepper Controller]
GPIB Devices
GPIB0::5::INSTR
LXI Devices
315W Multi Range Triple Output PSU [webserver: http://169.254.100.2]
TCPIP::169.254.100.2::9221::SOCKET
TCPIP::169.254.100.2::inst0::INSTR
34465A Digital Multimeter [webserver: http://169.254.100.3]
TCPIP::169.254.100.3::5025::SOCKET
TCPIP::169.254.100.3::hislip0::INSTR
TCPIP::169.254.100.3::inst0::INSTR
VXI11 Devices
34972A Data Acquisition / Switch Unit [webserver: http://10.12.102.15]
TCPIP::10.12.102.15::5025::SOCKET
TCPIP::10.12.102.15::inst0::INSTR
E5810 (00-21-B3-1F-01-CD) [webserver: http://10.12.102.31]
TCPIP::10.12.102.31::inst0::INSTR
E5810 (43:8E:5A:06:23:EE) [webserver: http://10.12.102.2]
TCPIP::10.12.102.2::inst0::INSTR
validate¤
Validate equipment registers and connection files against the schema.
Requires the msl-equipment-validate package to be installed.
The following command shows how to validate an equipment register
msl-equipment validate path/to/register.xml
See here for more examples.