Math for the DL05

Join Date
Mar 2008
Location
Texas
Posts
60
I have an HMI device that allows more numbers or less than the limits I provide, For example, V2000 is the HMI input and on this HMI you can go Negative, Or Positive over the limit that you want in the final regester. Using this example I want to limit the HMI from going over the limits.(In this example 0-100.)

I Wrote the following code, And please correct me because I am guessing,

v2000 > k100----- LD v2000
wire connecting v2000 under it. is dec TA1
under that is OUT v2000

What I want is when the number makes a certin point the program keeps it there.
 
Last edited:
Correct me if I'm wrong but you don't want to go over 100 right.
V2000 > K100 LD K100
.............Out V2000


X0--------T1
.........V2000 not a K value

What ever value you enter into V2000 will be the timer time.
Is this what you are trying to do?
 
Last edited:
Many HMIs offer the ability for a numeric entry control to limit the entry between limits. However it doesn't hurt to have extra protection within the ladder itself, especially if a number outside the limits might trigger damage.

And yes the ladder is that simple - though I believe the equivalent inline comparison instruction in the DL05 is a 'Greater Than OR Equal To' instruction.
 
I know it has been many months since I posted this message. I found a way out of math. I multuplyed a number by 50 then divided it by 51. Then out to a v-number. Now I need to write a program using adding and subtracting. and cannot figure out how to get k-numbers to do math. Plc is a DL-05.
 
Some of the math commands do not allow a constant 'K' as an argument. There are ways around that. If it's a common constant (1) then assign that to a V register (LD K1, OUT V2000). Then in later math you can use that V register (LD V3000, SUB V2000, OUT V2500 - subtracts the previously stored '1' from the value in V3000 and stores the result to V2500).
 

Similar Topics

I've written a large program(300 rungs so far) and I am running into a problem with binary math. According to the DL05 manual DIVB and MULB says...
Replies
13
Views
3,467
I am a newby at programming but I have been able to get my analog inputs to display back to the operator interface. My question is......I have two...
Replies
10
Views
3,301
I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
389
This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,364
Hi all. First time programming a machine of this type. A center driven unwind feeding to a center driven rewind. No dancers or load cells, just...
Replies
37
Views
4,891
Back
Top Bottom