Hello Guest it is March 28, 2024, 11:31:26 AM

Author Topic: Setting Motor Counts Per Unit in macro  (Read 8063 times)

0 Members and 1 Guest are viewing this topic.

Offline Mauri

*
  •  328 328
    • View Profile
Re: Setting Motor Counts Per Unit in macro
« Reply #20 on: January 13, 2018, 06:49:07 PM »
Craig,
I think I was typing my note at the same time as you.
Regards,
Mauri.

Offline Mauri

*
  •  328 328
    • View Profile
Re: Setting Motor Counts Per Unit in macro
« Reply #21 on: January 13, 2018, 06:51:07 PM »
Craig,
Am I supposed to enter the LUA Syntax somewhere?
rc = mc.mcSpindleSetCommandRPM(
      number mInst,
      number RPM)
Regards,
Mauri.
Re: Setting Motor Counts Per Unit in macro
« Reply #22 on: January 13, 2018, 06:54:01 PM »
Hi,
your spindle is now your A axis. Hook your stepper to the Step/Dir signals for motor6.

That is how the API is described in the Docs. Look at how its used in the code I posted.

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

Offline Mauri

*
  •  328 328
    • View Profile
Re: Setting Motor Counts Per Unit in macro
« Reply #23 on: January 13, 2018, 06:56:13 PM »
Craig,
So what happens to my normal spindle that my cutter is on, will it be affected by this code?
Regards,
Mauri.
Re: Setting Motor Counts Per Unit in macro
« Reply #24 on: January 14, 2018, 12:31:46 AM »
Hi,
as far as I can work out Mach4 allows only one spindle. You have to choose between your regular spindle or an A axis (spindle). Given that the API's are for a spindle
I would suggest that the A axis be the controlled spindle and your regular spindle can still be controlled as an out of band axis but won't have the API's available.

Must confess that I'm quite familiar with coordinated axes but unfamiliar with out of band axes. Learning what controls are available for out of band axes is new
to me.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting Motor Counts Per Unit in macro
« Reply #25 on: January 14, 2018, 08:36:56 AM »
Hi Tony,
as far as I know Mach3 and Mach4 handle rollover the same...see attached.

Craig

Yes they both have rollover properties but M4 does not have an axis designation checkbox (angular properties) that M3 has

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Setting Motor Counts Per Unit in macro
« Reply #26 on: January 14, 2018, 12:15:03 PM »
Standard convention dictates that A,B and C are rotational axis. No need to have a check box to tell you that. If there was a check box, one option or the other would break standard convention. Mach 3 did not have true slaves or out of band axis.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Setting Motor Counts Per Unit in macro
« Reply #27 on: January 14, 2018, 03:22:53 PM »
Hi,
have found a couple of APIs that allow you to set an out of band axis as spindle on the fly. Would allow you
to switch between your main spindle and your A axis spindle at will.
mc.AxisGetSpindle
mc.AxisSetSpindle

Have not found any means to control an out of band axis other than that....yet. Hoping some Mach4 gurus will chime
in.

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

Offline Mauri

*
  •  328 328
    • View Profile
Re: Setting Motor Counts Per Unit in macro
« Reply #28 on: January 14, 2018, 04:50:46 PM »
Craig,
That sounds more promising, as the other method just will not work for me.
I do not want to go back and control my main spindle manually.
My test would not allow the MPG to work on the A Axis and I could not see how Homing or Limits would work.
So unless a Mach4 Guru or the Mach4 programmer comes up with a solution that will allow all the proper functions to operate with A Axis and the Spindle and provide a way to make the A Axis using the Z Axis to change its speed, I will stay with Mach3 on our Router Table and not bother with the 4th Axis on our Mill.
May be before I hit the bucket someone will do this for us all.
Thanks Craig.
Regards,
Mauri.
Re: Setting Motor Counts Per Unit in macro
« Reply #29 on: January 14, 2018, 05:13:51 PM »
Hi,
when I say control the spindle manually I was thinking that it could be turned on and off and speed controlled
from Mach but it would not have the spindle API suite to go with it.

Assuming we could get the main spindle to work in acceptable fashion that would mean that the A axis would be
your spindle with the spindle API suite. It is not clear to me how an MPG would work although I note that all the
out of band axes has jog control. I would guess that its possible.

Limits on a free running A axis don't make sense. Do you have rotational limits on a spindle? A home or index signal
do make sense. Even an out of band axis can be rotated to a given angle. Whether an A axis which is the current spindle
could in addition be indexed is a question I can only guess at.

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