Fast Pulse Counter, Micro850

PLC Pie Guy

Member
Join Date
Jun 2013
Location
Halifax
Posts
1,144
Good Morning Folks.

I'm having a bit of an issue with a machine and I'm looking for opinions on something.

I have a beam that is moved with a hydraulic cylinder. On the beam is 53 segments that are 14 MM in width and 14 MM between them.

While the beam travels back and fourth, a proximity switch is looking for these segments.

Prox swith is 2-3mm distance with 10000HZ switching. SICK IME08-02BPSZW2K

The prox. goes to Input.0 on My Micro850.

Its always counts 53. However, every once in a while I will loose a pulse or two at a slower speed, but once I ramp up, I'm loosing like 10 to 12 pulses per move.

Just by using a timer to see how long it takes to make 1 full directional, at speed stroke, is about 633ms. So for my math I will use 600ms just for a safety buffer.


So If its 600MS for 53 Pulses = 11.3 MS between rising edges and should be on for about 5.66MS

My Max scan is 4MS, average is 2MS.

All this scan speed, high speed stuff is not my forte. I do some basic positioning with encoders, Iv used them on the Micro850 and with Logix stuff. Missing positions or pulses Isn't something Iv encountered. Usually I see this pulse counting set up on slower machines.

My question is, Do you think I can make this reliable, or should I find another way to do this? This is on my log harvester mounted on an excavator and lives in the worst of environment, which is why I figure an encoder would not last a day. Id really like to get this to work 100%.

I have used the Input filtering on the Micro850 while connected to an encoder, do you think it might be beneficial in this situation? If so, how would you configure it?

The choices are

-Enable Latch Rising or Falling and Ell Edge, Rising or Falling.


I'm going to experiment with this some on Saturday but I was hoping to be armed with as much knowledge about this as possible.

Thanks for any advice in advance!
 
Last edited:
I know very little about the Micro 850 but I believe like many small PLC's you can use the first byte (8) of digital inputs (24v type) as high speed counter inputs, there are some special instructions you use to read high speeds I think up to 100Khz, Mitsubishi do this, the first 8 inputs are also tied to 8 hardware high speed counters, on this platform you just enable the high speed counter for that input & it will count up to 100khz, although the values are accessed during scan, it means that no pulses are missed so for example, the counter counts up in hardware, the accumulator variable is available in the user program to read the count, other functions like pre-set & reset can be done within the program.
I it also possible to use interrupts so when the input is triggered, it leaves the scan program and processes the program set in the interrupt.
I'm sure someone here with AB experience can guide you on this.
Could not see the programming manual on RW site but here is a link to the manual chapter 8 is about high speed counters & inputs
http://www.marketotomasyon.com/UserFiles/File/Allen_Bradley/PLC/Micro850/2080_um002_en_e.pdf
 
Last edited:
This is exactly what I have done, but with an encoder and using the HSC instructions. However, using a proximity switch on a single input, I'm not sure If the HSC counting instructions would apply to this. I'm curious if any have done it. I will be experimenting with on Saturday, however, my time is short there and I'm hoping to use it wisely. Perhaps Ill set this up on a a test bench later and see If I can use something like the Mode_0 instruction with one input. I have doubts though.
 
Last edited:
I believe it can be done as a single phase counter.
According to the manual, mode 0 or 1 of the HSC is a count up single counter mode 0 is it resets when it reaches pre-set or mode 1 is reset via a program in the plc code.
As I said earlier, I have used this on Mitsubishi both as a proximity as a single point count & an encoder, I have used a single count system on turbine flow meters, also on a drive shaft with a proximity & and a pegged wheel giving pulses every 3ms.
 
Last edited:
What size proximity switch are you trying to use? When you say "segments" are you talking about chain links? Can the segments move closer or further away from the prox during operation?

What I'm driving at is the possibility that it may not be an issue of speed of response, more an issue of signal quality.
 
What size proximity switch are you trying to use? When you say "segments" are you talking about chain links? Can the segments move closer or further away from the prox during operation?

What I'm driving at is the possibility that it may not be an issue of speed of response, more an issue of signal quality.

OK. Imagine a 4" square tube. Thick wall. It has smooth sides but one side has dimples in the metal that are about 4mm deep. The sensor is mounted in a round piece of machined plastic that is backed by a spring to push it hard against the steel boom and mounted in a sensor well. As the boom slides past the sensor mount, the sensor should see the dimples in the steel.
I have cleaned the smooth surface as I suspected that the old grease and dirt was pushing the sensor housing away from the steel face, but it didn't make a difference. Besides, the miscounts get worse with speed. Going slow, it rarely misses a pulse. Once the throttle comes up a bit to give the hydraulics some power, I start to loose them.

The whole square boom runs inside of a larger square tube and telescopes in and out by means of the hydraulic cylinder. As it pushed out its delimbing the tree, as it retracts, its measuring the log to be cut. While running slow, its super accurate, but you need the idle up in order to delimb the heavier stuff.

The switch is 8mm in diameter. the sensor surface is probably 7mm.
 
Should not be a problem, we had indexing conveyors with flat pegs on the chain, these fitted into a stainless guide so the indicator flags were only about 5mm wide, 1.5mm thick and lay against the stainless slide so the distance between the peg & slide was only about 1.5 - 2mm & we could get them to read every time. (the pegs were in place of one of the link "figure of eight links) so you can imagine that is like detecting a small piece of stainless 1.5mm thick on top of a sheet of stainless but the hysteresis of those small 8mm sensors are pretty small so trigger reliably.
As someone has pointed out check the input card configuration as it is usually set at about 10ms filter & can be altered to almost nothing, also set the HSC mode to 2 I think it is this just acts like a counter rather than an encoder.
 
A 14 mm diameter dimple that's 4mm deep. Since you're sensing dimples rather than holes the signal from the prox is not likely to look like a square wave on a scope. It's almost certainly on more than off. Maybe it's not staying off long enough or the voltage isn't dropping lower than the PLC input's off level. Any way you can increase the distance from the prox to the square boom with the dimples? Maybe the first step would be to hook a scope to the signal line and see what it looks like at speed.
 
A 14 mm diameter dimple that's 4mm deep. Since you're sensing dimples rather than holes the signal from the prox is not likely to look like a square wave on a scope. It's almost certainly on more than off. Maybe it's not staying off long enough or the voltage isn't dropping lower than the PLC input's off level. Any way you can increase the distance from the prox to the square boom with the dimples? Maybe the first step would be to hook a scope to the signal line and see what it looks like at speed.

I tried increasing the distance a bit but then I lost a lot of counts. Certainly the closer I can get the prox the better it works.

I would try a scope but I don't have access to one at this point in time. If I cant get it working in this manner (HSC) than I may have to go that route later.
 
I tried increasing the distance a bit but then I lost a lot of counts. Certainly the closer I can get the prox the better it works.
Kind of the opposite of what I expected, but I'm probably not interpreting your description of the setup correctly.

Can you fit a larger diameter prox in the available space? Larger diameter = longer sensing distance.
 
I think a larger prox will have a larger hysteresis (dome) and will probably be worse, I noticed the OP's comment that the filter time was only valid on HSC, I thought HSC is what is being used but as a standard i phase counter ? I think the OP needs to look at this or I/O interrupts, I doubt that using I/O as standard scan will work that well, & if the program size increases, so will the scan time.
 
I think a larger prox will have a larger hysteresis (dome) and will probably be worse, I noticed the OP's comment that the filter time was only valid on HSC, I thought HSC is what is being used but as a standard i phase counter ? I think the OP needs to look at this or I/O interrupts, I doubt that using I/O as standard scan will work that well, & if the program size increases, so will the scan time.

You are right.
Re-Reading my original post, I see now that I failed to mention that I am at this point using the Input to run a "CTUD" Instruction. Not a HSC instruction at all. In CCW the CTUD is Count Up Down. I have used it before on a similar set up for a couple other machines, but always slower speed than this machine.

I see now that my question should have been.. Do you think I'm expecting to much of the current configuration, with the Input to basic counter given my speeds? Will simply filtering make it faster, or do you think I would have to run this in a HSC manner, further to this, is it possible with a single Input as I have always done this with 4 channel encoders.

I had some time last night during my kids Taekwondo class to read on this. I think it will work. I'm going to steal some time this morning so I can figure out the wiring on my test bench. I'm just hoping I don't loose the ability to use other Inputs normally. On the configuration page for the Input filters, the selection applies to inputs 0 and 1 as a pair. I don't have a spare input to inherit the switch tied to Input 1 so I will need to make sure it operates normally, or get another plug in....

Thanks for the help.

Any advice is appreciated. My time is short when I finally do get the chance
to get to work on my own equipment, so experimenting is hard to find time for. I have folks for the mechanical stuff, but this... I managed to get 2 hours in Last Sunday evening but it got dark on me to fast, that's when I discovered I was missing pulses. If I can be left alone this AM for a bit Ill be well armed for the time I have planned there tomorrow.
 
I have had a look at the manual & it seems to suggest in mode 0 (or 1a what ever that is) it only uses the one input, there is a mention regarding being able to use the other inputs elsewhere but it is not clear, I suppose you will just have to play with it. The other possibility is to use an I/O interrupt, to run a block of code that adds a 1 to a variable, again it's not clear but it does appear you can select imbedded I/O as interrupts, again just use this to increment a variable, just ensure you set the filter to a small value.
 

Similar Topics

Objective : Once the inlet flow drops below the set point on the filter chamber it starts a cleaning sequences and flushes the filter with...
Replies
12
Views
5,004
Hello! I need to know how fast pulse I can get (without any special cards etc.) out of my Siemens 314-1AE02-0AB0? I think the SFB43 is not...
Replies
4
Views
2,097
Hi All, I've been playing with 2 stratix switches in my test bench and seeing how different configurations affect the behaviour when 2 managed...
Replies
3
Views
212
Dear all, Im using Allen Bradley Compact Logix L36ERM as a PLC. and facing a problem where I need to create a FIFO buffer that fills an...
Replies
5
Views
1,650
Dear Members; We have Fluke 754 hart communicator. We have wired up three transmitters of Rosemount Model C3051 with this input module. But when...
Replies
4
Views
1,834
Back
Top Bottom