-
Book Overview & Buying
-
Table Of Contents
Learning RSLogix 5000 Programming
By :
To get started with structure text, let's write a simple routine and break down the components.
We have taken a brief look at the structured text editor, and now we will write a simple structured text routine to introduce some of the syntax and conventions. Our first structured text routine will provide an alarm count totalizer. The first version of this we create will have a few small errors, which we will correct as we learn more about structured text. Perform the following steps:
Open the Controller Organizer pane and navigate to Tasks | Main Tasks | Main Program. Right-click on Main Program and select New Routine, as shown in the following screenshot:

Configure a new structured text routine by setting the following values:
Name: AlarmTotalizer
Description: Digital Alarms
Type: Structured Text

In the structured text editor, enter the following code:
(***** Alarm Totalizer *****) if ( FC1001_FLT_ALM.InAlarm AND NOT FC1001_FLT_ALM.Disabled ) then...
Change the font size
Change margin width
Change background colour