Controller layer

class icepap.controller.IcePAPController(host, port=5000, timeout=3, auto_axes=False, **kwargs)

IcePAP motor controller class.

abort(axes)

Abort multiple axis movement (IcePAP user manual pag. 129).

Parameters

axes – [str/int]

add_alias(alias, axis)

Set a alias for an axis. The axis can have more than one alias.

Parameters
  • alias – str

  • axis – int

add_aliases(aliases)

Set alias for mutiple axes.

Parameters

aliases – {str: int}

add_pmux(source, dest='', pos=True, aux=True, hard=False)

Configures a position signal multiplexer configuration (IcePAP user manual, page 107).

Parameters
  • source – Source node

  • dest – Target node

  • pos – Connect the Position signals

  • aux – Connect the Auxiliary signals

  • hard – Enabling/Disabling hard flag connection.

property axes

Get the axes numbers.

Returns

[int]

check_version()

Compares the current version installed with the supported versions specified in the versions module.

Returns

system version number, -1 if not consistent.

clear_pmux(dest='')

Clear the multiplexer configuration. You can pass a destination with an optional signal or just the signals to remove (IcePAP user manual, page 107).

Parameters

dest – node to remove

ctrlrst(axes)

Reset control position register for multiple axis.

Parameters

axes – [str/int]

disconnect()

Method to close the communication with the IcePAP :return:

property drivers

Get the drivers IcePAPAxis objects.

Returns

[IcePAPAxis]

esync(axes)

Synchronize internal position register for multiple axis.

Parameters

axes – [str/int]

get_acctime(axes, atype='NOMINAL')

Get multiple velocities (IcePAP user manual pag. 141).

Parameters

axes – [str/int]

Returns

[float]

get_aliases()

Get the aliases of the system. One axis can have move than one alias.

Returns

{int:[str]}

get_enc(axes, register='AXIS')

Get multiple encoder.

Parameters
  • axes – [str/int]

  • register – str

Returns

[float]

get_fpos(axes, register='AXIS')

Fast read of multiple positions (IcePAP user manual pag. 73).

Parameters
  • axes – [str/int]

  • register – str

Returns

[float]

get_fstatus(axes)

Fast read of multiple status (IcePAP user manual pag. 74).

Parameters

axes – [str/int]

Returns

[int]

get_homestat(axes)

Get home search status.

Parameters

axes – [str/int]

Returns

[(str,int)] list of Status, Direction per motor

get_pmux()

Returns a list of the current signals sources used as axis indexers (IcePAP user manual, page 107).

Returns

list of multiplexer configurations.

get_pos(axes, register='AXIS')

Get multiple position.

Parameters
  • axes – [str/int]

  • register – str

Returns

[float]

get_power(axes)

Get axes power state.

Parameters

axes – [str/int]

Returns

[bool]

get_prog_status()

Request the state of the firmware programing operations (IcePAP user manual, page 112).

Returns

{ OFF | ACTIVE <progress> | DONE | ERROR }

get_rid(rack_nrs)

Get the rack hardware identification string (IcePAP user manual pag. 118).

Parameters

rack_nrs – int/[int]

Returns

[str]

get_rtemp(rack_nrs)

Get the rack temperatures (IcePAP user manual pag. 123).

Parameters

rack_nrs – int/[int]

Returns

[float]

get_states(axes)

Fast read of the multiples status

Parameters

axes – [str/int]

Returns

[State]

get_status(axes)

Read of multiple status (IcePAP user manual pag. 128).

Parameters

axes – [str/int]

Returns

[int]

get_velocity(axes, vtype='NOMINAL')

Get multiple velocities (IcePAP user manual pag. 141).

Parameters

axes – [str/int]

Returns

[float]

items()

Get the axes and drivers IcePAPAxis objects.

Returns

[(axis, IcePAPAxis),]

property mode

Get the system mode (IcePAP user manual pag. 91).

Returns

str

move(axes_pos, group=True, strict=False)

Start absolute movement for axes motor. The method allows aliases.

Parameters
  • axes_pos – [(str/int, int)]

  • group – bool

  • strict – bool

movep(pos, axes, group=True, strict=False)

Start axes movement to parameter value.

Parameters
  • pos – float

  • axes – [str/int]

  • group – bool

  • strict – bool

pmove(pos, axes, group=False, strict=False)

Start parameter movement.

Parameters
  • pos – float

  • axes – [str/int]

  • group – bool

  • strict – bool

print_commands()

Get the allowed commands (IcePAP user manual pag. 75).

prog(component, force=False)

Firmware programming command. This command uses the firmware code previously stored in the flash memory of the system master board (IcePAP user manual, page 112).

Parameters
  • component – { board adress | DRIVERS | CONTROLLERS| ALL }

  • force – Force overwrite regardless of being idential versions.

reboot()

System reboot (IcePAP user manual pag. 115).

reset(rack_nr=None)

Reset system or rack (IcePAP user manual pag. 117).

rmove(axes_pos, group=True, strict=False)

Start relative movement for axes motor. The method allows aliases.

Parameters
  • axes_pos – [(str/int,int)]

  • group – bool

  • strict – bool

send_cmd(cmd)

Communication function used to send any command to the IcePAP controller.

Parameters

cmd – string command following the Programming Interface.

Returns

None or list of string without the command and the CRLF.

set_acctime(axes_acc)

Set multiple velocities (Icepap user manual pag. 141).

Parameters

axes_acc – [(str/int, float)]

set_enc(axes_pos, register='AXIS')

Set multiple encoder.

Parameters
  • axes_pos – [(str/int,int)]

  • register – str

set_pos(axes_pos, register='AXIS')

Set multiple positions.

Parameters
  • axes_pos – [(str/int,int)]

  • register – str

set_power(axes, power_on=True)

Set axes power state.

Parameters
  • axes – [str/int]

  • power_on – bool

set_velocity(axes_vel)

Set multiple velocities (Icepap user manual pag. 141).

Parameters

axes_vel – [(str/int, float)]

sprog(component=None, force=False, saving=False)

Firmware programming command. This command assumes that the firmware code will be transferred as a binary data block (IcePAP user manual, page 112).

Parameters
  • component – { NONE | board adress | DRIVERS | CONTROLLERS| ALL }

  • force – Force overwrite regardless of being idential versions.

  • saving – Saves firmware into master board flash.

stop(axes)

Stop multiple axis movement (IcePAP user manual pag. 129).

Parameters

axes – [str/int]

update_axes()

Method to check if the axes created are presents. In case of no, the method will remove the IcePAPAxis object and its aliases.

Note: The axis can be present but not alive

Returns

property ver

Get the version of the all driver modules: Driver, DSP, FPGA, PCB, IO (IcePAP user manual pag. 144).

Returns

dict{module: (ver, date)}

property ver_saved

Returns the firmware version stored in the master flash memory.

Returns

dict{}