Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:software:qview:qview_6:qcl_library:dt21breakenc [2017/02/07 16:01] – created qem103en:software:qview:qview_6:qcl_library:dt21breakenc [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== 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 ===
 +
 +<code QCL>
 +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
 +</code>
 +
 +=== Note ===
 +
 +  * The AlmEnc flag is reset automatically when the emergency situation becomes invalid (stoped device).