Relay Ladder; Structured Text - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Chapter 19
ASCII Conversion Instructions (STOD, STOR, DTOS, RTOS, UPPER, LOWER)
Condition
Prescan
Rung-condition-in is false
Rung-condition-in is true
EnableIn is set
Instruction execution
Postscan
MV_read.EM
624
Execution:
Relay Ladder Action
The rung-condition-out is set to false.
The rung-condition-out is set to false.
The instruction executes.
The rung-condition-out is set to true.
N/A
SC is set.
Destination is cleared.
The instruction converts the Source.
If the result is zero, then S:Z is set
The rung-condition-out is set to false.
Example:
When MV_read.EM is set, the STOD instruction converts the first set of
numeric characters in MV_msg to an integer value. The instruction skips the
initial control character ($06) and stops at the delimiter ( \ ).

Relay Ladder

Structured Text

IF MV_read.EM THEN
STOD(MV_msg,MV_msg_nmbr);
MV_read.EM := 0;
END_IF;
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Structured Text Action
No action taken.
N/A
N/A
EnableIn is always set.
The instruction executes.
No action taken.
STOD
String To DINT
Source
'$06324\12\1\$r'
Dest MV_msg_nmbr
MV_msg
324

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents