Professional Documents
Culture Documents
Trigger When
Trigger When
ProgExperteBHR5.2 09.03.00 en
138 of 178
8 Trigger -- path--related switching actions (continued)
Instruction sequence:
Since the switching point can be shifted from the motion point before which it was
programmed, past all subsequent approximate positioning points, as far as the next exact
positioning point, it is possible to shift the switching point from the approximate positioning
start point POINT2 to POINT5. If POINT2 was not approximated in this sequence of
instructions, the switching point could only be shifted as far as the exact positioning point
POINT2.
POINT2
--
DELAY X
-- POINT5
+
PATH Y<0
DELAY X
-- +
POINT3 POINT4
DELAY=0
PATH=0
PATH Y>0 +
Numeric example:
X= --10, Y= --20
POINT2
Switching point
DELAY = -10
POINT5
PATH =
-20
POINT4
POINT3
ProgExperteBHR5.2 09.03.00 en
139 of 178
Expert Programming
Special cases:
G BCO run
If block selection is carried out to a continuous--path motion, this movement is performed
as a BCO run. Since the start point for this BCO run is entirely arbitrary, it can be of no use
as the start point for a distance specification. Therefore, if TRIGGER commands with PATH
specification are programmed before such a motion, and if a block selection is made to
these commands, they will all be executed at the end point.
G Approximation not possible
If approximation is not possible; an exact positioning motion is carried out at this position.
In this context, however, it is treated in the same way as an approximate positioning motion.
Switching actions further along the path remain saved and are triggered at the relevant
position. Generally speaking, however, they will no longer be exactly as programmed,
since the path, and thus the path length, are now different. Switching actions set in the first
half of the approximate positioning range by means of a negative PATH value cannot now
be triggered before the exact positioning point:
LIN P1 C_DIS
TRIGGER WHEN PATH=-120 DELAY=0 DO SP1() PRIO=-1
TRIGGER WHEN PATH=-70 DELAY=0 DO $OUT[2]=TRUE
LIN P2 C_DIS
In the above example, the distance between the start and end points should be 100 mm.
If approximation is possible for P1, the subprogram call SP1() is executed 20 mm before
the point on the path nearest to the approximate positioning point P1 is reached. Output
2 is set 30 mm after this point on the path. If it was not possible to carry out approximation
for P1, the path runs through P1, where exact positioning takes place. The subprogram call
SP1() is now executed immediately after leaving P1 and output 2 is set at a distance of
30 mm from P1.
G Canceling a motion
If a motion is canceled, by block selection or reset, for example, and not subsequently
completed, switching actions that have not yet been executed will be deleted, not executed,
in the event of a DISTANCE specification.
G Path--related TRIGGER statement for a PTP motion
If a PATH-TRIGGER statement with path specification is programmed for a PTP motion,
this will be refused by the interpreter when the motion is executed.
G PTP--CP approximate positioning
If a PATH-TRIGGER statement is programmed for a motion whose start point is a PTP--CP
approximate positioning point, the switching action can take place, at the earliest, at the
end of this approximate positioning range, since the whole approximate positioning range
is now covered using a PTP motion.
In the event of a CP--PTP approximate positioning range, all TRIGGER statements which
are still active, but have not yet been switched on, are triggered at the start point of the
approximate positioning range. This is because the motion is continued as PTP from this
point and path assignment is no longer possible.
ProgExperteBHR5.2 09.03.00 en
140 of 178
8 Trigger -- path--related switching actions (continued)
In the next example, switching actions with DISTANCE specifications and also with PATH
specifications are programmed. The individual switching points and the motion path are
illustrated in Fig. 52.
DEF TRIG ( )
INT NO
IF $IN[1]==TRUE THEN
$OUT[NO]=TRUE
ENDIF
END
ProgExperteBHR5.2 09.03.00 en
141 of 178
Expert Programming
POS 1 B POS 2
$OUT[3]
2
30
$OUT[6]
$OUT[2] E
$OUT[5]
180
B
8
$OUT[1] $OUT[8]
20
POS 0 $OUT[4] $OUT[7]
E
POS 3
POS 4
Fig. 50 Switching points and motion path for the above example
ProgExperteBHR5.2 09.03.00 en
142 of 178