Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Garyhlucas on March 22, 2022, 02:59:44 PM

Title: Location of motion blocks
Post by: Garyhlucas 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?
Title: Re: Location of motion blocks
Post by: Controls Guy 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?
Title: Re: Location of motion blocks
Post by: BobO 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.
Title: Re: Location of motion blocks
Post by: Garyhlucas on March 23, 2022, 01:42:43 PM
I have a 10 second delay timer before exiting. I thought surely that would be enough.
Title: Re: Location of motion blocks
Post by: Greg 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.
Title: Re: Location of motion blocks
Post by: franji1 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
Title: Re: Location of motion blocks
Post by: BobO 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.
Title: Re: Location of motion blocks
Post by: Garyhlucas 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!
Title: Re: Location of motion blocks
Post by: Greg 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:
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.
Title: Re: Location of motion blocks
Post by: Garyhlucas 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!
Title: Re: Location of motion blocks
Post by: Greg 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.
Title: Re: Location of motion blocks
Post by: BobO 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.
Title: Re: Location of motion blocks
Post by: Garyhlucas 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.