Amplifier enabled when moving MPG but not when running G Code

Moderators: TomKerekes, dynomotion

Post Reply
Harman
Posts: 2
Joined: Thu Jul 05, 2018 10:19 pm

Amplifier enabled when moving MPG but not when running G Code

Post by Harman » Fri Jul 06, 2018 3:57 pm

Hello!

I hear nothing but good things about Dynomotion products and both forum!

Amplifier is disabled after no activity. MPG will enable amplifier when disabled. If Amplifier has been disabled after no activity and I try to run G-Code, the amplifier does not become enabled thus giving a G-Code error, "Axis Disabled". I tried moving the timer to other areas of the code and then I have problems with my MPG. What am I doing wrong?


Thanks for your assistance!

Jerry
You do not have the required permissions to view the files attached to this post.

User avatar
TomKerekes
Posts: 111
Joined: Mon Dec 04, 2017 1:49 am

Re: Amplifier enabled when moving MPG but not when running G Code

Post by TomKerekes » Fri Jul 06, 2018 4:33 pm

Hi Jerry,

I don't see anything wrong with your program.

Whether or not the Amplifier is enabled should not cause that error. There are two separate things: Enable/Disable of the KStep Amplifier (Bit45) and Enable/Disable of the KFLOP Axes (ch0,ch1,ch2,ch3).

Having the Amplifier disabled should not cause that error. It would just cause the motors to not move. Because I believe your system is an open loop system it wouldn't normally know that the system is not moving. Does your system have some means to know the motors are not moving correctly?

To get that error a KFLOP Axis channel would need to be disabled. The only place I see the Axes are disabled is if the code receives an ESTOP signal (IO 1050 low).

Please provide more details on what is occurring. Are the Axes enabled before you attempt to run the GCode (all 4 DRO's Green)?

You might add a print statement such as:

printf("ESTOP Button Detected\n");

inside the Handle ESTOP Button "if" condition to determine if this is somehow occurring.
Regards,

Tom Kerekes
Dynomotion, Inc.

Harman
Posts: 2
Joined: Thu Jul 05, 2018 10:19 pm

Re: Amplifier enabled when moving MPG but not when running G Code

Post by Harman » Fri Jul 06, 2018 5:19 pm

Hi Tom,

Thanks so much for your prompt reply and your assistance!

You said the key words ("There are two separate things..." which got my attention. The problem was solve doing the following as it was not necessary.

//{
// DoPC(PC_COMM_ESTOP);
// SetBit(45);
// if (ch0->Enable) DisableAxis(0); // axis still enabled? - Disable it
// if (ch1->Enable) DisableAxis(1); // axis still enabled? - Disable it
// if (ch2->Enable) DisableAxis(2); // axis still enabled? - Disable it
// if (ch3->Enable) DisableAxis(3); // axis still enabled? - Disable it
// if (ch4->Enable) DisableAxis(4); // axis still enabled? - Disable it
//}

Harman

Post Reply