You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old November 8th, 2007, 10:19 AM   #1
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
fishenguy

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
  Reply With Quote
Old November 8th, 2007, 12:10 PM   #2
Ron Beaufort
Lifetime Supporting Member
United States

Ron Beaufort is offline
 
Ron Beaufort's Avatar
 
Join Date: Jul 2002
Location: Charleston, SC
Posts: 5,698
Greetings fishenguy ...

and welcome to the forum ...

see if this gets you started ...




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 ...
__________________

2-B ?
Best regards, ----+----] [----+------------( )----
Ron | |
PLC Boot Camp - Retired | 2-B |
+----]/[----+

I once was lost, but now am found, was blind, but now I see.

  Reply With Quote
Old November 8th, 2007, 12:27 PM   #3
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
Smile

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
  Reply With Quote
Old November 8th, 2007, 12:32 PM   #4
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
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
  Reply With Quote
Old November 8th, 2007, 12:38 PM   #5
Lancie1
Lifetime Supporting Member
United States

Lancie1 is offline
 
Lancie1's Avatar
 
Join Date: Jul 2003
Location: Alabama
Posts: 9,999
Ron says the Micro 1000 is different, so it may not have a jumper.
  Reply With Quote
Old November 9th, 2007, 12:02 AM   #6
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
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
  Reply With Quote
Old November 9th, 2007, 12:07 AM   #7
CroCop
Member
United States

CroCop is offline
 
Join Date: Aug 2005
Location: Utah
Posts: 1,050
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?
  Reply With Quote
Old November 9th, 2007, 12:21 AM   #8
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
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?
  Reply With Quote
Old November 9th, 2007, 12:29 AM   #9
CroCop
Member
United States

CroCop is offline
 
Join Date: Aug 2005
Location: Utah
Posts: 1,050
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.
  Reply With Quote
Old November 9th, 2007, 12:46 AM   #10
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
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?
  Reply With Quote
Old November 9th, 2007, 01:07 AM   #11
armchair
Member
United States

armchair is offline
 
Join Date: Oct 2006
Location: Illinois
Posts: 12
.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.
  Reply With Quote
Old November 9th, 2007, 01:36 AM   #12
fishenguy
Member
United States

fishenguy is offline
 
fishenguy's Avatar
 
Join Date: Nov 2007
Location: WESTERN PA
Posts: 125
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
  Reply With Quote
Old November 9th, 2007, 04:34 AM   #13
Alan Case
Lifetime Supporting Member
Australia

Alan Case is offline
 
Alan Case's Avatar
 
Join Date: Apr 2002
Location: Wagga Wagga
Posts: 1,268
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
  Reply With Quote
Old November 9th, 2007, 09:52 AM   #14
jrwb4gbm
Lifetime Supporting Member
United States

jrwb4gbm is offline
 
Join Date: Apr 2002
Location: NC
Posts: 2,245
Quote:

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.
  Reply With Quote
Old November 9th, 2007, 10:06 AM   #15
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 8,242
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:07 PM.


.