en:software:qview:qview_6:qcl_library:dw31wrcam

This translation is older than the original page and might be outdated. See what has changed.

DW31WrCam

D = Device(CAMMING3, CAMMING4)

W = Writing functions

* = Replaces the function DW30WrCam

The DW31WrCam function is used to write the fields to build an electronic cam. The function you will need to pass as parameters a pointer to start and one of the end which serve to identify the sector where you want to start writing and the area where you want to stop. La funzione scrive 128 settori della camma.

DW31WrCam (cmCamma, aslParam, CodeG, CodeM, CodeQm, CodeQs, CodeQma, CodeQsa, Error)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN CAMMING3
CAMMING4
cmCamma - Type of device to which you can apply the function
IN ARRSYS aslParam[1] L Sector number of start writing
IN SYSTEM aslParam[2] L Sector number of end writing (valid only if 'aslParam[3]' is to 0)
IN SYSTEM aslParam[3] L Number of sectors to write (optional in the case of use 'aslParam[2]')
IN SYSTEM aslParam[4] L Array element number from which to begin reading values (is you set to 0 start with the first element)
IN ARRSYS CodeG W/L Array containing Code G calculated
IN ARRSYS CodeM W/L Array containing Code M calculated
IN ARRSYS CodeQm L Array containing calculated space Master
IN ARRSYS CodeQs L Array containing calculated space Slave
IN ARRSYS CodeQma L Array containing Qma code (auxiliary code)
IN ARRSYS CodeQsa L Array containing Qsa code (auxiliary code)
OUT SYSTEM Errore B Error var in the cam writing

The “aslParam[1]” parameter (starting sector) indicates the number of the field in which you want to start writing the cam, while “aslParam[4]” (initial array element) indicates the number of the element of the array (CodeG, CodeM, etc..) from which you will start to copy the values in the sectors.
If the “aslParam[2]” parameter (ending sector) is not set to 0, writing sectors ending with the sector of this number, if the parameter is to 0 the writing continues for the number of sectors set in “aslParam[3]” parameter (number of sectors to write).

Once invoked the function if there are errors the error variable assumes certain values, the meaning of these values is described below:
0 - No errors
1 - Indices of the start and/or end wrong writing

Example

MAIN:
 
IF gfScrittCam
    gfScrittCam = 0
    aslParam[1] = 1		;He started writing from 1° sector of the cam
    aslParam[4] = 10		;Start reading from 10th element of the array
    DW31WrCam (cmCamma, aslParam, CodeG, CodeM, CodeQm, CodeQs, CodeQma, CodeQsa, Error)
    IF sbErrore
        JUMP FINE
    ENDIF
ENDIF
  • Last modified: 2019/08/29 17:01