Hi,
Modified code. much easier to work with and has the option of using the LCD port or the MDS display.
Many thanks.
IF Z=3
'SETLCD 0,0, CHR$(1) 'Clear Screen
'SETLCD 1,1, "ALARM LIST" 'LCD DISPLAY
PRINT #3 "?C"
PRINT #3 "?P0601";"ALARM LIST" 'MDS 100 DISPLAY
N = 2
ENDIF
IF DM[1] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.09 PUMP TRIP" 'LCD DISPLAY
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.09 PUMP TRIP" 'MDS 100 DISPLAY
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[2] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.10 CB AC TRIP"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.10 CB AC TRIP"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[3] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.11 CB SOL TRIP"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.11 CB SOL TRIP"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[4] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.12 CB PUMP O/L"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.12 CB PUMP O/L"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[5] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.13 CB PSU TRIP"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.13 CB PSU TRIP"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[6] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.14 CB DC TRIP"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.14 CB DC TRIP"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[7] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.15 CB TH TRIP"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.15 CB TH TRIP"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[8] AND Z = 3
SETLCD N,1, STR$(N-1,2)+" I0.01 ESTOP ACTIVE"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.01 ESTOP"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[9] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.16 PSU VOLTS FAIL"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.16 PSU V FAIL"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[10] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.17 PUMP DRY RUN"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.17 PUMP DRY"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[11] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.18 MOTOR SAVER TRIP"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.18 MOTOR SAVER"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF DM[12] AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" I0.19 COMM'S FAIL"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" I0.19 COMM'S FAIL"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF ADC(1) <= 100 AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" AI 0.1 SENSOR ERROR L"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" AI 0.1 SENSOR LOW"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF
IF ADC(1) >= 4000 AND Z = 3
'SETLCD N,1, STR$(N-1,2)+" AI 0.1 SENSOR ERROR H"
PRINT #3 "?P01";STR$(N,2); STR$(N-1,2)+" AI 0.1 SENSOR HIGH"
N = N+1
IF N > 4 RETURN: ENDIF
ENDIF