I am using the following custom function once upon startup to set some values. My problem is that I want to increment the values one at a time or at least slow it down so that I can reach a specific integer. The inputs are switches, and the plc is scanning so fast that I cant increment as slow as required.
Thanks in advance,
Ken
DM [50] = 1
SETLCD 0,1,CHR$(1)
SETLCD 1,1,"GPM CALIBRATE"
@10 REFRESH
IF TESTIO (SelectUp) = 1
DM[111] = DM[111] + 1
ENDIF
IF TESTIO (SelectDn) = 1
DM[111] = DM[111] - 1
ENDIF
SETLCD 2,1,STR$(DM[111],4)
IF TESTIO (Select) = 1
DM[50] = DM[50] + 1
ENDIF
IF DM[50] = 1
GOTO @10
ENDIF
SETLCD 0,1,CHR$(1)
SETLCD 1,1,"FPM CALIBRATE"
@20 REFRESH
IF TESTIO (SelectUp) = 1
DM[110] = DM[110] + 1
ENDIF
IF TESTIO (SelectDn) = 1
DM[110] = DM[110] - 1
ENDIF
SETLCD 2,1,STR$(DM[110],4)
REFRESH
IF TESTIO (Select) = 1
DM[50] = DM[50] + 1
ENDIF
IF DM[50] = 2
GOTO @20
ENDIF
@30 REFRESH
IF TESTIO (Selectup) = 1
TOGGLEIO FPM300
ENDIF
IF TESTIO (FPM300) = 1
DM [106] = 300
SETLCD 2,1,"FPM300"
ELSE
SETLCD 2,1,"AUTO "
ENDIF
REFRESH
IF TESTIO (Select) = 1
DM[50] = DM[50] + 1
ENDIF
IF DM[50] = 3
GOTO @30
ENDIF