Devices¶
Core¶
- class pychron.hardware.core.abstract_device.AbstractDevice(*args: Any, **kwargs: Any)¶
- class pychron.hardware.core.base_core_device.BaseCoreDevice¶
- blocking_poll()¶
- get_random_value()¶
- load()¶
- load_additional_args()¶
- pychron.hardware.core.core_device.CoreDevice¶
alias of
str
- class pychron.hardware.core.scanable_device.ScanableDevice(*args: Any, **kwargs: Any)[source]¶
- alarms¶
alias of
pychron.hardware.core.alarm.Alarm
Communicators¶
- class pychron.hardware.core.communicators.communicator.Communicator(*args: Any, **kwargs: Any)[source]¶
Base class for all communicators, e.g. SerialCommunicator, EthernetCommunicator
- class pychron.hardware.core.communicators.serial_communicator.SerialCommunicator(*args: Any, **kwargs: Any)[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.
- class pychron.hardware.core.communicators.gpib_communicator.GpibCommunicator(*args: Any, **kwargs: Any)[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: Any, **kwargs: Any)[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: Any, **kwargs: Any)[source]¶
- class pychron.hardware.core.communicators.modbus_communicator.ModbusCommunicator(*args: Any, **kwargs: Any)[source]¶
modbus message syntax [Device address][function code][data][error check]
- class pychron.hardware.core.communicators.scheduler.CommunicationScheduler(*args: Any, **kwargs: Any)[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