News:

  • September 26, 2026, 08:39:59 AM

Login with username, password and session length

Author Topic: Understanding BRX motion control  (Read 9841 times)

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Understanding BRX motion control
« on: March 12, 2021, 08:01:03 AM »
I am struggling a bit using motion control on the BRX which I think is because I don't quite understand it.  This is for a 2 axis drilling machine, the X axis is about 60" and the Z is about 4".  Simple motion, move in X, drill in Z, repeat for about 30 moves.  I have a Jog program block that works perfectly, it moves both X and Z continuously or intermittently in discrete step sizes using relative moves.  However when I go to run the main program I make an X and Z clearance movement to the first hole using absolute mode.  Z completes but the X stops every time at the same distance which is short of the target.  The Trapezoidal move block shows it is active but motion stops short.  I have alarms for attempts to execute code beyond the travel distance but they are not being triggered.

The Axis Config is done in a program that runs once and then exits.  The code for the Z move is in a program that is called by the main program and exits if successful after every move.  The code for the X axis in a program for X that is called and exits if successful as well.  In each of those programs there is the required math to apply tool offsets and convert inches of motion to pulses that are output. All moves are in absolute mode.

I am testing with a couple of stepper motors on my desk so I haven't been homing the axis as there aren't any limit switches connected to test the Home function which is also in its own program block.  I am thinking the home function is very important to using absolute mode and maybe that is where the problem lies.   It all seems so simple but clearly I am missing something important!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Understanding BRX motion control
« Reply #1 on: March 12, 2021, 09:45:53 AM »
I am struggling a bit using motion control on the BRX which I think is because I don't quite understand it.  This is for a 2 axis drilling machine, the X axis is about 60" and the Z is about 4".  Simple motion, move in X, drill in Z, repeat for about 30 moves.  I have a Jog program block that works perfectly, it moves both X and Z continuously or intermittently in discrete step sizes using relative moves.  However when I go to run the main program I make an X and Z clearance movement to the first hole using absolute mode.  Z completes but the X stops every time at the same distance which is short of the target.  The Trapezoidal move block shows it is active but motion stops short.  I have alarms for attempts to execute code beyond the travel distance but they are not being triggered.

The Axis Config is done in a program that runs once and then exits.  The code for the Z move is in a program that is called by the main program and exits if successful after every move.  The code for the X axis in a program for X that is called and exits if successful as well.  In each of those programs there is the required math to apply tool offsets and convert inches of motion to pulses that are output. All moves are in absolute mode.

I am testing with a couple of stepper motors on my desk so I haven't been homing the axis as there aren't any limit switches connected to test the Home function which is also in its own program block.  I am thinking the home function is very important to using absolute mode and maybe that is where the problem lies.   It all seems so simple but clearly I am missing something important!

When you say the move is active but it stops short, is the Success bit turning on when it stops?
"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

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Understanding BRX motion control
« Reply #2 on: March 12, 2021, 12:44:08 PM »
...I am testing with a couple of stepper motors on my desk so I haven't been homing the axis as there aren't any limit switches connected to test the Home function which is also in its own program block.  I am thinking the home function is very important to using absolute mode and maybe that is where the problem lies...
If the physical home position is not the same as the .CurrentPosition = 0, then, yes, homing can be very important. But if they are the same, then what you have described should work. The Success bit comes ON for the completion of the AXPOSTRAP which should be also when the .AtPosition bit comes ON.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: Understanding BRX motion control
« Reply #3 on: March 12, 2021, 08:10:07 PM »
The success bit has not been turning on. I rigged up some wiring to properly trigger the homing function and I believe that has solved the problem. Won?t be sure until I fix some other things that I?ve discovered.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6176
  • Yes Pinky, Do-more will control the world!
Re: Understanding BRX motion control
« Reply #4 on: March 13, 2021, 10:23:29 AM »
If the success bit of a single move trapezoid isn?t coming on, that suggests other 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

Garyhlucas

  • Hero Member
  • *****
  • Posts: 421
Re: Understanding BRX motion control
« Reply #5 on: March 17, 2021, 10:45:47 AM »
Just wanted to report I got it all working and the problems were not with the motion control blocks but with other code generating the data for the moves.  Also I needed to reset the done bit after the moves because it prevented the next move from happening.  So I am very pleased with how it is all working now.