Differences

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

Link to this comparison view

en:software:qview:qview_6:qcl_library:dw22chlenght [2017/03/28 18:01] – created qem103en:software:qview:qview_6:qcl_library:dw22chlenght [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== DW22ChLength ======
 +
 +**D = **//Device(CAMMING, CAMMING2, CAMMING3)//
 +
 +**W = **//Writing functions//
 +
 +The DW22ChLength function is linked with the DC2xFlyCut or DC3xFlyCut functions (where x>0) and is used in applications of flying cut. It serves to __execute the change of length of workpiece__.\\
 +To do this it takes arrays calculated by the DC2xFlyCut or DC3xFlyCut function It must be called before this to perform the calculation with the new length.\\
 +The function contains the instructions to Wait inside that block the task in which it appears. It is therefore recommended that you place the function in a task that doesn't need to be run entirely at each program scan.
 +
 +===== IMPLEMENTATION =====
 +
 +**DW22ChLength (cmCamma, CodeG, CodeM, CodeQm, CodeQs, ChExecut, Error)**
 +
 +Parameters:
 +
 +^IN/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^
 +|  IN  |  CAMMING / CAMMING2 / CAMMING3  |  cmCamma  |  -  |Device type to which you can apply the function|
 +|  IN  |  ARRSYS  |  CodeG  |  W/L  |Array containing calculated G Code|
 +|  IN  |  ARRSYS  |  CodeM  |  W/L  |Array containing calculated M Code|
 +|  IN  |  ARRSYS  |  CodeQm  |  L  |Array containing calculated Master Space|
 +|  IN  |  ARRSYS  |  CodeQs  |  L  |Array containing calculated Slave Space|
 +|  OUT  |  GLOBAL  |  ChExecut  |  F  |Flag (to toggle) to change the cam|
 +|  OUT  |  SYSTEM  |  Errore  |  B/L  |Error Var in the cam writing|
 +
 +==== Error ====
 +
 +After calling the function, if there are any errors the error variable takes certain values, the meaning of these values corresponds to the variable errcode device.
 +
 +=== Examples ===
 +
 +**1° Example** 
 +<code QCL>
 +MAIN:                  
 +     IF gfCambioLun
 +             gfCambioLun = 0
 +             DC21FlyCut (TipoStart, LunPez, VriferM, VmaxS, TaccS, TdecS, TmAttHome, TmAttFTag, TmTaglio, TmAssest, TmExtraSp, ExtraSpaz, CodeG, CodeM, CodeQm, CodeQs, Error, NumSett, LunMin, SpazioRitM, SpazioRitS)
 +        IF NOT Error
 +               DW22ChLength (cmCamma, CodeG, CodeM, CodeQm, CodeQs, ChExecut, Error)
 +        ENDIF
 +     ENDIF
 +</code>
 +
 +**2° Example** 
 +<code QCL>
 +MAIN:                  
 +     IF gfCambioLun
 +             gfCambioLun = 0
 +             DC31FlyCut (LunPez, VriferM, VmaxS, TaccS, TdecS, TmAttHome, TmAttFTag, TmTaglio, TmAssest, TmExtraSp, ExtraSpaz, CodeG, CodeM, CodeQm, CodeQs, Error, NumSett, LunMin, SpazioRitM, SpazioRitS)
 +        IF NOT Error
 +               DW22ChLength (cmCamma, CodeG, CodeM, CodeQm, CodeQs, ChExecut, Error)
 +        ENDIF
 +     ENDIF
 +</code>
 +
 +=== Note ===
 +
 +  *This function always calculates the cam dividing it into 12 sectors.
 +  *As cutting sector retains the number 3.