#include <mechanism.h>
Data Fields | |
char | Name [64] |
Device name (e.g. Filter), appears as Name=... in status messages. | |
int | Topology |
Device drive topology, one of MECH_ROTARY or MECH_LINEAR. | |
int | Resolution |
Microstep Resolution in microsteps/rev. Default is SI_RESOLUTION, currently not user-defined. | |
char | Port [64] |
Microstep drive communications port (e.g., /dev/ttyS0 or 128.172.2.12:8016). | |
int | FD |
Microstep drive comm port file descriptor, <0 if no drive connected. | |
long | Timeout |
Serial communications timeout interval in seconds. Default is MECH_TIMEOUT sec. | |
long | Polltime |
Drive status polling interval in msec. Default is MECH_POLLTIME msec. | |
int | State |
Drive Motion state (SI_READY, SI_MOVING, SI_SFAULT, SI_WIEXEC, or SI_WTEXEC). | |
int | Accel |
Motion profile acceleration in rev/s/s, range SI_MINVDOT to SI_MAXVDOT rev/s/s. | |
double | Speed |
Motion profile speed in rev/s, range SI_MINVEL to SI_MAXVEL rev/s. | |
int | Distance |
Motion profile move distance in microsteps, range +/-0 to SI_MAXMOVE microsteps. | |
int | Decel |
Motion profile deceleration in rev/s/s, range SI_MINVDOT to SI_MAXVDOT rev/s/s. | |
double | Current |
Motion profile drive current in Amps, range 0 to SI_IMAX. | |
double | IdleCurrent |
Motion idle current in Amps, range 0 to SI_IMAX. | |
int | Idle |
Enable/Disable drive idle (1=Enable/0=Disable). | |
char | Inputs [SI_MAXINPUTS+1] |
Raw input sensor bit string, size $SI_MAXINPUTS+1. | |
char | ISmask [SI_MAXINPUTS+1] |
Input Status (IS) Mask: 0 if input asserts low, 1 if input asserts high, size SI_MAXINPUTS+1. | |
int | NPos |
Number of discrete (indexed) mechanism positions, 0 if a continuous drive. | |
int | Offset |
Offset between the device and encoder positions (usually 0). | |
int | StepPos |
Number of microsteps per indexed position. | |
int | NData |
Number of position input data bits (1..SI_MAXINPUTS). | |
int | EncPos |
Decimal encoder position. | |
int | InPosAddr |
Address of the in-position bit (0 if unused, 1..SI_MAXINPUTS otherwise). | |
int | InPos |
Value of the in-position bit (if used). | |
int | OccupiedAddr |
Address of the position occupation bit (0 if unused, 1..SI_MAXINPUTS otherwise). | |
int | Occupied |
Value of the position occupation bit (1=occupied/0=empty). | |
int | HomeAddr |
Address of the home position sensor (0 if unused, 1..SI_MAXINPUTS otherwise). | |
int | AtHome |
Value of the home sensor (1 or 0, if used). | |
int | Position |
Device position (in steps from step-count home/zero position). | |
int | StepsPerMM |
Number of microsteps per millimeter of physical travel (0 if unused). | |
int | Limits |
Limit Switch Setting: MECH_NORMALLY_OPEN, MECH_NORMALLY_CLOSED, MECH_NOLIMITS. | |
int | CWlimit |
Value of the clockwise limit switch input (1 if at limit, 0 if not). | |
int | CCWlimit |
Value of the counterclockwise limit switch input (1 if at limit, 0 if not). | |
int | BrakeAddr |
Address of the brake drive output (0 if unused, 1..SI_MAXOUTPUTS otherwise). | |
int | Brake |
Brake is set (1) or released (0). | |
int | Debug |
Enable/Disable drive-level debugging output (1=Enable/0=Disable). | |
int | Abort |
A move abort has been issued (1=true/0=false). |
Contains data on the configuration of a mechanism and the drive parameters of its Si microstep drive. Encapsulates all data we should need for operating any mechanism in a Rotary or Linear topology, indexed or continuous.
The contents of this struct can be initialized by the MechInitTable() function.
|
Device name (e.g. Filter), appears as Name=... in status messages.
|
|
Device drive topology, one of MECH_ROTARY or MECH_LINEAR.
|
|
Microstep Resolution in microsteps/rev. Default is SI_RESOLUTION, currently not user-defined.
|
|
Microstep drive communications port (e.g., /dev/ttyS0 or 128.172.2.12:8016).
|
|
Microstep drive comm port file descriptor, <0 if no drive connected.
|
|
Serial communications timeout interval in seconds. Default is MECH_TIMEOUT sec.
|
|
Drive status polling interval in msec. Default is MECH_POLLTIME msec.
|
|
Drive Motion state (SI_READY, SI_MOVING, SI_SFAULT, SI_WIEXEC, or SI_WTEXEC).
|
|
Motion profile acceleration in rev/s/s, range SI_MINVDOT to SI_MAXVDOT rev/s/s.
|
|
Motion profile speed in rev/s, range SI_MINVEL to SI_MAXVEL rev/s.
|
|
Motion profile move distance in microsteps, range +/-0 to SI_MAXMOVE microsteps.
|
|
Motion profile deceleration in rev/s/s, range SI_MINVDOT to SI_MAXVDOT rev/s/s.
|
|
Motion profile drive current in Amps, range 0 to SI_IMAX.
|
|
Motion idle current in Amps, range 0 to SI_IMAX.
|
|
Enable/Disable drive idle (1=Enable/0=Disable).
|
|
Raw input sensor bit string, size $SI_MAXINPUTS+1.
|
|
Input Status (IS) Mask: 0 if input asserts low, 1 if input asserts high, size SI_MAXINPUTS+1.
|
|
Number of discrete (indexed) mechanism positions, 0 if a continuous drive.
|
|
Offset between the device and encoder positions (usually 0).
|
|
Number of microsteps per indexed position.
|
|
Number of position input data bits (1..SI_MAXINPUTS).
|
|
Decimal encoder position.
|
|
Address of the in-position bit (0 if unused, 1..SI_MAXINPUTS otherwise).
|
|
Value of the in-position bit (if used).
|
|
Address of the position occupation bit (0 if unused, 1..SI_MAXINPUTS otherwise).
|
|
Value of the position occupation bit (1=occupied/0=empty).
|
|
Address of the home position sensor (0 if unused, 1..SI_MAXINPUTS otherwise).
|
|
Value of the home sensor (1 or 0, if used).
|
|
Device position (in steps from step-count home/zero position).
|
|
Number of microsteps per millimeter of physical travel (0 if unused).
|
|
Limit Switch Setting: MECH_NORMALLY_OPEN, MECH_NORMALLY_CLOSED, MECH_NOLIMITS.
|
|
Value of the clockwise limit switch input (1 if at limit, 0 if not).
|
|
Value of the counterclockwise limit switch input (1 if at limit, 0 if not).
|
|
Address of the brake drive output (0 if unused, 1..SI_MAXOUTPUTS otherwise).
|
|
Brake is set (1) or released (0).
|
|
Enable/Disable drive-level debugging output (1=Enable/0=Disable).
|
|
A move abort has been issued (1=true/0=false).
|