Host Engineering Forum
General Category => General Discussion => Topic started by: scottsutton on August 12, 2019, 12:47:34 PM
-
I am using the AXFOLLOW instruction to sync a servo puncher to a product coming down a conveyor belt. The conveyor belt has an encoder on it and is configured as the Master Axis. The product has a target position where the punch occurs and 90% of the time the target is very accurate. However, once in a while the part gets molded slightly off causing the punch location to have to move on the part. The puncher servo is in continuous motion once it starts to punch a new part and it uses the Gear Ratio Multiplier to space the punches correctly.
I can sense when punch target moves slightly and I would like to send an offset location into the slave axis while its in motion to correct the punch location. Is that what the offset function does in the AXFOLLOW command? If so, does it offset the Master Register location so the slave updates?
Please explain.
Thank you,
Scott Sutton
-
This is indeed what the Offset Position is for. You set the Offset Position and then turn the Goto Offset Signal on. The thing you must remember is, if you are using the AXFOLLOW instruction, it is a requirement that your following axis be faster than your Master Register. In other words, that axis must have a faster Maximum Velocity and Accel/Decel rates. Otherwise, it cannot go to the offset you tell it to go to.
To answer your question, no it does not offset the Master Register location at all; that remains exactly what it is. It merely offsets its own CurrentPosition.
-
Greg,
Thank you!
A couple of more details if you will.
1. Do I apply the offset once and with the goto offset bit? Or, do I hold the bit on while the offset is in place and removing the bit returns to the Slave to the non-offset position?
2. Can I use a D register for the offset value and can I use a negative or position offset value?
Thanks again, this will lower our current scrap rate by a significant margin!
Scott
-
Greg,
Thank you!
A couple of more details if you will.
1. Do I apply the offset once and with the goto offset bit? Or, do I hold the bit on while the offset is in place and removing the bit returns to the Slave to the non-offset position?
2. Can I use a D register for the offset value and can I use a negative or position offset value?
Thanks again, this will lower our current scrap rate by a significant margin!
Scott
Set the relative offset and velocity, then set the Goto Offset bit. When the axis is at the new offset, the instruction will clear the bit.
Offset value can be negative or positive.
-
Is there an example program using the AXFOLLOW with an offset available to look at? I am not getting the expected results when I use this feature. The slave axis bogs down with either a positive or negative offset. Even as small as 1 step of offset. I am setting the goto bit and letting the AXFOLLOW reset it as instructed. Also, my excel/decel and maximum velocity on the slave are more than adequate to gain-lose steps to meet the offset target.
Thanks,
Scott
-
Is there an example program using the AXFOLLOW with an offset available to look at? I am not getting the expected results when I use this feature. The slave axis bogs down with either a positive or negative offset. Even as small as 1 step of offset. I am setting the goto bit and letting the AXFOLLOW reset it as instructed. Also, my excel/decel and maximum velocity on the slave are more than adequate to gain-lose steps to meet the offset target.
Thanks,
Scott
Please define "bogs down".
What is the accel/decel/max velocity settings of the master?
What is the accel/devel/max velocity settings of the slave?
What is your offset velocity set to?
What velocity is the master running at?
Is the master velocity changing at the time you adjust the slave?
-
...and what is the scale factor between the master and slave?
-
Bogs down: The slave slows way down no matter what the offset is set to
What is the accel/decel/max velocity settings of the master?
The Master is an encoder input on X0 ($BeltPulsesPerf) configured as an up counter
It operates at 1600 pulses per second at max speed
What is the accel/devel/max velocity settings of the slave?
Max Velocity = 250000
Accel = 900000000
Decel = 900000000
What is your offset velocity set to?
0
Is the master velocity changing at the time you adjust the slave?
no
Gear Ratio
-8.4
-
-8.4
Is this the gear ratio, and did you see my previous post?
Not sure how I feel about a negative gear ratio or whether it was even tested and should be allowed.
-
Yes, Ratio. No, did not see at first. See Reply above
-
The Negative Ratio is to reverse the direction of the slave. I could modify the servo config and set for positive if this is the issue.
Thanks
-
The Negative Ratio is to reverse the direction of the slave. I could modify the servo config and set for positive if this is the issue.
Thanks
I'm not sure if the negative is a problem or not.
The offset velocity must be set to a non-zero value. That defines the max relative velocity between the master and slave. I'm following a car down the road...it's the master, I'm the slave. If I want to pass, I have to go faster than him. The offset velocity is how much faster than the master that the slave is allowed to go to get to the new offset.
-
The offset velocity must be set to a non-zero value
Direct from the help file on the AXFOLLOW instruction:
Relative Offset Velocity is the additional velocity the Follower Axis will use when moving to the Relative Offset Position. This value specifies how much faster ( in pulses / second) the Follower Axis can move than the Master Axis when attempting to move to the Relative Offset Position. A value of 0 will cause the Follower Axis to move at the Axis's maximum Velocity to get to the specified offset position. This value can be any constant between 0 and 250,000 or any numeric location containing a value in that range.
-
The offset velocity must be set to a non-zero value
Direct from the help file on the AXFOLLOW instruction:
Relative Offset Velocity is the additional velocity the Follower Axis will use when moving to the Relative Offset Position. This value specifies how much faster ( in pulses / second) the Follower Axis can move than the Master Axis when attempting to move to the Relative Offset Position. A value of 0 will cause the Follower Axis to move at the Axis's maximum Velocity to get to the specified offset position. This value can be any constant between 0 and 250,000 or any numeric location containing a value in that range.
My bad. I've slept since that work was done.
The issue may be due to the negative ratio. I'll have one of the guys here check that out. I do not remember explicitly testing that so it may well be breaking some math.
-
Ok Thanks,
Once working correctly this will help us tremendously!
-
Ok Thanks,
Once working correctly this will help us tremendously!
We've done a bit of testing and the negative ratio is working fine for us. I really didn't know any specific reason it would fail, but some of the following math is tricky and I don't personally remember testing it, although others probably did.
I glossed over the fact that your master was a counter input rather than another axis. That's another wrinkle, especially at lower speeds. Did you specify a filter on the master?
-
Maybe this:
If I could write an offset to the Master Counter this would accomplish the same thing:
$BeltPulsesPerf.Acc = $BeltPulsesPerf.Acc -100
$BeltPulsesPerf.Acc = $BeltPulsesPerf.Acc +100
I tried and could not gain access to the register for manipulation.
-
You can already do that.
You can write whatever value you want the $BeltPulsesPerf.Acc to be into $BeltPulsesPerf.ResetValue, and then use the $BeltPulsesPerf.ResetEdge bit to set it to whatever you want whenever you want (e.g. on the fly). I'm not sure why you want to do this as I believe you can solve your following and offset issues without doing this, but, I just thought I'd mention this.
-
Actually, this would be the register that I would want to access on the fly and modify. This is the Reg that the slave is following, not the Acc. Is this possible?
$BeltPulsesPerf.CurrentPosition = $BeltPulsesPerf.CurrentPosition - X
$BeltPulsesPerf.CurrentPosition = $BeltPulsesPerf.CurrentPosition +X
-
Actually, this would be the register that I would want to access on the fly and modify. This is the Reg that the slave is following, not the Acc. Is this possible?
$BeltPulsesPerf.CurrentPosition = $BeltPulsesPerf.CurrentPosition - X
$BeltPulsesPerf.CurrentPosition = $BeltPulsesPerf.CurrentPosition +X
Then you just need to use AXFOLLOW. It's working fine for us. Are you sure there isn't something else going on with yours?
-
So you have verified on your end that the Master can be a counter instead of an axis?
The docs say this can be.
Scott
-
So you have verified on your end that the Master can be a counter instead of an axis?
The docs say this can be.
Scott
Yes.
-
So you have verified on your end that the Master can be a counter instead of an axis?
The docs say this can be.
Scott
Absolutely. The only question I had was whether the gear ratio could be negative, and it can. We tested settings close to yours with no issues.
-
Just now getting back to this after several days of successful implementation of the AXFOLLOW instruction. Two things that I discovered and I wanted to share.
First, setting a value of zero in the RELATIVE OFFSET VELOCITY causes the offset not to work at all in my setup. Maybe BC I am using a negative gear ratio? Per the Help File, setting it to zero will cause the Follower axis to move at it's maximum velocity to achieve the offset position.
So, instead of setting it to zero I set it at the slave axis maximum velocity (23500 in my case) too see if a setting of zero did in fact set the velocity to the maximum rate. After that the axis would react wildly. It would overshoot and then stall and have very erratic motion. It did not dawn on me that the correction velocity is the RELATIVE velocity even though it states it plainly.
Once I realized what I had done wrong and I set the offset velocity to 1500 the system stabilized and is working exactly like I desire. Our scrap rate went down dramatically!
I am a huge fan of the BRX line of PLCs! Being able to do relatively complex motion control within the PLC environment is a giant plus in my book. Thanks for all the new development in this line of PLCs!
Scott
-
Glad it's working! Not sure why the zero offset velocity is bad, but like you said, it could be due to the negative ratio. We'll confirm that and see it anything needs fixing.
-
Did a bit more testing and everything appears to be working as expected. I'm inclined to believe that the faster maximum velocity you are getting with zero is causing you issues somehow. By limiting to 1500, you are avoiding that.
-
But I thought that number was a delta from the master max velocity to the offset move velocity? Wouldn't the 1500 be faster?
-
But I thought that number was a delta from the master max velocity to the offset move velocity? Wouldn't the 1500 be faster?
Zero means move as fast as the slave axis will allow, SlaveMaxVel - MasterVel. 1500 means MasterVel + 1500.
-
Ah OK, it's a delta from the master current velocity, not the master max velocity, I hadn't caught that (and also the fact that there's a special interpretation for 0 value independent of master axis velocity)