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´ve being trying wrap head around FOR loops.. When and what can this be used for? I´ve mostly seen it move data, resettting arrays etc. I made a...
Replies
7
Views
143
Hi! When is CASE preffered? CASE uses a numreric variable for the cases and doesnt handle BOOL, but this can be done with numreric and bool using...
Replies
4
Views
132
Hello, doing switch from FBD to ST. First task is converting my old work. How do you sum variables? For example, Interlock1, interlocl2 and...
Replies
5
Views
200
Hello, I am using studio 5000 pro and am trying to figure out the structured text. Here's my scenario: An operator scans a barcode, the barcode...
Replies
15
Views
359
I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
446
Back
Top Bottom