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
weight_read.EM
626
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
S:C 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:
After reading the weight from a scale (weight_read.EM is set) the STOR
instruction converts the numeric characters in weight_ascii to a REAL value.
You may see a slight difference between the fractional parts of the Source and
Destination.

Relay Ladder

Structured Text

IF weight_read.EM THEN
STOR(weight_ascii,weight);
weight_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.
STOR
String to Real
Source weight_ascii
'428.259'
Dest
weight
428.259

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents