Devices¶
Core¶
-
pychron.hardware.core.abstract_device.
AbstractDevice
¶
-
pychron.hardware.core.base_core_device.
BaseCoreDevice
¶
-
pychron.hardware.core.core_device.
CoreDevice
¶ alias of
builtins.str
Communicators¶
-
class
pychron.hardware.core.communicators.communicator.
Communicator
(*args, **kw)[source]¶ Base class for all communicators, e.g. SerialCommunicator, EthernetCommunicator
-
class
pychron.hardware.core.communicators.serial_communicator.
SerialCommunicator
(*args, **kw)[source]¶ Base Class for devices that communicate using a rs232 serial port. Using Keyspan serial converter is the best option for a Mac class is built on top of pyserial. Pyserial is used to create a handle and this class uses the handle to read and write. handles are created when a serial device is opened setup args are loaded using load(). this method should be overwritten to load specific items.
-
ask
(cmd, is_hex=False, verbose=True, delay=None, replace=None, remove_eol=True, info=None, nbytes=None, handshake_only=False, handshake=None, read_terminator=None, terminator_position=None, nchars=None)[source]¶
-
-
class
pychron.hardware.core.communicators.gpib_communicator.
GpibCommunicator
(*args, **kw)[source]¶ uses PyVisa as main interface to GPIB. currently (8/27/14) need to use a 32bit python version. The NI488.2 framework does not work with a 64bit distribution
-
class
pychron.hardware.core.communicators.ethernet_communicator.
EthernetCommunicator
(*args, **kw)[source]¶ Communicator of UDP or TCP.
-
ask
(cmd, retries=3, verbose=True, quiet=False, info=None, timeout=None, message_frame=None, delay=None, use_error_mode=True, *args, **kw)[source]¶ @param cmd: ASCII text to send @param retries: number of retries if command fails @param verbose: add to log @param quiet: if true do not log the response @param info: str to add to response @param timeout: timeout in seconds @param message_frame: MessageFrame object @param delay: delay in seconds to wait before a cmd is sent
-
-
class
pychron.hardware.core.communicators.mcode_communicator.
MDriveCommunicator
(*args, **kw)[source]¶
-
class
pychron.hardware.core.communicators.modbus_communicator.
ModbusCommunicator
(*args, **kw)[source]¶ modbus message syntax [Device address][function code][data][error check]
-
class
pychron.hardware.core.communicators.scheduler.
CommunicationScheduler
(*args, **kw)[source]¶ this class should be used when working with multiple rs485 devices on the same port.
it uses a simple lock and sleep cycle to avoid collision on the data lines
when setting up the devices use device.set_scheduler to set the shared scheduler