Hello Guest it is December 26, 2024, 06:38:48 PM

Author Topic: Help controlling a stepper motor as a lowRPM spindle  (Read 28068 times)

0 Members and 1 Guest are viewing this topic.

Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #20 on: August 25, 2012, 11:34:21 AM »
Yes it is the A axis.
Not sure how to get the xml file, I will have to do it on Monday as I am only working until 11:30 (16:30 your time). I will grab what I can and send it then.

Thanks Hood, Barry.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #21 on: August 25, 2012, 01:34:34 PM »
Open Mach and lower right you should see the name of the profile you are using.
Go to your Mach3 folder and find a file of that name with a xml extension. Copy it to your desktop and rename it to Bazzer.xml then use the additional options button on the reply page to attach it.
Hood

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #22 on: August 26, 2012, 03:41:26 AM »
Was messing with something else for myself and thought about this post. The macro I posted earlier wouldnt work properly, code wouldnt wait until it was finished but this should work, the trigger for the macro doing what you want would be the Cycle Start Led, also the sleep dropped my CPU % from 40% down to 0-1%. (I thought the sleeps were automatic now but not in the version I am using iot would seem)

If GetOemLED(804) Then
Do
  ActivateSignal (OutPut1)
 If IsActive (Input1) Then Exit  Do
 Sleep 10
  Loop
  DeActivateSignal(OutPut1)
   Code "G91G0A60"
  While IsMoving()
  Wend
 Code"G90"
End If

Hood
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #23 on: August 27, 2012, 07:45:01 AM »
Hi Hood, thanks for that macro. I have attached the xml file for my laser.
Barry.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #24 on: August 27, 2012, 08:35:43 AM »
Are you using the parallel port or an external controller?
If you are using the parallel port then your motors are tuned to fast for the kernel, you will have to increase the kernel. Do that and restart Mach and see if you still have the issue.
BTW you have the A set as rotational.
Hood
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #25 on: August 27, 2012, 09:47:45 AM »
After a little playing around (still not right) I found the following.

When I am using axis A as linear:
Plus and minus positions are displayed when I jog plus and minus (correct).
From a minus position it moves positive to 0 when I send it to zero (correct).
From a positive position, it moves positive, gaining speed, and stops at +360 (not correct)

When I am using axis A as Angular:
From 0 position the count goes positive when I jog plus (correct).
From 0 position the count starts from positive 360 counting down.

Something I notice on the screen is that the box to the right of the position display never moves from 'RADIUS CORRECT'. Should it change to 'SCALE +1.000' like the other axis XYZ?
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #26 on: August 27, 2012, 10:46:38 AM »
Trying again with the right xml file.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #27 on: August 27, 2012, 01:54:40 PM »
Seems to be working fine here with your xml
I opened the jog screen (tab key) and jogged 4th and it acted like it should, constant speed and went past 360.

Hood
« Last Edit: August 27, 2012, 01:58:06 PM by Hood »
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #28 on: August 27, 2012, 02:24:59 PM »
I used my hotkeys to jog, fine in both directions. It's when I send the axis to zero I hit the problems, from a minus position it goes to zero fine. From a plus position it wants to run away at speed to plus 360  ???

Barry.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
Re: Help controlling a stepper motor as a lowRPM spindle
« Reply #29 on: August 27, 2012, 03:04:27 PM »
Ok go to General Config and uncheck Rotational Rollover.
Hood