
Rockwell Automation Publication 1756-RM084S-EN-P - March 2015 205
Chapter 11
Define a structured text routine
This chapter explains how to enter structured text logic in a complete
import/export file.
These examples show the structured text routine structure.
L5X structured text structure
<Routines>
<Routine [Routine_Attributes]>
<Description>
<![CDATA[ text ]]>
</Description>
<STContent [StContent_Attributes]>
<Line Number="number">
<![CDATA[ structured_text ]]>
</Line>
</STContent>
</Routine>
</Routines>
L5K structured text ST_ROUTINE structure
ST_ROUTINE <routine_name> [(Description := "text")]
‘(*comment_text*)
‘<statements>;
END_ST_ROUTINE;
Structured TextRoutine elements
L5X Item L5K Item Description
N/A routine_name The name of the routine.
In L5X, use a Name attribute on the <Routine> element.
Description Description User information about the routine.
STContent statements Structured text logic.
N/At comment_text Comment text within the structured text logic.
Introduction
Structured text routine