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/OUT | VARIABLE TYPE | EXAMPLE NAME | DIM | |
---|---|---|---|---|
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
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