The program seems and sounded simple enough to me, but I'm having trouble with it anyway. I'll give a quick rundown of what the system should do.
It should control a valve and has an open and closed position. It is normally closed. Opening/closing works by energizing and de-energizing a coil on a relay. When energized, it opens, when de-energized it closes.
The valve status is determined by a float switch that is normally closed. When the float is closed (in it's default position) the coil should be de-energized.
Now when the float opens it should start a 12hour timer. After that timer it should energize the coil (tell the valve to open).
When the float goes back down and closes (returns to it's default position) it should start a 31 hour timer after which it closes the valve.
So float goes up, 12 hour timer starts and valve opens, it stays open for X amount of time (until float goes back down) after float goes down valve stays open for 31 hours and then closes.
I guess the part I'm having a problem with is the de-generalization of a coil. I know how to energize them in ladder logic, but de-energizing them is a head scratcher to me (I'm very new to this so be gentle).
This is what I have right now. The main problem is that with the current logic the valve will immediately de-energize, instead of waiting the 36 hours. I imagine I need to branch something off of the first run to keep it open while the timer in TON_2 completes. I'm not sure how to accomplish that.
Any other suggestions or simpler ways to accomplish what I'm trying to do are appreciated. And remember, I'm pretty new to all of this so keeping it simple and talking to me like I'm an idiot is welcome lol.
Thank you guys for having such a helpful community.
It should control a valve and has an open and closed position. It is normally closed. Opening/closing works by energizing and de-energizing a coil on a relay. When energized, it opens, when de-energized it closes.
The valve status is determined by a float switch that is normally closed. When the float is closed (in it's default position) the coil should be de-energized.
Now when the float opens it should start a 12hour timer. After that timer it should energize the coil (tell the valve to open).
When the float goes back down and closes (returns to it's default position) it should start a 31 hour timer after which it closes the valve.
So float goes up, 12 hour timer starts and valve opens, it stays open for X amount of time (until float goes back down) after float goes down valve stays open for 31 hours and then closes.
I guess the part I'm having a problem with is the de-generalization of a coil. I know how to energize them in ladder logic, but de-energizing them is a head scratcher to me (I'm very new to this so be gentle).
This is what I have right now. The main problem is that with the current logic the valve will immediately de-energize, instead of waiting the 36 hours. I imagine I need to branch something off of the first run to keep it open while the timer in TON_2 completes. I'm not sure how to accomplish that.
Any other suggestions or simpler ways to accomplish what I'm trying to do are appreciated. And remember, I'm pretty new to all of this so keeping it simple and talking to me like I'm an idiot is welcome lol.
Thank you guys for having such a helpful community.