Hi all the following code runs in VSM
start:
if pinC.2=1 then goto blron
time=0
goto start
blron: ; boiler temperature control
do
readadc C.0,w2 ; 10k pot connected to pin C.0
w2=w2/25 ; 0 to 10 increments of 1
readtemp C.4,w3 ; DS18B20 connected to pin C.4
if w3<51 then ; setpoint 50oC
high b.4
endif
w4=w2+w3 ; readadc added to readtemp
w5=w4+1 ; 50oC to 60oC increments of 1
if w5>w4 then ; heater stays on until temperature is reached
high b.4
endif
if w5>60 then ; maximum temperatue 60oC
low b.4
endif
if time=20 then ; switches off after time delay
pause 100
low b.4
endif
if pinb.4=0 then ; goes to "start" after desired temperature is reached ;
goto start
endif
loop
However when I program the 14M2 the timing part of the code does not time out
The rest of the code works fine
If the temp reaches 50oC the led goes off if I increase the temp by using the pot the led goes off between 50oC and 60oC depending on what the pot is set to
I have attached the DSN file
any help would be appreciated
kind regards
novolts
start:
if pinC.2=1 then goto blron
time=0
goto start
blron: ; boiler temperature control
do
readadc C.0,w2 ; 10k pot connected to pin C.0
w2=w2/25 ; 0 to 10 increments of 1
readtemp C.4,w3 ; DS18B20 connected to pin C.4
if w3<51 then ; setpoint 50oC
high b.4
endif
w4=w2+w3 ; readadc added to readtemp
w5=w4+1 ; 50oC to 60oC increments of 1
if w5>w4 then ; heater stays on until temperature is reached
high b.4
endif
if w5>60 then ; maximum temperatue 60oC
low b.4
endif
if time=20 then ; switches off after time delay
pause 100
low b.4
endif
if pinb.4=0 then ; goes to "start" after desired temperature is reached ;
goto start
endif
loop
However when I program the 14M2 the timing part of the code does not time out
The rest of the code works fine
If the temp reaches 50oC the led goes off if I increase the temp by using the pot the led goes off between 50oC and 60oC depending on what the pot is set to
I have attached the DSN file
any help would be appreciated
kind regards
novolts
Attachments
-
128.8 KB Views: 13