Question

What does the ladder programming in PLC convert to? Does the graphic command (e.g. open contact, instruction etc.) a BASIC or C instruction, or does it compile to assembly language directly?

Was it helpful?

Solution

The graphical representation is a direct visual translation of the mnemonic code - this is like assembly language in that it has a (mostly) 1-1 correspondence to individual machine instructions. The graphical representation is not an abstraction, however, and does not "compile" to the mnemonic/assembly language, it is rather just a direct visualization of the assembly language. For example the rung :

 _______ |    100.00     100.01                     W23.00
[1      ]|------| |--------| |------------------------( ) 
[   7202]|                          |
[       ]|    100.02     100.03     |
[_______]|------|/|--------|↑|------|
         |

Would be rung #1 of the current program at step 7202. The mnemonic logic for the rung would be :

007202 | LD    100.00
007203 | AND   100.01
007204 | LDNOT 100.02
007205 | @AND  100.03
007206 | ORLD
007207 | OUT   W23.00

Your next rung, in this case, would start at step 007208, for example. The last instruction of the last rung in the previous program would be at step 007201. The above mnemonic code is all there is. This is compiled by CX-Programmer directly into machine code.

The only exception is for things like function blocks which contain higher level code called "Structured Text" - this compiles more like BASIC or C code and is used to create more powerful re-usable functions. Structured text, however, is much more limited than something like C or BASIC - it's really just another way to represent the same (mostly) atomic mnemonic operations.

See : http://en.wikipedia.org/wiki/IEC_61131-3

Does this answer your question?

OTHER TIPS

It's translated to mnemonic code, which is a proprietary language to Omron. This language is laid down in the system ROM in the PLC. Making a step in between (be it Basic or C) would slow down the PLC unneccesarily.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top