Sign in to follow this  
Followers 0
Mr JJ

HSC ML1200

12 posts in this topic

We are adding a plc onto a system that is all mechanical (cams, motors and etec.), We are going to put an encoder and plc (ML1200, internal HSC). The "zero" has to be offset every -72 deg. after 5 cycles it will be at its original "starting " zero. It is a in-line assembly system. The cycle linear distance is a 1.5" pitch vs. the 1.2" radial motion, the only shaft that we have to drive the Encoder / HSC. There is no 1:1 In Line linear / circular shaft motion. What would be the best way to accomplish this. Can the "zero" positon of the HSC be offset (reset to zero) from a discreate Limit Ss., or would it be better to go through the PLC/HSC software. And after each index progression the "zero offsets (reset to zero) -72 degs. Thank you in advance for your help John Edited by Mr JJ

Share this post


Link to post
Share on other sites
I would recommend avoiding resetting the HSC accumulator regularly while the system is in motion. You are better off to set up the counter so that it resets itself. Resetting the HSC from PLC code can result in missed pulses which could accumulate and end up being a big error over time. I am not sure I exactly follow why you would need to reset the HSC, other than to initialize it after doing maintenance. Even if the encoder is not attached to the main drive shaft and at an odd-ball ratio, you should be able to calculate how many encoder pulses per main shaft revolution you get, and set up your counter accordingly. I believe you can simply set the overflow and underflow values to the numbers you need so that it rolls over when the main shaft rolls over, regardless of the position of the shaft that is driving the encoder. That's the beauty of using a PLC with an encoder interface. You can program the PLC such that 9564 counts is exactly 3 feet of conveyor movement or 360 degrees of main camshaft rotation, or whatever else you want. Later on, you can decide that the enoder will do better at a different location, and change your scaling with ease. Doing it that way means that your ratio needs to be exact (whole encoder counts), and there's no slippage. If the number of counts with reference to the main shaft is not a whole number, or there is slippage, then I would recommend using a limit switch as a reset pulse rather than relying on PLC code to get you accurately back to zero. Hopefully I understood your question correctly Paul Edited by OkiePC

Share this post


Link to post
Share on other sites
Thanks Paul for your reply. My problen is that the HSC has to start its "starting zero" -72 degrees from its pervious starting zero. This will happen for 5 cycles, then starts its original starting zero. The cause being the shaft is an odd ratio to the linear motion. I want to use the HSC to shift a BSL and to activate 2 inspection windows in a cycle. I figure I either offset the "starting zero" or I have to use 5 different degrees to work the logic. Does that make sence Thanks again for your help John (Mr JJ) I would recommend avoiding resetting the HSC accumulator regularly while the system is in motion. You are better off to set up the counter so that it resets itself. Resetting the HSC from PLC code can result in missed pulses which could accumulate and end up being a big error over time. I am not sure I exactly follow why you would need to reset the HSC, other than to initialize it after doing maintenance. Even if the encoder is not attached to the main drive shaft and at an odd-ball ratio, you should be able to calculate how many encoder pulses per main shaft revolution you get, and set up your counter accordingly. I believe you can simply set the overflow and underflow values to the numbers you need so that it rolls over when the main shaft rolls over, regardless of the position of the shaft that is driving the encoder. That's the beauty of using a PLC with an encoder interface. You can program the PLC such that 9564 counts is exactly 3 feet of conveyor movement or 360 degrees of main camshaft rotation, or whatever else you want. Later on, you can decide that the enoder will do better at a different location, and change your scaling with ease. Doing it that way means that your ratio needs to be exact (whole encoder counts), and there's no slippage. If the number of counts with reference to the main shaft is not a whole number, or there is slippage, then I would recommend using a limit switch as a reset pulse rather than relying on PLC code to get you accurately back to zero. Hopefully I understood your question correctly Paul

Share this post


Link to post
Share on other sites
I'm confused. If we start at machine zero and count zero (forget the number of revolutions of the encoder for now - just concentrate on counts from the encoder) and we go just one complete machine cycle how many counts have been received from the encoder?

Share this post


Link to post
Share on other sites
Its not the number of count is, whatever the encoder is ( 360 counts , or 100 counts or whatever I choose) The issue is the starting point, or the zero, The shaft does not stop at the same position, it stop minus 72 degrees after each single cycle hence I have to start it at at that different position So Im looking to offset or reset the HSC to start my counts at zero. John

Share this post


Link to post
Share on other sites
What Bernie and I are trying to explain, is that the counts in the PLC can roll over where ever you want them to, regardless of the position of the shaft to which the encoder is attached. So, you shouldn't have to mess with offseting the numbers, you should be able to just program your HSC function file to roll over at the correct point, and end up with zero being referenced to your main process. Perhaps we need some pictures to better undersand each other. Later, I will try to come up with some illustrations. EDIT: Maybe the picture will help? Edited by OkiePC

Share this post


Link to post
Share on other sites
Okie (and bernie), Yes , I am confused, Havent work with endoers with this type of problem. The illstration is correct. So when you mean rollover , when its reaches the software overflow count , it will automaticilly rollover to zero? and that rollover count would be the number of count on the encoder ( in your ill, its 720 but the roll over would be 575) That count (575) would be placed in the Overflow value in the HSC parameters? thank you again for your help and patience Mr JJ The problem Im trying figure this out and dont have any hardware to play with

Share this post


Link to post
Share on other sites
Yes, that always increases the challenge! Edited by OkiePC

Share this post


Link to post
Share on other sites
I think I'm following you there John. Many times there is not an absolute "home", it could be because of some type of slippage or it could just be part of the process. I don't know how far you have got into learning about the HSC functioin file but look at the following file. It is an example of the basics of a HSC in the MIcrologix 1200. While not documented, the HSC is set to a mode of 7 in this application so inputs 0+1 are your A+B pulses off of your encoder, input 2 would reset the counter, and 3 would hold the counter's current position. So if you connect your crank sensor to input 2 the HSC value would reset every time it sees it. Just make sure you don't use input 3 for anything, your counter will not count if it is true since it is configured to hold the value in this setup. http://forums.mrplc.com/index.php?showtopic=17265&st=0&p=83165&hl=twcontrols&fromsearch=1entry83165 Hope that helps TW

Share this post


Link to post
Share on other sites
Thanks TW and all you guys for your help and patience, I think I got it now. Now how do I get my wife to stop with the honeydo lists? Thanks agian John

Share this post


Link to post
Share on other sites
Start doing things before she thinks of them :)

Share this post


Link to post
Share on other sites
Or just do them WRONG! I got fired from laundry duty when I was married, just for shrinking a couple of sweaters! But this advice comes from a guy who's been divorced...twice...

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