LogixPro Division Operation

laurathyme

Member
Join Date
May 2013
Location
Minnesota
Posts
2
Hi, I'm entirely new to ladder logic and binary and PLCS.net so this will probably be a no brainer. I'm working on the LogixPro Silo Simulator and have all the bells and whistles figured out EXCEPT calculating the rate of material flowing out of the silo. I want to take an integer and divide it by the timer's accumulated value (which is larger than the integer).
In short, I want to divide to get a number smaller than one - is this possible in ladder logic?
Thanks for your input.
 
Welcome to PLCtalk.net!
I want to take an integer and divide it by the timer's accumulated value (which is larger than the integer). In short, I want to divide to get a number smaller than one - is this possible in ladder logic?
It is possible in ladder logic, but not easily done in the LogixPro Simulator program (which only has a partial set of the RSLogix full instruciton set. For example, LogixPro does not allow the "F" file type for Floating-Point numbers, so that it has no way to show or use a number with a decimal point. There is a way around that by first multiplying some or all of your numbers by some constant (say 10 or 100), then doing the allowed LogixPro integer division, and using the result (knowing that this result is a factor of 10 or 100 larger than the real number).

However, all the similar exercises that I have done involving a LogixPro material rate, I did not calculate Material per unit of Time, but instead Time per quantity of Material. Actually in most cases I simply used a Counter that counted 1 for every smallest T unit of time while material flowed, then used the Counter Accumulator Value from 0 (Box Empty) to 92 (Box Full). That way, I had a counter value that was proportional to the real material flow rate.

Here is an example (see attached picture) where I have set up two proportional values to the Silo material Box Level. Only one of these methods is needed (counter OR timer). The timer has only a fairly coarse unit of 0.1 second, the only LogixPro timer base available (RSLogix timers have 1, 0.01 and 0.001 time bases). But there is a smaller time increment available using the internal clock bit S:4/0.

This screen picture was made just after the Box Full sensor went ON. You can see that the box always gets full at an internal clock count of "93" (or rare times at "92"). However, if you use a timer, the box may get full on a time anywhere between "37" and "43". This means that the timer method cannot control as fine or with as much resolution as the internal clock-bit/counter method. Based on this one test, the S:4/0 clock bit is 4.3/93 = 0.04724 seconds, which is a much shorter time that the timer increment of 0.1 second.

Silo Simulator Proportional Level Controls.JPG
 
Last edited:

Similar Topics

SELECTED NEW FILE SELECTED PROCESSOR TYPE SELECTED I/O CONFIGURATIONS IM UNABLE TO CONFIGURE MY I/O’S. I HAVE A PAPER COPY OF A PROGRAM AND I...
Replies
0
Views
79
Good morning, I am currently working on the LogixPro Advanced Batch #2 Multiple Mode of Operation and got stuck very close to completion. Link...
Replies
3
Views
2,226
Hi folks, i'm pretty much new on this topic and i need some help with the dual compressor part 3 and 4, currently working on part 3 i cant make...
Replies
20
Views
5,091
Hi, I'm using LogixPro Simulator, and I'm experimenting with BSL. I know how BSL works, but what I am trying to do is access the value of an...
Replies
3
Views
1,394
Hello Gurus, I am working on the elevator exercise of LogixPro and my output on the subroutine is being energized without its flag being called...
Replies
4
Views
2,199
Back
Top Bottom