Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Lost Tourist on May 14, 2008, 03:32:46 AM

Title: GRex Spindle Step/Dir setup
Post by: Lost Tourist on May 14, 2008, 03:32:46 AM
Hello everyone,

I am working my way through a CNC lathe upgrade (the controls were nearly pre-DOS) and i am using the GRex and Mach3 to run things and i have most of it worked out however i can't work out how to set up the spindle in Mach. I have the X and Z axis working fine but i can't work out how to move the spindle.

The spindle is setup to run through a G320 the same as the other axes (The G320 happily holds it's position as expected with no spindle signal sent), i can't find a setting to tell the Grex which output channel (A,B or C) the spindle is on. In the spindle setup tab i have the step/dir enabled in the motor control group, In the motor outputs tab i have tried with just the spindle enabled, with just the axis the spindle is wired on enabled (A initally but i even rewired it to C after thinking i remembered reading this was important somewhere) and with both of these on.


Can anyone tell me what i'm doing wrong?

Thanks

Lost Tourist
Title: Re: GRex Spindle Step/Dir setup
Post by: jimpinder on May 14, 2008, 03:56:50 AM
You seem to be saying that you are running your spindle with a stepper motor or similar - requiring step and direction pulses.

The spindle does not share a channel - it has it's own output, which can be configured just like an axis.

If you look under Config/Ports and Pins/Motor Outputs, the bottom line is for the Spindle, which you can configure to the pins/output port etc you are using.

As you say, you can then set Step/Dir option in the Spindle Setup page.
Title: Re: GRex Spindle Step/Dir setup
Post by: Chaoticone on May 14, 2008, 07:09:13 AM
Lost, I see what your saying. This is a good one. I will be thinking about this. At present I think you will have to do some VB magic to pull it off but I just woke up.  ;D

Have you looked at the guide? I know it doesn't cover this but might be good for some hints.  http://www.machsupport.com/docs/G100_Set_Up_Guide_Rev.1_9-19-07.pdf

Brett
Title: Re: GRex Spindle Step/Dir setup
Post by: jimpinder on May 15, 2008, 03:05:15 AM
Brett - I will leave this one to you, having just browsed through the G100 set up notes. That's the trouble with hard wiring !!!
Title: Re: GRex Spindle Step/Dir setup
Post by: jimpinder on May 16, 2008, 06:38:40 AM
Three things came to mind.

1. I don't think the first is feasable - run the spindle step/dir through two of the other 16 output pins - I dont think it will be fast enough.
2. There must be an allocation table somewhere, to allocate the info from Mach 3 to the Ethernet transmitter. Can you not swap the allocation of say, axis C with the  step/dir of the Spindle Output.
3. Will Mach 3 run a second port when running the Ethernet. You would only need three wires to run a drive for the Spindle. I would hard wire this to a printer type lead and run it seperately.
Title: Re: GRex Spindle Step/Dir setup
Post by: Lost Tourist on May 20, 2008, 01:32:53 AM
Thanks for your thoughts so far. It's good to know I wasn't just overlooking something obvious.

I'm kind of hoping the solution is more number 2 than any of the others. I assume no one has tried this before?

Lost Tourist
Title: Re: GRex Spindle Step/Dir setup
Post by: jimpinder on May 20, 2008, 03:56:12 AM
Yes - There must be, to allocate the outputs to fixed outputs - unfortunately I am not privvy to that information.
Perhaps Brett can come up with something.
Title: Re: GRex Spindle Step/Dir setup
Post by: Chaoticone on May 20, 2008, 07:18:03 AM
Dang guys, I'm sorry. I forgot about this one. Let me look at a couple of things. Please bump this topic if I don't post to it in a day or two.

Brett
Title: Re: GRex Spindle Step/Dir setup
Post by: ART on May 20, 2008, 08:05:47 AM
Hi Guys:

  To use a step/dir spindle in a G100, turn on all axis in config/ports&pins except the C axis , and restart the program. The spindle will now be
the C axis. Set the port and pin of the C axis for the spindle output. Shoudl work fine then..

Art
Title: Re: GRex Spindle Step/Dir setup
Post by: Chaoticone on May 20, 2008, 08:34:15 AM
Lost, please let me know how this works out. I will add this info. to the setup guide.

Brett
Title: Re: GRex Spindle Step/Dir setup
Post by: Lost Tourist on May 22, 2008, 04:06:54 AM
Thanks guys for your help,

I understood everything but "Set the port and pin of the C axis for the spindle output" I'm not sure how this works with the G100 which only uses the step and dir ports rather than pins.

So i did everything else you suggested which has made a lot of progress. I have set X,Y,Z,A,B,S axes and now the spindle responds to M03 commands and stops when the onscreen controls are used. However one problem still remains which is i cannot tune the spindle as any changes made on the motor tuning screen for the spindle are not saved or flashed successfully. (this is kind of important as the accel is set too high at the moment). All the other axes (X and Z) can be tuned fine.
Also the onscreen display can't see the encoder (which i really couldn't care less about) but the spindle autocal can't see the encoder either which i can probably live without as well if i can tune the motor)

Any ideas on this?

Lost Tourist
Title: Re: GRex Spindle Step/Dir setup
Post by: Lost Tourist on June 09, 2008, 08:08:58 PM
Just wondering if you guys have had any ideas on why i can't tune the spindle. I can step the speed up in steps of 100 to any speed but i can't start go to a high speed in a single command instead i need to g-code it to step up to the running speed.

Thanks for you help.

Lost Tourist
Title: Re: GRex Spindle Step/Dir setup
Post by: ART on June 09, 2008, 08:44:00 PM
Hi:

  Been awhile, but as I recall the C axis should respon to the accel settings and the velocity settings , COMBINED with the setting of the pulley maximum.
SO in yours, the speed seems OK, its just the accel thats the issue?

Art
Title: Re: GRex Spindle Step/Dir setup
Post by: Lost Tourist on June 09, 2008, 09:11:32 PM
Remember that i have C disabled (and all the others enabled as previously instructed) so i can't tune C.

The speed is fine, it's just the accel is too high so it trips the G320.

By the way, where do i set the temporary address as permanent as the constant searching restarting is driving my insane.

Lost Tourist
Title: Re: GRex Spindle Step/Dir setup
Post by: ART on June 09, 2008, 10:04:05 PM
Hi:

 Sorry about that, your right, it shoudl be the spindle axis that you tune in motor config.. Does that do nothing? If not, Ill check the plugin code for you to see what it may be..

Art
Title: Re: GRex Spindle Step/Dir setup
Post by: Lost Tourist on June 10, 2008, 03:06:18 AM
Art,

Tuning the spindle indeed does nothing, it says it flashes to the G100 and resets but nothing changes.

On the bright side however, while tinkering today i set the maximum frequency higher of the C-axis to 128kHz and it can now go to whatever speed i want, what that speed actually is i'm not sure (and don't really care) however i am still interested if there is a way to tune the spindle motor.

Thanks

Lost Tourist
Title: Re: GRex Spindle Step/Dir setup
Post by: Chaoticone on June 10, 2008, 11:40:15 AM
I would think you would set your steps per rev. for the c axis and/or spindle motor in the motor tuning page in Mach 3 and then reflash the G100. Is this what you have tried allready?

Brett
Title: Re: GRex Spindle Step/Dir setup
Post by: ART on June 10, 2008, 01:14:26 PM
Hi Guys:

  Ive looke din the code. But its firmware that handles it, so I cant see if the firmware assumes a VFD where the acceleration isnt important, ( Most VFD's have a setting for max acceleration, all they care about is the actual frequency.). Id try this, turn onth eC axis again, tune it so as the C axis it has a proper accel and velocity. Flash that to the G100. Then restart MAch3 and turn off the C axis in the config/ports&pins. Then restart Mach3 again. At this piont the firmware has the proper accel of the C axis stored, the spindle shoudl then reflect that accel paramater as long as it isnt assuming a VFD that doesnt care. Ive never used a spindle control on the G100 so I cant really say if it does use it properly in the G100 for the spindle partition..

Art