17. cc_visa
17.1. Communication Channel using VISA protocol
- module
cc_visa
- synopsis
VISA communication channel to communicate to instruments using SCPI protocol.
- class pykiso.lib.connectors.cc_visa.VISAChannel(**kwargs)[source]
VISA Interface for devices communicating with SCPI
Initialize channel settings.
- _cc_receive(timeout=0.1)[source]
Send a read request to the instrument
- Parameters
timeout (
float
) – time in second to wait for reading a message- Return type
Dict
[str
,Optional
[bytes
]]- Returns
the received response message, or an empty string if the request expired with a timeout.
- _cc_send(msg)[source]
Send a write request to the instrument
- Parameters
msg (
Union
[Message
,bytes
,str
]) – message to send- Return type
None
- _process_request(request, request_data='')[source]
Send a SCPI request.
- Parameters
request (
str
) – command request to the instrument (write, read or query)request_data (
str
) – command payload (for write and query requests only)
- Return type
str
- Returns
response message from the instrument (read and query requests) or an empty string for write requests and if read or query request failed.
- class pykiso.lib.connectors.cc_visa.VISASerial(serial_port, baud_rate=9600, **kwargs)[source]
Connector used to communicate with an instrument via Serial.
Initialize channel attributes.
- Parameters
serial_port (
int
) – COM port to use to connect to the instrumentbaud_rate – baud rate used to communicate with the instrument