omron — Example Command Program

Example Command Program Normally, a command program contains only Monitor commands. However, language keywords can be included by using the DO Monitor command. To include a language keyword in a Monitor command program, type a line with the format: MC DO keyword parameter, ... eV+ control instructions (for example, GOTO and IF) are ignored in a command program. Command programs can proceed only in a top-down manner, from the first line to the last. Example Command Program The following Monitor command program shows a simple start-up program (the line numbers refer to the descriptions below):

1 .PROGRAM auto() 2 3 ; This program will perform startup procedures for the 4 ; motion device, load a program file, move the device 5 ; to a safe location, and execute the main program. 6 7 MC WAIT.START 8 MC ENABLE POWER 9 MC CALIBRATE 10 MC LOAD main.v2 11 MC DO MOVE safe 12 MC CYCLE.END 13 MC EXECUTE motion, -1 14 .END The lines in this Monitor command program are described below: 1. This line is entered automatically when the program is created. 2. This blank line is ignored during execution. 3. This is a comment line. Notice that each comment line begins with a semicolon (";"). Lines beginning with a semicolon (with optional leading spaces) are ignored during execution. 4.

This is another comment line. 5. Another comment line. 6. Another blank line. 7. Wait for the operator to toggle the AUTOMATIC/MANUAL switch and press the START soft key on the pendant. 8. Turn on HIGH POWER. WARNING: Before processing a command program that turns eV+Operating System User's Guide, v2.x, 18320-000 Rev A Page 64