Structured text

gas

Member
Join Date
Nov 2005
Location
Erie, Pa
Posts
531
We are selling a product that runs B&R Automation Studio programmed in ST.
I haven't used ST in a number of years so I need a refresh.
Which should I review, C, C++, C# or Python?
Other comments appreciated.
Thanks in adveace
 
Fortran and gawk ;)


But seriously, review ST; it is its own language, more or less.


Syntax/grammar are picked up quickly and so are irrelevant; vocabulary - knowing the libraries and instructions available - takes longer.
 
Last edited:
ST is loosely based on Pascal, however, like other posters there is plenty of articles on ST programming and probably B&R have their own documents on the subject.
 
I think ST is more than just learning the syntax, it is learning the way to set out ST for common automation scenarios.


This guy, Tom, in the Netherlands has a book on ST. It is called: PLC Controls with Structured Text (ST) - IEC 61131-3 and best practice ST programming
 
PM if you have you have any questions. I program almost entirely in structured text.
Each language has its pluses and minuses.
Structured text is a very powerful language for plcs in my opinion.
 
Most B&R programming is in ST, so all the sample programs and sample function block code snippets have an ST version, and the top of the help tree has [Programming -> Programs -> Structured Text] for a refresher on syntax and available keywords.

ST is Pascal based, but reading through a book about ANSI C would be more helpful than Pascal, especially for B&R. B&R uses some very C-like functionality in their ST (as well as offering programming in ANSI C directly).

You should take the time to learn what a pointer is and how it might be useful. A ton of B&R example code uses `t->.element` pointer dereferencing notation and I remember being a bit lost when I first started out, not even knowing that `t` was a pointer or really what a pointer was.
 

Similar Topics

I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
12
Views
202
Good evening. I display the step number of a SFC on a display. Sometimes, on a trip, it goes quickly through many steps and I need to prove to...
Replies
1
Views
98
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
53
Good morning. I'm doing a rehab and I need to recycle some part of the old code that won't change and that I need. This is a calculation that...
Replies
22
Views
1,321
I'm writing some structured text that's handling a data structure that comes from a PC. The PC structure is in the "new" LREAL 64-bit floating...
Replies
3
Views
472
Back
Top Bottom