using the GREATER THAN command

Mas01

Member
Join Date
Oct 2020
Location
Leicester, England
Posts
1,105
Is it possible to compare a D value to a K (decimal) value?
e.g. D300 is the water temp. I want to set M11 (lamp) to TRUE when it is greater than 25 Celsius. Or does the K250 also need to be a D value in order for the greater-than to work?


|--[> K250 D300]----------------------------(M11)-|
 
It looks like you are using Mitsubishi? If so, you can do a comparison like you want. As I recall, you need to swap the K250 and D300 in order to check if D300 is greater than 250.
 
well according to divine knowledge you first tell in which plc you want this ? and also comparing is done via registers and mov commands mostly ...
 
It looks like you are using Mitsubishi? If so, you can do a comparison like you want. As I recall, you need to swap the K250 and D300 in order to check if D300 is greater than 250.
Yes, sorry, I should have said. It is indeed Mitsubishi. Thanks.
Ah yes, they should be the other way round, thus:


|--[> D300 K250 ]----------------------------(M11)-|
 
Last edited:
I know a little more of what I think you are trying to achieve, so at a stab I think you want to put a bit on when the temperature rises above a certain value to drive some pump or other equipment then turn it off when it gets below a certain temperature, correct me if I'm wrong.

-----[> Dxxx K225]------------(SET) // This is your bit so set it when above temperature


-----[ < Dxxx K100]------------(RST) //This resets the bit when it drops below a temperature
If your upper limit is say 22.5 (255) then the bit is on however, as soon as it drops to 22.4 the bit will go off and you will have the pump/control hunting
so you have two limits set the bit on the high limit 22.5 and reset it on 10.0 that way it will not hunt i.e. keep turning the equipment on/off
So you can set your limits of upper & lower temperatures.
 
I know a little more of what I think you are trying to achieve, so at a stab I think you want to put a bit on when the temperature rises above a certain value to drive some pump or other equipment then turn it off when it gets below a certain temperature, correct me if I'm wrong.

-----[> Dxxx K225]------------(SET) // This is your bit so set it when above temperature


-----[ < Dxxx K100]------------(RST) //This resets the bit when it drops below a temperature
If your upper limit is say 22.5 (255) then the bit is on however, as soon as it drops to 22.4 the bit will go off and you will have the pump/control hunting
so you have two limits set the bit on the high limit 22.5 and reset it on 10.0 that way it will not hunt i.e. keep turning the equipment on/off
So you can set your limits of upper & lower temperatures.

Thanks. It's the other way round actually...I want to set an alarm (lamp) and turn an equipment off when the water gets too hot. But I guess the principles of.your code is still applicable. Many thanks.
 
On another note, is it possible to directly drive a lamp From an X input parameter eg X201 which is coming into the PLC on a QX10 digital input module?
 
Mas01,
I'm reading your posts on this forum and massive help you obtained from Parky, and I think that you owe him at least good lunch and couple of beers. :)
I hope that you know how much cost Mitsubishi support in UK.
 
The inputs only draw a few milliamps so it will depend on what feeds it, so for example a proximity switch to an input probably be capable of driving 100ma so providing what ever is driving the input is capable of say 5ma plus the current required to illuminate the bulb then yes there should be no problem.
 

Similar Topics

Hi, I'm trying to use the IO Device Library (Product Versions) which is configured to work with the 1756-EN4TR & 1756-EN2TR but my system uses...
Replies
0
Views
40
Hello, As part of our project, we are using an M241 controller. This controller interfaces with an industrial computer and a router via a switch...
Replies
2
Views
74
I'm trying to write a data in Arduino using MODWR function block .I used the code I got from online for both PLC and Arduino. I made the wiring...
Replies
4
Views
84
Hey all, i have a panelview screen (image attached), with 4 items on it. Program 1, Program 2, ...3, ...4. The PLC i am using is a compactlogix...
Replies
5
Views
158
I am trying to set up a piece of equipment with a Horner HE-X4R. I'd like to use structured text and so far I'm just trying to get a basic On/off...
Replies
0
Views
67
Back
Top Bottom