Events – Function of a 32-bit variable value. TML Instructions and Data |
Setting any of these events allows you to detect when a selected variable is equal or over/under a value or the value of a variable. The selected variable can be any 32-bit TML variable, long or fixed. Instructions !VO var32, value32 Set event when 32-bit TML parameter or variable var32 is equal or over value32. Value32 is either a long or a fixed, depending on var32 type. !VO var32, var32c Set event when 32-bit TML parameter or variable var32 is equal or over var32c. Var32c is a 32-bit TML parameter of variable of the same type like var32. !VU var32, value32 Set event when 32-bit TML parameter or variable var32 is equal or under value32. Value32 is either a long or a fixed, depending on var32 type. !VU var32, var32c Set event when 32-bit TML parameter or variable var32 is equal or under var32c. Var32c is a 32-bit TML parameter of variable of the same type like var32.
Programming 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
See also: Events – When the actual motion is completed. Related TML Instructions and Data Events – Function of motor or load position Related TML Instructions and Data Events – Function of motor or load speed Related TML Instructions and Data Events – After a wait time Related TML Instructions and Data Events – Function of reference Related TML Instructions and Data Events – Function of inputs status Related TML Instructions and Data |