Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:software:qview:qview_6:qcl_library:dc10chvelrat [2017/03/28 15:40] – [Example of use] qem103 | en:software:qview:qview_6:qcl_library:dc10chvelrat [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DC10ChVelRat ====== | ||
+ | |||
+ | **D = **// | ||
+ | |||
+ | **C = **// | ||
+ | |||
+ | The DC10ChVelRat function __execute the calculations needed in order to set and/or change the speed ratio //**RV**// (RV = Slave Speed/ | ||
+ | |||
+ | You must pass values by reference speed of the Master, of the new speed ratio, the resolution is specified in the RV, the sampling time of the CAMMING device (or 4), the type of softening during speed changes. Function writes directly on the CAMMING3 (or 4) device sectors to run electric gearing with the new speed ratio. The function also returns the values on the " | ||
+ | |||
+ | If the function is executed with the cam is not in execution, the cam is programmed with the RV set. The next STARTCAM electric gearing attaches to the master with the RV.\\ | ||
+ | If the function is executed with the cam in execution, activates a rewrite "on the fly" with the new RV cam that by the time " | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **DC10ChVelRat (Cam, Vmaster, Rapp_SM, Risol, Tcamp, TipoAdd, Texec, WrExec, Error)** | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | CAMMING3\\ CAMMING4 | ||
+ | | IN | SYSTEM | ||
+ | | IN | SYSTEM | ||
+ | | IN | SYSTEM | ||
+ | | IN | SYSTEM | ||
+ | | IN | SYSTEM | ||
+ | | OUT | SYSTEM | ||
+ | | OUT | SYSTEM | ||
+ | | OUT | SYSTEM | ||
+ | |||
+ | ==== Error ==== | ||
+ | |||
+ | After calling the function, the error variable can take on certain values, the meaning of these values is summarized below:\\ | ||
+ | 0: calculation executed without errors\\ | ||
+ | 1: Null sample time\\ | ||
+ | 2: Null speed ratio\\ | ||
+ | 3: Null Master Speed\\ | ||
+ | 4: Cam error | ||
+ | |||
+ | === Note === | ||
+ | |||
+ | *In case the Texec is too high for your application that uses the function, It is advisable to check that the resolution of the master and the slave CAMMING3 (or 4) device is the highest possible and that the relationship measurem / pulsem and measure / pulse is as nearest possible to 1. | ||
+ | *The higher the resolution " | ||
+ | *If the speed of the Master passed to the function is similar to the actual speed of movement of the Master (within the 80%) then you can run the function at intervals equal to the value contained in Texec. If the Master speed passed to the function is much lower (most of the 80%) from the real one, you have to increase the time between calls the other function (> of Texec) otherwise the device goes into error and the axis stops responding in emergency. | ||
+ | *If the actual speed of the master is greater than 3 times the declared function, it's possible that the device goes into error and stops in an emergency. | ||
+ | |||
+ | === Example of use === | ||
+ | |||
+ | An example of using the function with a speed of the master of the real one is: | ||
+ | |||
+ | <code QCL> | ||
+ | .... | ||
+ | |||
+ | Rapp_SM = 1500 | ||
+ | |||
+ | Resol = 3 | ||
+ | |||
+ | Vmaster = 2750 ; | ||
+ | |||
+ | Tcamp = 2 | ||
+ | |||
+ | TipoAdd = 1 | ||
+ | |||
+ | DC10ChVelRat (Cam, Vmaster, Rapp_SM, Risol, Tcamp, TipoAdd, Texec, WrExec, Error) | ||
+ | |||
+ | WAIT WrExec | ||
+ | |||
+ | WrExec = 0 | ||
+ | |||
+ | tmTim = Texec | ||
+ | |||
+ | WAIT tmTim OR Error | ||
+ | |||
+ | .... | ||
+ | </ | ||