# GsiocInterface Beta
class GsiocInterface(serial_port=None, unit_id=0)
An implementation of GSIOC serial communications protocol.
This is not an ActiveComponent.
It is a helper class designed to make working with GSIOC components easier.
You cannot add it to an Apparatus.
It must be only be manipulated by other components.
GSIOC is used by many devices made by Gilson and other manufacturers. It runs on the RS-422/485 standard and works well with USB to RS-422 adapters by FTDI, e.g. https://www.ftdichip.com/Products/Cables/USBRS422.htm.
For protocol details please see Gilson document LT2181: GSIOC Technical Manual.
# Arguments
serial_port: The serial port to connect over.unit_id: The component's unit ID.
# Attributes
gsioc_id: Theunit_id, shifted down by 128 per the GSIOC specification.
# Metadata
Built and maintained by:
| Author | Institution | GitHub |
|---|---|---|
| Murat Ozturk | Indiana University, School of Informatics, Computing and Engineering | @littleblackfish |
# buffered_command
def buffered_command(self, command: str) -> None
Send buffered command.
Buffered commands send instructions to a slave device.
# Arguments
command: The command to execute.
# Raises
RuntimeError: When the device is not ready or does not respond.
# buffered_command_async
def buffered_command_async(self, command: str) -> None
Async implementation of buffered_command.
For API docs, see buffered_command.
# connect
def connect(self)
Connect to a GSIOC device.
Since GSIOC was designed around multiple slaves, even if we have single device on the bus, we still have to 'connect' to a specific unit_id every time we send out a command.
# Raises
RuntimeError: When unable to connect.
# connect_async
def connect_async(self) -> None
Async implementation of connect.
For API docs, see connect.
# immediate_command
def immediate_command(self, command: str) -> str
Send immediate command.
Immediate commands query GSIOC devices for information.
# Arguments
command: The command to execute.
# Returns
- The return value of the command.
# immediate_command_async
def immediate_command_async(self, command: str) -> str
Async implementation of immediate_command.
For API docs, see immediate_command.
← GilsonFC203 LabJack →