Hello Guest it is April 27, 2024, 04:03:51 PM

Author Topic: Script to Orientate Spindle  (Read 210 times)

0 Members and 1 Guest are viewing this topic.

Script to Orientate Spindle
« on: March 18, 2024, 11:57:04 AM »
Does anyone have simple code or a macro to orient a spindle to a certain position.  My axis has encoders and spindle index signals all working and Mach4 can see them.  I can accurately control the spindle to 1rpm

I have Mach4 and ESS/MB3 if it helps

I would like it to do something like this:
Rotate spindle CW at 10rpm and when the index signal is high stop (effectively 0 degrees) then rotate spindle 90 degrees and stop and lock the spindle.

GOOMBA

*
Re: Script to Orientate Spindle
« Reply #1 on: March 19, 2024, 09:10:02 AM »
Here is an example of the orientate macro we're running on one of our mills.
Re: Script to Orientate Spindle
« Reply #2 on: March 19, 2024, 02:32:41 PM »
Here is an example of the orientate macro we're running on one of our mills.

Thank you, That gave me the code to start and stop very helpful, but I still cant get it to stop on the index signal
Re: Script to Orientate Spindle
« Reply #4 on: March 22, 2024, 10:13:15 AM »
Check how we a servo on the spindle here:
https://www.cnc4pc.com/blog/post/configure-an-step-and-direction-servo-as-spindle-on-mach4-using-the-ethernet-smooth-stepper-and-c82

Thank you, that was last week's problem...lol just getting the spindle to work.  But now I am hoping to control the spindle so that I can position its orientation a set number degrees off the index mark.