Publication 1763-RM001C-EN-P - October 2009
ASCII Instructions
325
•
Destination
- This is the location which receives the result of the
conversion. The data range is from -32,768 to 32,767 if the
destination is a word and from -2,147,483,648 to 2,147,483,647 if the
destination is a long word.
Addressing Modes and File Types can be used as shown below:
Instruction Operation
The controller searches the source (file type ST) for the first character
between 0 and 9. All numeric characters are extracted until a non-numeric
character or the end of the string is reached. Action is taken
only
if
numeric characters are found. The string length is limited to 82 characters.
Commas and signs (
+,
-) are allowed in the string. However, only the
minus sign is displayed in the data table.
This instruction sets the following math flags in the controller status file:
ACI Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 82.
Parameter
Data Files
(1)
Function Files
C
S
-
Comms
IO
S - I/O
DL
S
-
D
a
ta
L
o
g
Address
Mode
Address Level
O
I
S
B
T,
C
, R
N
F
ST
L
MG,
PD
R
I/RIX
PL
S
RT
C
HS
C
PT
O,
P
W
M
ST
I
EII
BH
I
MMI
LC
D
Im
mediate
Dir
ect
Indir
e
c
t
Bi
t
Wo
rd
Lo
ng
W
o
rd
Elemen
t
Source
•
•
•
Destination
•
•
•
•
•
•
•
•
•
(1) The Control data file is the only valid file type for the Control Element.
Math Flag
Description
S:0/1
Overflow (V)
Flag is set if the result is outside of the valid range.
S:0/2
Zero (Z)
Flag is set if the result is zero.
S:0/3
Sign (S)
Flag is set if the result is negative.
S:5/0
Overflow Trap
Flag is set when the Overflow flag (S:0/1) is set.
S:5/15
ASCII String
Manipulation Error
Flag is set if the Source string exceeds 82 characters.
When S:5/15 is set, the Invalid String Length Error (1F39H) is
written to the Major Error Fault Code (S:6).
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive