前段时间我做了一个300软冗余程序!但在实际运用的时候,我发现IEC时间的DB块数量只能一个,超过一个时!冗余状态就不正常,打了西门子热线也没解决的了
下面是OB100的参数设置
CALL "SWR_START"
AG_KENNUNG :='A' // PLC-Classification: A for Station A
DB_WORK_NO :=DB1 // Work DB for SWR
DB_SEND_NO :=DB2 // Send DB for SWR
DB_RCV_NO :=DB3 // Receive DB for SWR
MPI_ADR :=3 // MPI-address of other station
LADDR :=256 // Base address of CP
VERB_ID :=1 // Connection no. of redundancy coupling
DP_MASTER_SYS_ID:=1 // Identification of DP-mastersystem (HW-config)
DB_COM_NO :=DB5 // Instance-DB of FB 101
DP_KOMMUN :=1 // Identification of DP-master
ADR_MODUS :=1 // Interval for CPU I/Q addressing
PAA_FIRST :=0 // Address of first redundant outputbyte
PAA_LAST :=5 // Address of last redundant outputbyte
MB_NO :=20 // First flagbyte used within redundant user program
MB_LEN :=10 // Amount of flagbytes used within redundant user program
IEC_NO :=20 // First instance DB used for redundant iec counters or timers
IEC_LEN :=1 // Amount of instance DBs used within redundant user program
DB_NO :=0 // First DB used within redundant user program
DB_NO_LEN :=0 // Amount of DBs used within redundant user program
SLAVE_NO :=3 // Profibus address of first used DP-slave (IM 153-3)
SLAVE_LEN :=1 // Amount of used DP-slaves
SLAVE_DISTANCE :=1 // Configuration of IM 153-3 interface
DB_A_B_NO :=DB255 // Send DB for non redundant data from Station A to B
DB_A_B_NO_LEN :=W#16#0 // Amount of used data bytes within Send DB
DB_B_A_NO :=DB255 // Receive DB for non redundant data from Station B to A
DB_B_A_NO_LEN :=W#16#0 // Amount of used data bytes within Receive DB
RETURN_VAL :=MW2 // Block return value
EXT_INFO :=MW4 // Extended information
我用的是MPI进行数据交换的。位内存的数据都是能交换的。