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

Robotic Programming and Software DevelopmentExplain the structure and classification of VAL Language Commands. Write examples of Hand control and Program control commands in VAL-I.20257mFormal Language & Automata TheoryThe decision problem is the function from string to _____. (i) char (ii) int (iii) boolean (iv) None of the above20202mRobotic Programming and Software DevelopmentChoose the correct option/answer the following (Any seven question only): (a) Which component manages the communication and processing tasks within a robot system? (b) The main workspace structure in ROS where packages are built is known as: (c) Lead through programming is primarily associated with: (d) Which sensor is commonly used for mapping and localization in autonomous navigation? (e) In VAL-I/II programming, what are conditional statements used for? (f) Which of the following is responsible for facilitating inter-process communication between different parts of a ROS system? (g) A configuration where a robot's wrist joints align in such a way that the robot loses one or more degrees of freedom is called a: (h) In the RAPID programming language, a command block designed for a specific, simple, and frequent operation that is called upon by the main program is typically a: (i) The command used to synchronize the actions of two or more independent devices (e.g., a robot and a conveyor belt) is the: (j) The application of Computer Vision, AR & VR in Robotics, and Virtual robotics are all topics covered under the study of:202514mDesign and Analysis of Algorithms Write a short note on: Dynamic Programming20257m