Mitsubishi Q series: Another SET/RST logic question...

DR uses a seal in as they call it (often preferred to set/rest but basically the same), the one problem I see with DR logic is probably a mis-interpretation of the way the existing system works, I think the pump has to be started initially & the manual start/stop is not just manual mode as they have no man/auto selection (or that is how it appears, however, without seeing all the logic cannot be sure), so in DR's code, if started using the top rung it is assumed this is manual control so the low level timer will not stop the pump as the pump is controlled by what he calls override (Ored round the low level condition).
The code I produced assumes (I think correctly) that the operator starts (or rather enables) the pump, this is then controlled by the level in the tank, so My logic is if you like start process (enable pump to run) if low level is reached, it stops the pump, as it has already been enabled (Started) it will re-start when the low level gets covered (including delays to prevent hunting), no idea how the process deals with low level is it automatic re-fill ? or does the operator have to top it up ?.
Without the complete description on how this system is operated then we can only guess, from what I have seen, the process is a bit iffy, the original code seems messy, probably little alarm handling, certainly not to a standard I would expect from a process.
I'm not directly knocking the original coder, we don't know the process/design & usual factors we have faced ourselves when a production manager is breathing down your neck.
From what I gather (with little information) this is a buffer tank for cooling water, this is fed through some kind of cooling system to cool something ? we do not know if this is a loss system i.e. water is passed through a possible jacket to cool & then dumped to drain (in this mode would require an auto top up system) or is it returned to the buffer tank possibly through a heat exchanger to cool it back down again.
What worries me is that without knowing completely this part of the process we could be barking up the wrong tree.
I would suggest to Mas01, if reliable answers are required he describes that part of the process in detail, I know he has restrictions on what he can disclose of the process, but this is not rocket science and unlikely to be use to others, as an experienced systems engineer I have done many different types of control so unlikely to be something that myself or many others have not done before.
 
Thanks for the time to answer my questions. This tank is the reservoir for the test facility. It is used for cooling down motors and clutch used for controlling the speed of a rotating shaft. Also some water evaporation is expected during testing and this water will be manually "topped up" by an industrial size ballcock valve similar to one in your domestic toilet cistern.
Originally, the code only started and stopped the sump pump via the "click on HMI followed by start button finger press" (similarly for stopping the pump). If the water level went too low for the pump to safely operate, well that was tough luck, because there was nothing in the code to prevent this.
As I'm now the designated 'plc man' (a dangerous definition,as I'm still learning) the operators then asked me to add code to automatically stop the pump if the water level goes below 18cm, which is what I did , but it's only half implemented (yes, the pump goes off, but there's nothing in the code to restart it once the water level rises again - hence I created this thread). This is naturally annoying the operator who had to do the 'click and finger press' to restart the pump - at the moment, we are not using full tank capacity and tank levels tend to fluctuate.
Ultimately, the operator wants to start the pump manually, let the test run and only stop the pump manually when the test is finished. If , during the test, the pump starts/stops due to water level, then this should be fully automated by the PLC monitoring water levels and controlling the pump accordingly.
 
Last edited:
the one problem I see with DR logic is probably a mis-interpretation ...

Oh dear, I wasn't clear (again).

Based on our story so far, I see two possible interpretations (at least; cf. Post #29 here) of how @Mas01 wants the process to behave. Although the response of the process to the Start/Stop PBs is very different, the code to implement either is very similar and short, so I coded a separate algorithm for each interpretation:

  • As @parky notes, the logic on the left of the image attached to Post #30 implements the option to override* the level control by running the pump continuously;
  • The logic on the right side of that image implements Auto/Manual behavior that is, I am fairly certain, equivalent** to @parky's code attachment Ladder.pdf to Post #12 here.
Both interpretations are technically overrides of the level control: the former prevents the level control from stopping the pump; the latter prevents the level control from running the pump.

I used the Start/Stop Circuit pattern (cf. here) as an alternative to Set/Reset because @parky already provided the latter; it will work either way of course, although with Set/Reset, the state of the Auto/Manual bit could be configured to survive a mode- or power-cycle of the PLC, which, again, is a decision for the process owner to make.

* I think the override-runs-the-pump behavior is the less likely interpretation, because it brings with it the risk of damaging the pump from operator error, but until the OP (@Mas01) tells us enough about their process to remove the ambiguity, we cannot know. I do note, however, that the currently-programmed behavior of the system is consistent with this interpretation.
a sump pump which is switched on/off at the HMI ... The code works fine for starting/stopping the pump.

... the pump will automatically turn off if the water level is below 18cm (to prevent damaging the pump) ...

HOWEVER, ... [the pump] does not turn back on once the water level starts rising again (and this is a requirement)
Again, the issue I see is the definition of "requirement" and its implication for the behavior of the process to the Start/Stop PBs:

  • If that requirement is primary, i.e. that the pump turns one once the water level rises above 18cm, and the Start/Stop PBs are also supposed to provide an independent way to turn the pump on and off, then this override-to-run-pump algorithm is the correct interpretation.
  • If that requirement is subordinate to operator control, then the Start/Stop PBs are really Auto/Manual PBs, and the alternate second algorithm is the correct interpretation. However, in that case the Start/Stop PBs do not unconditionally start and stop the pump, which appears to be different from the behavior described, and declared as "fine," in the OP.
** except for the typo at rung address 4
 
...
Ultimately, the operator wants to start the pump manually, let the test run and only stop the pump manually when the test is finished. If , during the test, the pump starts/stops due to water level, then this should be fully automated by the PLC monitoring water levels and controlling the pump accordingly.


Oh dear, it took me so long to compose that last post that I missed this.

Anyway, I still see ambiguity here:

  • "only stop the pump manually when the test is finished"
  • "If , during the test, the pump starts/stops due to water level, then this should be fully automated by the PLC"
Which is it? For a test, is the pump only to be stopped manually, or can it also be stopped by automated level control even if the test is still active?

Ultimately, with the controls at hand, I believe we have only two override choices available:

  • EITHER the operator can override the level control and not run the pump when the level is above 18cm
  • OR the operator can override the level control and run the pump when the level is below 18cm
We have only enough controls to choose one of those two options.

For logical completeness, I will also state the other options:

  • Run the pump manually while the level is above 18cm;
  • Not run the pump while the level is below 18cm.
But these are uninteresting options because they are each redundant with the corresponding level control's action.


-
 
Last edited:
The way I see it is providing the level is above the low level the operator can start the pump before the test.
Once running, if the level drops below the low level the pump will stop.
If the operator re-charges the tank once the level is above the low level the pump will automatically start.

What I believe it should do is as above but suggest if the tank falls below the low level an alarm or annunciator message should appear on the screen, for example, when the operator initiates the start of the pump perhaps a message saying "cannot start sump low level"
During the process, if the level falls below, it stops & also flashes an alarm or message as above or some other like "Re-charge sump water level low".
Ideally, if it was me I would put a fill valve on the system so when the pump is started it charged the water to what ever level, the pump would then automatically start when above low level.
To add this would be simple i.e. the fill valve would only be active when the operator starts (or tries to start the pump), i.e. operator selects & starts the pump, the pump would not run but tank will replenish this is so easy to accomplish, use the pump enable bit (Pump Enable) to also enable the filling cycle.
If auto filling was added, then I would also generate alarms that would stop the fill for example if on a fill cycle the water level did not reach at least mid point within x seconds/minutes stop the system i.e. the water not filling or the level sensors are not detecting it to stop over filling.
Personally, I would auto fill when the level drops below what I would set as low level (not low low level), stop filling when at high level, not High high level, you do appear to have 4 level controls using 4 levels is usually how you control auto filling the upper & lower ones only used for alarms or to stop the process.
In actual fact, just before I retired, one of our switched on engineers I mentored on exactly this type of project, we had some packaging machines that sealed film onto the tubs, the cutting/sealing heads were fed with cooled water from header tank chillers, the system like yours were manually filled, however, there were no interlocks so if the water level fell too low the film would stick to the seal/cutting head.
There were at least 3 or 4 calls per shift to top up the tanks, the engineer was given the job of automating the fill of 4 chilling tanks.
This was done quite simply with a small brick PLC, a small HMI & 4 stage level probes. It took the guy (who had no previous experience) a few days to write the code & HMI, a little help from me to de-bug it.
As far as I know this is still running without problems, I did personally add a alarm beacon in the engineering office which was close by but the tanks were in what we call the roof void out of sight.
 
Anyway, I still see ambiguity here:

  • "only stop the pump manually when the test is finished"
  • "If , during the test, the pump starts/stops due to water level, then this should be fully automated by the PLC"
Which is it? For a test, is the pump only to be stopped manually, or can it also be stopped by automated level control even if the test is still active?


-
Start of test - operator manually starts pump (pump is locked out if water level is too low to start).
During test - pump will switch off automatically if water level drops below 18cm. When water level rises above 18cm, pump should turn on automatically (this is the bit that's NOT implemented yet).
End of test - Operator manually turns off pump.

The operator could (if they choose to) turn off/on the pump manually during the test, although that would be an unusual thing to do.

The top-up water is not controlled by the PLC. It is a quarter-turn valve operated by hand.

Hope this clarifies the set-up.
 
Last edited:
The way I see it is providing the level is above the low level the operator can start the pump before the test.
Once running, if the level drops below the low level the pump will stop.
If the operator re-charges the tank once the level is above the low level the pump will automatically start.
All of the above is correct, just the bit in bold has not been implemented yet (hence the reason for starting this thread). Next week I'll try the code you suggested, see how I get on. Thanks
 
...
During test - pump will switch off automatically if water level drops below 18cm. ...

With or without the 10s delay after time when the level drops below 18cm?

And may we assume "the level drops below 18cm" actually means "FltSw018 bit transitions from 1 to 0?"

So [Sump Test Run] would be a better name for the operating mode after [Start PB] is pressed when [Sump Select] is 1, instead of of "Auto Run?"

Once the test is over i.e. when [Sump Test Run] is 0, does the 18cm level switch continue to contribute to the logic that chooses whether to run the sump pump or not?

-
 
1. With or without the 10s delay after time when the level drops below 18cm?

2. And may we assume "the level drops below 18cm" actually means "FltSw018 bit transitions from 1 to 0?"

3. So [Sump Test Run] would be a better name for the operating mode after [Start PB] is pressed when [Sump Select] is 1, instead of of "Auto Run?"

4. Once the test is over i.e. when [Sump Test Run] is 0, does the 18cm level switch continue to contribute to the logic that chooses whether to run the sump pump or not?

-

1. With a 10s delay. The 10s delay is to avoid "debounce" ie rapidly starting/stopping the pump if the water is turbulent and causing the float switch to go on/off intermittently.
2. Correct
3. I think you're referring to Parky's code, not the code I posted originally. Don't know the answer to this one.
4. Once the test is over the shift finishes and we all go home. However if (for any reason) the water level was below 18cm at the start of the next shift, the sump pump would be locked out (ie you won't be able to start it) until water level is increased above 18cm again (add more water).
 
Last edited:
4. Once the test is over the shift finishes and we all go home. However if (for any reason) the water level was below 18cm at the start of the next shift, the sump pump would be locked out (ie you won't be able to start it) until water level is increased above 18cm again (add more water).

Does the pump ever run when the system is not in a test?
Anyway, here are two solutions, both of which assume the answer is no. The upper solution is a simple start/stop circuit combined with a timer on the level.

The lower solution, which is academic only and not suitable for a real-world solution where someone might be looking at this code to diagnose an operational problem, does the same thing while compressing all but the timer logic into a mashed-up Start/Stop Circuit pattern. In RSLogix/Studio 5000, the [Normally Closed Extend_Run_10s] instruction could be replaced by a TOF and the entire solution would be one rung.
run_test_with_low_level_override.png
[Update: fixed typo in image; fix other typos]

-
 
Last edited:
P.S. those solutions highlight the problem with the original code from Post #1: it was trying to maintain the state of two independent conditions:

  • whether the pump is running, and
  • whether the system is running a test,
in one bit i.e. in the [Y2D4 Sump Pump Run] bit.

As soon as we split those two independent conditions into two separate bits, the solution all but presents itself.
 
@Mas01: if you can tell us, what is the purpose of the "test?"

Anyway, here's how I would combine @parky's suggestion of controlling the level

  • with hysteresis between the HIGH and LOW level switches in normal operation, and
  • with hysteresis via the LOWLOW level switch debounce during test operation.
normal_and_test_override.png
 
Last edited:
@Mas01: if you can tell us, what is the purpose of the "test?"

Anyway, here's how I would combine @parky's suggestion of controlling the level

  • with hysteresis between the HIGH and LOW level switches in normal operation, and
  • with hysteresis via the LOWLOW level switch debounce during test operation.

Thanks for the code, you've gone to a lot of effort here.
The only part of it that's unfamiliar to me, is the box TON, which I've never seen before in GX developer, but I realise it's a timer. Cheers for this.
 

Similar Topics

Hi, Can someone help me by explaining how I can transfer data from one PLC to another. I'm using GX Works 2, both CPU's are the same (Q03UDVCPU)...
Replies
6
Views
2,375
Ok, I'm using an A2USH series plc and I was looking for the one-shot rising and one-shot falling instructions and noticed that they were not...
Replies
7
Views
3,819
how to communicate FactoryTalk Optix and Mitsubishi Q Series. I want to know the details of that
Replies
0
Views
37
In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
273
Back
Top Bottom