// If you want to just get to the "meat" you can scroll pat the intro.
// TLDR = we've all been there mate
I know that I'm a little late to this conversation but after reading thru all of the previous posts about how to convert STL into LDR so you can more easily understand it, I feel like a few helpful pointers will avoid all this in the future. Early on (back in 1998-89) when I started working with the S7 plc the group I worked with wrote everything in ladder so like most of us I could easily figure out that when the NO contact was active the green line (RLO) continued on to the next element to the right of it. After awhile I start feeling confident that I know PLC programming and then I encounter a program written by a different group in our company that used STL and now I'm a little confused. Luckily in SIMANTIC Manager the help function (F1) is very informative and I was able to figure out the program to finish commissioning the new equipment. And you're wondering why I need to tell this story to make a point - I don't but I feel it does convey that we all started out not knowing much about Statement List. Another thing that helped me was understanding logic gates. When I was reading the help files on all those A's, AN's, O's, ON's, "(", ")" and "=" I realized that the were basically describing inputs, outputs and grouping of AND and OR logic gates.
// OK w/FBD?
The OP mostly shows bit logic in statement list format. If you understand FBD (or logic gates) just imagine each A represents an input to an AND logic gate. The output of the logic gate (or group of gates) is the "=". Similarly O is input to an OR gate and ON or AN is negated (or inverted) input to the gate.
******** Don't know FBD but like ladders?
If you are not that familiar with FBD and you want to think in ladder until you get the hang of it.
AND gates are like having contacts on series. You can re-write STL to ladder by writing horizontally across left to right each A becomes a NO contact and each AN becomes a NC contact then at the farthest right the "=" is drawn as a coil. Or you can go the other way, you can re-write a ladder to STL by writing vertically down the list so each NO contact is an A and each NC contact is an AN then at the end of the list put an EQUALS sign to represent the coil.
OR gates are ladder contacts in parallel but the same idea.
// If this helps 1 person, this wasn't a complete waste of time.