Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: Steelbarz 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.
-
Here is an example of the orientate macro we're running on one of our mills.
-
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
-
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
-
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.