Specifications

39
Data Type Structure Section 5-4
5.4 Data Type Structure
a) Alphanumerical Texts
Are stored in the memory byte for byte in ascending address order.
b) Counter
A distinction is made between variables which have been assigned a counter ad-
dress and variables which have been assigned another PLC address
Counter address
When accessing counter addresses, the count value is interpreted in the binary
format, the control bits of the counter are masked out. Therefore, to avoid control
bits from being erased, counter addresses should be accessed in the read-mode
only.
All other addresses
The count value is interpreted in BCD-code. This allows the transfer of this value
within the PLC program to the counter by means of the accumulator. This function
should be used for indirect write-operations of count values since the values are
available in the Siemens conformal format.
c) Timer
Timer functions consist of a time value and a time base. The terminal operates with
imaginary unsigned 4-byte variables, even though the data stored in the PLC com-
prise only 2 bytes.
When read-accessing the timer, the terminal converts the time value and time base
into a terminal-internal unsigned 4-byte number, which represents the time value in
reference to the time base of 0.01 second.
Example: A range of 10 (time base is 1.0 second) and a time value of 999, are
represented or edited, respectively, in the terminal by the value 99900. Scaling of
this value to other value ranges is possible by specifying a factor and divisor within
the variable deļ¬nition.
Before writing a timer variable to the PLC, the time value and the smallest possible
time base are formed from the terminal-internal unsigned 4-byte value.
In addition, a distinction is made between variables which have been assigned a
timer address or another PLC address.
Timer address
When accessing timer addresses, the time value is interpreted binary format. To
avoid timer control bits from being erased, this access should occur in the read-
mode only.
All other addresses
The time value is interpreted BCD-coded. This access should be used for indirect
write-operations of time values since the values are available in the Siemens con-
formal format.