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

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.

Ta very mooch.

I'm glad it's useful.

Actually what we want is the TOF, fed by the un-inverted bit (see the second half of the Debounce pattern), but feeding a TON with rung state driven by the inverted bit achieves the same result, and I am too lazy to check if GX has TOF.

The next step will be to convert this back to the Set/Reset modality and ensure it matches @parky's code (after fixing the typo). The only differences are that, with Set/Reset,

  • there is no seal-in; it is built into the Set/Reset instructions,
  • the Reset instruction follows the Set instruction,
  • the Start logic feeds the Set instruction,
    • The Start logic is everything in parallel with the Seal-in,
  • the inverse of the (not-)Stop logic feeds the Reset instruction,
    • the (not-Stop) logic is in series with the [Start OR Seal-in] logic.
The Start/Stop Circuit pattern is essentially the same as the Set/Reset pattern; putting the Reset first and Set last makes it the State/Fault pattern. If you are going to be the PLC man at your site, you really need to memorize, and more importantly understand, those patterns, why they're used, etc. This was a pretty simple problem; the only reason it took as long as it did was the need to get enough detail about the process.

I am getting more and more convinced that key to understanding the utility of the Start/Stop pattern is seeing that it models hysteresis in time in the output bit's responses to two asynchronous events:

  • An initial event starts it i.e. the output bit becomes 1
  • A later event stops it i.e. the output bit becomes 0
The output seal-in maintains the 1 value for the output bit between when the initial event has expired, and when the later event has not yet occurred.
 
Last edited:
@DR: Mas01 also has an analogue level as well as the 4 switches, for better operation it would be best never to have the pump stop during a test.
I would suggest that the low low level probe be set below the minimum & use the analogue level, so for example let's assume (I'm doing it in % here) high high level is 95%, high level is 90% low level is 15% low low level is 10% (actual settings can be anything). Now for the analogue:
Use the analogue for either operator messages (assume no automatic re-fill) so when the analogue level goes below 15% flash a warning message to operator to top up tank, the low low level is just used to stop the pump And alarm should it fall below that level, if the fill is manual then there would be no way to stop the operator over filling. The above would give fair warning the tank is low before the pump stops I would have thought that not running cooling water through the process could be detrimental to the process or why use it, however, again don't know the process so a guess.
If an automated valve was fitted to the system then the only change would be that when the analogue level falls below 15%, auto re-fill to 90% incorporate the high level probe for extra control, if the level reaches the high high level then alarm the tank overfill, nothing can be done if the valve sticks open but at least the operator will be aware (I assume there may be an overflow system in place?.
 
@DR: Mas01 also has an analogue level as well as the 4 switches, for better operation it would be best never to have the pump stop during a test.
I would suggest that the low low level probe be set below the minimum & use the analogue level, so for example let's assume (I'm doing it in % here) high high level is 95%, high level is 90% low level is 15% low low level is 10% (actual settings can be anything). Now for the analogue:
Use the analogue for either operator messages (assume no automatic re-fill) so when the analogue level goes below 15% flash a warning message to operator to top up tank, the low low level is just used to stop the pump And alarm should it fall below that level, if the fill is manual then there would be no way to stop the operator over filling. The above would give fair warning the tank is low before the pump stops I would have thought that not running cooling water through the process could be detrimental to the process or why use it, however, again don't know the process so a guess.
If an automated valve was fitted to the system then the only change would be that when the analogue level falls below 15%, auto re-fill to 90% incorporate the high level probe for extra control, if the level reaches the high high level then alarm the tank overfill, nothing can be done if the valve sticks open but at least the operator will be aware (I assume there may be an overflow system in place?.
Thanks for the suggested use of the analogue sensor, very helpful.
Yes, there is an overflow system in place in the form of large plastic containers. We did at one point consider overflowing into the river next to our facility, but the Environment Agency were very specific about the temperature difference between our overflow water compared to the river water. Also they were specific about the rate of ingress of the overflow water into the river.
Out of interest, I grew up in Sheffield and used to go fishing in the River Sheaf as a kid. I used to catch tropical fish such as guppies which were thriving near the warm water inlets into the river from the steel works. I'm guessing they were discarded pets or released by the nearby aquatic shop.
 
Last edited:
Interesting about the tropical fish, I lived very near to the river trent, many years ago it was pretty polluted, however, in the 60's they lined the bottom of a large stretch in burton -on - Trent, this cleaned it up immensely, they always blamed the power station as when discharging cooling water there was a foam all down the burton length, however, the power station was still running, there were always Carp and many other species in abundance The carp were put there originally by the monks in the monastery I think about 1100AD, since the power station was pulled down, the carp have dispersed, fishing is certainly not as good this I believe is due to no warm water being discharged, so I believe the power station discharging into the river was actually helping the environment. I also caught a number of odd species for example Trout, grayling both of which require very clean water & goldfish.
 
Interesting about the tropical fish, I lived very near to the river trent, many years ago it was pretty polluted, however, in the 60's they lined the bottom of a large stretch in burton -on - Trent, this cleaned it up immensely, they always blamed the power station as when discharging cooling water there was a foam all down the burton length, however, the power station was still running, there were always Carp and many other species in abundance The carp were put there originally by the monks in the monastery I think about 1100AD, since the power station was pulled down, the carp have dispersed, fishing is certainly not as good this I believe is due to no warm water being discharged, so I believe the power station discharging into the river was actually helping the environment. I also caught a number of odd species for example Trout, grayling both of which require very clean water & goldfish.

Interesting that you caught goldfish! I've never caught one. My fishing these days is mainly pole fishing on the Grand Union Canal in South Leicester. I've caught some decent size bream, roach and tench from there.

I digress - I'll do some code updates tomorrow and report back. Cheers.
 
I digress - I'll do some code updates tomorrow and report back. Cheers.

Done the code updates and so far so good.
Although I've not tried it on the pump yet, I've just been doing some dry runs (pardon the pun) with the pump isolated. The pump coil Y2D4 is energising/deenergising as expected.

We will be doing another test later in the week and the the sump pump will be tested for real.
I've learnt a lot from you both.
Many thanks.
 

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,352
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,813
In this sample programming, what does U4 mean? Any assistance would be greatly appreciated.
Replies
8
Views
234
Hi, I have a project with a R04CPU, RD77GF16 and a RJ71PN92 modules. The cell is given to me to change the program since the previous integrator...
Replies
9
Views
269
Hi One of the PLC's that I maintain/update is a Mitsubishi Q-Series, probably installed about 10 years ago. At the moment, ALL the wires from...
Replies
13
Views
1,161
Back
Top Bottom