News:

  • June 09, 2026, 11:14:44 PM

Login with username, password and session length

Author Topic: AXFOLLOW instruction with offset  (Read 40962 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: AXFOLLOW instruction with offset
« Reply #15 on: August 13, 2019, 12:04:55 PM »
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?

"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

scottsutton

  • Full Member
  • ***
  • Posts: 46
Re: AXFOLLOW instruction with offset
« Reply #16 on: August 14, 2019, 06:11:30 AM »
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.




Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: AXFOLLOW instruction with offset
« Reply #17 on: August 14, 2019, 10:20:12 AM »
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.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

scottsutton

  • Full Member
  • ***
  • Posts: 46
Re: AXFOLLOW instruction with offset
« Reply #18 on: August 14, 2019, 02:22:55 PM »
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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: AXFOLLOW instruction with offset
« Reply #19 on: August 14, 2019, 02:31:43 PM »
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?
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

scottsutton

  • Full Member
  • ***
  • Posts: 46
Re: AXFOLLOW instruction with offset
« Reply #20 on: August 14, 2019, 04:16:16 PM »
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

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: AXFOLLOW instruction with offset
« Reply #21 on: August 14, 2019, 04:25:06 PM »
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.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: AXFOLLOW instruction with offset
« Reply #22 on: August 14, 2019, 04:26:40 PM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

scottsutton

  • Full Member
  • ***
  • Posts: 46
Re: AXFOLLOW instruction with offset
« Reply #23 on: August 20, 2019, 06:40:13 AM »
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

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: AXFOLLOW instruction with offset
« Reply #24 on: August 20, 2019, 08:05:42 AM »
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.
« Last Edit: August 20, 2019, 10:11:41 AM by BobO »
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: AXFOLLOW instruction with offset
« Reply #25 on: August 20, 2019, 10:11:24 AM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: AXFOLLOW instruction with offset
« Reply #26 on: August 20, 2019, 11:22:45 AM »
But I thought that number was a delta from the master max velocity to the offset move velocity?  Wouldn't the 1500 be faster?
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6158
  • Yes Pinky, Do-more will control the world!
Re: AXFOLLOW instruction with offset
« Reply #27 on: August 20, 2019, 11:27:28 AM »
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.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3607
  • Darth Ladder
Re: AXFOLLOW instruction with offset
« Reply #28 on: August 20, 2019, 02:25:33 PM »
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)
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.