现有一个S5程序,要转换成S7程序,可其中用到了DB0,这个如何处理?
下面的是相关的程序:
FUNCTION FC 16 : VOID
AUTHOR: _991
NAME: SPEICHER
BEGIN
NETWORK
NETWORK
A M 8.7;
A M 247.1;
S M 93.1;
JC M001;
JU M002;
M001:NOP 0;
OPN DB 221;
L W#16#0;
T DBW 6;
T DBW 8;
T DBW 10;
M002:NOP 0;
AN M 8.7;
AN M 247.1;
R M 93.1;
NETWORK
O M 94.2;
O M 94.3;
O M 94.4;
O M 94.5;
O M 93.1;
= M 91.0;
NETWORK
O M 91.0;
O(;
AN M 169.0;
AN M 169.1;
AN M 169.2;
AN M 169.3;
AN M 169.4;
AN M 169.5;
);
JC M003;
OPN DB 221;
NOT;
S DBX 10.6;
NOT;
S DBX 10.6;
BEU;
M003:NOP 0;
OPN DB 221;
NOT;
R DBX 10.6;
NOT;
R DBX 10.6;
NETWORK
L MB 8;
L W#16#82;
<>I;
JC M004;
//;
A M 91.0;
JC M004;
//;
A M 9.0;
JC M005;
OPN DB 221;
NOT;
S DBX 10.3;
NOT;
S DBX 10.3;
JU M004;
M005:NOP 0;
OPN DB 221;
NOT;
R DBX 10.3;
NOT;
R DBX 10.3;
AN M 91.0;
S M 94.2;
M004:NOP 0;
NETWORK
L MB 8;
L W#16#83;
<>I;
JC M006;
//;
A M 91.0;
JC M006;
//;
A M 9.0;
JC M007;
OPN DB 221;
NOT;
S DBX 10.3;
NOT;
S DBX 10.3;
JU M006;
M007:NOP 0;
OPN DB 221;
NOT;
R DBX 10.3;
NOT;
R DBX 10.3;
AN M 91.0;
S M 94.3;
M006:NOP 0;
NETWORK
L MB 8;
L W#16#84;
<>I;
JC M008;
//;
A M 91.0;
JC M008;
//;
A M 9.0;
JC M009;
OPN DB 221;
NOT;
S DBX 10.3;
NOT;
S DBX 10.3;
JU M008;
M009:NOP 0;
OPN DB 221;
NOT;
R DBX 10.3;
NOT;
R DBX 10.3;
AN M 91.0;
S M 94.4;
M008:NOP 0;
NETWORK
L MB 8;
L W#16#85;
<>I;
JC M010;
//;
A M 91.0;
JC M010;
//;
A M 9.0;
JC M011;
OPN DB 221;
NOT;
S DBX 10.3;
NOT;
S DBX 10.3;
JU M010;
M011:NOP 0;
OPN DB 221;
NOT;
R DBX 10.3;
NOT;
R DBX 10.3;
AN M 91.0;
S M 94.5;
M010:NOP 0;
NETWORK
A M 94.2;
JCN X000;
CALL FC 17
( ANZ := 160
, LAEN := 90
, STRT := M 94.2
);
X000: NOP 0;
//;
A M 94.3;
JCN X001;
问题补充:
CALL FC 18
( ANZ := 160
, LAEN := 90
, FBBA := FC 31
, FBSW := FC 27
, FBTW := FC 14
, FBSK := FC 29
, FBTK := FC 28
, STK := M 0.0
, FBST := DB 0
, BLH := M 0.0
, FBBH := DB 0
, LOB := M 0.0
, FBLO := DB 0
, EBRV := M 0.0
, FBEB := DB 0
, RES1 := M 0.0
, FBR1 := DB 0
, RES2 := M 0.0
图片说明:
最佳答案
1, 在你修改的程序中DB0块没有呀
2, 在S5的程序中的 DB0 块是不被一般的块调用的,因为DB0是CPU系统的数据存储,不存用户信息数据.
提问者对于答案的评价:
只能读原程序了
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc133387.html