Hello. I got a problem with software redudanncy. I were trying to connect two redudant 317-2DP PLC to IM153-2 via Profibus, as a redudant link I used Ethernet. And got an I/O error. And couldn't find where it appeared. Here my code (and hardware in attachment):
OB100:
OB 35:
OB100:
Code:
CALL "SWR_START"
AG_KENNUNG :='A'
DB_WORK_NO :=DB1
DB_SEND_NO :=DB2
DB_RCV_NO :=DB3
MPI_ADR :=2
LADDR :=200
VERB_ID :=12
DP_MASTER_SYS_ID:=1
DB_COM_NO :=DB5
DP_KOMMUN :=1
ADR_MODUS :=1
PAA_FIRST :=1
PAA_LAST :=0
MB_NO :=0
MB_LEN :=0
IEC_NO :=0
IEC_LEN :=0
DB_NO :=0
DB_NO_LEN :=0
SLAVE_NO :=3
SLAVE_LEN :=1
SLAVE_DISTANCE :=1
DB_A_B_NO :=DB255
DB_A_B_NO_LEN :=W#16#0
DB_B_A_NO :=DB255
DB_B_A_NO_LEN :=W#16#0
RETURN_VAL :="netRes".res
EXT_INFO :="netRes".ext
Code:
CALL "SWR_ZYK" , DB5
DB_WORK_NO :=DB1
CALL_POSITION:=TRUE
RETURN_VAL :="netRes".resBefore
EXT_INFO :="netRes".extBefore
CALL "BLKMOV"
SRCBLK :=P#I 0.0 BYTE 1
RET_VAL:=MW200
DSTBLK :=P#M 100.0 BYTE 1
CALL "SWR_ZYK" , DB5
DB_WORK_NO :=DB1
CALL_POSITION:=FALSE
RETURN_VAL :="netRes".resAfter
EXT_INFO :="netRes".extAfter