;; VAL-II program: Pick and Place
;; Demonstrates basic robot motion and I/O

.PROGRAM pickplace()
    HOME                   ; Move robot to home position
    APPRO pnt1, 50         ; Approach point 1 from 50mm away
    MOVE pnt1              ; Move to pick position
    CLOSEI 1               ; Close gripper (signal 1)
    DELAY 0.5              ; Wait 0.5 seconds
    DEPART 50              ; Depart 50mm upward
    APPRO pnt2, 50         ; Approach point 2
    MOVE pnt2              ; Move to place position
    OPENI 1                ; Open gripper
    DELAY 0.5              ; Wait 0.5 seconds
    DEPART 50              ; Depart upward
    HOME                   ; Return to home position
.END