Hi,
I was using the below code in a basic program with no problems, whilst debuging some ladder logic I re-compiled and now it wont compile?? i added some comments but can't see any issues??
'******************************START
IF
TESTIO (CONTROL_OK)
DM[10] = 1
ELSE
DM[10] = 0
ENDIF
'******************************
IF
TESTIO (CLOSE_CB_STATUS)
DM[1] = 1
ELSE
DM[1] = 0
ENDIF
'******************************
IF
TESTIO (OPEN_CB_STATUS)
DM[2] = 1
ELSE
DM[2] = 0
ENDIF
'******************************
IF
TESTIO (TRIP_CB)
DM[3] = 1
ELSE
DM[3] = 0
ENDIF
'******************************
' CB STATUS CONTROL ALARM - BOTH INPUTS LOW
IF
DM[1] = 0 ' CLOSE
AND
DM[2] = 0 ' OPEN
THEN
DM[4] = 1 ' FAULT
ELSE
DM[4] = 0
ENDIF
'******************************
' CB STATUS CONTROL ALARM - BOTH INPUTS HIGH
IF
DM[1] = 1 ' CLOSE
AND
DM[2] = 1 ' OPEN
THEN
DM[5] = 1 ' FAULT
ELSE
DM[5] = 0
ENDIF
'******************************
' CB STATUS CONTROL ALARM - EITHER ERROR CONDITIONS
IF
DM[4] = 1 ' ERROR LOW
OR
DM[5] = 1 ' ERROR HIGH
THEN
DM[6] = 1 ' CB STATUS ERROR
ELSE
DM[6] = 0
ENDIF
'******************************
' CB STATUS CONTROL ALARM - CLOSED WHEN CONTROL NOT OK
IF
DM[1] = 1 ' CLOSE
AND
DM[10] = 0 ' CONTROL OK
THEN
DM[11] = 1 ' FAULT
ELSE
DM[11] = 0
ENDIF
'******************************
' CB STATUS COMFIRMATION OUTPUT
IF
DM[1] = 1 ' CLOSE
DM[12] = 1 ' CB SHOULD BE ON
ENDIF
IF
DM[2] = 1 ' OPEN
DM[12] = 0 ' CB SHOULD BE OFF
ENDIF
'******************************
' CB STATUS CONTROL CB CLOSING CIRCUIT OK
IF
DM[1] = 1
AND
DM[12] = 1
DM[13] = 1 ' CB CLOSED WHEN COMMANDED
ELSE
DM[13] = 0
ENDIF
' CB STATUS CONTROL CB OPENING CIRCUIT OK
IF
DM[2] = 1
AND
DM[12] = 0
DM[14] = 1 ' CB OPEN WHEN COMMANDED
ELSE
DM[14] = 0
ENDIF
'******************************END