DT21BreakEnc
D = Device(oopos-oopos2)
T = Control functions
The DT21BreakEnc function executes a check to see any problems on the On/Off axes movement. The function commands a stop device (or report the emergency through the flag), when with the active forward or back output, the axis, in the time set in TmCntrl parameter, covered at least the space set to the MinSpost parameter.
IMPLEMENTATION
DT21BreakEnc(Axis, MinSpost, TmCntrl, EmrgOn, AlmEnc)
Parameters:
IN/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
IN | OOPOS OOPOS2 OOPOS3 | Axis (INTDEVICE) | - | Device type to which you can apply the function |
IN | SYSTEM | MinSpost | L | Minimum displacement value to do over time TmCntrl (UM) |
IN | SYSTEM | TmCntrl | L | Time to execute the minimum movement MinSpost (msec) |
IN | SYSTEM | EmrgOn | F | If the Flag is set to 1, if an alarm function, gives a stop command to the device; is set to 0 the function simply set the alarm flag |
IN | SYSTEM/ GLOBAL | AlmEnc | F | Alarm Flag. Set to 1 when the function detects the alarm, (regardless of the value of the EmrgOn parameter). |
Example
MinSpost = 10 ;(10 units of measure of displacement) TmCntrl = 1000 ;(1secTime in which to execute the MinSpost space) EmrgOn = 0 ;(Enable only the flag and not the stop command directed to the device) DT21BreakEnc(Axis, MinSpost, TmCntrl, EmrgOn, AlmEnc) IF AlmEnc IF NOT Axis:st_still STOP Axis ENDIF ENDIF
Note
-
The AlmEnc flag is reset automatically when the emergency situation becomes invalid (stoped device).