Auxiliary Spindle Control

More
27 Jul 2019 20:29 #140766 by rds626
I have an auxiliary high speed spindle that I use on my mill. I manged to hack the remapped M6 code for automating tool changes such that it taps the ETS and fixes up the tool offset because the HS spindle uses a collet system. This works great but I still have to turn the spindle on/off and adjust the speed manually.

I can setup a named parameter that indicates what spindle type is in use such as main or HS spindle. I use this already to determine what type of tool change to perform.

So I'm wondering if this named parameter could be used to redirect the spindle action to the HS spindle?

I'm using a 7i92 P2 to operate the mill and have available P1 to operate the HS spindle. The VDF on this spindle needs a 0 - 10VDC control voltage for speed so using a MESA SPINx1 board I can connect it to a predefined PWM on P1 plus the 2 other bits for enable and direction - this is the easy part.

Is there some way to switch configurations based on a name parameter? Ideally if the name parameter indicates the main spindle everything works as usual, if the named parameter indicates HS spindle all related codes such as M3, M4, M5 and S would now operate the HS spindle.

I am aware of the "Add support for multiple spindles" but this would necessitate changing my CAM post processor - something I would like to avoid.

Thanks for any insight.

Please Log in or Create an account to join the conversation.

More
27 Jul 2019 20:52 #140768 by PCW
Replied by PCW on topic Auxiliary Spindle Control
You could use M62..M65 to set a hal pin true or false and use that
to direct the physical I/O to the proper spindle

Please Log in or Create an account to join the conversation.

More
27 Jul 2019 22:14 #140775 by rds626
Replied by rds626 on topic Auxiliary Spindle Control
Yeah, that could work but the two VFD's use different formats for both speed & control. The main spindle uses a step generator while the HS spindle uses 0 - 10VDC which I can get using a PWM generator into the SPINx1 board. Then I have the control issues. This is possible with some custom hardware but then it looks like the G-Code would have to be altered to include the M codes either by manually editing it or by changing the CAM post-processor, unless I'm missing something here.

I don't know enough about LinuxCNC to know if I can throw the switch in software based on a GUI option switch or not.

Is it possible to remap the M3, M4, M5 & S codes and based on the GUI switch (which I can set to a named parameter) either call the original functions or some new ones to operate the HS spindle?

Please Log in or Create an account to join the conversation.

More
27 Jul 2019 22:19 #140776 by tommylight
Did you check if the HS spindle can be programed to run on 0-5V ? Almost all new VFD's can do that.
Also check the 2.8 or 2.9 version of Linuxcnc as they have built in support for multiple spindles.

Please Log in or Create an account to join the conversation.

More
28 Jul 2019 01:57 - 28 Jul 2019 01:58 #140783 by PCW
Replied by PCW on topic Auxiliary Spindle Control
If you have both step/dir and PWM interfaces connected, you can just
chose between them with the state of a single hal bit and appropriate hal wiring.

How the hal bit gets set is up to you (GUI Button, Mcode etc)

Not sure why you would remap M3,M4,M5, they would be the same for either spindle
Last edit: 28 Jul 2019 01:58 by PCW.

Please Log in or Create an account to join the conversation.

More
28 Jul 2019 02:33 #140784 by rds626
Replied by rds626 on topic Auxiliary Spindle Control

If you have both step/dir and PWM interfaces connected, you can just chose between them with the state of a single hal bit and appropriate hal wiring.

This is what I was hoping to hear.

How the hal bit gets set is up to you (GUI Button, Mcode etc).

Yeah, the GUI has an input field to select the spindle type: Standard, High Speed or Speeder. It's no problem to get this selection in Python or as a named parameter in some o code. So I can flip a hal bit whenever the High Speed selection is made.

I have not really done any hal wiring so some reading is in order but I appreciate the insight that it can be done.

The remapping of the spindle codes was just some out-loud thinking if it could not be done with some hal wiring.

Please Log in or Create an account to join the conversation.

More
28 Jul 2019 17:08 #140813 by Vmax549
Replied by Vmax549 on topic Auxiliary Spindle Control
PathPilot already has a switch function between 2 different spindles. Their Lowspeed setup and Highspeed setup. Why not use what they have setup ??

Just a thought, (;-) TP

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.074 seconds
Powered by Kunena Forum