Delaying motion enable after machine-on

More
14 Jun 2018 19:13 #112372 by bevins

I am not really following this thread but, with delaying motion enable after machine is on, why don't you just enable the drives with a relay and when the machine is turned on run a timer and then energize the drive enable relay? This can be done in classic ladder pretty easy.

Let me think..... With the leading edge trigger of Motion-is-on fire a timer with an output to energize after the timer of 6 seconds or so.
That output will be linked to drive enable relay. Have that output latched and in series with the latch put the trailing edge of motion-is-on contact so when the machine is turned off or e-stop condition, the drives will be disabled.

That way you cant jog or home until after the time period. If you do try to jog it will throw a joint error.

Is this what you were looking for?


I either misunderstand your reply, or it doesn't work as I need it to. The start-up sequencing is as follows:

1. Machine physical switch on, power to Mesa card & PC power on/boot up
2. Operator gives "control on" signal through physical switch (previously UI). Power is connected to drives through e-stop relay.
(delay 2 seconds)
3. Drives are enabled
(delay 8 seconds)
4. Z-axis brake is released, as all drives are assumed to have control over movement now but aren't yet commutated
5. Wait until all drive "Commutation Complete" signals are true (could be 10-20 seconds)
6. Allow jogging and homing

Thus, I can't delay drive enable because they need to be enabled to commutate. Once the drives are enabled using the standard Axis GUI buttons, there is an assumption that they are ready to be moved - which is not true in this case.

I'm not in favour of allowing a cryptic error message to be shown to a layman operator if the situation can be more gracefully handled ahead of time. The same goes for a sign/message that says "Wait 30 seconds before homing machine". Good luck with that one.

I believe my problem will be resolved by using hardware only buttons and a custom GUI. All of my troubles would go away if I could select a different motor/drive combination but the gods aren't taking pity on me today.


OH, I see your delay is for motor commutation. Yeah, that won't work.

Please Log in or Create an account to join the conversation.

More
15 Jun 2018 04:01 #112390 by Sparky961

So are you expected to code and run blind? There's no way to debug, see variables, set breakpoints, and step through code?


I think that there are ways. But I have never figured them out (most of my LinuxCNC is kernel-module driver work, you can't typically breakpoint them anyway).

The problem I have found with any debugger built in to an IDE in the context of LinuxCNC is that you can't really tell the IDE how to start LinuxCNC and run the program you are editing.


I stumbled upon instructions for setting up remote debugging while researching another topic. I haven't yet tried it myself, but for anyone else who was wondering you can check out the following link:

linuxcnc.org/docs/html/remap/remap.html#...embedded_python_code

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum