Back to the 2025 paper

VAL-II

20257m

Write a basic program using VAL-II programming to perform a pick-and-place operation, incorporating a conditional statement based on a sensor input.

Worked SolutionAI Assisted

Solution: VAL-II Pick-and-Place with Sensor Condition

A pick-and-place program moves a workpiece from a pickup position to a placement position. A sensor can be used to verify that a part is available before starting.

Note: VAL-II syntax varies by controller implementation. The following is an exam-oriented illustrative program showing the required logic rather than a controller-specific production program.

Example

PROGRAM PICKPLACE

  MOVE PICK_APPROACH
  IF PART_SENSOR = ON THEN
      MOVE PICK
      CLOSE GRIPPER
      MOVE PICK_APPROACH
      MOVE PLACE_APPROACH
      MOVE PLACE
      OPEN GRIPPER
      MOVE PLACE_APPROACH
  ELSE
      STOP
  ENDIF

END

Operation

  1. Move to the pickup approach position.
  2. Read the part-presence sensor.
  3. If the sensor is ON, the robot moves to the pickup point.
  4. The gripper closes and holds the workpiece.
  5. The robot returns to the safe approach position.
  6. It moves to the placement approach position.
  7. It moves to the placement point and opens the gripper.
  8. It returns to the safe position.
  9. If the sensor is OFF, the program stops or waits for a part.

Flowchart

START
  ↓
Move to pickup approach
  ↓
Part sensor ON?
 ┌───────┴────────┐
NO               YES
 ↓                 ↓
STOP          Pick part
                  ↓
             Close gripper
                  ↓
              Move to place
                  ↓
             Open gripper
                  ↓
                 END

Importance of the Conditional Statement

The conditional statement prevents the robot from attempting to pick an absent part. It therefore improves automation reliability, safety and process control.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.