en:software:qview:qview_6:qcl_library:dc10chgear

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

DC10ChGear

D = Device(CAMMING2, CAMMING3)

C = Calculation functions

The DC10ChGear function allows you to change “on the fly” the synchronism of a gearing ratio Master-Slave, an electronic cam built in computation of the DC10ElGear function.
The gearing is a system that links a Slave axis an Master axis by a ratio of timing adjustable.
Below is a chart showing the progress of the Slave with respect to Master. The point described as “tchange” in the graph, represents the time when you change the sync relationship. Slave/Master sync ratio on the graph changes from 1:2 (aslParam[1] = 500) to 1:1 (aslParam[1] = 1000)

DC10ChGear (cmSlave, aslParam,ChangeExe,ErrChRapp)

Parameters:

IN/OUTVARIABLE TYPEEXAMPLE NAMEDIM
IN CAMMING2 / CAMMING3 cmSlave - Device type to which you can apply the function
IN ARRSYS aslParam [1] L Synchronous Slave/Master relationship (1000=1:1) (possibility of minimum variation of 1‰)
IN ARRSYS aslParam [2] L Maximum Slave speed (UM/sec) [1÷999999]
IN ARRSYS aslParam [3] L Master speed reference (UM/sec) [1÷999999]
OUT GLOBAL ChExecut F Flag (to toggle) to change the cam
OUT SYSTEM Errore B Error var intervened

Once the error variable function assumes certain values, the meaning of these values is summarized below:
0: calculation executed without errors
1: Sync ratio equal to 0
2: Master speed less than or equal to 0
3: Slave max speed less than or equal to 0
4: “Measure” parameter less than or equal to 0
5: Calculated Slave speed greater than the maximum Slave speed

Example

MAIN:                  
     IF gfChGear
           gfChGear = 0
 
           aslParam[1] = 1000	;Slave/Master ratio (1:1)
           aslParam[2] = 4000	;Maximum Slave speed
           aslParam[3] = 1500	;Master reference speed
 
           DC10ChGear (cmSlave, aslParam,ChangeExe,ErrChRapp)
    ENDIF

Operation notes

  • The sync relationship (aslParam[1]) can also be set to negative, in that case the Slave follows the relationship of timing set but going in the back direction
  • The change takes place without any ramp as shown in the chart above
  • The number of sectors used is 8
  • The function contains instructions to wait that block the task that hosts, It is recommended that you create a separate task that contains the function or put the function in a task that can be stopped.
  • Last modified: 2019/08/29 17:01