News:

  • October 14, 2025, 01:33:31 AM

Login with username, password and session length

Author Topic: Location of motion blocks  (Read 3218 times)

Garyhlucas

  • Hero Member
  • *****
  • Posts: 412
Location of motion blocks
« on: March 22, 2022, 02:59:44 PM »
I am using a BRX for motion control and located AXJOG, AXPOSTRAP in a program called jog that I go in and out of. Also have AXPOSTRAP in other programs to move each axis in automation and enter and exit those programs as well.  I keep faulting the motion blocks.  I am starting to think that I should have a Motion program that contains all the motion blocks and stays on all the time. Then just enable a rung for say AXJOG and pass the needed variables. Is this the intended method of motion control?

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3601
  • Darth Ladder
Re: Location of motion blocks
« Reply #1 on: March 22, 2022, 09:11:25 PM »
Is there a chance that the containing programs are terminating before the motion is competed and the box done?
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: 6126
  • Yes Pinky, Do-more will control the world!
Re: Location of motion blocks
« Reply #2 on: March 22, 2022, 11:00:06 PM »
Is there a chance that the containing programs are terminating before the motion is competed and the box done?

Near 100%, I'd guess.
"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: 412
Re: Location of motion blocks
« Reply #3 on: March 23, 2022, 01:42:43 PM »
I have a 10 second delay timer before exiting. I thought surely that would be enough.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Location of motion blocks
« Reply #4 on: March 23, 2022, 02:16:10 PM »
I have a 10 second delay timer before exiting. I thought surely that would be enough.
Instead, wait until that particular instruction either gets a Success or Error indication. I commonly do motion utilizing Stages. But, I'm not doing real-world applications here in the office lab. So, your mileage may vary.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: Location of motion blocks
« Reply #5 on: March 23, 2022, 04:07:26 PM »
Instead, wait until that particular instruction either gets a Success or Error indication. I commonly do motion utilizing Stages. But, I'm not doing real-world applications here in the office lab. So, your mileage may vary.
On Success and On Error still support standard ladder "set bit" mechanisms for closing the loop on completion (vs. open loop with a timer).

AXJOG .... Set OnSuccessBit Set OnErrorBit

// EXIT upon completion of the AXJOG
STR OnSuccessBit
OR OnErrorBit
EXIT

No JMPs necessary

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Location of motion blocks
« Reply #6 on: March 23, 2022, 04:07:52 PM »
I have a 10 second delay timer before exiting. I thought surely that would be enough.

In general, you should never terminate a program block containing any instruction with Success/Error bits until it has completed and set the appropriate bit. For motion instructions, that will fault the axis. Remember that instructions like AXJOG don't complete until you drop the enable/reset leg.
"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: 412
Re: Location of motion blocks
« Reply #7 on: March 25, 2022, 08:15:17 AM »
I have a 10 second delay timer before exiting. I thought surely that would be enough.

In general, you should never terminate a program block containing any instruction with Success/Error bits until it has completed and set the appropriate bit. For motion instructions, that will fault the axis. Remember that instructions like AXJOG don't complete until you drop the enable/reset leg.

And that last line above is the answer I needed! AXPOSTRAP is no problem its AXJOG that was tripping me up.

I was struggling getting one servo to move smoothly. Finally found out I grabbed a 10k pullup resistor for the step input instead of the 2.2k it needed!

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Location of motion blocks
« Reply #8 on: March 25, 2022, 10:37:22 AM »
...AXPOSTRAP is no problem its AXJOG that was tripping me up...
This "mode" operation bites a few people from time-to-time. If you'd monitored AXJOG's "On Success" and "On Error" bits, you would've noticed that neither of them ever came ON, indicating it still had the Axis locked. Of the 12 Axis instructions, 5 of them are strictly modes, and 1 of them is selectable:
  • AXCAM (mode)
  • AXCONFIG (single operation)
  • AXFOLLOW (mode)
  • AXGEAR (mode)
  • AXHOME (single operation)
  • AXJOG (mode)
  • AXPOSSCRV (single operation)
  • AXPOSTRAP (selectable)
  • AXRSTFAULT (single operation)
  • AXSCRIPT (single operation)
  • AXSETPROP (single operation)
  • AXVEL (mode)
Roughly:
Mode = "On Success" indication turns ON after the input logic turns OFF
Single operation = "On Success" indication turns ON when the instruction completes after input logic has been enabled
Selectable = You can choose. AXPOSTRAP allows multiple moves (mode), or a single move (single operation).

Please read the Help file for each instruction to completely understand the difference and the behavior of each. What I listed is a very rough summary.

A comparable list exists for the instructions for CTRIO2 modules in a 205 or Terminator Do-more CPU.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

Garyhlucas

  • Hero Member
  • *****
  • Posts: 412
Re: Location of motion blocks
« Reply #9 on: March 25, 2022, 01:25:43 PM »
I always love when someone says ?please read? because I am one of the few people that actually read the manuals.  However somewhere in the 647 page Yaskawa manual, the 350 page VFD manual, the 997 page BRX manual, and 172 page WEG VFD manual on this one project, I occasionally miss a couple things.  Hence why I ask here!

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Location of motion blocks
« Reply #10 on: March 25, 2022, 01:36:32 PM »
I always love when someone says ?please read?...
That was not directed at you as the cause of your problem.  ;D  lol... I'm the same way. I'm one of those people who actually read manuals. Please don't hesitate to ask here even if the answer is in the manual buried in the 1000s of pages. Or, like when I used to work for Siemens, the manual accidentally gave you the answer while talking about something else! With regards to the AXJOG thingy, I was hoping perhaps we had a clearer indication that would be useful if you just pulled that instruction up and plopped it down in ladders... you know, like a colored triangle thing we use, or perhaps in the textual name of the instruction. But we're not consistently indicating "mode" VS "single operation." It is indeed buried in the description in the Help file.

Some of the textual descriptions of the instructions actually say "mode," but if you don't practically know what "mode" means, that's of no use either.

So, sorry, I didn't mean for you to take that as an insult.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6126
  • Yes Pinky, Do-more will control the world!
Re: Location of motion blocks
« Reply #11 on: March 25, 2022, 01:37:42 PM »
I always love when someone says ?please read? because I am one of the few people that actually read the manuals.  However somewhere in the 647 page Yaskawa manual, the 350 page VFD manual, the 997 page BRX manual, and 172 page WEG VFD manual on this one project, I occasionally miss a couple things.  Hence why I ask here!

I'm mean like that.  ;) Greg, not so much.
"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: 412
Re: Location of motion blocks
« Reply #12 on: March 25, 2022, 06:50:37 PM »
Didn?t take it as an insult.  In fact I often wonder if I waste too much time researching a problem on my own instead of asking help.  I learn a lot while pulling my hair out though.