Extended instructions
8.2 String and character
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
293
A valid string has a maximum length that must be greater than zero but less than 255. The
current length must be less than or equal to the maximum length.
Strings cannot be assigned to I or Q memory areas.
For more information see: Format of the String data type (Page 114).
S_MOVE (Move character string) instruction
Table 8- 16 String move instruction
Copy the source IN string to the OUT location. S_MOVE execution does not affect
the contents of the source string.
Table 8- 17 Data types for the parameters
If the actual length of the string at the input IN exceeds the maximum length of a string
stored at output OUT, then the part of the IN string which can fit in the OUT string is copied.
String conversion instructions
8.2.3.1
S_CONV, STRG_VAL, and VAL_STRG (Convert to/from character string and number)
instructions
You can convert number character strings to number values or number values to number
character strings with these instructions:
● S_CONV converts (number string to a number value) or (number value to a number
string)
● STRG_VAL converts a number string to a number value with format options
● VAL_STRG converts a number value to a number string with format options