RS Logix Structured Text

JasonWade

Member
Join Date
Oct 2005
Location
Preston
Posts
160
Could anyone send me an example of a program using structured text for a CompactLogix PLC. I know there are some examples bundled with RS Logix, but it seems they are for ControlLogix, and my Lite version of Logix will not open them.

I am well familiar with structured text in the CodeSys or Siemens world, but this looks very different. Things that I'm trying to adjust to are:

Use of Structures
Where are the local vars in an ST program?
How 'Add-on' instructions compare to FBs/FCs
And so on............

Even the following line of code gives me problems;

stTestVar1.xTest1:=stTestVar1.xTest2; (This compiles)

stTestVar1.xTest1:=TRUE; (This doesn't compile)?!?

I think an example program using some of the above would help a lot.

Thanks
 
Structured text programs are the same for controllogix and compactlogix. So your lite version won't be able to deploy them.

I think I already said this in my post; 'my Lite version of Logix will not open them'

Or did I miss some important point?

If you are telling me that Lite can't do ST then I think you are mistaken.

What I would like is to get hold of an example program that is written for CompactLogix (edited; was micrologix)
 
Last edited:
My version of rslogix5k is Professional, that means I can open anything related to compact and controllogix. Do me a favor give me your part number and then I can confirm if your version can handle structured text. My guess is that is not possible, you can only handle ladder.
 
Yes it handles ST, I have already tried. I am just struggling to adapt to the editors, from by Codesys background.

If you can open a ControlLogix example and somehow save it in a CompactLogix project, I would be very grateful!

Thanks for you help.

Part No: AB9324RLD250ENE

Built on: 05/14/12 18:43:32

Installed Components:
Ladder Diagram
Function Block Diagram
Motion
Trending
External Routines
Structured Text
Sequential Function Chart
GuardLogix Editor

Installed Controller Support:
CompactLogix5300
FlexLogix5400

Installed Firmware Support:
v16
v20

Motion Database Information:
Revision: 8.12.0
Required Major Revision: 8
 
It's related to the original post so I will ask here;

Can anyone point me at the best reference manual for Structured Text (in CompactLogix). I'm looking for things like;

Why cant I use TRUE and FALSE in my code? (ok I can declare a var and call it TRUE if I want but am I missing something?)
Why is there apparently no SHL/R (shift left/right) function?
Why can't I raise a number to a power (like 2^10)

If the answer is 'these things don't exist in AB ST' then ok I will work around them, but if there was a good manual..........


Thanks
 
Here you go:

http://literature.rockwellautomation.com/idc/groups/literature/documents/pm/1756-pm007_-en-p.pdf

There are really very few built-in operators and no inherent function in AB structured text. To the best of my knowledge there is no "library" like there is in TwinCAT of other 3S CoDeSys derivatives. You are pretty much on your own.

There is not a predefined TRUE or FALSE.
x^y is types as x**y.
You may be able to use some of the "ladder" functions in ST. Check the instruction help on an instruction by instruction basis to see if you are allowed to.

Keith
 

Similar Topics

I am trying to learn structured text on the controllogix platform and have managed to fault the processor by creating an infinite loop. My problem...
Replies
21
Views
3,507
Hello, I please need your help why I cannot get the return parameter from the RET instruction to go into the return parameter in the JSR return...
Replies
6
Views
2,739
I am troubleshooting an issue on a controller with logic, function block and structured text. I am lost on how to read the structured text as...
Replies
8
Views
2,572
Hey! I'm looking for a way to reset a tag when the routine that sets the tag is disabled. For example: Routine 1 has the following If Tag1...
Replies
6
Views
1,768
Hi I'm working on a project in structured text in RSLogix 5k. When I verify my program it shows the errors and warnings in the buttom of my...
Replies
12
Views
5,316
Back
Top Bottom