
More complicated devices using custom DLLs (usually cameras or some translation stages) will have more unique methods of addressing individual devices: serial number, device index, device ID, etc. > meter = Ophir.VegaPowerMeter(("COM3",38400)) # explicitly specifying the correct baud rate > meter.close() # need to close the connection before reopening OphirBackendError: backend exception: 'timeout during read' > meter.get_power() # let us assume that the devices is currently set up with 38400 baud > meter = Ophir.VegaPowerMeter("COM3") # for this power meter 9600 baud are used by default If it is provided incorrectly, then no communication can be done, and requests will typically return a timeout error: > from vices import Ophir By default, the devices would use the baud rate which is most common for them, but in some cases (e.g., if the device baud rate can be changed), you might need to provide it explicitly. The baud rates are, similarly, provided as a tuple: ("COM1", 19200). The most common situations are ports for the network connection and baud rates for the serial connections.

However, sometimes the connection might require some additional information. In most cases, the connection address is all you need. Usually, it is set on the device front panel or using some kind of configuration tool and a different connection, such as serial or USB. Network devices do not easily provide such functionality (and there are, in principle, many unrelated devices connected to the network), so you might need to learn the device IP elsewhere. > pll.list_backend_resources("visa") # note that, by default, visa also includes all the COM ports > pll.list_backend_resources("serial") # list serial port resources

To get the list of all connected devices, you can run :func:`.comm_backend.list_backend_resources`: > import pylablib as pll For example, serial devices addresses look like "COM1", Visa addresses as "USB0::0x1313::0x8070::000000::INSTR", and network addresses take IP and, possibly, port "192.168.1.3:7230". Simple message-style devices, such as AWG, oscilloscopes, sensors and gauges, require an address which depends on the exact connection protocol. Getting the address usually depends on the kind of device:

The device identifier or address needs to be provided upon the device object creation, after which it is automatically connected. If this is the case for your device, you can let the developers know by raising an issue on GitHub, or sending an e-mail to Connection Some specific devices functionality might not be completely covered in the current release.
