!VO Set event when a selected variable is equal or over a 32-bit value or the value of a fixed or long variable |
Syntax
VAR32B: fixed or long variable value32: 32-bit fixed or long immediate value Binary code
The programmed event is automatically erased when the event occurs or if the timeout for the WAIT! command expires. Remark: After setting UPD! or STOP! you need to wait until the programmed event occurs using WAIT!, otherwise, the program will continue with the next instructions that may override the event monitoring.
Example //Wait until master position MREF > 500 counts, then activate //electronic gearing slave mode !VO MREF, 500; //Set event when variable MREF is >= 500 GEAR = 1; // gear ratio GEARMASTER = 1; // Gear ratio denominator GEARSLAVE = 1; // Gear ratio numerator EXTREF 2; // read master from 2nd encoder or pulse & dir MASTERRES = 2000; // master resolution MODE GS; //Set as slave, position mode TUM1; //Set Target Update Mode 1 SRB UPGRADE, 0xFFFF, 0x0004;//UPGRADE.2=1 enables CACC limitation CACC = 0.3183; //Limit maximum acceleration at 1000[rad/s^2] UPD!; //execute on event |