Sign in to follow this  
Followers 0
MIKE31

PLC AB PROCESSORS 5/02 5/02

6 posts in this topic

HI How to count or totalize an event up to 999999 in AB slc 500 and to view it on HMI panel view 500 and higher . sorry for typing error it should be 5/02 and higher processors Thanks for advice and suggestion Edited by MIKE31

Share this post


Link to post
Share on other sites
A classic A-B controller conundrum. You're probably familiar with A-B's 16-bit signed Integer data elements. These allow you to use 15 bits of data plus one sign bit to represent integer numbers between -32768 and +32767. This weakness is exactly the reason that ControlLogix controllers use 32-bit data elements. The new MicroLogix 1200/1500 controllers have a Long Integer data type that allows them to use 32-bit signed integers too. But when you're using SLC-500 or PLC-5, you are stuck with that limitation. To count to 999,999 the easiest thing to do is to use two cascading counters: One counts only 1's, and the other counts 1000's. Your first counter will have a preset of 1000. Every time it's Done (C5:0.DN, for example) bit comes on, that bit should trigger a second counter with a preset of 1000. You can display both counters side-by-side in your HMI. There are other ways to beat the 32767 limit, but I'll leave those up to other Forum members. Edited by Ken Roach

Share this post


Link to post
Share on other sites
Hi Ken, I wonder if you see any drawback with the following method. Do all calculation and counting in the float, and then copy the float to an integer register e.g. copy F9:10 to N10:10 (length 2). When displaying on the panel view use the integer address but declare it as Float/Real. e.g. display N10:10 as a counter on panel view. I have done this method in the past and it worked.

Share this post


Link to post
Share on other sites
HI If one word of integer file is max 32767 and sign bit then how can you have larger than 32767 using N file .Floating point file not allowed on AB 5/02 processor and Panel view is also used to indicate this number at any time when needed. If you know the way please let me know thanks Edited by MIKE31

Share this post


Link to post
Share on other sites
thank KEN I had same probelm new is OK.

Share this post


Link to post
Share on other sites
The problem (apart from not being available on the 5/02) is resolution. FP may be OK for 6 digits or less, but beyond that the result is an approximation. To display the big number, create two 3-digit display fields side-by-side showing the contents of the two counters. Left-justify the low order and right-justify the high order. Adjust background, spacing, etc to make it look like one display.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0