- Posts: 19306
- Thank you received: 0
HAL Edits for RS485 / VFD Spindle Control
8 months 3 weeks ago #342571
by andypugh
Replied by andypugh on topic HAL Edits for RS485 / VFD Spindle Control
spindle.0.speed-out is clearly there in the screenshot.
Two possibilities spring to mind, one of them rather wierd.
1) You have the net commands for the spindle too early in the HAL file, ie before the motmod module has been loaded.
2) The - in speed-out is the wrong sort of dash. Though it looks right in this case. Maybe try re-typing it using the minus key. I think I typed out the example text on my Mac on a train, and it likes to be clever with typography.
Two possibilities spring to mind, one of them rather wierd.
1) You have the net commands for the spindle too early in the HAL file, ie before the motmod module has been loaded.
2) The - in speed-out is the wrong sort of dash. Though it looks right in this case. Maybe try re-typing it using the minus key. I think I typed out the example text on my Mac on a train, and it likes to be clever with typography.
Please Log in to join the conversation.
8 months 3 weeks ago #342647
by Mr1576
Replied by Mr1576 on topic HAL Edits for RS485 / VFD Spindle Control
Please Log in to join the conversation.
8 months 2 weeks ago #342786
by jtrantow
Replied by jtrantow on topic HAL Edits for RS485 / VFD Spindle Control
Looks like you have a very simple VFD/Spindle setup. If you are using a simple spindle setup that may be enough. If you have a machine with any type of gear ration between the motor and spindle the following may be of use.I'm using RS485 VFD to control the spindle on three different machines:
In the near future I intend to redo my spindle encoders and use the forum.linuxcnc.org/47-hal-examples/27071-automatic-spindle-gea idea to automatically choose FF0.
- Router - high speed spindle 24000 RPM with a CommanderSK VFD (capable of 1000hz).
- Mill - Six pulley combinations connected to nominal 1725 RPM @ 60 hz motor with a GS2 VFD. [MANUAL BELT CHANGE]
- Lathe - Six pulley combinations connected to nominal 1750 RPM @ 60 hz motor with a CommanderSK VFD. [MANUAL BELT CHANGE]
With the Router I don't have to worry about gearing changes (or sending commands greater than the VFD can handle).Attachment not found
With the Mill and Lathe, I only recently figured out a way to easily change scaling to match the gearing using pid FF0.
Attachment not found
Using PID component is nice for several reasons:- I can use the gmoccapy/Calibration to change/test/save [SPINDLE_0]FF0 while running linuxcnc whenever I change belts.
- I can set [SPINDLE_0]MAX_OUTPUT to avoid sending illegal RPM commands to the VFD which get ignored and can cause a crash if you aren't checking the at-speed status.I added a [SPINDLE_0]MAXIMUM_MOTOR_RPM parameter to the .ini and kick off a message to change belt if the motor RPM is maxed out.
Here are my additions to Mill.ini for this implementation:
Mill.ini
[/code]Code:[DISPLAY] MESSAGE_BOLDTEXT = NONE MESSAGE_TEXT = VFD using maximum motor RPM. MESSAGE_TYPE = okdialog MESSAGE_PINNAME = VFD-max-motor-rpm [SPINDLE_0] P = 0 I = 0 D = 0 FF0 = 1.135 [code]MAX_OUTPUT = 1799
In the near future I intend to redo my spindle encoders and use the forum.linuxcnc.org/47-hal-examples/27071-automatic-spindle-gea idea to automatically choose FF0.
Please Log in to join the conversation.
Time to create page: 0.126 seconds
