pylab_ml.position_controller.pollux.Pollux

class Pollux(**kwargs)[source]

Bases: Instrument

Class to control the Pollux positioning controller.

__init__(**kwargs)[source]

Initialize the Pollux controller instance and connect to the device, then calibrate the device and set the limits for each axis.

Methods

__init__(**kwargs)

Initialize the Pollux controller instance and connect to the device, then calibrate the device and set the limits for each axis.

base_position()

Set the base position for each axis of the Pollux controller. The base position is set to the following for each axis: - X-axis : 40mm - Z-axis : 100mm - Angular axis : 0 degrees.

calibrate()

Calibrate each axis of the Pollux controller to determine the origin (lower limit).

close([force])

Close connection to instrument.

disconnect()

Disconnect from the Pollux controller and close the VISA resource.

find_names()

find_names() returns list of identifiers strings, lhs of = assignments

flush()

Flush the USB buffer.

help()

Print the docstring of the instrument class.

identify([showInstName])

Identify message.

init([identify])

Optional init for interlock startup after identification.

maximum_limits()

Determine the maximum limits for each axis of the Pollux controller.

message([message])

Device has no display, message display to logger.info.

mqtt_add(client, instrument[, liste, qos])

Add the instrument to mqtt.

mqtt_disconnect()

Remove the instrument from mqtt.

publish(topic, value)

Publish topic as type='cmd' with payload=value.

publish_get(function_name, value)

Publish function_name as type='get' with paylad=value.

publish_set(function_name, value)

Publish function_name as type='set' with paylad=value.

reset()

Send reset to Pollux-Drive.

set_limits()

Set the maximum limits for each axis of the Pollux controller. The limits are set to the following for each axis: - X-axis : 60mm - Z-axis : 100mm - Angular axis : 354 degrees.

setup_inst()

Set instrument settings.

status()

Check the status of each axis (X, Z, Angular) and return True if all are ready, otherwise return False and log the reasons for each axis that is not ready.

stop()

Stop any ongoing movement of the Pollux controller.

Attributes

ang

Get the current angular position in degrees.

blocking_mode

Retrieves the current blocking mode status.

command

id

Get IDN string.

interchoices

mqtt_enable

mqtt_list

mqtt_status

Getter for the mqtt_status.

pos_x

Get the current position of the X-axis in millimeters.

pos_z

Get the current position of the Z-axis in millimeters.

speed_ang

Get the current angular speed in degrees per second.

speed_x

Get the current speed of the X-axis in millimeters per second.

speed_z

Get the current speed of the Z-axis in millimeters per second.

property ang

Get the current angular position in degrees.

base_position()[source]

Set the base position for each axis of the Pollux controller. The base position is set to the following for each axis:

  • X-axis : 40mm

  • Z-axis : 100mm

  • Angular axis : 0 degrees

property blocking_mode

Retrieves the current blocking mode status.

calibrate()[source]

Calibrate each axis of the Pollux controller to determine the origin (lower limit).

close(force=False)

Close connection to instrument.

disconnect()[source]

Disconnect from the Pollux controller and close the VISA resource.

find_names()

find_names() returns list of identifiers strings, lhs of = assignments

Returns:

obj_names – List of identifier strings

Return type:

list of str

flush()[source]

Flush the USB buffer.

help()

Print the docstring of the instrument class.

property id

Get IDN string.

identify(showInstName=False)

Identify message.

init(identify=False)

Optional init for interlock startup after identification.

json = <module 'json' from '/home/runner/miniconda3/envs/test/lib/python3.9/json/__init__.py'>
maximum_limits()[source]

Determine the maximum limits for each axis of the Pollux controller.

message(message=None)[source]

Device has no display, message display to logger.info.

mqtt_add(client, instrument, liste='#', qos=0)

Add the instrument to mqtt. Calling from base_instrument, after the instrument (device) has been create. Normally you have not to use this function, only base_instrument use it.

Parameters:
  • client (mqtt_init) – The MQTT client instance to which the instrument should be added.

  • instrument (object) – The instrument to be added to the MQTT client.

  • liste (list or str) – A list of attributes for which MQTT messages should be sent. If set to “#”, all attributes will be included (default: “#”).

  • qos (int) – The Quality of Service level for MQTT messages (default: 0).

Return type:

None

mqtt_disconnect()

Remove the instrument from mqtt. Calling from base_instrument, if the instrument are closing. Normally you have not to use this function, only base_instrument use it.

property mqtt_status

Getter for the mqtt_status.

property pos_x

Get the current position of the X-axis in millimeters.

property pos_z

Get the current position of the Z-axis in millimeters.

publish(topic, value)

Publish topic as type=’cmd’ with payload=value.

Parameters:
  • topic (str) – The name of the topic to publish.

  • value (any) – The value to be published.

Return type:

None

publish_get(function_name, value)

Publish function_name as type=’get’ with paylad=value.

Parameters:
  • function_name (str) – The name of the function to be published as a ‘get’ command.

  • value (any) – The value to be published as the payload of the ‘get’ command.

Return type:

None

publish_set(function_name, value)

Publish function_name as type=’set’ with paylad=value.

Parameters:
  • function_name (str) – The name of the function to be published as a ‘set’ command.

  • value (any) – The value to be published as the payload of the ‘set’ command.

Return type:

None

reset()[source]

Send reset to Pollux-Drive.

set_limits()[source]

Set the maximum limits for each axis of the Pollux controller. The limits are set to the following for each axis:

  • X-axis : 60mm

  • Z-axis : 100mm

  • Angular axis : 354 degrees

setup_inst()[source]

Set instrument settings.

property speed_ang

Get the current angular speed in degrees per second.

property speed_x

Get the current speed of the X-axis in millimeters per second.

property speed_z

Get the current speed of the Z-axis in millimeters per second.

status()[source]

Check the status of each axis (X, Z, Angular) and return True if all are ready, otherwise return False and log the reasons for each axis that is not ready.

Returns:

True if all axes are ready, False otherwise.

Return type:

bool

stop()[source]

Stop any ongoing movement of the Pollux controller.