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 Machine
- (bit) halui.machine.on - pin for requestiong machine on
- (bit) halui.machine.off - pin for requesting machine off
- (bit) halui.machine.is-on - indicates machine on
1.2.2 E-Stop
- (bit) halui.estop.activate - pin for requesting E-Stop
- (bit) halui.estop.reset - pin for requesting E-Stop reset
- (bit) halui.estop.is-activated - indicates E-stop reset
1.2.3 Mode
- (bit) halui.mode.manual - pin for requesting manual mode
- (bit) halui.mode.is_manual - indicates manual mode is on
- (bit) halui.mode.auto - pin for requesting auto mode
- (bit) halui.mode.is_auto - indicates auto mode is on
- (bit) halui.mode.mdi - pin for requesting mdi mode
- (bit) halui.mode.is_mdi - indicates mdi mode is on
1.2.4 Mist, Flood, Lube
- (bit) halui.mist.on - pin for requesting mist on
- (bit) halui.mist.is-on - indicates mist is on
- (bit) halui.flood.on - pin for requesting flood on
- (bit) halui.flood.is-on - indicates flood is on
- (bit) halui.lube.on - pin for requesting lube on
- (bit) halui.lube.is-on - indicates lube is on
1.2.5 Spindle
- (bit) halui.spindle.start
- (bit) halui.spindle.stop
- (bit) halui.spindle.forward
- (bit) halui.spindle.reverse
- (bit) halui.spindle.increase
- (bit) halui.spindle.decrease
- (bit) halui.spindle.brake-on - pin for activating spindle-brake
- (bit) halui.spindle.brake-off - pin for deactivating spindle/brake
- (bit) halui.spindle.brake-is-on - indicates brake is on
1.2.6 Joints
<channel> is a number between 0 and 7 and 'selected'.
- (bit) halui.joint.<channel>.home - pin for homing the specific joint
- (bit) halui.joint.<channel>.on-min-limit-soft - status pin telling joint is at the negative software limit
- (bit) halui.joint.<channel>.on-max-limit-soft - status pin telling joint is at the positive software limit
- (bit) halui.joint.<channel>.on-min-limit-hard - status pin telling joint is on the negative hardware limit switch
- (bit) halui.joint.<channel>.on-max-limit-hard - status pin telling joint is on the positive hardware limit switch
- (bit) halui.joint.<channel>.fault - status pin telling the joint has a fault
- (bit) halui.joint.<channel>.homed - status pin telling that the joint is homed
1.2.7 Jogging
<channel> is a number between 0 and 7 and 'selected'.
- (float) halui.jog.speed - set jog speed
- (bit) halui.jog.<channel>.minus - jog in negative direction
- (bit) halui.jog.<channel>.plus - jog in positive direction
1.2.8 Selecting a joint
- (u32) halui.joint.select - select joint (0..7) - internal halui
- (u32) halui.joint.selected - selected joint (0..7) - internal halui
- (bit) halui.joint.x.select bit - pins for selecting a joint - internal halui
- (bit) halui.joint.x.is-selected bit - status pin a joint is selected - internal halui
1.2.9 Feed override
- (float) halui.feed-override.value - current FO value
- (float) halui.feed-override.scale - pin for setting the scale on changing the FO
- (s32) halui.feed-override.counts - counts from an encoder for example to change FO
- (bit) halui.feed-override.increase - pin for increasing the FO (+=scale)
- (bit) halui.feed-override.decrease - pin for decreasing the FO (-=scale)
1.2.10 Spindle override
- (float) halui.spindle-override.value - current SO value
- (float) halui.spindle-override.scale - pin for setting the scale on changing the SO
- (s32) halui.spindle-override.counts - counts from an encoder for example to change SO
- (bit) halui.spindle-override.increase - pin for increasing the SO (+=scale)
- (bit) halui.spindle-override.decrease - pin for decreasing the SO (-=scale)
1.2.11 Tool
- (u32) halui.tool.number - indicates current selected tool
- (float) halui.tool.length-offset - indicates current applied tool-length-offset
1.2.12 Program
- (bit) halui.program.is-idle
- (bit) halui.program.is-running
- (bit) halui.program.is-paused
- (bit) halui.program.run
- (bit) halui.program.pause
- (bit) halui.program.resume
- (bit) halui.program.step
1.2.13 General
- (bit) halui.abort - pin to send an abort message (clears out most errors)
1.2.14 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:
- a MDI_COMMAND is added to the ini (in the section [HALUI]) (e.g. [HALUI] MDI_COMMAND = G0 X0
- when halui starts it will read/detect the MDI_COMMAND fields in the ini, and export pins of type (bit) halui.mdi-command-<nr> (<nr> is a number from 00 to the number of MDI_COMMAND's found in the ini)
- when the pin halui.mdi-command-<nr> is activated 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).
1.3 Case - Studies
User descriptions of working halui and hardware EMC control panels here.