EasyManuals Logo

Siemens Simatic S7 Series System Manual

Siemens Simatic S7 Series
726 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #202 background imageLoading...
Page #202 background image
Program instructions
7.5 Convert
S7-200 SMART
202 System Manual, 09/2015, A5E03822230-AC
7.5.2
ASCII character array conversion
Converting from or to ASCII character byte arrays
The ASCII character array instructions use the BYTE data type for character input or output.
An array of ASCII characters is referenced a sequence of byte addresses.
This is not the STRING data type, as no length byte is used. Use the ASCII string
instructions to work with the variables of the STRING data type.
ASCII to Hex and Hex to ASCII
LAD / FBD
STL
Description
ATH IN, OUT, LEN
HTA IN, OUT, LEN
ATH converts a number LEN of ASCII characters, starting at IN, to hexadec-
imal digits starting at OUT. The maximum number of ASCII characters that
can be converted is 255 characters.
HTA converts the hexadecimal digits, starting with the input byte IN, to ASCII
characters starting at OUT. The number of hexadecimal digits to be convert-
ed is assigned by length LEN. The maximum number of ASCII characters or
hexadecimal digits that can be converted is 255.
Valid ASCII input characters are the alphanumeric characters 0 to 9 with a
hexadecimal code value of 30 to 39, and uppercase characters A to F with a
hex code value of 41 to 46.
Non-fatal error conditions with ENO = 0
SM bits affected
0006H Indirect address
0091H Operand out of range
SM1.7 ATH: Illegal ASCII value
SM1.7 ATH: Illegal ASCII value
Input / output
Data type
Operand
IN, OUT
BYTE
IB, QB, VB, MB, SMB, SB, LB, *VD, *LD, *AC
LEN
BYTE
IB, QB, VB, MB, SMB, SB, LB, AC, *VD, *LD, *AC, Constant

Table of Contents

Other manuals for Siemens Simatic S7 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens Simatic S7 Series and is the answer not in the manual?

Siemens Simatic S7 Series Specifications

General IconGeneral
CPUVaries by model (e.g., S7-300, S7-400, S7-1200, S7-1500)
Communication InterfacesPROFIBUS, PROFINET, Ethernet, MPI
ProgrammingTIA Portal, STEP 7
Programming LanguagesLAD, FBD, STL, SCL, GRAPH
I/O ModulesDigital, Analog, Specialty modules available
Operating Temperature0°C to 60°C (standard models)
MountingDIN rail mounting
Operating Voltage24V DC or 120/230V AC (varies by model)
Protection ClassIP20 (standard models)
MemoryVaries depending on the S7 model. Includes work memory (RAM) for program execution, load memory (EEPROM or Flash) for program storage, and system memory for operating system functions. Memory sizes range from kilobytes to megabytes.

Related product manuals