Table of Contents
1 Halui
1.1 Introduction
Halui is a HAL based user interface for EMC, it connects HAL pins to NML commands. Most of the functionality (buttons, indicators etc.) that is provided by a traditional GUI (mini, Axis, etc.), is provided by HAL pins in Halui.
The easiest way to add halui is to add the following to the [HAL] section of the ini file.
HALUI = halui
An alternate way to invoke it (especially when using a stepconf generated config file) is to include the following in your custom.hal file. Make sure you use the actual path to your ini file.
loadusr halui -ini /path/to/inifile.ini
in your custom.hal file.
1.2 Halui pin reference
1.2.1 Abort
- halui.abort (bit, in) - pin to send an abort message (clears out most errors)
1.2.2 Axis
- halui.axis.n.pos-commanded (float, out) - Commanded axis position in machine coordinates
- halui.axis.n.pos-feedback (float, out) - Feedback axis position in machine coordinates
- halui.axis.n.pos-relative (float, out) - Commanded axis position in relative coordinates
1.2.3 E-Stop
- halui.estop.activate (bit, in) - pin for requesting E-Stop
- halui.estop.is-activated (bit, out)- indicates E-stop reset
- halui.estop.reset (bit, in) - pin for requesting E-Stop reset
1.2.4 Feed Override
- halui.feed-override.count-enable (bit, in) - must be true for counts to work.
- halui.feed-override.counts (s32, in) - counts from an encoder to change FO
- halui.feed-override.decrease (bit, in) - pin for decreasing the FO (-=scale)
- halui.feed-override.increase (bit, in) - pin for increasing the FO (+=scale)
- halui.feed-override.scale (float, in) - pin for setting the scale for increase and decrease
- halui.feed-override.value (float, out) - current FO value
1.2.5 Flood
- halui.flood.is-on (bit, out) - indicates flood is on
- halui.flood.off (bit, in) - pin for requesting flood off
- halui.flood.on (bit, in) - pin for requesting flood on
1.2.6 Jog
<n> is a number between 0 and 8 and 'selected'.
- halui.jog-deadband (float, in) - deadband for analog jogging (smaller jogging speed requests are not performed)
- halui.jog-speed (float, in) - pin for setting jog speed for minus/plus jogging
- halui.jog.<n>.analog (float, in) - analog velocity input for jogging (usefull with joysticks or other analog devices)
- halui.jog.<n>.minus (bit, in)- pin for jogging axis <n> in negative direction at the halui.jog.speed velocity
- halui.jog.<n>.plus (bit, in) - pin for jogging axis <n> in positive direction at the halui.jog.speed velocity
- halui.jog.selected.minus (bit, in) - pin for jogging the selected axis in negative direction at the halui.jog.speed velocity
- halui.jog.selected.plus (bit, in) - pin for jogging the selected axis in positive direction at the halui.jog.speed velocity
1.2.7 Joint
<n> is a number between 0 and 8 and 'selected'.
- halui.joint.<n>.has-fault (bit, out) - status pin telling the joint has a fault
- halui.joint.<n>.home (bit, in) - pin for homing the specific joint
- halui.joint.<n>.is-homed (bit, out) - status pin telling that the joint is homed
- halui.joint.<n>.is-selected bit (bit, out) - status pin a joint is selected - internal halui
- halui.joint.<n>.on-hard-max-limit (bit, out) - status pin telling joint <n> is on the positive hardware limit switch
- halui.joint.<n>.on-hard-min-limit (bit, out) - status pin telling joint <n> is on the negative hardware limit switch
- halui.joint.<n>.on-soft-max-limit (bit, out) - status pin telling joint <n> is at the positive software limit
- halui.joint.<n>.on-soft-min-limit (bit, out) - status pin telling joint <n> is at the negative software limit
- halui.joint.<n>.select (bit, in) - select joint (0..7) - internal halui
- halui.joint.selected (u32, out) - selected joint (0..7) - internal halui
- halui.joint.selected.has-fault (bit, out) - status pin telling that the joint <n> has a fault
- halui.joint.selected.home (bit, in) - pin for homing the selected joint
- halui.joint.selected.is-homed (bit, out) - status pin telling that the selected joint is homed
- halui.joint.selected.on-hard-max-limit (bit, out) - status pin telling that the selected joint is on the positive hardware limit
- halui.joint.selected.on-hard-min-limit (bit, out) - status pin telling that the selected joint is on the negative hardware limit
- halui.joint.selected.on-soft-max-limit (bit, out) - status pin telling that the selected joint is on the positive software limit
- halui.joint.selected.on-soft-min-limit (bit, out) - status pin telling that the selected joint is on the negative software limit
1.2.8 Lube
- halui.lube.is-on (bit, out) - indicates lube is on
- halui.lube.off (bit, in) - pin for requesting lube off
- halui.lube.on (bit, in) - pin for requesting lube on
1.2.9 Machine
- halui.machine.is-on (bit, out) - indicates machine on
- halui.machine.off (bit, in) - pin for requesting machine off
- halui.machine.on (bit, in) - pin for requestiong machine on
1.2.10 Max Velocity
The maximum linear velocity can be adjusted from 0 to the MAX_VELOCITY that is set in the [TRAJ] section of the ini file.
- halui.max-velocity.count-enable (bit, in) - when TRUE, modify max velocity when counts changes
- halui.max-velocity.counts (s32, in) - lets you hook up an encoder to change the max velocity
- halui.max-velocity.decrease (bit, in) - pin for decreasing max velocity
- halui.max-velocity.increase (bit, in) - pin for increasing max velocity
- halui.max-velocity.scale (float, in) - the amount applied to the current maximum velocity with each transition from off to on of the increase or decrease pin in machine units per second.
- halui.max-velocity.value (float, out) - is the maximum linear velocity in machine units per second.
1.2.11 MDI
Sometimes the user wants to add more complicated tasks to be performed by the activation of a HAL pin. This is possible using the following MDI commands scheme:
- The MDI_COMMAND is added to the ini file in the [HALUI] section.
[HALUI]
MDI_COMMAND = G0 X0
- When halui starts it will read the MDI_COMMAND fields in the ini, and export pins from 00 to the number of MDI_COMMAND's found in the ini up to a maximum of 64 commands.
- halui.mdi-command-<nn> (bit, in) - halui will try to send the MDI command defined in the ini. This will not always succeed, depending on the operating mode emc2 is in (e.g. while in AUTO halui can't successfully send MDI commands). If the command succeeds then it will place EMC in the MDI mode and then back to Manual mode.
1.2.12 Mist
- halui.mist.is-on (bit, out) - indicates mist is on
- halui.mist.off (bit, in) - pin for requesting mist off
- halui.mist.on (bit, in) - pin for requesting mist on
1.2.13 Mode
- halui.mode.auto (bit, in) - pin for requesting auto mode
- halui.mode.is-auto (bit, out) - indicates auto mode is on
- halui.mode.is-joint (bit, out) - pin showing joint by joint jog mode is on
- halui.mode.is-manual (bit, out) - indicates manual mode is on
- halui.mode.is-mdi (bit, out) - indicates mdi mode is on
- halui.mode.is-teleop (bit, out) - pin showing coordinated jog mode is on
- halui.mode.joint (bit, in) - pin for requesting joint by joint jog mode
- halui.mode.manual (bit, in) - pin for requesting manual mode
- halui.mode.mdi (bit, in) - pin for requesting mdi mode
1.2.14 Program
- halui.program.block-delete.is-on (bit, out) -
- halui.program.block-delete.off (bit, in) -
- halui.program.block-delete.on (bit, in) -
- halui.program.is-idle (bit, out) - status pin telling that no program is running
- halui.program.is-paused (bit, out) - status pin telling that a program is paused
- halui.program.is-running (bit, out) - status pin telling that a program is running
- halui.program.optional-stop.is-on (bit, out) -
- halui.program.optional-stop.off (bit, in) -
- halui.program.optional-stop.on (bit, in) -
- halui.program.pause (bit, in) - pin for pausing a program
- halui.program.resume (bit, in) - pin for resuming a paused program
- halui.program.run (bit, in) - pin for running a program
- halui.program.step (bit, in) - pin for stepping in a program
- halui.program.stop (bit, in) - pin for stopping a program
1.2.15 Spindle Override
- halui.spindle-override.count-enable (bit, in) - when TRUE, modify spindle override when counts changes.
- halui.spindle-override.counts (s32, in) - counts from an encoder for example to change SO
- halui.spindle-override.decrease (bit, in)- pin for decreasing the SO (-=scale)
- halui.spindle-override.increase (bit, in) - pin for increasing the SO (+=scale)
- halui.spindle-override.scale (float, in) - pin for setting the scale on changing the SO
- halui.spindle-override.value (float, out) - current SO value
1.2.16 Spindle
- halui.spindle.brake-is-on (bit, out) - indicates brake is on
- halui.spindle.brake-off (bit, in) - pin for deactivating spindle/brake
- halui.spindle.brake-on (bit, in) - pin for activating spindle-brake
- halui.spindle.decrease (bit, in) - decreases spindle speed
- halui.spindle.forward (bit, in) - starts the spindle with CW motion
- halui.spindle.increase (bit, in)- increases spindle speed
- halui.spindle.is-on (bit, out) -
- halui.spindle.reverse (bit, in)- starts the spindle with a CCW motion
- halui.spindle.runs-backward (bit, out) -
- halui.spindle.runs-forward (bit, out) -
- halui.spindle.start (bit, in) - starts the spindle
- halui.spindle.stop (bit, in) - stops the spindle
1.2.17 Tool
- halui.tool.length-offset (float, out) - indicates current applied tool-length-offset
- halui.tool.number (u32, out) - indicates current selected tool