PLC lower level question ?

janeDoe

Member
Join Date
Dec 2016
Location
LA
Posts
2
When Siemens PLC STL Code converts to lower level MC7 code ?
Before sending the STL code to PLC or downloading from PLC?

Or correct me if am wrong STL is the lower level asm for PLC ?

2) In PLC When it and how it converts to MC7 code ?
 
Last edited:
STL is the lowest level for the S7 PLC. There is even a booklet available with all the S7 STL instructions and their corresponding bit patterns. LAD and FBD are converted to STL while writing the program. You can always see the result by viewing a block of LAD or FBD code in STL.

Inside the PLC the STL code is further interpreted into the assembly language of the used microprocessor.
 
MC7 is the lowest level machine code, but there's no huge difference between MC7 and STL.

Sometimes you see the MC7 code in the Step7 code editor, when you download a block from a plc with a function call where the editor has no parameter list of, and thus it can't "decompile" the MC7 to STL. Then the editor switches to the MC7 code view, where you can't edit or save anything.
There's also a hidden trick in the Step7 editor that allows you to see the MC7 code, but it's read only.
It helps a little bit to understand how the STL editor compiles to MC7, an why some things are as they are.

For example:
L DB1.DBW0
is internally split into two operations:
OPN DB1
L DBW0

Parameter passing is also an interesting part and looks different, and you see how the pointers are passed to FCs:
UC "R_STRNG"
P#L 37.0
P#L 41.0

Also MC7 does not know of jump-labels, this are only relative address jumps internally.

There are S7 which are MC7 interpreter and others that are compiler machines. And there are processors like the Vipa Speed7 which "speak" MC7 natively.
 

Similar Topics

I'm a beginner in the automation field and I've set up an automation system connecting several devices (datalogger, radio, etc.) via Modbus RS485...
Replies
5
Views
217
Hi everyone, I've attached a 4-20ma level sensor to a PLC input that is configured for current. The PLC reads the range 4-12ma just fine, but...
Replies
35
Views
9,022
kindly need to understand why can't upload the plc
Replies
2
Views
41
Hello all, I have a one problem. I would like to upgrade Mitsubishi PLC Q02 to Q03UDVCPU. I have Q02 program and I change to PLC type and try to...
Replies
2
Views
36
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
9
Views
242
Back
Top Bottom