# The timer resolution is 1 microsecond details timers

• Notes
• MinisterIronDragonfly8373
• 924
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 758 - 761 out of 924 pages.

The timer resolution is 1 microsecond. Details Timers -1 and -2 If you don't want to use timers 1 through 15, or need more than 15 timers, Timers -1 and -2 may be used as follows: AUTO start_time, interval, scale scale = 62.5 ;Set scale = 1000 for TIMER(-2) start_time = TIMER(-1) ... interval = ((TIMER(-1)-start_time) BAND ^HFFFFFF)/scale In V+ 11.2 and later, timer -3 provides a better method for computing such intervals pro- vided that a DOUBLE value can be used. The type of V+ variable used in time computations affects the maximum interval that can be computed with full resolution: l Standard REAL variables have only 24 bits of resolution, which limits the time interval to 16,777,216 (2 24 ) counts. This limit corresponds to about 4.6 hours for millisecond timers and 74 hours for 16-millisecond timers. l DOUBLE REAL variables have 52 bits of precision so the full resolution of the various timers is stored. Example The following example shows how the TIMER instruction and real-valued function can be used to time the execution of a subroutine: TIMER 1 = 0 ;Set timer to zero CALL test.routine() ;Call the subroutine TYPE "Elapsed time =", TIMER(1)," seconds" Related Keyword TIMER program instruction TIMER real-valued function V+ Language Reference Guide Page 758
TOOL program instruction Syntax TOOL transformation_value Function Set the internal transformation used to represent the location and orientation of the tool tip relative to the tool mounting flange of the robot. Usage Considerations The TOOL instruction causes a BREAK in continuous-path motion. The TOOL instruction can be executed by any program task as long as the robot selected by the task is not attached by any other task. The instruction applies to the robot selected by the task. If the V+ system is not configured to control a robot, executing the TOOL instruction causes an error. The word "tool" cannot be used as a program name or variable name. Parameter transformation_value Optional transformation variable or function, or compound transformation expression, that is the new tool trans- formation. If the transformation value is omitted, the tool is set to NULL. Details Causes a BREAK in the robot continuous-path motion and sets the value of the tool trans- formation equal to the transformation value given. Refer to the monitor TOOL command for a complete description of the effect of this instruc- tion. (For information on how to define a tool transformation, see the section Tool Trans- formations in the V+ Language User's Guide .) Related Keywords SELECT program instruction SELECT real-valued function TOOL monitor command TOOL transformation function TOOL program instruction V+ Language Reference Guide Page 759
TOOL transformation function Syntax TOOL Function Return the value of the transformation specified in the last TOOL command or instruction.