
Parker Hannifin
14 Programmer’s Guide
Creating a program
This application requires two programs.
Program 0: Determines the motion the gantry (axes X and Y),
allowing a camera to take scans from various positions.
Program 1: Activates when the gantry (axes X and Y) crosses a
boundary marked by a light curtain. When the gantry passes
through the light curtain, input 10 turns on, which initiates retraction
of the camera (axis Z) to a safety position. When input 10 turns off,
the camera returns to its original position.
1. In the Project Workspace, select Program Editor. By default, it
opens Program 0.
2. In the Program Editor window under the comment 'TODO: edit
your program here, type the following (or copy and paste the
code to the program editor):
DRIVE ON X Y : REM Enable X and Y Axes
X0 Y0 : REM Return X and Y axes to Zero Position
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
_Head
X6 Y6 : REM Move to Position 1
SET 34 : REM Turn on OUTPUT 34 (Camera Process)
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
CLR 34 : REM Turn off OUTPUT 34 (Camera Process)
X12 Y6 : REM Move to Position 2
SET 34 : REM Turn on OUTPUT 34 (Camera Process)
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
CLR 34 : REM Turn off OUTPUT 34 (Camera Process)
X18 Y6 : REM Move to Position 3
SET 34 : REM Turn on OUTPUT 34 (Camera Process)
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
CLR 34 : REM Turn off OUTPUT 34 (Camera Process)
X18 Y12 : REM Move to Position 4
SET 34 : REM Turn on OUTPUT 34 (Camera Process)
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
CLR 34 : REM Turn off OUTPUT 34 (Camera Process)
X12 Y12 : REM Move to Position 5
SET 34 : REM Turn on OUTPUT 34 (Camera Process)
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
CLR 34 : REM Turn off OUTPUT 34 (Camera Process)
X6 Y12 : REM Move to Position 6
SET 34 : REM Turn on OUTPUT 34 (Camera Process)
DWL 5 : REM Wait 5 seconds (for Camera Process to finish)
CLR 34 : REM Turn off OUTPUT 34 (Camera Process)
GOTO Head : REM Start Cycle over again
3. In the Project Workspace, select Program 1.
Comentários a estes Manuais