String And Character; String Data Overview - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
Extended instructions

8.2 String and character

Your program can also use RTM execution mode 7 to save the runtime meter values in a
memory card. The states of all timers at the instant RTM mode 7 is executed are stored in
the memory card. These stored values can become incorrect over time as the hour timers
are started and stopped during a program run session. You must periodically update the
memory card values to capture important runtime events. The advantage that you get from
storing the RTM values in the memory card is that you can insert the memory card in a
substitute CPU where your program and saved RTM values will be available. If you did not
save the RTM values in the memory card, then the timer values would be lost (in a substitute
CPU).
Note
Avoid excessive program calls for memory card write operations
Minimize flash memory card write operations to extend the life of the memory card.
Table 8- 15
Condition codes
RET_VAL (W#16#....)
0
8080
8081
8082
8091
80B1
8.2
String and character
8.2.1

String data overview

String data type
String data is stored as a 2-byte header followed by up to 254 character bytes of ASCII
character codes. A String header contains two lengths. The first byte is the maximum length
that is given in square brackets when you initialize a string, or 254 by default. The second
header byte is the current length that is the number of valid characters in the string. The
current length must be smaller than or equal to the maximum length. The number of stored
bytes occupied by the String format is 2 bytes greater than the maximum length.
Initialize your String data
String input and output data must be initialized as valid strings in memory, before execution
of any string instructions.
292
Description
No error
Incorrect runtime meter number
A negative value was passed to the parameter PV
Overflow of the operating hours counter
The input parameter MODE contains an illegal value
Value cannot be saved to MC (MODE=7)
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
Table of Contents
loading

Table of Contents