09.12.2012 Views

Basic Characteristics RAPID

Basic Characteristics RAPID

Basic Characteristics RAPID

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

clock Time measurement<br />

Description<br />

Example<br />

Limitations<br />

<strong>Characteristics</strong><br />

Clock is used for time measurement. A clock functions like a stopwatch used for timing.<br />

Data of the type clock stores a time measurement in seconds and has a resolution of<br />

0.01 seconds.<br />

VAR clock clock1;<br />

ClkReset clock1;<br />

The clock, clock1, is declared and reset. Before using ClkReset, ClkStart, ClkStop and<br />

ClkRead, you must declare a variable of data type clock in your program.<br />

The maximum time that can be stored in a clock variable is approximately 49 days<br />

(4,294,967 seconds). The instructions ClkStart, ClkStop and ClkRead report clock<br />

overflows in the very unlikely event that one occurs.<br />

A clock must be declared as a VAR variable type, not as a persistent variable type.<br />

Clock is a non-value data type and cannot be used in value-oriented operations.<br />

Related Information<br />

Described in:<br />

Summary of Time and Date Instructions <strong>RAPID</strong> Summary - System & Time<br />

Non-value data type characteristics <strong>Basic</strong> <strong>Characteristics</strong> - Data Types<br />

<strong>RAPID</strong> Reference Manual 7-clock-1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!