counting above 32767 ML1500

robw53

Member
Join Date
Nov 2009
Location
south yorks
Posts
515
i am working on a project for counting boxes or plastic trays coming down two decline conveyors, as it stands the system knows if it is a cardboard box or a plastic tray as the operators need to switch between the two as box's go into one line and when running trays they go to another line, at the moment there are two counters for each decline this is going to be replaced with a PV600 on DH485 back to the exisiting ML1500 using an AIC, the task is to detect the difference between a tray which is empty and a tray that is full and count a full tray but not count an empty tray, i am going to have a sensor to detect the presence of a box/tray and then a sensor only active on trays looking down into the tray to detect full trays only, also sometimes two box's may come down together so i am going to use a TON and calculate the length of the box in milliseconds so i can detect multiple box's and use the TON DN bit to increase the counter by one, the bit im a little unsure of is the best way to count upto say 9,999,999 or even 99,999,999 and display this on the HMI?

help please, and if anyone can see a flaw in my sensor theory please do raise it

cheers

Rob
 
The reason for the limitation of 32767 is due to the integer files and timer/counter acc's being signed integers i.e. the most significant bit is used as the sign bit, you can get around this by using the floating point stores (F8:0 etc) these are 32 bit stores giving you 2^32 approx 4.2 billion

Steve
 
cheers steve, i knew about what was limiting me with the integer, i didnt relaise the floating point would count up that high.

everyday's a school day

Rob
 
a little help with the DH485 wiring if anyone can shed any light, the two screens are in seperate locations from the processor, one been around 20m away and the other about 22m away in the opposite direction, the NET-AIC would i be able to use just the one connected to the processor and daisey chain with belden to either screen or am i missing something vital here, i have only done devicenet and ethernet never DH485 so any other bonus knowledge would be greatful

Rob
 
The reason for the limitation of 32767 is due to the integer files and timer/counter acc's being signed integers i.e. the most significant bit is used as the sign bit, you can get around this by using the floating point stores (F8:0 etc) these are 32 bit stores giving you 2^32 approx 4.2 billion

Steve

Not quite. The 32 bit floating point number only has 23 bits of significand. With the 'Hidden bit', that gives 24 bits of precision, or a bit more then 16.77 million counts before adding 1 results in no change.
 
cheers for the explanation 16 million is more than enough and i can just rest it after it hits 16 million.

still some help with the comms needed if anyone can advice me
 
I stand corrected, I've never actually used values that high before and made an assumption (to Assume is to make an *** of U and ME), you are correct of course.

Steve

Oops it don't like the front end of Assume
 
The ML1500 can address Long Integer files as well. 32 Bit Integers rather than 16 Bit Integers. Which gives you more than the Float. You just need to create a new data file and make in an "L" type. It's not one of the default data file types created in a new project.
 
a shift manager at an old plant i worked at used the same saying, and cheers tharon i didnt know you could do long integers, i will give it a go tonight

rob

comms help still needed if anyone could be so kind
 
Do the PVs have RS485? The DH485 protocol can run on RS232C and RS485. You'll want to check that your PV's aren't just RS232c. Otherwise you may need more AICs.

And yes, if RS485 then daisy chaining like you said will be fine. Just don't forget your terminting resistors.
 
its a 2711-T6C3L1 which has an RS232 as a printer port and the two seperate ports for DH485

You should be in good shape then! Since the PLC is in the middle you should probably make that the center node on your network and just terminate at both panelviews. That way you don't have parallel cables running.
 
Just skip the floating point resolution headaches. Use the L data type. You'll be happier and Bubba will be happier.

If you want to dive into the ins and outs of the problems of counting large numbers with floats then search the forum for IEEE 754. You'll find dozens of threads that dive into the nitty gritty innards of floats. (I was just helping out the Boss's son on an IEEE 754 float problem for a program he was writing for school)
 
whats the best way to connect either the RJ45 DH485 on the screen or the other port on the screen to the NET-AIC over that distance as i crnt get a premade cable that long that goes from the 5 pin pheonix plug on the NET-AIC to the screen.
 

Similar Topics

Hello I am looking for tips on how to count the duration of a given function and then how to display it on the hmi panel in the hh:mm:ss format...
Replies
4
Views
1,699
Guys, I know it will be silly but can't get my head around it. I have 3 conveyors, every one on a separate servo drive, and 2...
Replies
25
Views
3,496
The 1734-IB8 has no hardware counting function correct? I am trying to find something to substitute in for a 5069-IB16F (since lead times are...
Replies
3
Views
1,412
Been scratching my head at what I thought should be a relatively simple task. I need to count how many rows a .csv file has, so I can later read...
Replies
6
Views
2,540
Hi All, I need to count my Contactor switching times. There are lots of them so I created a template logic with local variables in FC2000. Now I...
Replies
10
Views
2,115
Back
Top Bottom