630 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 19 ASCII Conversion Instructions (STOD, STOR, DTOS, RTOS, UPPER, LOWER)
Execution:
Example: When send_data is set, the RTOS instruction converts the value in data_1 to a
string of ASCII characters and places the result in data_1_ascii. Subsequent
rungs insert or concatenate data_1_ascii with other strings to produce a complete
message for a display terminal.
You may see a slight difference between the fractional parts of the Source and
Destination.
Relay Ladder
Structured Text
IF send_data THEN
RTOS(data_1,data_1_ascii);
send_data := 0;
END_IF;
Condition Relay Ladder Action Structured Text Action
Prescan The rung-condition-out is set to false. No action taken.
Rung-condition-in is false The rung-condition-out is set to false. N/A
Rung-condition-in is true The instruction executes.
The rung-condition-out is set to true.
N/A
EnableIn is set N/A EnableIn is always set.
The instruction executes.
Instruction execution The instruction converts the source.
Postscan The rung-condition-out is set to false. No action taken.
send_data
Real to String
Source data_1
15.3001
Dest data_1_ascii
'15.3001003'
RTOS