BenchWorkSoftware
← Back to industrial studies

Industrial engineering

Controls package builder.

Run an inspection cell from the operator panel. Follow one part from pickup to pallet or reject, then compare the FANUC and ABB programs that move it.

Interactive workcell

Run a part through the cell.

Keep a faulty part off the pallet. Choose All faulty and press Run part. Use Next operation to follow the part from the gripper to the reject bin. Run a part Download project files

Material sort cellOperator terminal · Offline simulation
Robot controller
Selects the robot program language shown and downloaded.
State ReadyPLC scan Automatic
No active alarms.

Material cycle

Pass goes to the pallet. Fail goes to the reject bin.

Phase
Idle
Part
None
Gripper
Open
Good · pallet
0
Rejected · bin
0

Sorting something similar on your line? Discuss a sorting problem

Step pauses after each operation. Press Next operation to advance. Continuous keeps feeding parts until you stop it. Hold pauses the cycle and keeps a carried part in the jaws. Blockages are raised on the Alarms screen.

Articulated robot sorting parts between four stationsAn original isometric cell diagram. An infeed tray and an inspection jig stand on the left, a pallet on the right and a reject bin nearest the aisle. The jointed arm changes pose as it moves. The simulation draws each part it carries. 01 Inspection02 Pallet03 Reject bin05 Infeed
Tool position HomeCompleted cycles 0
  • Pass → Pallet
  • Fail → Reject bin
  • Parts arrive at Infeed

Manual positioning

Between material cycles

Robot handshake

PLC ⇄ robot registers, live

Request GI[1]
PLC asks for a route: 1 inspect · 2 pallet · 3 reject · 4 home · 5 infeed.
0
Robot target GO[2]
Station number the robot is moving toward.
0
Robot busy DO[1]
On while the robot works a request.
Off
At target DI[1]
On when the arm has reached its target.
Off
Route reply GO[1]
Robot echoes the route. The PLC clears its request on a match.
0

Live ladder

Power flows left to right to the coil. Use Slow monitor, or hold the cycle and Step scan. Networks 1–4 run the route handshake, 5–8 the material cycle.

Scan 0Robot line 03 · Wait for request Program trace
  1. 01 · Latch requestOpen · 0 fires
    SendClear pathIdleReq = 0MOVRoute → Req
  2. 02 · Clear requestOpen · 0 fires
    Req ≠ 0Ack = ReqMOV0 → Req
  3. 03 · Count completionOpen · 0 fires
    AcceptedClearIdleCTUCycles +1
  4. 04 · Motion enableOpen · 0 fires
    Clear pathBusyTarget dueOTEMotion
  5. 05 · Grip at pickupOpen · 0 fires
    Pick completeAt infeedPiece readyOTLGripCmd
  6. 06 · Inspect and routeOpen · 0 fires
    Inspect completePart heldMeasuredMOVSort route
  7. 07 · Release at destinationOpen · 0 fires
    Sort completeAt binPart heldOTUGripCmd
  8. 08 · Register sorted partOpen · 0 fires
    ReleaseJaws openPart clearCTUSorted

Scroll the list, or Tab into it and use ↑ ↓. Networks 1–4 route · 5–8 material.

Robot program and event history

Event history

The latest 80 events remain here until the page closes or reloads. Each entry shows the order and local time.

  1. Ready at home.

FANUC LS

The highlighted line runs in the browser. Its joint move selects a virtual position register: PR[1] inspection, PR[2] pallet, PR[3] reject, PR[4] home or PR[5] infeed. The original diagram uses illustrative geometry and timing.

  1. 01! +----------------------------+
  2. 02! | BBB W W BENCHWORK |
  3. 03! | B B W W SOFTWARE |
  4. 04! | BBB W W W TRANSFER |
  5. 05! | B B WW WW CELL |
  6. 06! | BBB W W BWSTUDY |
  7. 07! +----------------------------+
  8. 08
  9. 09! PLC owns grip and inspection
  10. 10! PR 1 Inspect / 2 Pallet
  11. 11! PR 3 Reject / 4 Home
  12. 12! PR 5 Infeed pickup
  13. 13
  14. 14LBL[1]
  15. 15! Accept one PLC route word
  16. 16WAIT (GI[1]<>0)
  17. 17R[1]=GI[1]
  18. 18DO[1]=ON
  19. 19GO[2]=R[1]
  20. 20
  21. 21! Move to the requested station
  22. 22J PR[R[1]] 20% FINE
  23. 23WAIT DI[1]=ON
  24. 24
  25. 25! Return this route to the PLC
  26. 26GO[1]=R[1]
  27. 27WAIT (GI[1]=0)
  28. 28
  29. 29! Clear target before busy drops
  30. 30GO[2]=0
  31. 31WAIT DI[1]=OFF
  32. 32GO[1]=0
  33. 33DO[1]=OFF
  34. 34
  35. 35JMP LBL[1]
Download LS source

Controller and robot program files

Open the PLC project, read either robot program and trace the signals between them.

1756-L85E · Logix Designer 36.043 programs · 11 routines · 142 ladder rungs

Rockwell controller

Open the project in Studio 5000 Logix Designer or inspect the ladder in the XML export.

Robot programs

Read either file in a text editor, then follow its active instruction in the operator terminal.

Robot EtherNet/IP device files and signal map

PLC and robot I/O

Each adapter exchanges eight bytes in each direction. The map identifies the route words, busy bit and arrival signal used by the controller logic.

Robot I/O mapPLC bytes, FANUC bits and ABB signals · CSVRobot I/O workbookFilterable signal register · Excel
Routine list and how to use these files

Controller routines

  • P10_Cell
    Commands (36), Diagnostics (9), Handshake (16), MainRoutine (4), Sequence (20)
  • P20_Model
    GripInspect (11), MainRoutine (2), RobotSim (16)
  • P30_RobotIO
    MainRoutine (2), ReadImages (12), WriteImages (14)

Steps

  1. Open BW_SortCell.ACD in the listed Logix Designer version. The L5X contains the same controller and its rung comments.
  2. For the onboard model, use SourceSelect = 0 and SampleMode = 2 for alternating good and reject parts. Follow the Cell_100ms task in scan order.
  3. In a running offline simulation, leave OpContinuous at 0 and pulse OpRun for each operation. For consecutive parts, set OpContinuous to 1 and pulse OpRun. Pulse OpStopAfter to finish the current part.
  4. Trace RobotRequest from pickup to inspection and sorting. The PLC holds GripCmd until the part reaches its destination and counts the part after release feedback.
  5. Both robot modules start inhibited. The EDS files describe the adapters. The signal map shows how four 16-bit words in each direction carry the request, target, busy, arrival and reply.

Station package builder

Inspection station FANUC LS · 3 BOM rows · 7 HMI bindings
BOM device
VI-21 · Inspection camera
Generated PLC tag
InspectionOK
HMI indicator
Quality / Inspection passed
Virtual robot interface
GI[1] / GO[1]
Try the generated operator screen
Open the generated PLC program
PROGRAM StationReview
VAR
    PartPresent, InspectionOK, StartReview : BOOL;
    LastStart : BOOL;
    RequestWord, RobotAck, LastRoute, Stage : INT;
END_VAR
(* Inputs and words are symbolic simulator values. Stage 0/10/20 = ready/wait/clear. *)
CASE Stage OF
    0: IF StartReview AND NOT LastStart AND PartPresent AND RobotAck = 0 THEN
           IF InspectionOK THEN RequestWord := 10; ELSE RequestWord := 20; END_IF;
           Stage := 10;
       END_IF;
    10: IF RobotAck = RequestWord THEN
            LastRoute := RobotAck;
            RequestWord := 0;
            Stage := 20;
        END_IF;
    20: IF RobotAck = 0 THEN Stage := 0; END_IF;
END_CASE;
LastStart := StartReview;
END_PROGRAM
Inspect FANUC LS source · BWROUTE.LS
/PROG  BWROUTE
/ATTR
OWNER       = MNEDITOR;
COMMENT     = "Route word review";
PROG_SIZE   = 0;
DEFAULT_GROUP = *,*,*,*,*;
/MN
   1:  R[90]=GI[1] ;
   2:  IF R[90]=10,JMP LBL[1] ;
   3:  IF R[90]=20,JMP LBL[1] ;
   4:  GO[1]=0 ;
   5:  JMP LBL[2] ;
   6:  LBL[1] ;
   7:  GO[1]=R[90] ;
   8:  LBL[2] ;
/POS
/END
Inspect all seven HMI bindings
Part at station
Overview / PartPresent
Inspection passed
Quality / InspectionOK
Review request
Overview / StartReview
Route requested
Robot / RequestWord
Route acknowledged
Robot / RobotAck
Last route
Overview / LastRoute
Sequence stage
Overview / Stage
Download this engineering package ↓
Inspection station ABB RAPID · 3 BOM rows · 7 HMI bindings
BOM device
VI-21 · Inspection camera
Generated PLC tag
InspectionOK
HMI indicator
Quality / Inspection passed
Virtual robot interface
giRouteRequest / goRouteAck
Try the generated operator screen
Open the generated PLC program
PROGRAM StationReview
VAR
    PartPresent, InspectionOK, StartReview : BOOL;
    LastStart : BOOL;
    RequestWord, RobotAck, LastRoute, Stage : INT;
END_VAR
(* Inputs and words are symbolic simulator values. Stage 0/10/20 = ready/wait/clear. *)
CASE Stage OF
    0: IF StartReview AND NOT LastStart AND PartPresent AND RobotAck = 0 THEN
           IF InspectionOK THEN RequestWord := 10; ELSE RequestWord := 20; END_IF;
           Stage := 10;
       END_IF;
    10: IF RobotAck = RequestWord THEN
            LastRoute := RobotAck;
            RequestWord := 0;
            Stage := 20;
        END_IF;
    20: IF RobotAck = 0 THEN Stage := 0; END_IF;
END_CASE;
LastStart := StartReview;
END_PROGRAM
Inspect ABB RAPID source · RouteReview.mod
MODULE RouteReview
    ! Configure giRouteRequest and goRouteAck as virtual group signals.
    PROC ReviewOnce()
        VAR num job;
        job := GInput(giRouteRequest);
        IF job = 10 OR job = 20 THEN
            SetGO goRouteAck, job;
        ELSE
            SetGO goRouteAck, 0;
        ENDIF
    ENDPROC
ENDMODULE
Inspect all seven HMI bindings
Part at station
Overview / PartPresent
Inspection passed
Quality / InspectionOK
Review request
Overview / StartReview
Route requested
Robot / RequestWord
Route acknowledged
Robot / RobotAck
Last route
Overview / LastRoute
Sequence stage
Overview / Stage
Download this engineering package ↓
Packaging station FANUC LS · 3 BOM rows · 7 HMI bindings
BOM device
VS-42 · Label reader
Generated PLC tag
LabelOK
HMI indicator
Quality / Label verified
Virtual robot interface
GI[1] / GO[1]
Try the generated operator screen
Open the generated PLC program
PROGRAM StationReview
VAR
    PartPresent, LabelOK, StartReview : BOOL;
    LastStart : BOOL;
    RequestWord, RobotAck, LastRoute, Stage : INT;
END_VAR
(* Inputs and words are symbolic simulator values. Stage 0/10/20 = ready/wait/clear. *)
CASE Stage OF
    0: IF StartReview AND NOT LastStart AND PartPresent AND RobotAck = 0 THEN
           IF LabelOK THEN RequestWord := 10; ELSE RequestWord := 20; END_IF;
           Stage := 10;
       END_IF;
    10: IF RobotAck = RequestWord THEN
            LastRoute := RobotAck;
            RequestWord := 0;
            Stage := 20;
        END_IF;
    20: IF RobotAck = 0 THEN Stage := 0; END_IF;
END_CASE;
LastStart := StartReview;
END_PROGRAM
Inspect FANUC LS source · BWROUTE.LS
/PROG  BWROUTE
/ATTR
OWNER       = MNEDITOR;
COMMENT     = "Route word review";
PROG_SIZE   = 0;
DEFAULT_GROUP = *,*,*,*,*;
/MN
   1:  R[90]=GI[1] ;
   2:  IF R[90]=10,JMP LBL[1] ;
   3:  IF R[90]=20,JMP LBL[1] ;
   4:  GO[1]=0 ;
   5:  JMP LBL[2] ;
   6:  LBL[1] ;
   7:  GO[1]=R[90] ;
   8:  LBL[2] ;
/POS
/END
Inspect all seven HMI bindings
Part at station
Overview / PartPresent
Label verified
Quality / LabelOK
Review request
Overview / StartReview
Route requested
Robot / RequestWord
Route acknowledged
Robot / RobotAck
Last route
Overview / LastRoute
Sequence stage
Overview / Stage
Download this engineering package ↓
Packaging station ABB RAPID · 3 BOM rows · 7 HMI bindings
BOM device
VS-42 · Label reader
Generated PLC tag
LabelOK
HMI indicator
Quality / Label verified
Virtual robot interface
giRouteRequest / goRouteAck
Try the generated operator screen
Open the generated PLC program
PROGRAM StationReview
VAR
    PartPresent, LabelOK, StartReview : BOOL;
    LastStart : BOOL;
    RequestWord, RobotAck, LastRoute, Stage : INT;
END_VAR
(* Inputs and words are symbolic simulator values. Stage 0/10/20 = ready/wait/clear. *)
CASE Stage OF
    0: IF StartReview AND NOT LastStart AND PartPresent AND RobotAck = 0 THEN
           IF LabelOK THEN RequestWord := 10; ELSE RequestWord := 20; END_IF;
           Stage := 10;
       END_IF;
    10: IF RobotAck = RequestWord THEN
            LastRoute := RobotAck;
            RequestWord := 0;
            Stage := 20;
        END_IF;
    20: IF RobotAck = 0 THEN Stage := 0; END_IF;
END_CASE;
LastStart := StartReview;
END_PROGRAM
Inspect ABB RAPID source · RouteReview.mod
MODULE RouteReview
    ! Configure giRouteRequest and goRouteAck as virtual group signals.
    PROC ReviewOnce()
        VAR num job;
        job := GInput(giRouteRequest);
        IF job = 10 OR job = 20 THEN
            SetGO goRouteAck, job;
        ELSE
            SetGO goRouteAck, 0;
        ENDIF
    ENDPROC
ENDMODULE
Inspect all seven HMI bindings
Part at station
Overview / PartPresent
Label verified
Quality / LabelOK
Review request
Overview / StartReview
Route requested
Robot / RequestWord
Route acknowledged
Robot / RobotAck
Last route
Overview / LastRoute
Sequence stage
Overview / Stage
Download this engineering package ↓