Exam 2 Review

CMPSC 304 Robotic Agents

Topics: PLCs & Collaborative Robots

Format: Paper exam, closed everything
Duration: 50 minutes
Questions: 10 total
  • 5 multiple-choice
  • 3 short answer
  • 2 scenario-based

Press Space or to advance

What's Covered on Exam 2?

Topics: Week 5 through week 8

  • Programmable Logic Controllers (PLCs)
  • Ladder logic: contacts, coils, latching, timers
  • Collaborative robots (FANUC CRX)
  • Safety rules and work cell operation
  • Programming: jogging, teaching, pick-and-place

Study Materials

Projects

  • Project 2
  • Project 3

Slides

  • PLC Slides
  • Collaborative Robots Slides

Readings

  • PLC Guidebook Part II
  • PLC Guidebook Part III

Activities

  • Activity 4: FANUC CRX

Review Game Rules

How to Answer:
  • Multiple Choice: Raise the correct colored paper 🔴 🟢 ⚫ 🟠
  • First person with correct color gets to answer!
  • Short Answer & Scenarios: Raise your hand ✋
  • First hand up gets to answer!
Scoring:
  • 🥇 1st place team: +1 point on exam
  • 🥈 2nd place team: +0.5 points on exam
  • 🥉 3rd place team: +0.25 points on exam

Work together with your team, but only one person answers at a time!

MULTIPLE CHOICE
QUESTIONS

🔴 🟢 ⚫ 🟠

Multiple Choice Practice 1

Which of the following is an INPUT device on a PLC training system?

🔴 Red: Indicator lamp

🟢 Green: Motor contactor

Black: Limit switch

🟠 Orange: Output coil

First hand up gets to answer!

Answer: ⚫ Black - Limit switch

Input devices supply a voltage signal TO the PLC — they are sensing/triggering devices.

Examples of inputs:
  • Limit switches
  • Push buttons

Output devices receive a signal FROM the PLC — they do work.

  • Indicator lamps
  • Motor contactors

Multiple Choice Practice 2

Which of the following correctly describes a Normally Open (NO) contact in ladder logic?

🔴 Red: Passes power when the referenced bit is FALSE (0)

🟢 Green: Passes power when the referenced bit is TRUE (1)

Black: Always blocks power regardless of input state

🟠 Orange: Inverts the state of the output coil

Answer: 🟢 Green - Passes power when the referenced bit is TRUE (1)

A Normally Open (NO) contact (XIC — Examine if Closed) is open by default and closes when its referenced bit is TRUE.

NO contact (XIC):
  • Bit = 1 (TRUE) → contact CLOSES → power passes
  • Bit = 0 (FALSE) → contact stays open → no power
  • Used for start buttons and seal-in (latch) contacts

Normally Closed (NC / XIO) contact:
  • Bit = 0 (FALSE) → contact CLOSED → power passes
  • Bit = 1 (TRUE) → contact OPENS → power blocked
  • Used for stop buttons and safety interlocks

Multiple Choice Practice 3

In a PLC ladder logic rung, what condition must be true for the output coil to energize?

🔴 Red: Any one input contact on the rung must be closed (NO)

🟢 Green: All series contacts on the path to the coil must be closed

Black: The coil must be connected directly to the power rail

🟠 Orange: At least one normally-closed (NC) contact must be open

Answer: 🟢 Green - All series contacts on the path to the coil must be closed

Ladder logic reads like an electrical circuit:

  • Left rail = power supply (+)
  • Right rail = return (−)
  • Rung = path from left to right rail

Series contacts (AND logic): ALL must be closed for power to reach the coil.

Parallel contacts (OR logic): ANY one closed path is enough.

The coil energizes when there is a complete circuit path from left to right rail.

Multiple Choice Practice 4

Which motion type moves the FANUC CRX's tool tip (TCP) in a predictable straight line between two points?

🔴 Red: Joint (J)

🟢 Green: Linear (L)

Black: Arc (A)

🟠 Orange: Free-hand

Answer: 🟢 Green - Linear (L)

Linear (L) motion:
  • Moves the TCP in a straight line from start to end point
  • Path is predictable — useful when obstacles are nearby
  • Used for approach and depart moves in pick-and-place

Joint (J) motion:
  • Each joint moves independently to reach the target
  • TCP path can be curved or unexpected
  • Faster, but less predictable — use only in open space

Arc (A) motion is used for circular/curved paths (e.g., welding arcs).

Multiple Choice Practice 5

When a movement command in a FANUC CRX program is set to Fine routing, what does the robot do?

🔴 Red: Continues through the point at full speed without slowing down

🟢 Green: Stops completely at the point before moving to the next command

Black: Creates the largest possible blend arc, staying farthest from the point

🟠 Orange: Skips the point and interpolates directly to the destination

Answer: 🟢 Green - Stops completely at the point before moving to the next command

Fine routing:
  • Robot decelerates to zero velocity and fully stops at the point
  • Use Fine for precision positions: pick/place locations, critical waypoints

CNT routing (Continuous):
  • CNT 0 — blends close to the point (smallest arc, nearly stops)
  • CNT 100 — largest blend arc; robot swings farthest from the point
  • Robot never fully stops — creates smoother, faster transitions

In Project 3: CNT was used on the Circle program to smooth the transition between the two Circular commands at the mid-circle point.

SHORT ANSWER
QUESTIONS

Short Answer Practice 1

Explain how a latching circuit works in PLC ladder logic and why it is useful.

First hand up gets to answer!

Sample Answer

A latching circuit (seal-in circuit) allows an output to remain energized even after the input that triggered it is released.

How it works:
  • A momentary input (e.g., push button) energizes the output coil
  • A normally-open contact of that same output is wired in parallel with the input
  • Once the output energizes, it "seals itself on" through its own contact
  • A separate stop input (normally-closed contact in series) breaks the latch

Why it's useful:
  • Models real-world behavior: a motor should stay ON after you press start
  • Avoids holding a button continuously
  • Mirrors industrial conveyor, pump, and motor control logic

Short Answer Practice 2

Describe how a TON (timer on-delay) works in PLC ladder logic and give a practical use case.

Sample Answer

A TON (timer on-delay) counts time while its enabling rung is continuously TRUE.

How it works:
  1. Enabling rung goes TRUE → timer begins counting
  2. When accumulated value reaches preset → timer done bit (DN) energizes
  3. If enabling rung goes FALSE before preset → timer resets to zero

Key parameters:
  • Preset (PT): Target time (e.g., 5 seconds)
  • Accumulated (ET): Current elapsed time
  • Done bit (DN/Q): Becomes TRUE when ET ≥ PT

Practical use case: Turn on a warning light 10 seconds after a machine starts, or control a timed lamp sequence (as in Project 2, Part 3).

Short Answer Practice 3

Explain the difference between Teach mode (TP enabled) and Auto mode (TP disabled) on the FANUC CRX, and when you would use each.

Sample Answer

Teach mode (TP enabled):
  • Used for programming and testing — jogging, teaching points, stepping through programs
  • Enable function (open rectangle icon, top right) must be toggled ON
  • Run programs step-by-step using the Play Tab → Step → drag Run slider
  • Required any time you enter the work cell

Auto mode (TP disabled):
  • Used for running completed programs continuously
  • TP is disabled; robot runs from Play menu (Run slider FWD)
  • Operator must be outside the work cell
  • Only use after fully verifying all points in Teach (Step) mode first

Key rule: Always verify in Teach mode step-by-step before switching to Auto mode.

Short Answer Practice 4

What is "payload" in the context of a collaborative robot, and why is it important to configure it correctly?

Sample Answer

Payload is the total mass the robot must support at its end of arm — including the end effector (e.g., gripper) and any object being carried.

Why it matters:
  • Motion accuracy: The controller uses payload to calculate correct speed, acceleration, and motor torque — wrong payload leads to overshoot or sluggish motion
  • Force sensing: Cobots use payload to calibrate collision detection — if payload is wrong, the robot may not stop when it should (or may stop unnecessarily)
  • Mechanical safety: Exceeding the rated payload can overload joints and damage the robot
In a pick-and-place task:
  • Payload changes mid-program: gripper only (moving to pick) vs. gripper + object (carrying)
  • The payload setting must be updated at the right point in the sequence so the robot always has accurate inertia information

SCENARIO-BASED
QUESTIONS

Scenario Practice 1

Your PLC program should turn on a lamp when a button is pressed and keep it on until a reset button is pressed. You test it and the lamp turns on, but immediately turns off when you release the button.

What is likely missing from your ladder logic, and how do you fix it?

First hand up gets to answer!

Sample Answer

Problem: No latch (seal-in) circuit — the lamp output is only powered while the input button contact is TRUE.

Fix: Add a seal-in branch
[Stop_In NC] ─── [Start_In NO] ──────────────( Lamp_Out )
                       │
               [Lamp_Out NO] ────────────────
                    
  • Add a normally-open contact of the Lamp Output in parallel with the Start Button contact
  • Once the lamp energizes, it "seals itself on" through its own contact
  • A normally-closed Reset Button contact in series breaks the latch

This is the standard latching circuit (Part 1 of Project 2).

Scenario Practice 2

Describe what the following PLC program does, step by step. Be specific about when each output turns on and off.
Rung 1:
[Stop_In NC]─[Start_In NO]────( Motor_Out )
                  │
           [Motor_Out NO]────

Rung 2:
[Motor_Out NO]────( TON Timer1 PRE:5s )

Rung 3:
[Timer1 DN NO]────( Alarm_Out )
                    

Sample Answer

Rung 1 — Motor latch:
  • Pressing Start_In energizes Motor_Out
  • Motor_Out NO in parallel seals the latch — motor stays on after Start is released
  • Pressing Stop_In opens the NC contact, cutting power and turning the motor off
Rung 2 — Timer starts when motor runs:
  • Motor_Out NO enables Timer1 (TON, preset = 5 s)
  • The timer accumulates only while the motor is running; resets if motor stops before 5 s
Rung 3 — Alarm after 5 seconds:
  • When Timer1 reaches its preset, the DN (done) bit goes TRUE
  • Alarm_Out energizes — e.g., a warning light or buzzer turns on
  • Alarm stays on as long as the motor has been running ≥ 5 s; turns off when motor stops

Summary: This program latches a motor on/off and triggers an alarm output if the motor runs continuously for more than 5 seconds.

Scenario Practice 3

A student is teaching a pick-and-place program. They jog the robot to the pick position using Cartesian mode, moving it in the +X direction. Later, they rotate the robot's flange (end of arm) 90° and jog in +X again — but the robot moves in a completely different direction in the real world.

Why does this happen? What does X, Y, Z mean in Cartesian jogging, and what determines which way is "X"?

Sample Answer

In Cartesian (World) jogging, X, Y, and Z refer to axes of a fixed coordinate frame attached to the robot's base — not to the tool or the flange.

So why did +X look different after rotating the flange?
  • It didn't — +X in World frame is always the same direction regardless of how the arm is oriented
  • The robot's joints move differently to achieve the same World-frame motion, which can make it look unexpected
  • If the student was jogging in Tool frame instead, then rotating the flange would change which real-world direction +X points
Key concept:
  • World/Cartesian frame: Fixed to the robot base — X, Y, Z always point the same way
  • Tool frame: Fixed to the end effector — axes move with the tool as it rotates
  • Choosing the right frame for jogging matters: World frame is predictable; Tool frame is useful when you want to move relative to the tool tip

Scenario Practice 4

Your collaborative robot pick-and-place program picks the object correctly, but during the move to the place position the robot takes a long, sweeping arc that nearly hits the table edge. How would you address this?

Sample Answer

Problem: The robot is using Joint motion, which optimizes each joint independently and can produce unexpected TCP paths.

Solutions:
  1. Switch transit motion to Linear (L) — moves the TCP in a straight line; change Motion Type in the code block Details tab
  2. Add an intermediate waypoint — teach a safe via-point between pick and place to guide the path
  3. Reduce approach height so the robot lifts less before traveling horizontally
  4. Reduce override speed while testing to catch unexpected paths before they cause damage

Key Concepts Review

PLCs

  • Input vs. output devices
  • Ladder logic: rungs, contacts (NO/NC), coils
  • Latching circuits (seal-in)
  • Timers (TON: preset, accumulated, done bit)
  • Deterministic scan-cycle execution

FANUC CRX

  • Cell: robot, controller, Tablet TP, gripper, control panel
  • Safety rules: work cell entry, E-stop, escape plan
  • Teach Mode vs. Production Mode
  • Jogging: Joint, Cartesian (Cart), MPG
  • Programming: code blocks, timeline, touch-up, Basic Pick/Place
  • Gripper: width, force, wait
  • Motion types: Joint vs. Linear; override speed ≤ 250 mm/s
  • Step mode verification before full-speed runs