Skip to content

Step 3: E-stop, buttons, I/O and the Hall sensor

Stage 2 of the first-run check checks the control box's inputs and outputs with your help: you press and release the E-stop (the check confirms that the E-stop channels your control box version uses read pressed, that the robot latches the E-stop, and that it clears again), you give the box's buttons B1 and B2 a short press, you may switch each isolated input and watch each isolated output, and you turn the Hall-sensor joint by hand through its magnet. The E-stop matters most: when it is pressed, the robot latches an ESTOP error and the arm is disabled, so a wiring mistake there must be found before anything moves. No motor moves in this stage; the only motion is the joint you turn yourself. The drives must be powered and the arm DISABLED: every step of this stage waits for it.

Prerequisites

  • Step 1 and Step 2 passed. The control box version must be right: it decides which E-stop channels this stage reads.
  • The drives powered: the Hall sensor is read through its joint's drive.
  • The arm DISABLED. If it is enabled, each step asks you to press Disable and waits up to 180 s (see the Danger notice below).
  • The dashboard's software E-stop (its E-STOP button) off. If it is on, the E-stop step asks you to switch it off and waits up to 60 s.
  • Within your reach:
    • the E-stop;
    • the control box's buttons B1 and B2 (a build without them can skip each one);
    • for the isolated inputs (optional): a way to switch each one — a 24 V signal or a switch wired to it — on terminals 11 (input 1), 10 (input 2) and 9 (input 3), see the runtime's docs/pin_map.md;
    • for the isolated outputs (optional): something you can see on terminals 6 (output 1), 7 (output 2) and 8 (output 3) — a lamp, a relay, a meter — and nothing that moves;
    • the Hall-sensor joint, to turn it by hand (J6 on PAR6), and the gripper, to hold it.

Danger

When the arm is enabled, each step of this stage asks you to press Disable in the dashboard.

An arm that is not supported can drop when it is disabled; the check never disables it itself for this reason.

  • Support the arm, or park it, before you press Disable.
  • Keep your hands out from under the arm while you disable it.

Procedure

In the dashboard: open the First run tab. All six stages are ticked by default: leave only 2 E-stop, buttons, I/O, Hall sensor ticked, then press Start. A question shows one button per answer; a wait shows what the check waits for, how long at most, and a Skip button.

From a terminal on the robot's Pi:

cd ~/Desktop/RCB-Runtime && .venv/bin/python3 tools/first_run.py --stages 2

In the terminal a yes / no question takes y, yes, n or no; a question with several answers lists them as [1] …: type the number or the answer. Ctrl-C while the check waits skips; Ctrl-C at a question stops the run; Ctrl-C while a step works on its own (for example during the 2 s an output is on) skips that whole step.

When stage 0 is not part of the run, two of its steps run first, because this stage needs them: The configuration loads and The robot service runs (see Step 1). Their results are listed under the first stage of the run: stage 2 when you run it alone.

Then, before each of the five steps below: if the arm is ENABLED, the check says The arm is ENABLED. Support it (or park it), then press Disable in the dashboard — waiting for the arm to be disabled and waits up to 180 s. If the arm stays enabled, that step is skipped.

  1. The E-stop (S2.estop). Skipping any of its waits skips the whole step.
    1. Only if the software E-stop is on: The software E-stop (the dashboard's E-STOP button) is on — switch it off — up to 60 s.
    2. Only if the E-stop already reads pressed: The E-stop reads PRESSED — release it (turn or pull it to unlock) — up to 60 s.
    3. Press the E-stop now — up to 60 s. Press it and keep it pressed.
    4. The check waits 0.5 s, then reads the E-stop channels again.
    5. Waiting for the robot to latch the E-stop ... — up to 1 s. Nothing to do.
    6. Now release the E-stop — up to 60 s. Turn or pull it to unlock it. If it is not seen released, the step ends here.
    7. The check sends the robot's Clear Errors command itself, then Clearing the E-stop error ... — up to 3 s. Nothing to do.
  2. The box's buttons (S2.buttons). For B1, then B2:
    1. Give the control box's button B1 a SHORT press (it only turns the screen's page; skip it if your box has no such button) — up to 30 s. Skipping here skips only this button; the check goes on with B2.
    2. ... and release B1 — up to 30 s. Skipping here also skips only this button (its press was seen); the check goes on with B2.
  3. Isolated inputs (optional) (S2.inputs). The question: Test the isolated inputs? You need a way to switch each one (a 24 V signal or a switch wired to it, docs/pin_map.md); you can skip any input that has nothing wired to it. no skips the step. yes: for input 1, 2 and 3 in turn:
    1. Switch isolated input <n> (terminal <terminal>; it reads <level> now) — skip it if nothing is wired to it — up to 45 s. <level> is the input's level when the wait starts, 0 or 1. Skipping here skips only this input.
    2. Switch input <n> back — up to 45 s. Skipping here also skips only this input (its change was seen); the check goes on with the next input.
  4. Isolated outputs (optional) (S2.outputs). The question: Test the isolated outputs? Each switches on for 2 s — have something on it you can see (a lamp, a relay, a meter), and nothing that moves; answer 'not wired' for one with nothing on it. no skips the step. yes:
    1. The check takes control of the robot. If the dashboard holds control (it keeps it for 5 s after your last click there), the check says Another client holds control — the dashboard lets go 5 s after its last click; waiting for it and waits up to 15 s. Skipping this wait skips the whole step.
    2. For output 1, 2 and 3 in turn: the check switches the output on for 2 s, then back to the level it had before, and asks Did output <n> (terminal <terminal>) switch on for ~2 s? The answers:
      • yes: PASS for this output.
      • no: FAIL for this output.
      • again: the output switches on for 2 s once more and the question comes again — for an answer you gave by mistake, as often as you need.
      • not wired: SKIP for this output.
  5. The Hall sensor (S2.hall). Only on a robot with a Hall-sensor joint, and only when the robot is in IDLE.

    1. The check takes control of the robot, as for the outputs (up to 15 s; skipping skips the whole step).
    2. It starts the Hall check: Starting the Hall check ... — up to 3 s. The joint goes limp.
    3. If the sensor is ON already (the joint stands at its magnet), the check says The sensor is ON already: <joint> stands at the magnet. Otherwise: <joint> is limp now (hold the gripper if its weight could turn it). Find the magnet: turn <joint> SLOWLY either way until the sensor switches ON — up to 120 s. When it switches, the arm beeps (a high tone) and the check says ON at <angle> deg.
    4. Three tries of the point homing stops at, each in two short waits, each up to 120 s, each switch beeped (a low tone for OFF, a high one for ON):

      • <k> of 3: turn <joint> toward its + sign until the sensor switches OFF — back out of the magnet.
      • <k> of 3: now turn <joint> SLOWLY toward its - sign until the sensor switches ON (where homing stops) — then the check says ON at <angle> deg (<k> of 3).

      On PAR6 J6 homes turning toward its - sign; on a joint that homes the other way the two signs swap. When the sensor switches ON while the joint turns the other way (it went in from the magnet's other side), the check says ON at <angle> deg, but turning toward its + sign — homing comes the - way: not counted, again and that try starts again (at most 6 tries in all). 5. No question is asked: the step ends after the third ON. 6. However the step ends, the check stops the Hall check and the joint holds again.

    Skipping any of this step's waits skips the whole step. 6. Only when your run also includes later stages: if stage 2 has a FAIL, the check asks Stage 2 has a FAIL — fix it first (the hints say what to check). Go on to stage <next stage> anyway? yes goes on, no ends the run. Ctrl-C (or Stop the run) at this question counts as no. 7. The run ends: the check writes its report and, with the support bundle set to ask, asks whether to add the support bundle (see the first-run check).

Stop the run in the dashboard skips the wait in progress and every wait after it — each gives the same result as Skip — and stops the run at the next question. The results the step had measured before that question are kept in the report.

Danger

Isolated outputs 1, 2 and 3 each switch on for 2 s — and again for every again you answer.

Whatever is wired to them runs: a valve, a motor, a tool. Every output is switched before the question, so answering not wired afterwards does not stop it.

  • Disconnect anything that moves from the outputs before you answer yes to Test the isolated outputs?.
  • Put something on them you can see instead: a lamp, a relay, a meter.
  • Answer no to skip the outputs altogether.

Note

During the Hall check the Hall-sensor joint makes no torque: its drive's current limit is set to 0.

The gripper's weight can turn the joint by itself.

  • Hold the gripper while the joint is limp.
  • The joint holds again when the step ends, when the robot leaves IDLE or a mode change is requested, or after 2 minutes without the check renewing it. The check renews it when it starts, after the start and before each of its waits.

What each check looks at

The steps read the control box's inputs through get_hardware (without the CAN counters). The waits for a press, a release or a switch read them every 0.04 s; the two waits before the E-stop test (the software E-stop, an E-stop already pressed) every 0.1 s. The E-stop channels and the buttons are active low: level 0 means pressed.

The E-stop

Step S2.estop. Reads E-stop channel 1 (terminals E2 + E4) and channel 2 (terminals E1 + E3), the dashboard's software E-stop, and the robot's latched errors. Which channels count follows the control box version from the configuration:

PCB version Channels that count "Pressed" means
v1 1 channel 1 reads pressed. Channel 2 is not used: on this board it always reads pressed (a layout fault), and the step reports it as INFO.
v2 1 and 2 either channel reads pressed. 0.5 s after the press both must read pressed.

Pass rule — all of these:

  • the E-stop is seen pressed within 60 s of Press the E-stop now;
  • with PCB v2: 0.5 s after the press, both channels read pressed;
  • the robot latches its ESTOP error within 1 s;
  • the E-stop is seen released within 60 s of Now release the E-stop.

The PASS can come with an INFO (PCB v1's channel 2) and a WARN (the ESTOP error did not clear within 3 s of the check's Clear Errors).

Note

The E-stop step sends the robot's Clear Errors command itself, after you release the E-stop.

You do not need to press Clear Errors in the dashboard after this step, unless the step warns that the error did not clear.

  • If it warns, press Clear Errors; if the error stays, an E-stop channel still reads pressed.

The box's buttons

Step S2.buttons. Reads buttons B1 and B2, every 0.04 s: a short press lasts about 0.1-0.3 s.

Pass rule, per button: a press seen within 30 s, then the release within 30 s.

Isolated inputs (optional)

Step S2.inputs. Inputs 1, 2 and 3 on terminals 11, 10 and 9. For each, the step notes the input's level when it starts on it (0 or 1).

Pass rule, per input: the level changes within 45 s, and returns to the starting level within the next 45 s.

Isolated outputs (optional)

Step S2.outputs. Outputs 1, 2 and 3 on terminals 6, 7 and 8. For each, the step switches the output on (level 1) for 2 s, then back to the level it had just before. The step cannot see the result: it asks you.

An output that was already on before the step stays on throughout, so you see no change.

Pass rule, per output: you answer yes.

The Hall sensor

Step S2.hall. The Hall-sensor joint is the first joint whose <has_hall_sensor> is 1 in the robot's file (J6 on PAR6). The way it homes into its sensor comes from its <homing_direction> (0 = the motor's + way) and <dir> (1 = the joint turns against its motor): on PAR6 J6 both give the - way, and its <home_offset> (106.66°) is the field's edge met that way. The step needs the robot in IDLE and control of the robot. It starts the robot's Hall check: the joint's drive gets a current limit of 0, so the joint makes no torque, and the robot reads the joint's Hall sensor every tick. The robot counts every change of the sensor's level and records the joint's angle (in degrees, as the robot reads it) at the last change to each level.

Pass rule:

  • the Hall check has started on that joint within 3 s;
  • the sensor switches ON within 120 s (or is ON already);
  • it switches OFF again when the joint is turned back out of the magnet;
  • the three ON points, each reached turning the way the joint homes, lie within 2.0° of each other: PASS; further apart: WARN. An ON reached turning the other way is the field's other edge and is not counted.

Each switch beeps through the arm's playing motor (beep(): 1320 Hz for ON, 660 Hz for OFF; the drive set in <sound><node>, J2 on PAR6). The sound is a help, not a check: when the robot refuses it (programs' sounds switched off in the Sound card) the check says (no sound: <reason>) once and goes on silently.

Expected results

A correctly wired robot shows, after the two steps of stage 0 when they run first:

  • PASS The E-stop: pressed: read on <n> channel(s) and latched by the robot; released: clear — read on 1 channel with PCB v1, read on 2 channels with PCB v2.
  • With PCB v1 only: INFO The E-stop: channel 2 reads pressed — not used on PCB v1. This is normal for a v1 board.
  • PASS The box's buttons: button B1: pressed and released
  • PASS The box's buttons: button B2: pressed and released
  • PASS Isolated inputs (optional): input <n>: switches both ways — for each input you tested.
  • PASS Isolated outputs (optional): output <n>: switched, seen by the user — for each output you tested.
  • PASS The Hall sensor: the sensor switches ON at the magnet (<joint> at <angle> deg) — or the sensor is ON at the magnet (<joint> stands there).
  • PASS The Hall sensor: the sensor switches ON at the same place each time <joint> comes the - way (as homing does): <angle> deg, the 3 within <spread> deg

A button, input or output you skipped, or answered not wired for, shows as a SKIP: that is not a fault.

Troubleshooting

The Result column shows what the check prints after the step's title. A WARN or FAIL is followed by what was expected (when the step says) and the hints, most likely first.

The E-stop (S2.estop)

Result What it means What to check
SKIP the software E-stop stayed on The dashboard's software E-stop was on and was not switched off within 60 s. Switch the software E-stop off in the dashboard, then run the stage again.
FAIL the E-stop reads pressed and did not release The E-stop read pressed when the step started and was not seen released within 60 s. Expected: released. the E-stop's two wires to the control box: E-Stop 1 is terminals E2 + E4 (E-Stop 2: E1 + E3, docs/pin_map.md)
the E-stop's contact type: the box expects a normally-CLOSED contact that OPENS when pressed
the E-stop button itself: a contact block not clipped on, or a broken contact
a wire broken anywhere in the E-stop circuit reads as pressed — that is on purpose
FAIL pressing the E-stop changed nothing within 60 s No pressed E-stop was seen within 60 s of Press the E-stop now. Expected: pressed. the E-stop's two wires to the control box: E-Stop 1 is terminals E2 + E4 (E-Stop 2: E1 + E3, docs/pin_map.md)
the E-stop's contact type: the box expects a normally-CLOSED contact that OPENS when pressed
the E-stop button itself: a contact block not clipped on, or a broken contact
FAIL E-stop channel <n> does not read pressed (the other does) PCB v2 only: 0.5 s after the press, this channel did not read pressed. Expected: both channels pressed. channel <n>'s wire or contact (a dual-channel E-stop has two separate contacts)
INFO channel 2 reads pressed — not used on PCB v<version> PCB v1: channel 2 is not read. On a v1 board it always reads pressed. —
INFO channel 2 reads released — not used on PCB v<version> PCB v1: channel 2 is not read, and it reads released. —
FAIL the inputs read pressed but the robot did not latch ESTOP The control box reads the E-stop pressed, but the robot did not latch its ESTOP error within 1 s. RTI reads the E-stop every tick: is RTI running (S0)? logs/RTI.log
FAIL the E-stop still reads pressed after the release The E-stop was not seen released within 60 s of Now release the E-stop. The step ends without clearing the error. the E-stop's two wires to the control box: E-Stop 1 is terminals E2 + E4 (E-Stop 2: E1 + E3, docs/pin_map.md)
the E-stop's contact type: the box expects a normally-CLOSED contact that OPENS when pressed
the E-stop button itself: a contact block not clipped on, or a broken contact
WARN the ESTOP error did not clear after the release The check sent Clear Errors, but the ESTOP error was still latched 3 s later. press Clear Errors in the dashboard; if it stays, an E-stop channel still reads pressed
PASS pressed: read on <n> channel(s) and latched by the robot; released: clear The E-stop works. Given only when the step has no FAIL. —

The box's buttons (S2.buttons)

Each line names the button, B1 or B2.

Result What it means What to check
SKIP button <B1/B2>: skipped by the user You skipped the press wait for this button. —
FAIL button <B1/B2>: no press seen in 30 s No press was seen within 30 s. <B1/B2>'s two wires to the Pi's header (docs/pin_map.md)
is the supervisor running? It reads the buttons (logs/supervisor.log)
SKIP button <B1/B2>: the press was seen; skipped by the user before its release A press was seen; you skipped the release wait. The check goes on with the next button. —
PASS button <B1/B2>: pressed and released — —
FAIL button <B1/B2>: stays pressed A press was seen, but no release within 30 s. <B1/B2> is stuck or its wire is shorted to ground

Isolated inputs (S2.inputs)

Result What it means What to check
SKIP not tested (the user's choice) You answered no to Test the isolated inputs?. —
SKIP input <n>: skipped by the user (not wired) You skipped the switch wait for this input. —
FAIL input <n>: no change seen The input's level did not change within 45 s. input <n>'s wiring and its supply (an isolated input needs its own signal voltage)
SKIP input <n>: the change was seen; skipped by the user before switching back The level changed; you skipped the switch-back wait. The check goes on with the next input. —
PASS input <n>: switches both ways The level changed and came back. —
WARN input <n>: changed, did not go back The level changed, but was not back at its starting level within 45 s. what drives input <n> still gives its signal (a switch that latches, a sensor still triggered), or the input's wiring holds it

Isolated outputs (S2.outputs)

Result What it means What to check
SKIP not tested (the user's choice) You answered no to Test the isolated outputs?. —
SKIP another client holds control (<reason>) — the dashboard keeps it ~5 s after its last command: wait, or release it there, then run this step again The check could not take control of the robot: another client held it for more than 15 s, or the robot refused for the reason given. No output was switched. The line says it: wait, or release control in the dashboard, then run the stage again.
SKIP output <n>: not wired (the user) You answered not wired. —
PASS output <n>: switched, seen by the user You answered yes. —
FAIL output <n>: the user saw nothing You answered no. output <n>'s wiring and the supply of what it drives (an isolated output switches an external voltage)

The Hall sensor (S2.hall)

Result What it means What to check
SKIP this robot has no Hall-sensor joint No joint has <has_hall_sensor> 1 in the robot's file. The same line appears when the configuration did not load (The configuration loads failed). A robot without a Hall sensor: nothing. Otherwise fix The configuration loads first.
SKIP the Hall check needs IDLE (the robot is in <mode>) The robot is in another mode than IDLE. Bring the robot to IDLE (the line names the mode it is in), then run the stage again.
SKIP another client holds control (<reason>) — the dashboard keeps it ~5 s after its last command: wait, or release it there, then run this step again The check could not take control of the robot, as for the outputs. The line says it: wait, or release control in the dashboard, then run the stage again.
SKIP the robot refused the Hall check: <reason> The robot refused to start the Hall check and said why. The real-time loop's own reasons: a joint is free for hand turning or in a test move; the robot is not in IDLE, or a mode change is pending; the loop is still configuring the drives (the first ~1.2 s after it starts); the robot has no joint with <has_hall_sensor> 1. Do what the reason says, then run the stage again.
FAIL the robot did not start the Hall check The Hall check was accepted but had not started on the joint within 3 s. logs/RTI.log
FAIL the sensor never changed Within 120 s the sensor never switched ON. Expected: it switches ON at the magnet. the sensor's cable to the drive (its connector on the drive)
the magnet: present, its gap to the sensor (a few mm), the right pole facing it
turn through the whole range once: the magnet may sit elsewhere
PASS the sensor switches ON at the magnet (<joint> at <angle> deg) The sensor works: it switched ON at <angle>. —
PASS the sensor is ON at the magnet (<joint> stands there) The sensor was ON when the step began: the joint stood at its magnet. —
FAIL the sensor switched ON and stays ON Turned back out of the magnet, the sensor did not switch OFF within 120 s. Expected: it switches OFF past the magnet. the sensor stays triggered: the magnet too close, or the sensor's output shorted
PASS the sensor switches ON at the same place each time <joint> comes the <way> way (as homing does): <angle> deg, the 3 within <spread> deg The three ON points lie within 2.0°: homing will stop at the same place. <angle> is their mean. —
WARN the sensor switched ON <spread> deg apart coming the <way> way (<angles> deg) The three ON points lie more than 2.0° apart. Expected: within 2.0 deg. the magnet or the sensor is loose, or the gap is so large the sensor triggers late; homing relies on this point
WARN the 3 tries were not completed (<n> done: ON at <angles> deg) You skipped during the tries (Skip, Ctrl-C or Stop the run), a wait for ON passed 120 s, or 6 tries gave fewer than 3 ON points reached the homing way. Run the stage again for this result.
SKIP <joint>'s homing direction is not readable in the robot XML (<homing_direction>, <dir>) The joint's <homing_direction> or <dir> is missing or not 0 / 1, so the check cannot tell which way homing comes. Nothing was started. Fix the two values in the robot's file.

Any step of this stage

Result What it means What to check
SKIP no connection to the robot (S0's 'Robot service' step) The robot service runs failed, so there is no connection to the robot. Fix The robot service runs (Step 1).
SKIP the arm stayed enabled (this step needs it disabled) The arm was ENABLED and was not disabled within 180 s. Support or park the arm, press Disable in the dashboard, then run the stage again.
SKIP skipped by the user You skipped a wait that skips the whole step: the wait for Disable, the wait for control, or any wait of the E-stop step, or the Hall sensor's first wait (finding the magnet; a skip during the three tries keeps what was measured: see its table). (In the buttons and inputs steps a skip skips only that button or input: see their tables.) —
SKIP skipped by the user (Ctrl-C) You pressed Ctrl-C in the terminal while the step worked on its own rather than waiting for you, for example during the 2 s an output is on (the output goes back to its level first). The whole step is skipped and its results so far are not kept; the run goes on with the next step. Run the stage again for this step's result.
SKIP the run was stopped here You stopped the run at a question of this step (Ctrl-C in the terminal, Stop the run in the dashboard): Test the isolated inputs?, Test the isolated outputs?, or an output's question. The run ends. This line and the step's results measured before the question — the outputs already answered — are in the report. (The Hall sensor step asks no question: Stop the run during it ends its tries as a skip does.) —
FAIL the check itself failed: <error type>: <message> The check's own code raised an error. The run goes on with the next step; the report's details hold the error's traceback. this is a fault of the check, not necessarily of the robot — send the report

What's next

Step 4: Joint test moves


Found a mistake on this page? Edit it on GitHub · Report it · Get help