Yes I can. On Rung 022, there is a MOV (Move) instruction that moves the value of N[11]:[0] (which is equal to direct address N11:0) to the Timer T4:0 Preset Value when the System Latch is ON. In other words, Timer T4:0 gets changed to a timing range of 0 to N11:0 (which I think should be set to "15", but definitely NOT a negative number such as "-21846", for the first PLC run). I suppose in the original, the value of N11:0 is supposed to be set somewhere in the operator interface program.
By making the direct address N11:0 into an Indirect Address by adding the brackets [], some slick programmer made it so that a Search would not find N11:0. That makes it apeear that N11:0 does not exist in this program, but it does. I hate to see guys that do stuff like that simply to confuse the uninitiated.
Oh I see. It is first retrieving the value of N7:53 which is 11, and that's how you were getting N11. Then C5:1.ACC is 0, so it is N11:0. I didn't realize you could address things that way, but that makes sense now.
So last night I spent another 2 hours wrangling with this and got nowhere again.
First I was trying to get the warmup cycle. Starting from a "ready" system that has been initialized by the old unit, I can press the Warm Up From PM (B3:0/12) and it does warm up the valves. However, it never shuts off.
I am trying to learn the file and breaking it down to getting the warmup cycle to work first. I took a hard look at the PDF file and this is the best I have come up with so far:
I see rung 0017. To me this says either the "Warm Up From PM B3:0/12" or "Warm Up Latch B3:0/13" has to be set to 1. "Stop All B3:0/14" has to be set to 0. The "Warm Up Sequence T4:12/DN" has to be set to 0. This is the timer "done" bit correct? Can I reset this myself? I seem to be able to write it to 0, but I don't know if you have to interact with timers differently like clearing something else which then itself makes it done. Then the "System Latch B3:0/15" has to be 0. This will make the Warm Up Sequence TON Timer T4:12 start ticking. It counts every 10ms (Timer Base of 0.01) from 0 (T4:12/ACC) to 1500 for a total of 15 seconds. Or does it go from 1500 to 0? I have seen references on the web that say it counts down, others say it counts up. Does this also then mean I have to "reset" the timer with the starting value before making the stuff before it true? When all this happens, then the "Warm Up Latch B3:0/13" will latch on.
I don't really get the interaction between the timer block in parallel with the "Warm Up Latch B3:0/13" output. Is that a "if one is false, the other is false"? I see that "EN", so "T4:12.EN" is tied to the output as well...
Then if I go down to rung 0020 it uses the "Warm Up Latch B3:0/13" to start the TOFF timer T4:1 "Warm Up Needed T". Then that timer counts down from 1200 to 8 every second? So it will take about 20 minutes? I am guessing this timer value needs to be preset to something so it only takes 1-2 minutes, not 20 if I read that properly.
Then I look on rung 0036, if T4:12.ACC is between 10 and 25, then it puts some temperature values on the valves and sets the "Warm Up Temp Set B3:0/11". Then on rung 0037, if T4:12.ACC is between 30 and 45, it then sets the flow rate for those valves and sets the "Warm Up Flow Set B3:0/10".
Then on Run 0038, if T4:12.ACC is greater than 50, then "Warm Up Delay B3:0/9" gets set.
Rungs 0036, 0037, and 0038 depend on "Warm Up Latch B3:0/13" being set, which it should have been on rung 0017 that started this whole thing,
Rungs 0039 through 0055 do something with the "Warm Up Flow Set" and "Warm Up Temp Set" bits that were set in 0036 and 0037 to put some data somewhere internally. Not quite sure if that is something special, or just internal housekeeping.
Then rung 0057 uses the "Warm Up Delay B3:0/9" to start the T4:2 TOFF timer. It counts every second from 1 to 1? So I am guessing this needs to be set externally to something else to tell it how long before that timer expires and turns stuff off?
And then on 0058, when "Delay Off Valve T4:2.DN" is set to 1 and "Stop Zone 1 B3:3/6" + "Stop All Individual B3:4/14" are not set, it will set some internal bit "Start Out Valve Start = 1"?
Same sort of deal with the same weird timers for 0060, 0061, and 0062 for Zone 2. Again the same with 0063, 0064, and 0065 for Zone 3. And again with 0066, 0067,and 0068 for Zone 4. Again with 0069, 0070, and 0071 for Zone 5. And once more with 0072, 0073, and 0074 for Zone 6. I guess I will need to set all these weird timers to something non-1 so that it actually does count and turn on then delay off right?
Rung 0075 doesn't seem to matter for Warm Up since it requires the System Latch of B3:0/15 to be on which only gets set with the actual programs from the PM which the Warmup is not. I don't see that being set anywhere else in code but rung 0019. Rungs 0076 and 0077 require the "Sequence Temp Se B3:4/0" bit to be set to do anything which only gets set on 0075. So again I will ignore those for warmup purposes. 0077 sets the "Sequence Flow Se B3:4/1" bit, so I can ignore rung 0078 as well.
It looks like Rung 0079 allows you to individually set the temperature of Valve 6 as long as lots of other things aren't going on. Presumably to prevent people from changing it while the program is running... Rung 0080 does the same for Valve 5, 0081 for Valve 4, 0082 for Valve 3, 0083 for Valve 2, and then 0084 for Valve 1.
It looks like 0085 lets you turn all the valves on a low flow setting as long as they aren't set for other flow rates or in use already. 0086 for medium flow, 0087 for high flow. Again, nothing to do with warmup.
And looking at the rest of the rungs, it looks like that is the actual program part that changes the flow and temperatures depending on the time. That seems to just always do it when the program is on because when I have the problem of it not shutting off, it does seem to constantly adjust everything. So that looks all good.
Going through it, it appears that the thing I was missing was setting those "weird TOFF timers" like T4:2, T4:3, etc to values greater than 1. And then in the T4:1 timer, adjust that from the default of 20 minutes to something more reasonable if I read that properly.
Does this sound reasonable?
I appreciate all the help. Thanks!