I have been working on the programming for the automatic water changes. Here is what I have come up with. Looking for any suggestions or if I missed anything here.
AWC_Ready
Fallback OFF
Set ON
If Output AWC_Mode = ON Then OFF
If Output AWC_Reset = ON Then OFF
If Output AWC_Start = ON Then OFF
If Output AWC_Fill = ON Then OFF
If Output AWC_FillTmr = ON Then OFF
If Output AWC_Drain = ON Then OFF
If Output AWC_Fill2 = ON Then OFF
If Output AWC_Fill2Tmr = ON Then OFF
If Output AWC_Drain2 = ON Then OFF
Defer 120:00 Then ON
• Fallback: OFF
• Initial Set: ON
• Conditions to Turn OFF:
• If AWC_Mode, AWC_Reset, AWC_Start, AWC_Fill, AWC_FillTmr, AWC_Drain, AWC_Fill2, AWC_Fill2Tmr, or AWC_Drain2 are ON.
• Defer: 120 minutes before turning ON.
• Function: Indicates the system's readiness for initiating the automatic water change process.
• ON State:
• System Readiness: Shows that the system is in a state where it is prepared for a new water change cycle, assuming all preconditions are met.
• Minimum OFF Period: The system is in the minimum 120-minute OFF period required for some outputs to reset.
• OFF State:
• Active Cycle or Waiting Period: When any of the listed outputs (AWC_Mode, AWC_Reset, AWC_Start, AWC_Fill, AWC_FillTmr, AWC_Drain, AWC_Fill2, AWC_Fill2Tmr, or AWC_Drain2) are ON, AWC_Ready turns OFF. This indicates that the system is currently in an active water change cycle or has not yet completed the minimum 120-minute OFF period required before initiating a new cycle.
AWC_Mode
Fallback OFF
If Output AWC_Start = ON Then ON
If Output AWC_Timer = OFF Then OFF
If Output AWC_Reset = ON Then OFF
If Master CLOSED Then OFF
• Fallback: OFF
• Conditions to Turn ON:
• If AWC_Start is ON.
• If AWC_Timer is ON.
• Conditions to Turn OFF:
• If AWC_Reset is ON.
• If Master is CLOSED.
• Function: Controls the overall mode for automatic water change.
• ON State: Activates the water change mode, allowing filling, draining, and timing operations to proceed.
• OFF State: Deactivates the water change mode, stopping all associated processes if conditions are not met.
AWC_Timer
Fallback OFF
Set OFF
If Output AWC_Start = ON Then ON
If Output AWC_Fill = ON Then ON
If Output AWC_Drain = ON Then ON
If Output AWC_Fill2 = ON Then ON
If Output AWC_Drain2 = ON Then ON
Defer 012:00 Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If any of AWC_Start, AWC_Fill, AWC_Drain, AWC_Fill2, or AWC_Drain2 are ON.
• Defer: When transitioning to OFF, the change is deferred for 12 minutes. If any of the specified outputs (AWC_Start, AWC_Fill, AWC_Drain, AWC_Fill2, or AWC_Drain2) turn back ON during this defer period, the 12-minute counter resets. The defer period is set 1 minute longer than the longest time between filling and draining cycles to ensure accurate detection of all cycle completions.
• Function: Manages the timing for automatic water change operations, including soak periods between filling and draining.
• ON State:
• Deactivation of Defer: The defer timer to turn OFF begins only when none of the water change outputs are ON. If any of these outputs turn ON again during the defer period, the timer resets.
• Cycle Completion: Ensures accurate timing for filling, draining, and soak periods.
• OFF State:
• Process Completion: Indicates that all water change operations and soak periods are complete. Once the defer period concludes and the output turns OFF, AWC_Mode is deactivated, signaling the end of the water change cycle.
AWC_Reset
Fallback OFF
Set OFF
If SW_AWC CLOSED Then ON
Defer 000:05 Then ON
Defer 002:00 Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If SW_AWC is CLOSED.
• Defer: Turns ON after 5 seconds, then OFF after 2 minutes.
• Function: Resets the system to its initial state, clearing current operations and setting conditions to default.
• ON State:
• System Reset: Initiates a system reset, which turns OFF AWC_Mode. This action in turn turns OFF all associated cycles and operations, such as AWC_Start, AWC_Fill, AWC_Drain, AWC_Fill2, AWC_Drain2, etc.
• Interaction with Other Outputs:
• AWC_Mode: When AWC_Reset is activated, it turns OFF AWC_Mode, which deactivates all water change cycles and processes controlled by this output.
• Minimum 120-Minute OFF Period: Since AWC_Mode turns OFF all other cycles, if any of these outputs were ON before the reset, they will need to meet their minimum 120-minute OFF period before being reactivated. This OFF period ensures that the system has enough time to complete the cycle before starting a new one.
• OFF State:
• End of Reset Process: Marks the completion of the reset process, allowing the system to return to its normal operational state.
• Resumption of Normal Operations: Once AWC_Reset turns OFF, the system will need to adhere to the minimum 120-minute OFF period for any previously active cycles before resuming normal operation. AWC_Mode and other outputs will only be ready for activation once this period has elapsed.
AWC_Start
Fallback OFF
Set OFF
If SW_AWC CLOSED Then ON
If Master CLOSED Then OFF
If Power Apex Off 001 Then OFF
Defer 001:10 Then OFF
Min Time 120:00 Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If SW_AWC is CLOSED.
• Conditions to Turn OFF:
• If Master is CLOSED.
• If Power Apex Off 001 is ON.
• Defer: Turns OFF after 1 minute and 10 seconds if conditions are still met.
• Minimum Time: When AWC_Start turns OFF, it must remain OFF for at least 120 minutes before it can be turned back ON.
• Function: Initiates the automatic water change process by controlling related outputs.
• ON State:
• Turns ON AWC_Mode: Activates AWC_Mode, which manages the overall water change process and coordinates other related outputs.
• Starts AWC_Fill: Initiates the filling process by turning ON AWC_Fill.
• Manages Other Outputs: Ensures that other outputs related to the water change process are kept off or controlled as defined by their conditions and timing requirements. Specifically:
• AWC_FillTmr, AWC_Fill2, AWC_Fill2Tmr, AWC_Drain, AWC_Drain2, and others may be kept in their respective OFF states or controlled according to their conditions.
• OFF State:
• Does Not Disrupt Ongoing Processes: Turning OFF AWC_Start stops the initiation of new cycles but does not affect the filling or draining operations already in progress. The output must remain OFF for at least 120 minutes before it can be reactivated, ensuring a proper off-period before any subsequent activation.
AWC_Speed
Fallback OFF
If Output AWC_Drain = ON Then ON
If Output AWC_Start = ON Then OFF
If Output AWC_Fill = ON Then OFF
If Output AWC_Fill2 = ON Then OFF
If Output AWC_Drain2 = ON Then OFF
If Output AWC_Mode = OFF Then OFF
Defer 003:00 Then ON
Defer 003:00 Then OFF
• Fallback: OFF
• Conditions to Turn ON:
• If AWC_Drain is ON.
• Conditions to Turn OFF:
• If AWC_Start, AWC_Fill, AWC_Fill2, AWC_Drain2, or AWC_Mode are ON.
• Defer: 3 minutes ON, then OFF.
• Function: Controls the speed of the return pumps.
• ON State: Reduces the return pump speed to 75 gallons per hour.
• OFF State: Allows the return pumps to operate at their normal variable speeds.
AWC_Fill
Fallback OFF
If Output AWC_Start = ON Then ON
If SOF_4 CLOSED Then OFF
If Output AWC_FillTmr = ON Then OFF
If Output AWC_Drain = ON Then OFF
If Output AWC_Fill2 = ON Then OFF
If Output AWC_Drain2 = ON Then OFF
If Output AWC_Mode = OFF Then OFF
Min Time 120:00 Then OFF
• Fallback: OFF
• Conditions to Turn ON:
• If AWC_Start is ON.
• Conditions to Turn OFF:
• If SOF_4 is CLOSED (indicating an overflow water level in the sump).
• If AWC_FillTmr is ON (indicating an active timer for filling).
• If AWC_Drain, AWC_Fill2, or AWC_Drain2 are ON (to prevent overlap of filling and draining operations).
• If AWC_Mode is OFF.
• Minimum Time: Must remain OFF for at least 120 minutes before it can be turned back ON.
• Function: Manages the filling process of the aquarium with new water.
• ON State:
• Initiates Filling Operations: Activates the filling process, allowing new water to enter the aquarium.
• OFF State:
• Stops Filling Operations: Halts the filling process and allows other processes to proceed.
• Effect of AWC_FillTmr:
• AWC_FillTmr ON: When AWC_FillTmr is ON, it signifies that a timer specifically for managing filling operations is active. This prevents AWC_Fill from continuing to fill the aquarium because the timer is managing the duration of the filling process.
• AWC_FillTmr OFF: Once AWC_FillTmr turns OFF, AWC_Fill can be reactivated if the other conditions are met, signaling that the timer has finished its designated period for filling.
AWC_FillTmr
Fallback OFF
Set OFF
If Output AWC_Fill = ON Then ON
Defer 010:00 Then ON
If Output AWC_Mode = OFF Then OFF
Defer 000:02 Then OFF
Min Time 120:00 Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If AWC_Fill is ON (indicating that the filling process is active).
• Defer: Turns ON after 10 minutes if the conditions are met, then turns OFF after 2 seconds.
• Minimum Time: Must remain OFF for at least 120 minutes before it can be turned back ON.
• Function: Manages the timing of the filling process to ensure accurate duration and control.
• ON State:
• Activates the Timer for Filling: When AWC_FillTmr is ON, it indicates that the timer is actively managing the duration of the filling process. The timer starts after a 10-minute defer period and remains ON for only 2 seconds.
• Timing Control: Ensures that the filling operation adheres to a specified duration by controlling the timing aspect of AWC_Fill. The brief ON period ensures that the timer function is triggered to track the filling process.
• OFF State:
• Deactivates the Filling Timer: Stops the timing functions related to the filling process. Once AWC_FillTmr turns OFF, the timing of the filling operation is no longer actively managed.
• Effect on AWC_Fill: When AWC_FillTmr is OFF, AWC_Fill can be reactivated if the other conditions are met. This is crucial for ensuring that the filling process does not overlap with other operations, such as draining, by coordinating the timing between different stages.
AWC_Drain
Fallback OFF
If RPHI_1 CLOSED Then ON
If RPLO_2 OPEN Then OFF
If SOF_4 CLOSED Then OFF
If Output AWC_Start = ON Then OFF
If Output AWC_Fill = ON Then OFF
If Output AWC_Fill2 = ON Then OFF
If Output AWC_Drain2 = ON Then OFF
If Output AWC_Mode = OFF Then OFF
Defer 010:00 Then ON
Defer 000:02 Then OFF
Min Time 120:00 Then OFF
• Fallback: OFF
• Default State: If none of the conditions are met, AWC_Drain defaults to OFF.
• Conditions to Turn ON:
• RPHI_1 is CLOSED (high water level in the return pump area).
• RPLO_2 is OPEN (low water level in the return pump area).
• Conditions to Turn OFF:
• SOF_4 is CLOSED (no overflow condition).
• AWC_Start is ON.
• AWC_Fill is ON.
• AWC_Fill2 is ON.
• AWC_Drain2 is ON.
• AWC_Mode is OFF.
• Defer:
• 010:00 (10 minutes): When conditions to turn ON are met, AWC_Drain activates after a 10-minute delay. This period ensures that new water has mixed adequately with the existing water, providing proper soak time before initiating the draining process.
• 000:02 (2 seconds): When conditions to turn OFF are met, AWC_Drain remains ON for an additional 2 seconds before turning OFF. This brief ON period facilitates a smooth transition to the next function in the water change cycle.
• Minimum Time:
• 120 minutes: After AWC_Drain turns OFF, it must remain OFF for at least 120 minutes before it can be reactivated. This ensures appropriate timing between drainage cycles and prevents immediate reactivation.
• Function:
• ON State:
• Activates Draining Operations: Initiates the removal of water from the aquarium when conditions are met.
• Defer Mechanism: The 10-minute delay ensures proper mixing of new and existing water. Following this, AWC_Drain will turn ON. If conditions to turn OFF are met, it will stay ON for an additional 2 seconds to facilitate a smooth transition to the next cycle function.
• OFF State:
• Stops Draining Operations: Halts the draining process, allowing other operations to proceed.
• Effect of Minimum OFF Period: Ensures that the output remains OFF for 120 minutes before reactivation, maintaining proper intervals between drainage cycles.
AWC_Fill2
Fallback OFF
If RPHI_1 OPEN Then ON
If SOF_4 CLOSED Then OFF
If Output AWC_Fill2Tmr = ON Then OFF
If Output AWC_Start = ON Then OFF
If Output AWC_Fill = ON Then OFF
If Output AWC_Drain = ON Then OFF
If Output AWC_Drain2 = ON Then OFF
If Output AWC_Mode = OFF Then OFF
Min Time 120:00 Then OFF
• Fallback: OFF
• Conditions to Turn ON:
• If RPHI_1 is OPEN (indicating that no water is detected at the return pump high level).
• Conditions to Turn OFF:
• If SOF_4 is CLOSED (indicating the overflow sensor is not detecting excess water).
• If AWC_Fill2Tmr is ON (indicating an active timer for secondary filling).
• If AWC_Start is ON (prevents overlap with initial filling).
• If AWC_Fill is ON (prevents overlap with primary filling).
• If AWC_Drain is ON (prevents overlap with draining).
• If AWC_Drain2 is ON (prevents overlap with additional draining).
• If AWC_Mode is OFF (prevents secondary filling when mode is inactive).
• Minimum Time: Must remain OFF for at least 120 minutes before it can be turned back ON.
• Function: Manages the secondary filling process, adding additional water to the aquarium as needed after the primary filling.
• ON State:
• Initiates Secondary Filling: Activates secondary filling when no water is detected at the return pump high level, indicating it’s safe to continue.
• OFF State:
• Stops Secondary Filling: Halts secondary filling, allowing other processes to take place.
• Effect of AWC_Fill2Tmr:
• AWC_Fill2Tmr ON: Prevents AWC_Fill2 from operating, as the timer manages the duration of the secondary filling process.
• AWC_Fill2Tmr OFF: Allows AWC_Fill2 to be reactivated if conditions are met, enabling secondary filling to resume.
AWC_Fill2Tmr
Fallback OFF
Set OFF
If Output AWC_Fill2 = ON Then ON
Defer 015:00 Then ON
Defer 000:02 Then OFF
Min Time 120:00 Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If AWC_Fill2 is ON (indicating secondary filling is active).
• Defer:
• 015:00: Turns ON after a 15-minute delay if conditions are met, allowing time for secondary filling to complete.
• 000:02: Remains ON for 2 seconds before turning OFF, ensuring proper engagement of the timer function.
• Minimum Time: Must remain OFF for at least 120 minutes before it can be turned back ON.
• Function: Manages the timing of the secondary filling process to ensure accurate duration and control.
• ON State:
• Activates Timer for Secondary Filling: Indicates that the timer is actively managing the duration of secondary filling.
• OFF State:
• Deactivates Timer: Stops the timing functions related to secondary filling. Once OFF, the timing aspect is no longer managed.
• Effect on AWC_Fill2:
• AWC_Fill2Tmr ON: Prevents AWC_Fill2 from operating, coordinating the secondary filling process with the timer.
• AWC_Fill2Tmr OFF: Allows AWC_Fill2 to be reactivated if conditions are met, ensuring smooth operation between filling and other processes.
AWC_Drain2
Fallback OFF
If RPHI_1 CLOSED Then ON
If RPHI_1 OPEN Then OFF
If SOF_4 CLOSED Then OFF
If Output AWC_Start = ON Then OFF
If Output AWC_Fill = ON Then OFF
If Output AWC_Drain = ON Then OFF
If Output AWC_Fill2 = ON Then OFF
If Output AWC_Mode = OFF Then OFF
Defer 000:07 Then OFF
Defer 011:00 Then ON
Min Time 120:00 Then OFF
• Fallback: OFF
• Conditions to Turn ON:
• If RPHI_1 is CLOSED (indicating water level detected at the high level in the return pump).
• Conditions to Turn OFF:
• If SOF_4 is CLOSED (indicating an overflow or high water level in the sump).
• If any of AWC_Start, AWC_Fill, AWC_Drain, AWC_Fill2 are ON (to prevent overlap with other processes).
• If AWC_Mode is OFF (indicating the system is not in operation mode).
• Defer:
• 000:07 (7 seconds): When conditions to turn OFF are met, AWC_Drain2 remains ON for an additional 7 seconds before turning OFF. This brief ON period ensures a smooth transition to the next function in the water change cycle.
• 011:00 (11 minutes): Turns ON after an 11-minute delay if conditions to turn ON are still met. This period ensures that new water has mixed adequately with the existing water, providing proper soak time before initiating the secondary draining process.
• Minimum Time: Must remain OFF for at least 120 minutes before it can be turned back ON.
• Function: Controls a secondary draining process for additional waste removal or balancing water levels.
• ON State:
• Activates Secondary Draining: Engages the secondary draining process to manage water levels or remove additional waste.
• OFF State:
• Stops Secondary Draining: Halts the secondary draining process, allowing other operations to continue smoothly.
AWC_ATO
Fallback OFF
If RPHI_1 OPEN Then ON
If RPHI_1 CLOSED Then OFF
If Output AWC_Start = ON Then OFF
If Output AWC_Fill = ON Then OFF
If Output AWC_Drain = ON Then OFF
If Output AWC_Fill2 = ON Then OFF
If Output AWC_Drain2 = ON Then OFF
If Output AWC_Mode = OFF Then OFF
Defer 000:05 Then ON
Defer 000:05 Then OFF
• Fallback: OFF
• Conditions to Turn ON:
• If RPHI_1 is OPEN (indicating no water detected at the high level in the return pump, suggesting a low water level that needs topping off).
• Conditions to Turn OFF:
• If RPHI_1 is CLOSED (indicating the water level is sufficient).
• If any of AWC_Start, AWC_Fill, AWC_Drain, AWC_Fill2, or AWC_Drain2 are ON (to avoid conflicts with other water change processes).
• If AWC_Mode is OFF (indicating the system is not in operation mode).
• Defer:
• 5 seconds ON, then OFF after 5 seconds: When conditions are met to turn ON, AWC_ATO will activate after a 5-second delay, and then it will remain ON for 5 seconds before turning OFF. This ensures that the top-off operation initiates properly and aligns with other system activities.
• Function: Controls the automatic top-off (ATO) function to maintain water levels in the aquarium by adding water when needed.
• ON State:
• Activates ATO: Engages the automatic top-off process when the water level is detected as low. This helps maintain the desired water level in the aquarium, ensuring that the proper water level in the return pump is achieved while the AWC_Timer expires, signaling the end of the automatic water change process.
• OFF State:
• Deactivates ATO: Stops the automatic top-off process when the water level is adequate or if other conditions require cessation of the top-off function. This prevents unnecessary water addition and allows other processes to continue smoothly.
AWC_WastePump
Fallback OFF
Set OFF
If Output AWC_Drain = ON Then ON
If Output AWC_Drain2 = ON Then ON
If WPLO_3 OPEN Then OFF
If Master CLOSED Then OFF
Fallback: OFF
Initial Set: OFF
Conditions to Turn ON:
• If Output AWC_Drain is ON: This condition ensures that the waste pump is activated when the primary draining process is active, indicating that water needs to be drained from the sump.
• If Output AWC_Drain2 is ON: This condition activates the waste pump when the secondary draining process is active, indicating that water needs to be drained from the sump.
Conditions to Turn OFF:
• If WPLO_3 is OPEN: This sensor indicates that there is not enough water to allow the waste pump to operate. The output will be turned OFF to prevent dry running or damage.
• If Master is CLOSED: If the master switch is closed, it means the overall system is off, and the waste pump should be turned OFF.
Function: Controls the operation of the waste pump, which is responsible for removing wastewater during the automatic water change process. The pump will activate during the draining phases to ensure that the removed water is properly expelled from the system.
ON State:
• Active Drainage: The waste pump is turned ON during active drainage cycles (both primary and secondary) to handle the removal of wastewater.
• Efficient Waste Removal: Ensures that all wastewater is effectively expelled from the system, maintaining optimal water quality and system performance.
OFF State:
• Inactive State: The pump turns OFF if conditions indicate that no draining is necessary, or if there are issues with the water level or the master switch, preventing potential damage.
• Safety Mechanism: Prevents operation when there are issues with the water level (WPLO_3 being OPEN) or when the master switch indicates a closed state, ensuring safe and reliable pump operation.
AuxPumpFrnt
Fallback OFF
Set OFF
If Output ATO_Control = ON Then ON
If Output ATO_Low = OFF Then OFF
If Output AccModeCntrl = ON Then ON
If Output ATO_Fill = ON Then ON
If Output AWC_Fill = ON Then ON
If Output AWC_Fill2 = ON Then ON
If Output AWC_ATO = ON Then ON
If FMM1_4 OPEN Then OFF
If FMM3_4 OPEN Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If ATO_Control is ON (indicating that automatic top-off control is active).
• If AccModeCntrl is ON (acclimation mode control is active).
• If any of ATO_Fill, AWC_Fill, AWC_Fill2, or AWC_ATO are ON (indicating filling or top-off operations are active).
• Conditions to Turn OFF:
• If ATO_Low is OFF (indicating the ATO water level is not critically low. This prevents the output from turning on due to ATO_Control Output when ther is sufficient water in the ATO reservoir).
• If FMM1_4 or FMM3_4 are OPEN (temporary sensors are used here and indicate conditions where the pump should not operate).
• Function: Controls an auxiliary pump power supply located at the front of the system.
• ON State:
• Activates the Auxiliary Pump: Engages the front auxiliary pump power supply for tasks such as additional water filling.
• OFF State:
• Deactivates the Auxiliary Pump: Turns off the front auxiliary pump power, ceasing its operation.
AuxPumpSide
Fallback OFF
Set OFF
If Output ATO_Control = ON Then ON
If Output ATO_Low = OFF Then OFF
If Output AccModeCntrl = ON Then ON
If Output ATO_Fill = ON Then ON
If Output AWC_Fill = ON Then ON
If Output AWC_Fill2 = ON Then ON
If Output AWC_ATO = ON Then ON
If FMM1_4 OPEN Then OFF
If FMM3_4 OPEN Then OFF
• Fallback: OFF
• Initial Set: OFF
• Conditions to Turn ON:
• If ATO_Control is ON (indicating that automatic top-off control is active).
• If AccModeCntrl is ON (acclimation mode control is active).
• If any of ATO_Fill, AWC_Fill, AWC_Fill2, or AWC_ATO are ON (indicating filling or top-off operations are active).
• Conditions to Turn OFF:
• If ATO_Low is OFF (indicating the ATO water level is not critically low. This prevents the output from turning on due to ATO_Control Output when ther is sufficient water in the ATO reservoir).
• If FMM1_4 or FMM3_4 are OPEN (temporary sensors are used here and indicate conditions where the pump should not operate).
• Function: Controls an auxiliary pump power supply located at the side of the system.
• ON State:
• Activates the Auxiliary Pump: Engages the side auxiliary pump power supply for tasks such as additional water filling.
• OFF State:
• Deactivates the Auxiliary Pump: Turns off the side auxiliary pump power supply, ceasing its operation.