motion − accepts NML motion commands, interacts with HAL in realtime |
loadrt motmod [base_period_nsec=period] [servo_period_nsec=period] [traj_period_nsec=period] [key=SHMEM_KEY] [num_joints=[0-9]] |
These pins and parameters are created by the realtime motmod module. This module provides a HAL interface for EMC’s motion planner. Basically motmod takes in a list of waypoints and generates a nice blended and constraint-limited stream of joint positions to be fed to the motor drives. Pin names starting with "axis" are actually joint values, but the pins and parameters are still called "axis.N". They are read and updated by the motion-controller function. |
axis.N.amp-enable-out OUT bit |
TRUE if the amplifier for this joint should be enabled |
axis.N.amp-fault-in IN bit |
Should be driven TRUE if an external fault is detected with the amplifier for this joint |
axis.N.home-sw-in IN bit |
Should be driven TRUE if the home switch for this joint is closed |
axis.N.homing OUT bit |
TRUE if the joint is currently homing |
axis.N.index-enable IO BIT |
Should be attached to the index-enable pin of the joint’s encoder to enable homing to index pulse |
axis.N.jog-counts IN s32 |
Connect to the "counts" pin of an external encoder to use a physical jog wheel. |
axis.N.jog-enable IN bit |
When TRUE (and in manual mode), any change to "jog-counts" will result in motion. When false, "jog-counts" is ignored. |
axis.N.jog-scale IN float |
Sets the distance moved for each count on "jog-counts", in machine units. |
axis.N.jog-vel-mode IN bit |
When FALSE (the default), the jogwheel operates in position mode. The axis will move exactly jog-scale units for each count, regardless of how long that might take. When TRUE, the wheel operates in velocity mode - motion stops when the wheel stops, even if that means the commanded motion is not completed. |
axis.N.joint-pos-cmd OUT float |
The joint (as opposed to motor) commanded position. There may be several offsets between the joint and motor coordinates: backlash compensation, screw error compensation, and home offsets. |
axis.N.joint-pos-fb OUT float |
The joint feedback position. This value is computed from the actual motor position minus joint offsets. Useful for machine visualization. |
axis.N.motor-pos-cmd OUT float |
The commanded position for this joint. |
axis.N.motor-pos-fb IN float |
The actual position for this joint. |
axis.N.neg-lim-sw-in IN bit |
Should be driven TRUE if the negative limit switch for this joint is tripped. |
axis.N.pos-lim-sw-in IN bit |
Should be driven TRUE if the positive limit switch for this joint is tripped. |
motion.adaptive-feed IN float |
When adaptive feed is enabled with M52 P1, the commanded velocity is multiplied by this value. This effect is multiplicative with the NML-level feed override value and motion.feed-hold. |
motion.analog-in-NN IN float |
These pins are used by M66 Enn wait-for-input mode. |
motion.current-vel |
Current cartesian velocity |
motion.digital-in-NN IN bit |
These pins are used by M66 Pnn wait-for-input mode. |
motion.digital-out-NN OUT bit |
These pins are controlled by the M62 through M65 words. |
motion.distance-to-go OUT float |
Distance remaining in the current move |
motion.enable IN bit |
If this bit is driven FALSE, motion stops, the machine is placed in the "machine off" state, and a message is displayed for the operator. For normal motion, drive this bit TRUE. |
motion.feed-hold IN bit |
When Feed Stop Control is enabled with M53 P1, and this bit is TRUE, the feed rate is set to 0. |
motion.motion-inpos OUT bit |
TRUE if the machine is in position. |
motion.probe-input IN bit |
G38.x uses the value on this pin to determine when the probe has made contact. TRUE for probe contact closed (touching), FALSE for probe contact open. |
motion.spindle-brake OUT bit |
TRUE when the spindle brake should be applied |
motion.spindle-forward OUT bit |
TRUE when the spindle should rotate forward |
motion.spindle-index-enable I/O bit |
For correct operation of spindle synchronized moves, this signal must be hooked to the index-enable pin of the spindle encoder. |
motion.spindle-on OUT bit |
TRUE when spindle should rotate |
motion.spindle-reverse OUT bit |
TRUE when the spindle should rotate backward |
motion.spindle-revs IN float |
For correct operation of spindle synchronized moves, this signal must be hooked to the position pin of the spindle encoder. |
motion.spindle-speed-in IN float |
Actual spindle speed feedback in revolutions per second; used for G96 feed-per-revolution and constant surface speed modes. |
motion.spindle-speed-out OUT float |
Desired spindle speed in rotations per minute |
motion.spindle-at-speed IN bit |
Motion will pause until this pin is TRUE, under the following conditions: before the first feed move after each spindle start or speed change; before the start of every chain of spindle-synchronized moves; and if in CSS mode, at every rapid->feed transition. |
Many of the pins below serve as debugging aids, and are subject to change or removal at any time. |
axis.N.active |
TRUE when this joint is active |
axis.N.backlash-corr |
Backlash or screw compensation raw value |
axis.N.backlash-filt |
Backlash or screw compensation filtered value (respecting motion limits) |
axis.N.backlash-vel |
Backlash or screw compensation velocity |
axis.N.coarse-pos-cmd |
axis.N.error |
TRUE when this joint has encountered an error, such as a limit switch closing |
axis.N.f-error |
The actual following error |
axis.N.f-error-lim |
The following error limit |
axis.N.f-errored |
TRUE when this joint has exceeded the following error limit |
axis.N.faulted |
axis.N.free-pos-cmd |
The "free planner" commanded position for this joint. |
axis.N.free-tp-enable |
TRUE when the "free planner" is enabled for this joint |
axis.N.free-vel-lim |
The velocity limit for the free planner |
axis.N.home-state |
Reflects the step of homing currently taking place |
axis.N.homed |
TRUE if the joint has been homed |
axis.N.in-position |
TRUE if the joint is using the "free planner" and has come to a stop |
axis.N.joint-vel-cmd |
The joint’s commanded velocity |
axis.N.kb-jog-active |
axis.N.neg-hard-limit |
The negative hard limit for the joint |
axis.N.pos-hard-limit |
The positive hard limit for the joint |
axis.N.wheel-jog-active |
motion.coord-error |
TRUE when motion has encountered an error, such as exceeding a soft limit |
motion.coord-mode |
TRUE when motion is in "coordinated mode", as opposed to "teleop mode" |
motion.in-position |
Same as the pin motion.motion-inpos |
motion.motion-enabled |
TRUE when motion is enabled |
motion.on-soft-limit |
motion.program-line |
motion.teleop-mode |
TRUE when motion is in "teleop mode", as opposed to "coordinated mode" |
Many of the parameters serve as debugging aids, and are subject to change or removal at any time. |
motion-command-handler.time |
motion-command-handler.tmax |
motion-controller.time |
motion-controller.tmax |
Show information about the execution time of these HAL functions in CPU cycles |
motion.debug-* |
These values are used for debugging purposes. |
motion.servo.last-period |
The number of CPU cycles between invocations of the servo thread. Typically, this number divided by the CPU speed gives the time in seconds, and can be used to determine whether the realtime motion controller is meeting its timing constraints |
motion.servo.overruns |
By noting large differences between successive values of motion.servo.last-period, the motion controller can determine that there has probably been a failure to meet its timing constraints. Each time such a failure is detected, this value is incremented. |
Generally, these functions are both added to the servo-thread in the order shown. |
motion-command-handler |
Processes motion commands coming from user space |
motion-controller |
Runs the emc motion controller |
This manual page is horribly incomplete. |
iocontrol(1) |