fishenguy

fishenguy

Member
Join Date
Nov 2007
Location
WESTERN PA
Posts
125
I'm new here and am in desperate need of help. I'm trying to write a program for a micrologic 1000 using a highspeed counter. I don't know how to incorporate it into the ladder logic to make it work. The prox swith has to count the teeth of a sprocket while it's spinning and latch a binary bit after counting 36 teeth. At the same time it has to reset and count 36 teeth again, and so on. Any help in this would be greatly appreciated. Thanks:confused:
 
Greetings fishenguy ...

and welcome to the forum ...

see if this gets you started ...

hsc_1.JPG



if this doesn't do what you had in mind, please post again and give us more details ...

also ... you didn't tell us WHEN you want to reset that "latched" bit ... post again if you need help with that end of things ...
 
Ron, Thanks for the reply. I'm just now leaving for work. I'll give this a try and get back to you. I'm going to use the latch bit to also start a timer wich will control the latch time,about .2 sec. Thanks again, fishenguy
 
Lancie1, I knew where to attatch the prox leads, but I didn't know about any jumpers. I'll look that up when I get to work. Thanks for the input. I'll get back to you soon. fishenguy
 
Ron, I installed that line of logic and it worked perfectly. I sat and watched the pnumatic valve switch back and forth from the two outputs I had in the program. I was amazed that the answer was so simple.When I talked to the rockwell tech, he wanted me to write in a high speed interupt and all other kinds of things that I really didn't understand.
So thanks I apreciate the help.
Now I have another problem.
While I was watching the input from the prox at 0/0 I noticed that every once in a while it would skip a beat. It din't come at any regular interval. So I can't fault the teeth on the sprocket.
I'm wondering if my prox switch might not be fast enough. It's an AB rated at 1000 hz switching frequency. I did some calculating and found that I'm trying to count 13.5 teeth per second. I don't know if 1000 hz is fast enough or should I go to a faster 3000 hz prox switch?
Thanks for any insight. Dave
 
At 13.5 teeth/second, you're looking at 75 hz switching frequency. The prox is plenty fast enough to pick up that signal.

Are you sure you've got everything aligned properly?
Can you turn the sprocket at a lower rate to check the system out at a speed you can see?
 
CroCop, I'm pretty sure it's properly aligned. I did mark my teeth with a paint pen and ran the machine at a slower speed. Every time those two teeth came to the prox switch my output would light up. So I know it wasn't miscounting. The only other thing I can think of is I may have it wired wrong. The prox is an NPN, but now that I think about it, at the PLC I have it wired as a PNP, I think. I have the brown wire on 24v+ and the blue wire on 24v- and a jumper going from 24v+ to the common on the input. Would that make it randomly skip a beat or two?
 
Messing up a sink/source will make the sensor not sense at all. Randomly says to me that the parts aren't aligned right, or perhaps the sprocket teeth are in front of the sensor for too short a time.
 
That was why I went to using the high speed counter in my plc program. Would it make a difference that I'm using a large (18mm) prox. Maybe a smaller (4mm) would be better? The sensing distance for the 18mm is quite large. I can't remember off hand. Maybe I should move it closer and put a feeler guage in between to set it at about .020 inches from the teeth?
 
.020 would work out nicely as long as you have no possibility of the sprocket ever coming loose and hitting the prox switch. I work in plastics blow molding and we have extruder screws that the speed is measured in the same way you are discussing. The gap between prox and sprocket is roughly .25 inches and it works out fine.
 
If this sprocket ever came loose I would have more to worry about than a prox switch. I'm going to try moving it closer tommorow. Thanks for all the inputs and I'll let you know how it works out. Goodnight
 
Also have a look at the filter time for input zero. The default is 8 seconds. You may need to adjust it down. Look under IO configuration--Filter Adjust. Regards Alan
 
While I was watching the input from the prox at 0/0 I noticed that every once in a while it would skip a beat. It din't come at any regular interval. So I can't fault the teeth on the sprocket.


Perhaps you can temporarily or permanently set up a second prox and plc to compare with and verify that they are equally counting. If the counts were different either stop the equiptment or sound/send an alarm. This may be a little overkill, depending on how redundant you need to be.

By the way, years ago I thought I was having the same problem, but I didn't. It turns out that the computer I was using just wasn't updating the video monitor fast enough. The input was there and the counter I described would pick it up even if the monitor screen never displayed it.
 
I think you were on the right track back in post #10.

How big are the gear teeth compared to the size of the prox switch? An 18mm prox switch is quite a bit larger than what is usually used in applications like this. You may be sensing more than one tooth.

If you were to look at the signal from the prox with an oscilloscope, you might find that the off time is significantly shorter than the on time. Occasionally, the off time might not be long enough or the off-state voltage may not drop low enough to register as a transition. A smaller prox switch might improve things. Smaller diameter prox switches have shorter sensing distances, but you indicated you could mount the prox closer if necessary.
 
Back
Top Bottom