Tabela de conteúdos

DW10ChLength

D = Device(CAM01)

W = Writing functions

The DW10ChLength function is linked with the DC20FlyCut or DC30FlyCut functions and is used in applications of flying cut. It serves to execute the change of length of workpiece.
Are required the calculated array from thee DC20FlyCut or DC30FlyCut functions 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

DW10ChLength (CodeG, CodeM, CodeQm, CodeQs, ChExecut, Error)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN ARRSYS CodeG W Array containing calculated G Code
IN ARRSYS CodeM W 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 Var error of cam writing

Error

After calling the function, if there are any errors the error variable having the following values:
0 - No errors
1 - Error writing in the areas of cam

Examples

1° Example

MAIN:                  
     IF gfCambioLun
             gfCambioLun = 0
             DC20FlyCut (LunPez, VriferM, VmaxS, TaccS, TdecS, TmAttHome, TmAttFTag, TmTaglio, TmAssest, TmExtraSp, ExtraSpaz, CodeG, CodeM, CodeQm, CodeQs, Error, NumSett, LunMin, SpazioRitM, SpazioRitS)
        IF NOT Error
                DW20ChLength (cmCamma, CodeG, CodeM, CodeQm, CodeQs, ChExecut, Error)
        ENDIF
     ENDIF

2° Example

MAIN:                  
     IF gfCambioLun
             gfCambioLun = 0
             DC30FlyCut (LunPez, VriferM, VmaxS, TaccS, TdecS, TmAttHome, TmAttFTag, TmTaglio, TmAssest, TmExtraSp, ExtraSpaz, CodeG, CodeM, CodeQm, CodeQs, Error, NumSett, LunMin, SpazioRitM, SpazioRitS)
        IF NOT Error
               DW20ChLength (cmCamma, CodeG, CodeM, CodeQm, CodeQs, ChExecut, Error)
        ENDIF
    ENDIF

Note