×
Forum Header
Spindle setup
09 Jan 2024 20:33 #290299
by frprim
Spindle setup was created by frprim
Hi everyone,
this is my first post here and pleased to see some nice and vibrant community around open source project like this one.
Recently we purchased well built CNC Milling machine. It has MTs 107 drivers and IO3-R2 BOB. Since we didnt have enough money for proper spindle we decided to go with mounted handheld router. Its connected to the BOB (just power cable) so one can turn it on and off and spindle speed is set by hand on the router itself (it has speed marks 1,2,3 ... ) .
Also, BOB is connected trough LPT port thus I used StepConf to set everything up. Router power is connected to Pin 1, and I put spindle PWM there, and later I choose PWM 0 Hz to use PDM mode.
Now, when I start Axis UI, spindle starts right away so I had to press + sign few times in order to stop it (on a spindle display when it hits 1500 RPM mark it stops spinning). Also, everytime my machine hits limit switch on any axis spindle starts spinning. I assume this is not expected behaviour. Also, I tried PWM mode with 30Hz which also set another problems.
As far as I understood, there are few ways to setup spindle in linuxcnc but since I'm new to this I get a feeling that what I did is not the proper way to setup this part of the linuxcnc software considering my current setup.
If anyone has and idea what I did wrong or how to setup spindle please let me know.
Thanks in advance
this is my first post here and pleased to see some nice and vibrant community around open source project like this one.
Recently we purchased well built CNC Milling machine. It has MTs 107 drivers and IO3-R2 BOB. Since we didnt have enough money for proper spindle we decided to go with mounted handheld router. Its connected to the BOB (just power cable) so one can turn it on and off and spindle speed is set by hand on the router itself (it has speed marks 1,2,3 ... ) .
Also, BOB is connected trough LPT port thus I used StepConf to set everything up. Router power is connected to Pin 1, and I put spindle PWM there, and later I choose PWM 0 Hz to use PDM mode.
Now, when I start Axis UI, spindle starts right away so I had to press + sign few times in order to stop it (on a spindle display when it hits 1500 RPM mark it stops spinning). Also, everytime my machine hits limit switch on any axis spindle starts spinning. I assume this is not expected behaviour. Also, I tried PWM mode with 30Hz which also set another problems.
As far as I understood, there are few ways to setup spindle in linuxcnc but since I'm new to this I get a feeling that what I did is not the proper way to setup this part of the linuxcnc software considering my current setup.
If anyone has and idea what I did wrong or how to setup spindle please let me know.
Thanks in advance
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
09 Jan 2024 22:04 #290311
by tommylight
Replied by tommylight on topic Spindle setup
Invert the spindle pin, like so:
setp parport.0.pin-01-out-invert TRUE
Just add that line after the spindle line, save and restart the config.
setp parport.0.pin-01-out-invert TRUE
Just add that line after the spindle line, save and restart the config.
The following user(s) said Thank You: BSOD
Please Log in or Create an account to join the conversation.
10 Jan 2024 10:16 #290345
by frprim
Replied by frprim on topic Spindle setup
Thank you Tommy,
I did try that before but the problem is that spindle don't start when I execute g-code. I have to press + sign until it reaches 1500 on the spindle display and then it starts. If I start g-code without starting the spindle it does not start on g-code start and if I start spindle before g-code start then g-code start executing and turn off the spindle.
Thanks again for your help.
I did try that before but the problem is that spindle don't start when I execute g-code. I have to press + sign until it reaches 1500 on the spindle display and then it starts. If I start g-code without starting the spindle it does not start on g-code start and if I start spindle before g-code start then g-code start executing and turn off the spindle.
Thanks again for your help.
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
10 Jan 2024 11:44 #290349
by besriworld
Replied by besriworld on topic Spindle setup
Upload your configuration files and sample G-code program
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
10 Jan 2024 12:26 #290351
by tommylight
Replied by tommylight on topic Spindle setup
In gcode, add Sxxxx after M3 , xxxx is spindle speed like 10000 or 24000
Please Log in or Create an account to join the conversation.
10 Jan 2024 18:29 - 10 Jan 2024 18:32 #290390
by frprim
Replied by frprim on topic Spindle setup
Hi, sorry for late reply.
My confing files:
my g-code start:; GCODE Generated by cam.openbuilds.com on 2023-12-28
G21 ; mm-mode
; Operation 0: CNC: Vector (path inside)
; Endmill Diameter: 6
G0 Z24; move to z-safe height
G0 F1000 X72.0293 Y37.5218
G0 Z0
G1 F20 Z-1.0000
G1 F200 X71.9918 Y38.2125 Z-1.0000 S1
G1 F200 X72.1136 Y38.8934 Z-1.0000 S1
G1 F200 X72.3880 Y39.5283 Z-1.0000 S1
G1 F200 X72.8680 Y40.1529 Z-1.0000 S1
G1 F200 X93.4320 Y60.6563 Z-1.0000 S1
G1 F200 X64.9452 Y64.9073 Z-1.0000 S1
G1 F200 X64.2775 Y65.0875 Z-1.0000 S1
G1 F200 X63.6687 Y65.4159 Z-1.0000 S1
My confing files:
my g-code start:; GCODE Generated by cam.openbuilds.com on 2023-12-28
G21 ; mm-mode
; Operation 0: CNC: Vector (path inside)
; Endmill Diameter: 6
G0 Z24; move to z-safe height
G0 F1000 X72.0293 Y37.5218
G0 Z0
G1 F20 Z-1.0000
G1 F200 X71.9918 Y38.2125 Z-1.0000 S1
G1 F200 X72.1136 Y38.8934 Z-1.0000 S1
G1 F200 X72.3880 Y39.5283 Z-1.0000 S1
G1 F200 X72.8680 Y40.1529 Z-1.0000 S1
G1 F200 X93.4320 Y60.6563 Z-1.0000 S1
G1 F200 X64.9452 Y64.9073 Z-1.0000 S1
G1 F200 X64.2775 Y65.0875 Z-1.0000 S1
G1 F200 X63.6687 Y65.4159 Z-1.0000 S1
Attachments:
Last edit: 10 Jan 2024 18:32 by frprim.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
10 Jan 2024 19:00 #290392
by tommylight
Replied by tommylight on topic Spindle setup
That is not valid gcode for a mill, it lacks
M3 S24000
Or similar at the start of gcode.
M3 S24000
Or similar at the start of gcode.
Please Log in or Create an account to join the conversation.
10 Jan 2024 19:58 #290395
by frprim
Replied by frprim on topic Spindle setup
I will try this same code and insert M3 s24000 at the code start and post results.
Thank you very much for all the help.
Thank you very much for all the help.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19300
- Thank you received: 6462
10 Jan 2024 21:58 #290398
by tommylight
Replied by tommylight on topic Spindle setup
Sorry, was busy having a coffee with friends, so forgot to add that you also need M5 at the end of gcode to stop the spindle.
Please Log in or Create an account to join the conversation.
11 Jan 2024 18:33 #290443
by frprim
Replied by frprim on topic Spindle setup
Thank you Tommy,
what you said did the trick and it works flawlessly.
One more thing if you can answer me. While in Stepconf, when I reach to page with Spindle setup, I choose 0Hz to enter PDM mode. There are few settings there like: Speed 1, Speed 2, PWM 1 and PWM 2. If I change PWM1 from 0.1 to 0.4 then in Axis UI when I type G0 Z10 for example, it does not travel 10mm thus I have to change PWM1 and PWM2 until I find exact ratio. Why is that?
Many thanks
what you said did the trick and it works flawlessly.
One more thing if you can answer me. While in Stepconf, when I reach to page with Spindle setup, I choose 0Hz to enter PDM mode. There are few settings there like: Speed 1, Speed 2, PWM 1 and PWM 2. If I change PWM1 from 0.1 to 0.4 then in Axis UI when I type G0 Z10 for example, it does not travel 10mm thus I have to change PWM1 and PWM2 until I find exact ratio. Why is that?
Many thanks
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.218 seconds