Panel Accessories - Limit Switches, E-Stop Button, Signal Tower
This is the technical view of the optional panel accessories. For cabling and operator settings, see the User Manual: Limit Switch Cabling, E-Stop Button Cabling, Signal Tower Cabling, and Axis Selection (↗ User Manual).
All three are off by default, are switched on in the Settings program (Inputs, Outputs, and Sounds tab), and are wired into REB.local.hal at the next launch by REB_Setup/REB_Generate_Local_Ini.py (see Launching Rose Engine Butler).
The E-stop button, the signal tower and Limit Jacks 1 - 3 are on the base box. Limit Jacks 4 - 6 are on the optional expansion box and are used only while Expansion Box - Connected is ticked (Axis Selection tab); otherwise they are greyed out, keep their choice, and are left out of the configuration.
Mesa 7i92 pins
The generator loads the cards with num_inms=0, so the firmware's InM input pins are plain GPIO (hm2_7i92.N.gpio.NNN.in / .out, N = the card - 0 base, 1 expansion - and NNN = the 3-digit I/O number). No firmware change is needed.
| Function | Box | Header pin | I/O | HAL pin | Setting in the generator |
| Limit Jack 1 / 2 / 3 | Base | P2 pins 3, 7, 13 | 002, 006, 010 | hm2_7i92.0.gpio.002.in / .006.in / .010.in | LIMIT_JACK_INPUT |
| Limit Jack 4 / 5 / 6 | Expansion | P2 pins 3, 7, 13 | 002, 006, 010 | hm2_7i92.1.gpio.002.in / .006.in / .010.in | LIMIT_JACK_INPUT |
| E-stop button | Base | P1 pin 21 | 031 | hm2_7i92.0.gpio.031.in | ESTOP_BUTTON_INPUT |
| Signal tower green | Base | P1 pin 25 | 033 | hm2_7i92.0.gpio.033.out | SIGNAL_TOWER_OUTPUT |
| Signal tower red | Base | P2 pin 25 | 016 | hm2_7i92.0.gpio.016.out | SIGNAL_TOWER_OUTPUT |
| Signal tower buzzer | Base | P1 pin 13 | 027 | hm2_7i92.0.gpio.027.out | SIGNAL_TOWER_OUTPUT |
Spare on the base card: Input3 (P2 pin 21), Input4 (P1 pin 3), Input5 (P1 pin 7). Spare on the expansion card: Input3 (P2 pin 21); its connector P1 is not used. Full map: Mesa 7i92 Pin Mapping.
Limit switches
- Normally-closed switch between the input and GND; the 7i92's pull-up makes an open switch (tripped, broken, or unplugged) read TRUE = limit hit. With Limit Switch Type set to NO in the Settings program, the generator reads .in_not instead, for all six jacks. NC is strongly recommended.
- Each in-use jack drives a net named after its axis: <letter>-limit-sw (both ends - feeds the joint's neg-lim-sw-in and pos-lim-sw-in), <letter>-limit-min (neg-lim-sw-in only) or <letter>-limit-max (pos-lim-sw-in only). REB.hal itself never touches the joints' limit pins.
- A jack can protect any axis in use, on either box - e.g. Limit Jack 1 on the base box can guard an axis on the expansion box.
- A jack whose axis isn't assigned to a channel in use, or that conflicts with a lower-numbered jack, is skipped with a message in the generator's output.
E-stop button
- LinuxCNC's E-stop chain always runs through estop-latch.0: iocontrol.0.user-enable-out -> ok-in, user-request-enable -> reset, ok-out -> iocontrol.0.emc-enable-in.
- The latch's fault-in is an OR (estop-fault-or) of the E-stop button (when marked connected) and card-fault - any Mesa card losing contact (its packet-error-exceeded or watchdog.has_bit).
- Pressing the button (or a broken / unplugged cable) latches E-stop until the button is released and F1 is pressed. A lost card latches E-stop the same way; F1 works once the card answers again (see Field Troubleshooting).
Signal tower
- Green = not halui.program.is-idle (a program or MDI command is running).
- Red = a logic OR (tower-red-or) of every active joint's joint.N.f-errored, every in-use limit net, and card-fault (a Mesa card losing contact).
- Buzzer = a 3-second oneshot (tower-buzz) on red's rising edge (SIGNAL_TOWER_BUZZER_SECONDS). The fault siren can also, or instead, play on the Raspberry Pi's speaker (Settings program, Sounds).
- Relays switch ON when pulled LOW (SIGNAL_TOWER_ACTIVE_LOW = True), because the 7i92 holds its pins high whenever LinuxCNC isn't driving them. With the tower switched off, the three pins stay inputs.
Checking and fixing
- Watch an input in halshow (e.g., hm2_7i92.0.gpio.002.in, or hm2_7i92.1.gpio.002.in for Limit Jack 4): it should read FALSE with the switch closed and TRUE when pressed or unplugged.
- If every limit input reads backwards, check the Limit Switch Type (NC / NO) setting.
- If the tower lights or buzzer are on at boot, the relay board is active-high: set SIGNAL_TOWER_ACTIVE_LOW = False in REB_Setup/REB_Generate_Local_Ini.py.
- If a min switch stops the axis at the max end, swap min/max for that axis's jacks in the Settings program (a motor with reversed direction swaps them).
- Limit Jacks 4 - 6 do nothing: check Expansion Box - Connected is ticked and the expansion card answers (see Field Troubleshooting).
|
eMail comments to |
