Interval Timers - Siemens SIMATIC S7-200 System Manual

Programmable controller
Hide thumbs Also See for SIMATIC S7-200:
Table of Contents

Advertisement

Interval Timers

Beginning Interval Time
The Beginning Interval Time (BITIM) instruction reads the
current value of the built-in 1 millisecond counter and stores
the value in OUT. The maximum timed interval for a
DWORD millisecond value is 2 raised to the 32 power or
49.7 days.
Calculate Interval Time
The Calculate Interval Time (CITIM) instruction calculates
the time difference between the current time and the time
provided in IN. The difference is stored in OUT. The
maximum timed interval for a DWORD millisecond value is 2
raised to the 32 power or 49.7 days. CITIM automatically
handles the one millisecond timer rollover that occurs within
the maximum interval, depending on when the BITIM
instruction was executed.
Table 6-77
Valid Operands for the Interval Timer Instructions
Inputs/Outputs
Data Types
IN
DWORD
OUT
DWORD
Example: SIMATIC Beginning Interval Time and Calculate Interval Time
Operands
VD, ID, QD, MD, SMD, SD, LD, HC, AC, *VD, *LD, *AC
VD, ID, QD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
Network 1
//Capture the time that Q0.0 turned on.
LD
Q0.0
EU
BITIM VD0
Network 2
// Calculate time Q0.0 has been on.
LD
Q0.0
CITIM VD0, VD4
S7-200 Instruction Set
Chapter 6
203

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents