Hello Guest it is March 28, 2024, 11:02:28 AM

Author Topic: Mach 3: Programmatic change to config  (Read 5126 times)

0 Members and 1 Guest are viewing this topic.

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Mach 3: Programmatic change to config
« Reply #30 on: May 11, 2021, 12:46:26 PM »
I will have to start makikng a M6 macro for ATC carousel I am making. That will be quite a challenge  ;D

is soon your Hardware (Inputs/Outputs) is clear just start a new thread, and we will seen.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach 3: Programmatic change to config
« Reply #31 on: May 11, 2021, 01:11:24 PM »
I will have to start makikng a M6 macro for ATC carousel I am making. That will be quite a challenge  ;D

is soon your Hardware (Inputs/Outputs) is clear just start a new thread, and we will seen.

Sure I will. First I need to finish to machine all the motor mount to switch to servos on all the axis. Then it's the time for the ATC...exiting.
Re: Mach 3: Programmatic change to config
« Reply #32 on: May 11, 2021, 03:26:21 PM »
Hi,

Quote
try to rigid tapping and in that case you trust the good closed loop system from the servo to don't keep up with Z and do not loose power. Is it correct?

Yes, the closed loop applies to the servo and servo drive. You signal the drive where you want the servo to be and the servo/servo drive takes itself
there. In some respects its like an open loop stepper, you signal a certain number of steps in a given direction and the stepper drive drives
the stepper to that location....assuming no loss of steps. A servo has feedback so that it is much more certain of arriving at the commanded location,
and if it can't for any reason it will fault 'following error' and alarm out.

You could signal the drive, one pulse = one revolution, but it would be very coarse. All AC servos have the principle of electronic gearing.
It allows that you can signal the drive at one rate, say 1324 pulse per rev, but the servo encoder is 10,000 pulse per rev. Electronic gearing allows
very great flexibility in application of a servo.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 3: Programmatic change to config
« Reply #33 on: May 11, 2021, 04:52:08 PM »
Quote
You could signal the drive, one pulse = one revolution, but it would be very coarse. All AC servos have the principle of electronic gearing.
It allows that you can signal the drive at one rate, say 1324 pulse per rev, but the servo encoder is 10,000 pulse per rev. Electronic gearing allows
very great flexibility in application of a servo.

Craig

Does it mean that you can actually "try" rigid tapping with using this principle without a spindle index input (1 pulse /rev)? Just with the SERVO encoder? That would be really interesting.
Re: Mach 3: Programmatic change to config
« Reply #34 on: May 11, 2021, 07:37:08 PM »
Hi,

Quote
Just with the SERVO encoder? That would be really interesting

Yes, that is exactly how my C axis works.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 3: Programmatic change to config
« Reply #35 on: May 12, 2021, 07:05:00 AM »
Hi,

Quote
Just with the SERVO encoder? That would be really interesting

Yes, that is exactly how my C axis works.

Craig

Amazing, so that can also be attempt with my current USS after I have the AC servo installed. IS there a good thread talking about axis swap and how to achieve it? If I think at Mahc3 I guess you will have to assign same step and dir pins and port to spindle and C axis (C axis set it as angular axis). Then the rest is handled in the gcode. But maybe I am missing something.

My AC servo is 2500 count *4=10000 pulse/rev. What a good electronic gear ration I can use? I was thinking at 2000 pulse/rev

Thanks
Re: Mach 3: Programmatic change to config
« Reply #36 on: May 12, 2021, 12:34:34 PM »
Quote
If I think at Mahc3 I guess you will have to assign same step and dir pins and port to spindle and C axis (C axis set it as angular axis)

Sorry, I meant you assign new step and dir pins for the C axis, but you connect them to the same pins used to control the spindle during milling on the AC servo drives.
Re: Mach 3: Programmatic change to config
« Reply #37 on: May 12, 2021, 04:48:20 PM »
Hi,
You may have to do a hardware swap, rather like the probe problem. Whether that is required is determined by the control
modes offered by the servo rather than any limitation in Mcah3.


Most of the time my AC servo runs as in velocity mode with a 0-10V PWM input, easy. My Allen Bradley servo has dual mode,
so by asserting one digital input to the drive it changes from analogue velocity mode to step/direction position mode.
Thus when I want to do a C-axis  move during a job I call a macro that asserts the change-over pin, then write Gcode
of the form:

G1 C3600 Z-10

which results in the Caxis (spindle) doing 10 revolutions while the Z axis descends 10mm for a 1mm pitch helical interpolation move.

Once the Caxis move is complete I can run another macro to de-assert the changeover pin and the spindle goes back to analogue velocity
mode with PWM input. This all happens without any intervention on my part while running the Gcode program.

Note that this dual-mode option is pretty much standard across all modern AC servos. My new Delta B2 series servos for my new build have that feature
as well. I imagine your spindle servo will have the same feature, although I have not read the manual closely enough to be sure.

If your spindle servo has that feature you can swap between the two modes WITHOUT having to switch any wiring. If it does not have that feature
then you will have to do some sort of hardware switch.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 3: Programmatic change to config
« Reply #38 on: May 12, 2021, 05:49:18 PM »
Quote
Most of the time my AC servo runs as in velocity mode with a 0-10V PWM input, easy. My Allen Bradley servo has dual mode,
so by asserting one digital input to the drive it changes from analogue velocity mode to step/direction position mode.
Thus when I want to do a C-axis  move during a job I call a macro that asserts the change-over pin, then write Gcode
of the form:

G1 C3600 Z-10

which results in the Caxis (spindle) doing 10 revolutions while the Z axis descends 10mm for a 1mm pitch helical interpolation move.

Once the Caxis move is complete I can run another macro to de-assert the changeover pin and the spindle goes back to analogue velocity
mode with PWM input. This all happens without any intervention on my part while running the Gcode program.

Ah ok makes sense. I went through the manual. This is a Chinese Servo. They seems decent enough for my application. Model is Ac Servo 220V 110ST-M06030. I have attached the manual but indeed there is a dual mode function. Need to see how to define the pins. Would you mind to post the 2 macros that you use? I guess then I will need to modify the post processor to output those before and after rigid tapping, but that's not a problem.

Thank you!
Re: Mach 3: Programmatic change to config
« Reply #39 on: May 12, 2021, 06:50:34 PM »
Hi,

Quote
Would you mind to post the 2 macros that you use?

My macros are no good to you because they are written in Lua for Mach4.

They are simple though, one macro asserts an output high, and the other de-asserts that output.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'