Moog Animatics SmartMotor™ Developer's Guide,Rev. L
Page 363 of 909
CLK=formula
Millisecond Clock
APPLICATION: System
DESCRIPTION: Value (in milliseconds) of the firmware system clock
EXECUTION: N/A
CONDITIONAL TO: N/A
LIMITATIONS: N/A
READ/REPORT: RCLK
WRITE: Read/write
LANGUAGE ACCESS: Assignment, formulas and conditional testing
UNITS: Number
RANGE OF VALUES: -2147483648 to 2147483647
TYPICAL VALUES: N/A
DEFAULT VALUE: 0
FIRMWARE VERSION: 5.x and later
COMBITRONIC: CLK:3=1234
where ":3" is the motor address — use the actual address or a
variable
DETAILED DESCRIPTION:
CLK is an independent, free-running, read/write counter. It is reset to zero on a hardware or
software reset, and it counts once per millisecond.
The user may assign a value to this counter at any time. The size of CLK is 32 bits (signed). At
the value 2147483647, it will roll over to the value -2147483648 and continue counting up. The
time required to start from 0 and reach the roll-over value is 24.8 days.
EXAMPLE: The following example pauses for one second.
WAIT=1000'Pause for one sec
EXAMPLE:
This example uses code within a WHILE loop that executes during the pause.
CLK=0'Initialize clock
WHILECLK<1000'Loop one sec
LOOP
RELATED COMMANDS:
WAIT=formula Wait for Specified Time (see page 795)
Part 2: Commands: CLK=formula