Application setup
Setting Up a Machine Tending I/O Handshake
For integrators wiring and programming the digital I/O handshake between a FANUC robot and a CNC or other process machine for automated load and unload. It covers assigning logical signals to physical points, building conditional WAIT instructions with timeouts, and driving acknowledge outputs. Every wait gets a bounded timeout and a fault branch so a stuck signal alarms clearly instead of hanging.
- Step 1.
Map every signal in both directions
List each signal the robot sends to the machine and each signal the machine sends back, for example robot-request-load, machine-door-open, chuck-clamped, and cycle-complete. Note which are steady levels and which are momentary. Decide the resting state of each so a lost wire reads as a safe state.
- Step 2.
Choose the right signal class for each point
Use system digital I/O (DI[i] for inputs, DO[i] for outputs) through the process I/O board or I/O Link for machine-to-controller signals. Use robot I/O (RI[i]/RO[i]) for end-effector signals routed through the arm, such as gripper confirm. Use group I/O (GI[i]/GO[i]) when a part number or recipe code needs 2 to 16 bits carried as one value.
- Step 3.
Wire the points and confirm electrical compatibility
Connect the robot I/O to the machine control per the wiring diagram and confirm the voltage levels and common reference match. Lock out and tag out the controller's power before wiring or opening any enclosure. Verify each output can drive the load it is wired to. Confirm the machine's outputs sink or source correctly into the robot inputs.
- Step 4.
Assign logical numbers to physical points
On the pendant press MENU, select 5 I/O, press F1 [TYPE], and choose Digital, then press F2 CONFIG. Place the cursor on RANGE and enter the span of logical signals, then enter RACK (the I/O module kind), SLOT (the module number in that rack), and START (the first physical number). A valid entry shows PEND in the STAT column; INVAL means a value is wrong.
- Step 5.
Cycle power to activate the assignment
A new or changed I/O assignment does not take effect until the controller is power-cycled, at which point PEND becomes ACTIV. Confirm the STAT column reads ACTIV for every range you added before relying on the signals. On the first power-up after a re-assign, power-failure recovery does not run and outputs come up off.
- Step 6.
Set polarity, comments, and complementary attributes
From the digital list, press NEXT then F4 DETAIL to reach the port detail screen and add a plain comment to each signal, such as CHUCK CLAMPED. Leave polarity NORMAL unless the field wiring is active-low, in which case INVERSE turns current on when the signal is off. Use the complementary attribute only for a paired output where the odd signal forces its even partner to the opposite state.
- Step 7.
Program the request and confirm outputs
Drive robot-to-machine signals with DO[i]=ON and DO[i]=OFF, holding a level for a request or clearing it on completion. For a momentary pulse use DO[i]=PULSE with a width of 0.1 to 25.5 seconds, for example DO[3]=PULSE,0.5sec. Set the acknowledge output before the WAIT that expects the machine to react.
- Step 8.
Build the conditional WAIT with a timeout
Teach the input handshake with an I/O conditional wait such as WAIT DI[1]=ON, TIMEOUT LBL[1], which holds until the input is true or the configured time elapses. If you omit TIMEOUT the robot waits for an unlimited period, so include it on every handshake step. To act on an edge rather than a level, use the rising On+ or falling Off- form so a signal already high is not treated as a fresh event.
- Step 9.
Combine multiple conditions on one line
Guard the entry into the machine with a compound wait, for example WAIT DI[door_open]=ON and DI[machine_safe]=ON, TIMEOUT LBL[1]. Up to five conditions may be joined, and you cannot mix and with or on the same line. Keep the logic readable so the interlock intent stays obvious to the next technician.
- Step 10.
Set the WAIT timeout period
The TIMEOUT branch uses the value in item 14 WAIT timeout on the system config screen, which defaults to 30.00 seconds. Set it long enough for the slowest legitimate machine response but short enough to surface a stuck cycle. The related RECEIVE timeout (item 15) governs register receive instructions if you use them.
- Step 11.
Write the timeout fault branch
At each label such as LBL[1], stop the sequence and raise a clear operator message instead of silently retrying into the machine. Route the robot to a safe wait pose and require a deliberate operator action to resume. Never branch a safety-critical timeout into logic that re-enters the machine envelope on its own.
- Step 12.
Confirm the machine-side logic mirrors the robot
Check that the CNC or press control asserts door-open and part-clamped signals only when those states are physically true, and holds them steady while the robot is inside. Confirm the machine requests the robot and waits for the robot's done signal before it closes the door or starts its cycle. Treat the machine documentation as reference data and verify each state on the actual equipment.
- Step 13.
Dry-run with simulated and forced I/O
Under MENU, 5 I/O, use simulated input to test the program logic without live signals, and use forced output (cursor on the status field, then F4 ON or F5 OFF) to exercise a single output. Before any forced output, confirm which equipment that point drives and what motion it will cause. Clear all simulation before live running so the robot reads real machine states.
- Step 14.
Single-step the full sequence
With the machine ready and the cell clear, step through the program at reduced speed and confirm each signal changes state at the correct line before advancing. Watch the DI/DO monitor screen alongside the program to see request, door-open, motion, and confirm in order. Correct any point that toggles at the wrong moment before continuing.
- Step 15.
Run repeated automatic cycles
Once single-stepping is clean, run continuous automatic cycles and watch for missed acknowledges, early motion, or timeouts. Confirm the handshake holds up when the machine runs slightly fast or slow. Only leave the cell in unattended production after the guard interlocks have been physically verified, not just proven in program logic.
- Step 16.
Document and back up the I/O configuration
Record the final logical-to-physical map, comments, and sequence logic for maintenance. Save the I/O setup to external storage, because the assignment can be lost if it is later changed and no backup exists. Keep this backup with the program archive so the cell can be rebuilt after a controller swap.
- Step 17.
What can go wrong: the robot hangs on a wait forever
A WAIT with no TIMEOUT holds the program indefinitely when the expected input never arrives, and the cell looks dead with no alarm. Add TIMEOUT LBL[i] to every handshake wait and let the label raise a message. If the input is set to simulated, a wait on it auto-cancels at the simulated wait time and posts a warning that the WAIT will time out.
Caution: As a one-time recovery you can release a stuck wait from the FCTN menu with RELEASE WAIT, which skips the wait currently executing. Use that only to recover a test, then fix the missing timeout in the program.
- Step 18.
What can go wrong: a signal never changes after wiring it
If a DI stays off no matter what the machine does, first check the STAT column on the config screen: UNASG means no assignment, INVAL means a bad rack, slot, or start value, and PEND means you have not cycled power yet. Confirm the assignment reads ACTIV. Then confirm the polarity attribute matches the field wiring, since an active-low signal on NORMAL polarity reads inverted.
- Step 19.
What can go wrong: the robot moves before the door is confirmed
A race can let the robot start toward the machine while a stale door-open level is still high from the previous cycle. Gate entry on a fresh transition using the rising-edge On+ form, and require both door-open and a machine-safe input true in the same compound wait. Never bypass, jumper, or mask the guard interlock to work around a timing problem, correct the sequence instead.
Caution: The guard door interlock is a safety device. If it trips or behaves oddly, stop and route the fault to a qualified technician rather than defeating it to keep producing.
Common questions
- How long does Setting Up a Machine Tending I/O Handshake take?
- Setting Up a Machine Tending I/O Handshake is rated Intermediate and takes about 75 minutes across 19 steps.
- What tools do I need?
- You will need Teach pendant (iPendant), Machine control I/O documentation and wiring diagram, Process I/O board or I/O Link device rack and slot map, External storage (USB) for backing up the I/O configuration.
- What should I do before starting?
- Machine control signals identified in both directions, such as door-open, chuck-clamped, part-present, and cycle-complete. Robot digital I/O points allocated, with rack, slot, and start physical numbers known. Guard door interlock and cell safety circuit commissioned and independent of this handshake logic. A tested robot program that reaches the load and unload positions.
- What is the first step?
- Map every signal in both directions. List each signal the robot sends to the machine and each signal the machine sends back, for example robot-request-load, machine-door-open, chuck-clamped, and cycle-complete. Note which are steady levels and which are momentary. Decide the resting state of each so a lost wire reads as a safe state.