yaq/daemons/newport-connex-agp


Daemon for the Newport connex-agp controllers This daemon was specifically tested with the CONEX-AG-PR100P. It should, in theory, work (though with other units, potentially) for other CONEX line controllers.

PR100P
bugtracker
manufacturer
source

installation

The newport-connex-agp daemon can be installed using the following package managers:

PyPI

traits

The newport-connex-agp daemon is composed of the following traits:

is-daemon
has-position
is-homeable
uses-uart
uses-serial
has-limits

hardware

The newport-connex-agp daemon has been tested with the following hardware:

newport/conex-ag-pr100p

configuration

axis (int) default: 1
Allows for daisy chained controllers

baud_rate (int) default: 921600

limits (array) default: [-inf, inf]
Configuration limits are strictly optional.

make (['null', 'string']) default: None

model (['null', 'string']) default: CONEX-AGP

out_of_limits (enum) default: closest
Control behavior of daemon when set_position is given a value outside of limits.

port (int)
TCP port for daemon to occupy.

serial (['null', 'string']) default: None
Serial number for the particular device represented by the daemon

serial_port (string)

units (string) default: deg
Units for the motor attatched to the controller

state

The newport-connex-agp daemon will provide the following state information:

destination (float)

error_code (string)
Four digit code describing error conditions in the Tell Status (TS) command.

hw_limits (array)

position (float)

status (string)
Device status, translated into text from the Tell Status (TS) command.

messages

The newport-connex-agp daemon will expose the following public messages:

busy ➜ boolean
Returns true if daemon is currently busy.

direct_serial_write ➜ null
Expose direct access to the serial port to clients. This should not be encouraged for normal use, but may be very important for debugging. If a device is expected to return data, it should be logged at the INFO level, not returned to the client. This is done to allow long tasks to be run asynchronously, and to explicitly discourage use of this method except when debugging. Setting `busy` to true is encouraged, but individual daemon writers should consider their own use case.
parameters:

message (bytes)

get_config ➜ string
Full configuration for the individual daemon as defined in the TOML file. This includes defaults and shared settings not directly specified in the daemon-specific TOML table.

get_config_filepath ➜ string
String representing the absolute filepath of the configuration file on the host machine.

get_destination ➜ float
Get current daemon destination.

get_limits ➜ {'items': 'float', 'type': 'array'}
Get daemon limits.Limits will be the intersection of config limits and driver limits (when appliciable).

get_position ➜ float
Get current daemon position.

get_state ➜ string
Get version of the running daemon

get_units ➜ ['null', 'string']
Get units of daemon. These units apply to the position and destination fields.

home ➜ null
Initiates the homing procedure. The daemon will report as busy during the homing procedure. After the homing procedure is complete, the daemon will return to the current destination.

id ➜ {'type': 'map', 'values': ['null', 'string']}
JSON object with information to identify the daemon, including name, kind, make, model, serial.

in_limits ➜ boolean
Check if a given position is within daemon limits.
parameters:

position (float)

set_position ➜ null
Give the daemon a new destination, and begin motion towards that destination.
parameters:

position (float)

set_relative ➜ float
Give the daemon a new destination relative to its current position. Daemon will immediately begin motion towards new destination. Returns new destination.
parameters:

distance (float)

shutdown ➜ null
Cleanly shutdown (or restart) daemon.
parameters:

restart (boolean) default: False


built 2020-10-27 13:47:08                                      CC0: no copyright