Control functions, Clock1, Chapter 7 – Rockwell Automation 1746-BAS BASIC LANGUAGE User Manual
Page 85: Clock1 -1, Chapter, Purpose, Syntax

1
Publication 1746-RM001A-US-P
Chapter
7
Control Functions
This chapter describes and illustrates commands executed within the BASIC
program or from the command line to control the internal clock or the flow of the
BASIC program. Table 7.1 lists the corresponding mnemonics.
CLOCK1
Purpose
Use the CLOCK1 statement to enable the free running clock resident on the
BASIC or BASIC-T module. The special function operator TIME is incremented
once every 5 milliseconds after the CLOCK1 statement is executed. The CLOCK1
statement uses an internal TIMER to generate an interrupt once every 5
milliseconds. Because of this, the special function operator TIME has a resolution
of 5 milliseconds. The special function operator TIME counts from 0 to
65535.995 seconds. After reaching a count of 65535.995 seconds TIME overflows
back to a count of zero. The interrupts associated with the CLOCK1 statement
cause the module programs to run at about 99.6% of normal speed. This means
that the interrupt handling for the free running clock uses about 0.4% of the total
CPU time
.
Syntax
CLOCK1
Table 7.1 Chapter Reference Guide
If you need (to)
Use this mnemonic
Page
Disable the real time clock.
CLOCK0
Enable the real time clock.
CLOCK1
Set up a conditional do-loop.
DO-UNTIL
Set up a conditional do-loop.
DO-WHILE
Terminate a program execution.
END
Set up a for-next loop.
FOR-TO-(STEP)-NEXT
Go to the program line number.
GOTO
Conditional test
IF-THEN-ELSE
Test a for-next loop condition.
NEXT
Conditional GOTO
ON-GOTO
IMPORTANT
This does not include additional overhead for ON-TIME user
interrupt handling execution.