en:software:qview:qview_6:qcl_library:dw22wrcam

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

DW22WrCam

D = Device(CAMMING2, CAMMING3, CAMMING4)

W = Writing functions

* = Replaces the function DW20WrCam

The DW22WrCam 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 end time they serve to identify the field where you want to start writing and the area where you want to stop. Function writes 40 sectors cam.

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

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN CAMMING2
CAMMING3
CAMMING4
cmCamma - Type of device to which you can apply the function
IN ARRSYS aslParam[1] L Sector number to start writing
IN SYSTEM aslParam[2] L Sector number to end writing (valid only if 'aslParam[3]' is to 0)
IN SYSTEM aslParam[3] L Number of sectors to write (optional if you want to use 'aslParam[2]')
IN SYSTEM aslParam[4] L Number of array element from which to begin reading values (if set 0 it 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 Error B Error var on 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 fields.
If the “aslParam[2]” parameter (ending sector) is not set to 0, writing the fields ends with 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 any errors the error variable takes certain values, the meaning of these values is described below:
0 - No error
1 - Indices of the start and/or end writing drivers

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
    DW22WrCam (cmCamma, aslParam, CodeG, CodeM, CodeQm, CodeQs, CodeQma, CodeQsa, Error)
    IF sbErrore
        JUMP FINE
    ENDIF
ENDIF
  • Last modified: 2019/08/29 17:01