IPC Göttingen classes

These classes are for communication with hardware by the Institut für Physikalische Chemie, Göttingen.

Communication

class nicos.ipc.IPCModBus

Bases: Device

Abstract class for IPC protocol communication over RS-485.

A device of this type is needed as the bus parameter of the other IPC devices.

Concrete implementations are IPCModBusTaco, IPCModBusTCP, IPCModBusSerial.

Parameters inherited from the base classes: description, loglevel, lowlevel

class nicos.ipc.IPCModBusTaco

Bases: TacoDevice, IPCModBus

IPC protocol communication over TACO RS-485 server.

Parameters

maxtries (int, settable at runtime)

Number of tries for sending and receiving. Default value: 3.

Parameters inherited from the base classes: description, loglevel, lowlevel, tacodelay, tacodevice, tacotimeout, tacotries

class nicos.ipc.IPCModBusTacoless

Bases: IPCModBus

Base class for IPC connections not using the RS485 TACO server.

This is an abstract class; use one of IPCModBusTCP or IPCModBusSerial.

Parameters

commtries (int, settable at runtime)

Number of tries for sending and receiving. Default value: 5.

roundtime (float, settable at runtime)

Maximum time to wait for an answer, set this high to slow down everything. Default value: 0.10000000000000001. Unit: s.

Parameters inherited from the base classes: description, loglevel, lowlevel

class nicos.ipc.IPCModBusTCP

Bases: IPCModBusTacoless

IPC protocol communication bus over network to serial adapter using TCP connection.

Parameters

host (str, settable at runtime, mandatory in setup)

Hostname (or IP) of network2serial converter.

port (int)

TCP Port on network2serial converter. Default value: 4001.

Parameters inherited from the base classes: commtries, description, loglevel, lowlevel, roundtime

class nicos.ipc.IPCModBusSerial

Bases: IPCModBusTacoless

IPC protocol communication directly over serial line.

Parameters

port (str, settable at runtime, mandatory in setup)

Device file name of the serial port to use.

Parameters inherited from the base classes: commtries, description, loglevel, lowlevel, roundtime

Stepper Motors

class nicos.ipc.Motor

Bases: Motor

This class supports IPC 6-fold, 3-fold and single motor cards.

It can be used with the nicos.generic.Axis class.

Attached devices

bus

The communication bus. Type: IPCModBus.

Parameters

accel (an integer in the range [0, 256), settable at runtime)

Motor acceleration (0..255). Default value: 0.

addr (int, mandatory in setup)

Bus address of the motor.

confbyte (an integer in the range [0, 256), settable at runtime)

Configuration byte. Default value: 0.

divider (an integer in the range [0, 8), settable at runtime)

Speed divider. Default value: 0.

firmware (int)

Firmware version. Default value: 0.

inhibit (one of 'off', 'on', volatile)

Inhibit input. Default value: 'off'.

max (an integer in the range [0, 1000000), settable at runtime)

Upper motorlimit. Default value: 0. Unit: steps.

microstep (one of 1, 2, 4, 8, 16, settable at runtime)

Microstepping mode. Default value: 1. Unit: steps.

min (an integer in the range [0, 1000000), settable at runtime)

Lower motorlimit. Default value: 0. Unit: steps.

power (one of 'off', 'on', settable at runtime, volatile)

Internal power stage switch. Default value: 'on'.

ramptype (an integer in the range [1, 5), settable at runtime)

Ramp type. Default value: 1.

relay (one of 'off', 'on', settable at runtime, volatile)

Relay switch. Default value: 'off'.

slope (float, settable at runtime)

Motor slope. Default value: 1.0. Unit: steps/main.

speed (an integer in the range [0, 256), settable at runtime)

Motor speed (0..255). Default value: 0.

startdelay (a float in the range [0.000000, 25.000000], settable at runtime)

Start delay. Default value: 0.0. Unit: s.

steps (an integer in the range [0, 1000000), settable at runtime)

Last position in steps. Default value: 0.

stopdelay (a float in the range [0.000000, 25.000000], settable at runtime)

Stop delay. Default value: 0.0. Unit: s.

timeout (int)

Waiting timeout. Default value: 360. Unit: s.

unit (str)

Motor unit. Default value: 'steps'.

zerosteps (float, settable at runtime)

Motor steps for physical zero. Default value: 0.0. Unit: steps.

Parameters inherited from the base classes: abslimits, description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, precision, target, userlimits

class nicos.ipc.IPCRelay

Bases: Moveable

Makes the relay of an IPC single stepper card available as switch.

Attached devices

stepper

The stepper card whose relay is controlled. Type: Motor.

Parameters inherited from the base classes: description, fixed, fmtstr, loglevel, lowlevel, maxage, pollinterval, target, unit

class nicos.ipc.IPCInhibit

Bases: Readable

Makes the inhibit of an IPC single stepper card available as an input.

Returns ‘on’ if inhibit is active, ‘off’ otherwise.

Attached devices

stepper

The stepper card whose inhibit is read out. Type: Motor.

Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit

Coders

class nicos.ipc.Coder

Bases: Coder

This class supports both IPC absolute and incremental coder cards.

It can be used with the nicos.generic.Axis class.

Attached devices

bus

The communication bus. Type: IPCModBus.

Parameters

addr (int, mandatory in setup)

Bus address of the coder.

circular (None or float, settable at runtime)

Wrap-around value for circular coders, if negative use it as +/-, else as 0..value, None disables this. Default value: None.

confbyte (an integer in the range [0, 256), settable at runtime)

Configuration byte of the coder. Default value: 0.

firmware (int)

Firmware version. Default value: 0.

slope (float, settable at runtime)

Coder slope. Default value: 1.0. Unit: steps/main.

steps (int)

Current coder position in steps. Default value: 0.

zerosteps (float, settable at runtime)

Coder steps for physical zero. Default value: 0.0. Unit: steps.

Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, precision, unit

4-Wing Slits

Digital I/O

class nicos.ipc.Input

Bases: Readable

IPC I/O card digital input class.

Attached devices

bus

The communication bus. Type: IPCModBus.

Parameters

addr (int, mandatory in setup)

Bus address of the card.

first (an integer in the range [0, 16), mandatory in setup)

First bit to read.

last (an integer in the range [0, 16), mandatory in setup)

Last bit to read.

Parameters inherited from the base classes: description, fmtstr, loglevel, lowlevel, maxage, pollinterval, unit

class nicos.ipc.Output

Bases: Input, Moveable

IPC I/O card digital output class.

Shares parameters and doInit with Input.

Attached devices

bus

The communication bus. Type: IPCModBus.

Parameters inherited from the base classes: addr, description, first, fixed, fmtstr, last, loglevel, lowlevel, maxage, pollinterval, target, unit

Table Of Contents

Previous topic

I/O classes

Next topic

Session API reference