So I have the following assignment for a class I am taking.
I have completed the majority of the assignment. However I am getting caught up on the rinse cycle. I can't figure out how to get the machine to fill and drain after already using those outputs earlier in the ladder logic. I have attached my program in a zip file for those who may want to see it.
Any help would be gratefully appreciated.
Thank you.
"Program overview:
The size of the load to be wash is selected first. The start push button is pressed to start the cycle. During the fill, the stop push button can stop it from filling. The analog output will display the amount of water in the tub in decimal. After the proper level is reached, the full light illuminates and a soak delay starts. When the soak time is complete, the agitator starts for a specified amount of time and the soap is dispensed. After the agitation is complete, the tub will drain. The run light will illuminate when the tub is filling, dumping, and agitating. The idle light will only illuminate during soaking. Immediately after draining the wash cycle, the tub will fill to the same level as the wash cycle with no agitation and then immediately drain.
Program requirements:
1. First, the size of the load must be chosen by the selector switch.
2. The start and stop pushbutton are only active during the initial filling of the tub. After the tub is full, these buttons will no longer work, until the load is complete and is ready for the next load. To start the next load, the size of the load will need to be selected, unless the selector switch is already on the proper load size.
3. When the start pushbutton is pressed, the fill pump will start filling the tub as the fill flowmeter is measuring the amount of water filling the tub.
4. The actual amount of water in the tub is displayed on the control panel in DECIMAL at all times.
5. When the tub reaches the appropriate level, the FULL light illuminates, and the soak period begins.
6. After the soaking is done, the machine will agitate for a specified amount of time.
7. During the agitation, the soap will be dispensed.
8. When the agitation is complete, the tub will drain.
9. Once the tub drains from the wash cycle, it will immediately fill to the appropriate level, according to the load size.
10. Once the proper level is reached, it will immediately drain, no agitation.
11. At this time another load size can be selected, and the process starts all over.
Load size requirements:
Large Load Medium Load Custom Load
Wash water level 300 200 1-306
Rinse water level 300 200 1-306
Soak time 9 seconds 8 seconds 10 seconds
Agitation time 6 seconds 5 seconds 7 seconds
Soap dispensed 5 units 5 units 5 units
Hints: (As you know, there are many ways of writing similar programs. Below are a few hints which may cause some confusion, until you get to that section. It may be wise, to start your program first, then if you get stumped, read the hints.)
1. Write a short program to fill the tub until the hi level shuts the fill pump off to determine the highest level the tub is safely filled to. My simulator goes to 306 in decimal. If yours is different and you are unable to use the above water levels, please make a note on your maximum level, and notify me.
2. In this program, latch bits were used as flags to mark the cycle.
3. After running the program a few times, a residual amount of water remains in the tank, according to the counter. (Ignore the extra)
4. Even if the custom load is not selected, you may have to place a number in the analog input in order to allow the fill pump to turn on for the other loads.
5. Since only one of the 3 load size subroutines will be active, the same timer can be used in all three subroutines for at least the agitator.
6. Write a basic main routine first, and continually add to it as you write the subroutines.
7. The start PB can be used in addition to starting the process, as resetting the flags from the last process.
8. One way to dispense soap: add 5 to the accumulator value of the tanks level and place it in an integer file. Then during agitation, turn the soap pump on until that level is reached. The soap will be fully dispensed before the load is done agitating.
9. This is not the ideal washing machine; the timing and soap dispensing may not make the most sense. The purpose of this program is to pull out as many techniques as possible, and still make somewhat sense."
9. This is not the ideal washing machine; the timing and soap dispensing may not make the most sense. The purpose of this program is to pull out as many techniques as possible, and still make somewhat sense."
I have completed the majority of the assignment. However I am getting caught up on the rinse cycle. I can't figure out how to get the machine to fill and drain after already using those outputs earlier in the ladder logic. I have attached my program in a zip file for those who may want to see it.
Any help would be gratefully appreciated.
Thank you.