After confusing myself a little I came up with this,
Code:
checkrelays:
select case myinput
case 1,3,16,66 'manual and auto pulse on day and night
high relay1 : pause pulsetime : low relay1
case 5,7,20,70 'manual and auto hold on day and night
high relay1
case 8,10,40,138 'manual and auto pulse off day and night
high relay2 : pause pulsetime : low relay2
case 12,14,44,142 'manual and auto hold off day and night
low relay1
end select
return
This seems to cover all my possible cases, however this is for one relay, I have 8 to test.
After filling MYINPUT the first time the only bits that need to be changed for the next relay are:
myinput.1, myinput.2, myinput.3, and then the relays to act on, IE relay2, relay3, etc....
Is there a better way to do this or just write a seperate case select for each relay?
Thanks for any input!
Bookmarks