EPICS Digital I/O¶
This is a Python class which allows the control of a set of digital I/O ports defined by the user. Ports are named with a common prefix followed by its number. Once it is based on EPICS resources, one can get and set PV values related to the ports. Its also possible to add and delete ports from the set, and list their names.
Using EPICS Digital I/O module¶
Usage of Python class for EPICS Digital I/O control
-
class
py4syn.epics.DigitalIOClass.
DigitalIO
(digitalIO_prefix, port_type, port_sequence)[source]¶ Class for Digital I/O using EPICS.
Constructor
Parameters: - digitalIO_prefix : string
Prefix of the ports.
- port_type : string
‘INPUT’ or ‘OUTPUT’.
- port_sequence : string
Index of the ports. Example: ‘0-3;7’ means ports from 0 to 3 and 7.
-
addPorts
(port_sequences)[source]¶ Add ports to name and PVs dictionaries.
Parameters: - port_sequences : string
Index of the ports to be added.
-
deletePorts
(port_sequences)[source]¶ Delete ports from name and PVs dictionaries.
Parameters: - port_sequences : string
Index of the ports to be deleted.
-
getName
(port_index)[source]¶ Returns the name of a port PV.
Parameters: - port_index : int
Index of the port.