yaq/daemons/pmc


Motor driver for motors from Precision MicroControl Corporation.

external links

source
bugtracker
manufacturer

installation

The pmc daemon can be installed using the following package managers:

PyPI

traits

The pmc daemon is composed of the following traits:

has-limits
has-position (from has-limits)
is-homeable
is-daemon

hardware

The pmc daemon has been tested with the following hardware:

dcx-pci100
37-1070-000

configuration

counts_per_mm (Integer) default: 58200
Encoder counts per mm of travel

controller (Integer) default: 0
Index of the controller in MCAPI

axis (Integer) default: 0
Axis number for the individual motor in the controller

tolerance (Integer) default: 20
Tolerance in motor steps

acceleration (Number) default: 70000
Acceleration for the motor in steps/sec/sec

gain (Number) default: 2211
Gain parameter

velocity (Number) default: 11000
Velocity of motion in steps/sec

integral_gain (Number) default: 0
Integral Gain

integration_limit (Integer) default: 0
Integration Limit

integration_option (Integer) default: 0
Integration Option

derivative_gain (Number) default: 6000
Derivative Gain

derivative_sample (Number) default: 0.001364
Derivative Sample

following_error (Number) default: 0
Following Error

velocity_gain (Number) default: 0
Velocity Gain

accel_gain (Number) default: 0
Acceleration Gain

decel_gain (Number) default: 0
Deceleration Gain

encoder_scaling (Number) default: 0
Encoder Scaling

update_rate (Number) default: 0
Update Rate

position_deadband (Number) default: 0
Position Deadband

delay_at_target (Number) default: 0
Delay At Target

output_offset (Number) default: 0
Output Offset

output_deadband (Number) default: 0
Output Deadband

units (String) default: mm
Units

limits ([number, number]) default: [-inf, +inf]
Configuration limits are strictly optional.
from has-limits

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

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

serial (string) default: NULL
Serial number for the particular device represented by the daemon
from is-daemon

make (String) default: NULL
from is-daemon

model (String) default: NULL
from is-daemon

state

The pmc daemon will provide the following state information:

hw_limits
type: [number, number]
from has-limits

position
type: number
from has-limitshas-position

destination
type: number
from has-limitshas-position

methods

Daemons with the pmc trait expose the following public methods:

stop
Halt motion of the motor

steps_to_mm ➜ Number
Convert motor steps to mm travel
Arguments:

steps, {'type': 'Integer', 'description': 'Number of motor steps'}

mm_to_steps ➜ Integer
Convert mm travel to motor steps
Arguments:

mm, {'type': 'Number', 'description': 'mm of travel'}

reset_to_known_postion
Reset the represented position to a known actual position
Arguments:

position, {'type': 'Number', 'description': 'Current actual position in mm'}

get_limits ➜ [number, number]
Get daemon limits. Limits will be the intersection of config limits and driver limits (when appliciable).
from has-limits

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

position, {'type': 'number'}

get_destination ➜ number
Get current daemon destination.
from has-limitshas-position

get_units ➜ string
Get units of daemon. These units apply to the position and destination fields.
from has-limitshas-position

get_position ➜ number
Get current daemon position.
from has-limitshas-position

set_position
Give the daemon a new destination, and begin motion towards that destination.
from has-limitshas-position
Arguments:

position, {'type': 'number'}

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

distance, {'type': 'number'}

home
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

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

id ➜ dictionary
JSON object with information to identify the daemon, including name, kind, make, model, serial.
from is-daemon

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

get_config ➜ dictionary
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_traits ➜ [string]
Get a full list of the daemon traits.
from is-daemon

get_state ➜ dictionary
Get daemon state, as saved in the state.toml file.
from is-daemon

set_state
Set daemon state. Accepts any subset of the state dictionary, dynamically.
from is-daemon

list_methods ➜ [string]
Get an array of all known public method names.
from is-daemon

shutdown
Cleanly shutdown (or restart) daemon.
from is-daemon
Arguments:

restart, {'type': 'boolean', 'default': False}

help ➜ string
If method not given, return a human-readable string with information about the daemon as a whole. If method is given, return a human-readable string with the signature of the method on the first line and a description of the method on subsequent lines. The signature is not specified to be in any particular language. It is intended for usage by humans ONLY.
from is-daemon
Arguments:

method, {'type': 'string'}


built 2020-05-24 18:31:17                                      CC0: no copyright