beautypg.com

Program flow commands, Event triggers & trippoints – Galil DMC-2X00 User Manual

Page 138

background image

Instruction Interpretation

:ED Edit

Mode

000 #A

Program Label

001 PR1000

Position Relative 1000

002 BGA

Begin

003 PR5000

Position Relative 5000

004 EN

End

Q

Quit Edit Mode

:XQ #A

Execute #A

?003 PR5000

Error on Line 3

:TC1

Tell Error Code

?7 Command not valid while running.

Command not valid while running

:ED 3

Edit Line 3

003 AMX;PR5000;BGA

Add After Motion Done

Q

Quit Edit Mode

:XQ #A

Execute #A

Program Flow Commands

The DMC-2x00 provides instructions to control program flow. The DMC-2x00 program sequencer
normally executes program instructions sequentially. The program flow can be altered with the use of
event triggers, trippoints, and conditional jump statements.

Event Triggers & Trippoints

To function independently from the host computer, the DMC-2x00 can be programmed to make
decisions based on the occurrence of an event. Such events include waiting for motion to be complete,
waiting for a specified amount of time to elapse, or waiting for an input to change logic levels.

The DMC-2x00 provides several event triggers that cause the program sequencer to halt until the
specified event occurs. Normally, a program is automatically executed sequentially one line at a time.
When an event trigger instruction is decoded, however, the actual program sequence is halted. The
program sequence does not continue until the event trigger is "tripped". For example, the motion
complete trigger can be used to separate two move sequences in a program. The commands for the
second move sequence will not be executed until the motion is complete on the first motion sequence.
In this way, the DMC-2x00 can make decisions based on its own status or external events without
intervention from a host computer.

NOTE: It is not recommended to send trip point commands (e.g. AM) from the PC to a DMC-
2100/2200. The buffer becomes filled easily when using event triggers which would halt
communications between the host and the controller.

128

Chapter 7 Application Programming

DMC-2X00