Siemens step 5 function blocks

stevelawson

Member
Join Date
Feb 2004
Posts
115
I am having problems understanding a program i am trying to troubleshoot.
The reason why i am having difficulty is because its written in function blocks and i have little understanding of their structure and symbols.
I managed to work out that the machine had stopped because flag F154.2 was constantly set, thus preventing the program from running through its cycle. All the relevant input conditions seemed to be in order but the program wasn't going any further.
This machine has stopped in this position before, indeed more than once. However, on other occasions i have forced FY55 on from KH08 to KH09 using control variable and the machine starts. But on this occasion the machine starts up but only does one cycle and stops in exactly the same place.
To overcome this situation i forced a reset of F 154.2 using the control variable option and the machine started to run. the problem hasn't yet returned but i'm sure it will.
I don't think the action i took was the correct one but it got me out of a situation. You know what production is like :rolleyes:

So, can anybody explain how this type of program structure works. I have worked with jump instructions in Organisation Blocks but am not familiar with the =M00X instructions used in the function blocks. My best guess is that its just the title of a sub-routine.
Another thing, why is the RLO only showing the condition of the first 4 statements?

Here are the relevant segments of the function block

FB55 SEG9 RLO
:L KF +20 1
:L FY 59 1
:>< F 1
:JC =MOO1 1
:S F 154.1
:S F 154.6
:R F 154.2
:AN I 48.2
:JC =M002
:JU =M001
M002:
:L KF +21
:T FY 59
M001:
:***


FB55 SEG11 RLO
:L KF +22 1
:L FY 59 1
:>< F 1
:JC =M001 1
:S F 154.2
:S F 154.6
:R F 154.1
:A I 48.2
:JC =M002
:JU =M001
M002:
:L KF +23
:T FY 59
M001:
:***


FB55 SEG16 RLO
:L KF +9 1
:L FY 55 1
:>< F 1
:JC =M001 1
:S F 154.1
:S F 154.6
:R F 154.2
:AN I 48.2
:JC =M002
:JU =M001
M002:
:L KF +10
:T FY 55
M001:
:***

FB55 SEG17 RLO
:L KF +10 1
:L FY 55 1
:>< F 1
:JC =M001 1
:S F 154.1
:S F 154.6
:R F 154.2
:A I 48.2
:A I 48.4
:A F 160.2
:A F 150.4
:JC =M002
:AN I 48.4
:O T 60
:JC =M003
:JU =M001
M002:
:L KF +13
:T FY 55
:JU =M001
M003:
:L KF +12
:T FY55
M001:
:***

The RLO results should be shown further over to the right but for some reason when posting the data moves right next to the statement list. So the 1 that you see under RLO is the result of the logic operation. Hope thats clear and hope someone can help.
Many thanks Steve.
 
Last edited:
Hello,

I'll try the explain what M0001 means

FB55 SEG9 RLO
:L KF +20 Load the value 20 in accu 1

:L FY 59 Load the value of FY 59 and place it in accu 1
and put the value what was in accu 1 (20) to
accu 2.

:>< F compare accu 2 with accu 1 and if the condition
is true then jump to M001 else next line
:JC =MOO1
:S F 154.1 Set F 154.1 "1"
:S F 154.6 Set F 154.6 "1"
:R F 154.2 Reset F 154.2 "0"
:AN I 48.2 If I 48.2 is "0" then jump to MOO2 else jump to
:JC =M002 M001
:JU =M001
M002 :L KF +21 Load the value 21 and transfer it to FY 59
:T FY 59
M001:
:***

This is the explanation of a small part of the program. In your program there are two kinds of jump instruction used;

JC = J ump on c ondition
JU = Ju mp allway

So when you see an JC =MOO1 it jumps to M001 : in your program. You can choose any kind of syntax.
:JC =dummy
dummy :a I 154.2
:= Q 15.0
:be

Rudi
 

Similar Topics

Hi, is it possible to read the name of the steps in an S7 Graph sequencer? In the parameterinterface there is, for example the parameter #S_NO...
Replies
21
Views
7,160
I have recently encountered a problem with a Function Call being know how protected. I cannot not open the Function Call to edit the ladder logic...
Replies
5
Views
7,806
Siemens Step 5 Function Blocks Post #1 Hi everyone, this is my first time on this forum and i thought i would just test the water. So here...
Replies
38
Views
17,518
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
239
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
540
Back
Top Bottom