Kkula
Browse Questions » SIMATIC S5 / STEP 5: 2 question about converting S5 code Towards S7 (how Towards make s7 Data block & s5 Ob21-s7 Ob101?)

About User

Questions Asked: 24.4K

Answers Given: 0

0
  • Open

SIMATIC S5 / STEP 5: 2 question about converting S5 code Towards S7 (how Towards make s7 Data block & s5 Ob21-s7 Ob101?)

Hi .
My first post here
.
I am moving an old S5 application to S7, and have few questions, and if someone can help me to resolve them, I would be realy glad. (I am not using a S5-S7 converter program– instead I am looking at old application and write it manual in to S7)
Questions nr. 1:
In old S5 applications is a few DB, such D1 and DB6.When I am open them with PG I can see that they contet approx.. 255 rows, and they are look like following:
DB6 (S5)
0:KH = 0000;
1: KH = 00C7
2:KH = 0000
3:KH = 00CE
…and so on.
Shell i just create a new DB i S7 (Shared DB) and wrote same?
(Is not KH in S5 Hex?)
+0.0 db_var word 0000
+2.0 db_var1 word 00C7
+4.0 db_var2 word 0000
+6.0 db_var3 word 00CE
…and so on?
If my idea how to wrote it iS7 is wrong, how shall I do instead?
Question nr 2:
My old S5 applications have OB21, and I found in some old books that OB21 is for “Hot Restart” function. S7 block for restart is OB101.
But there is some code in old S5 OB21????
A F 1.0;
R F 1.0; //RLO "0"
AN F 1.1;
S F 1.1; //RLO "1"
;
L KF +255;
G
DB 6;
G
DB 206;
:
JC PB 6 //Fault text OB21/OB22
I guess I shall write (or not?) same code in S7 as following:
A M 1.0;
R M 1.0; //RLO "0"
AN M 1.1;
S M 1.1; //RLO "1"
BLD 130;
L +255;
G
DB 6;
G
DB 206;
BLD 130;
UC FB 6; //Fault text OB21/OB22
But the problem is that S7 do not want to accept
G
DB6 and
G
DB206.
What is
G
in S5 means at all?
And what is “same” commando in S7?
Or is it such simple that S5 code above is integrated in to S7 OB101, so I do not have at all to write this code in S7?

0 Likes 0 Favourites 0 Followers 0 Comments
Answers(0)