Hi,
yes that can be done, I'm not sure that you would call it the 'proper way' though.
Because Mach can reassign motors to axes on-the-fly programmatically what I suggest is that you have two
axes defined, one your regular OB1 axis and the other a C axis.
Using:
rc = mc.mcAxisMapMotor(
number mInst,
number axisId,
number motorId)
I believe you can assign your motor to each axis as required.
I would suggest you write two macros, m666,and m999 say.
m666 would assign your spindle motor to your OB1 axis, the normal operating condition. Thus m666 would need to be
included in all your Gcode jobs.
m999 would assign your spindle to the Caxis.
There may well be some complications that need to be worked through. For example the simple scheme I have sketched out would
require that the servo be step/direction in both modes with the same steps per rev in each mode. That data is stored in the ESS
and cannot, to my knowledge, be changed on the fly. I would suspect that the ESS would need to be power cycled to pick up
the fresh data.
What I did was to use two axes (OB and C) but with two permanently assigned motors. My OB axis is PWM and my C axis
is step/direction. When I wish to change mode I would have the ESS change a two pole relay and set an output for the
drive. I too use an AB3000 drive and I take advantage of the dual mode feature. In one mode (primary) its step/direction
and suitable as a C axis and the second mode its analogue velocity mode, all that is required is one digital input to the drive.
You've got to absolutely love modern AC servos!
You may recall I have just bought three 750W Delta B2 series servos for a new project and they have essentially the same
feature, namely dual mode operation with the application of just one input......so simple. I would guess that all new or recent
design servos would have the same feature or version of it. The competitive market requires that if one manufacturer does something
the others all do it too, just to keep up.
Craig