drbitboy
Lifetime Supporting Member
May i suggest the following.
1. write your logic for only 1 pump and get it working. that will help you set up
your data table requirements.
2. set up your data table requirements for all the pumps.
3. create a subroutine for all the pumps.
4. save the logic for the first pump to a library.
5. import the logic into each subroutine and use edit index to change the i/o, bits, and other control bits/words.
6. go to each subroutine and do a LOCAL search / replace for the pump numbers.
you will save a ton of time by doing this. i use it a lot.
james
Sure, but with the data structured, and the pump number and the hour of day both abstracted into indices to access those data, as @parky and @MikeyN suggest, one rung handles all pumps for all hours. The rest is bookkeeping.
It will be ugly to debug to be sure, but your get-it-working-for-one-pump-during-one-hour-first approach will certainly help there.
What is going to be a mess is the HMI for this. A slider/selector box for hour of day, and a button to send the selected hour's enables and schedule times for all pumps? A slider/selector for pump number, and a button to send the selected pump's enables and schedule times for all hours? A slider each, for hour of day and for pump number, ...?