Hello Guest it is April 27, 2024, 08:27:42 AM

Author Topic: Problem with OB motor being truely OB  (Read 1014 times)

0 Members and 1 Guest are viewing this topic.

Problem with OB motor being truely OB
« on: October 13, 2023, 09:53:40 PM »
I wanted to be able to spin my A axis (my rotary motor) continuously and independent of Gcode for certain operations so I could run an end mil down the side and cleanly and quickly cut down the side of a turning blank with the side of an end mil.  This is much faster and cleaner cutting than running the tip back and fourth like the normal toolpath Vectric generates.

So I wrote a screen script (attached code) to unmap the A axis from Motor 4, and map the motor to OB1, and then start up the axis with a velocity jog using the direction and rpm selected in the screen.  The idea was to start the motor, then run a Gcode file (X, Y, Z only), and then when the Gcode is done, stop the motor, which re-instates it back to an A-axis condition.
I also wrote a macro m3000 attached to start the motor from a Gcode file, and another m3001 (attached) to stop it at the end of the Gcode.

The screen function works perfectly by itself, it starts and stops the axis smoothly, and when its stopped, i can run the A-axis normally again.

But I have a couple of odd things happening that I could use some pointers on:

1. Running a file rewind, either directly from the screen button or as an M30 Gcode, locks up the OB motor immediately.  An M2 at the end of a file does not do this so I think it is the built in rewind of the M30.
2. The m3001 macro intermittently creates a "clunk" in the rotary when it stops the jog, almost like it stops it immediatly instead of ramping down like it does when I run the screen script version.  It behaves the same when run from a Gcode file or MDI.   The screen and macro use the same functions, so this seems odd to me.

I am using an ESS board, and mach4 5125 and ESS 298.

Any ideas or pointers would be much appreciated.

thanks,
Jim