Expose a stepper box motor as a yaq daemon. The uses for this daemon combine the implementation of 'Filter Wheels' and 'Linear stepper drivers' (sometimes referred to as FuYu motors) You can specify discrete stops which is particularly useful for discrete filter wheels. The default settings are for operation as a continuous filter wheel: - No discrete stops - units of 'deg' - 1.11111... steps per unit (0.9 degrees per step, or 400 steps per revolution) - two full revolutions (720 degrees) in either direction from the home flag The settings for our standard 50 mm 'fuyu' motors: - No discrete stops - units of 'mm' - -100.0 steps per unit (pitch of 2.0 mm per revolution, 200 steps per revolution) - Negative because of direction of travel from home - limits = [0.0, 50.0] The settings for our larger 400 mm 'fuyu' motors: - No discrete stops - units of 'mm' - -20.0 steps per unit (pitch of 5.0 mm per revolution, 100 steps per revolution) - Negative because of direction of travel from home - limits = [0.0, 400.0]



The wright-stepper-box daemon can be installed using the following package managers:



The wright-stepper-box daemon is composed of the following traits:



baud_rate (int) default: 57600
from uses-uart

enable (boolean) default: True
Disable this daemon. The kind entry-point will not attempt to start this daemon.
from is-daemon

identifiers ({'type': 'map', 'values': 'double'}) default: {}
Position identifiers
from is-discrete

limits (array) default: [-720.0, 720.0]
Configuration limits are strictly optional.
from has-limits

log_level ({'name': 'level', 'symbols': ['debug', 'info', 'notice', 'warning', 'error', 'critical', 'alert', 'emergency'], 'type': 'enum'}) default: info
Set daemon log-level.
from is-daemon

log_to_file (boolean) default: False
Optionally force logging to a file.
from is-daemon

make (['null', 'string']) default: None
from is-daemon

microstep (int) default: 1
Increases angle resolution of motor stepping; valid integers are 1, 2, 4, 8, 16, 32; Must be the same for all motors in a box

model (['null', 'string']) default: None
from is-daemon

motor (int) default: 0
Index for the motor

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

port (int)
TCP port for daemon to occupy.
from is-daemon

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

serial_port (string)
from uses-uart

steps_per_unit (double) default: 1.1111111111111112
Number of full motor steps per 1 unit. This is independent of microstepping

units (string) default: deg
Units of the motor


The wright-stepper-box daemon will provide the following state information:

destination (double)
from has-position

hw_limits (array)
from has-limits

position (double)
from has-position

position_identifier (['null', 'string'])
Current position identifier.
from is-discrete


The wright-stepper-box daemon will expose the following public messages:

busy ➜ boolean
Returns true if daemon is currently busy.
from is-daemon

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.
from uses-serial

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.
from is-daemon

get_config_filepath ➜ string
String representing the absolute filepath of the configuration file on the host machine.
from is-daemon

get_destination ➜ double
Get current daemon destination.
from has-position

get_identifier ➜ ['null', 'string']
Get current identifier string. Current identifier may be None.
from is-discrete

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

get_position ➜ double
Get current daemon position.
from has-position

get_position_identifier_options ➜ {'items': 'string', 'type': 'array'}
Get position identifier names. Identifiers may not change at runtime.
from is-discrete

get_position_identifiers ➜ {'type': 'map', 'values': 'double'}
Get position identifiers. Identifiers may not change at runtime.
from is-discrete

get_state ➜ string
Get version of the running daemon
from is-daemon

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

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.
from is-homeable

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

in_limits ➜ boolean
Check if a given position is within daemon limits.
from has-limits

position (double)

set_identifier ➜ double
Set using an identifier. Returns new destination.
from is-discrete

identifier (string)

set_position ➜ null
Give the daemon a new destination, and begin motion towards that destination.
from has-position

position (double)

set_relative ➜ double
Give the daemon a new destination relative to its current position. Daemon will immediately begin motion towards new destination. Returns new destination.
from has-position

distance (double)

shutdown ➜ null
Cleanly shutdown (or restart) daemon.
from is-daemon

restart (boolean) default: False

built 2023-11-21 16:02:05                                      CC0: no copyright