我使用SFC13进行DP网诊断,在OB82中调用,DP网断的时候不诊断,只有好的时候,才开始诊断,但是诊断结果还是busy,求救
SET
= M 0.0
L #OB82_MDL_ADDR // Base address of module with fault
T MW 4
CALL "DPNRM_DG" // SFC 13
REQ :=M0.0
LADDR :=MW4
RET_VAL:=MW2
RECORD :=P#DB82.DBX0.0 BYTE 64
BUSY :=M0.1
CLR
= M 0.0
//****************
// Welcher Modul
//****************
A DB82.DBX 7.0 // event at module 1
= M 10.0
A DB82.DBX 7.1 // event at module 2
= M 10.1
//****************
// Modul Status
//****************
AN DB82.DBX 19.0
AN DB82.DBX 19.1
= "Modul1_OK" // Module 1 OK
AN DB82.DBX 19.2
AN DB82.DBX 19.3
= "Modul2_OK" // Module 2 OK
A DB82.DBX 19.0
AN DB82.DBX 19.1
= "Modul1_error" // Module 1 error, no valed data
A DB82.DBX 19.2
AN DB82.DBX 19.3
= "Modul2_error" // Module 2 error, no valed data
AN DB82.DBX 19.0
A DB82.DBX 19.1
= "false_module1" // false module at slot 1
AN DB82.DBX 19.2
A DB82.DBX 19.3
= "false_module2" // false module at slot 2
A DB82.DBX 19.0
A DB82.DBX 19.1
= "no_module1" // no module at slot 1
A DB82.DBX 19.2
A DB82.DBX 19.3
= "no_module2" // no module at slot 2
最佳答案
不要放在OB82里面来调用,放在OB1中调用,因为OB82只执行一次,而SFC13需要多个周期
提问者对于答案的评价:
谢谢啊
原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc310409.html