- LinuxCNC
- General LinuxCNC Questions
- Two problems related to spindle control and stepper motor movement
Two problems related to spindle control and stepper motor movement
- SHJ
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 Aug 2022 12:13 #249505
by SHJ
Two problems related to spindle control and stepper motor movement was created by SHJ
Hi!
Im trying to make my cnc-machine work. I have two issues at the moment.
1. My Z-axis is moving really slow. My X and Y axis are moving as it should, but the stepper motor for Z-axis is turning way to slow.
2. I cant set the spindle control right. I have tried to control the VFD by using RS485 and changed some settings in my .ini and .hal files, it worked before trying adding the pyVCP. After adding pyVCP something seems to fail. In axis.ngc the light is always green and when changing the spindle speed nothing happens.
Would be greatful for any help and insight in my problems, thanks
Hardware:
Aliexpress CNC breakoutboard 5-AXIS
Stepper Drivers DM 556
Huanyang VFD
2.2kW water cooled spindle
Software
I will add my files for LinuxCNC
Im trying to make my cnc-machine work. I have two issues at the moment.
1. My Z-axis is moving really slow. My X and Y axis are moving as it should, but the stepper motor for Z-axis is turning way to slow.
2. I cant set the spindle control right. I have tried to control the VFD by using RS485 and changed some settings in my .ini and .hal files, it worked before trying adding the pyVCP. After adding pyVCP something seems to fail. In axis.ngc the light is always green and when changing the spindle speed nothing happens.
Would be greatful for any help and insight in my problems, thanks
Hardware:
Aliexpress CNC breakoutboard 5-AXIS
Stepper Drivers DM 556
Huanyang VFD
2.2kW water cooled spindle
Software
I will add my files for LinuxCNC
Attachments:
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
11 Aug 2022 13:57 #249516
by Todd Zuercher
Replied by Todd Zuercher on topic Two problems related to spindle control and stepper motor movement
Sometimes miss wired or faulty wiring to a step motor can cause slow movement.
The spindle at speed led stays green because in your pyvcp hal file you have the line "sets spindle-at-speed true" that turns it on.
I don't see where your vfd hal file is loaded. So if it was working before but stopped. It probably stopped because you accidentally removed the line that loaded that hal file. (That hal file also has the line of code that should be sending the signal for spindle at speed instead of that sets line in your pyvcp hal file.) You probably just need to add a line to the [HAL] section of your ini file to load it. Something like:
The spindle at speed led stays green because in your pyvcp hal file you have the line "sets spindle-at-speed true" that turns it on.
I don't see where your vfd hal file is loaded. So if it was working before but stopped. It probably stopped because you accidentally removed the line that loaded that hal file. (That hal file also has the line of code that should be sending the signal for spindle at speed instead of that sets line in your pyvcp hal file.) You probably just need to add a line to the [HAL] section of your ini file to load it. Something like:
HALFILE = vfd.hal
Please Log in or Create an account to join the conversation.
- SHJ
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 Aug 2022 15:25 #249527
by SHJ
Replied by SHJ on topic Two problems related to spindle control and stepper motor movement
Thank you for the input.
I did change the .ini file, but further I got this error:
./vfd.hal:5 Pin "spindle.0.speed-out" does not exist
1561 .... and so on ...., Have I commented out something maybe, will check
I did change the .ini file, but further I got this error:
./vfd.hal:5 Pin "spindle.0.speed-out" does not exist
1561 .... and so on ...., Have I commented out something maybe, will check
Please Log in or Create an account to join the conversation.
- SHJ
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 Aug 2022 15:29 - 11 Aug 2022 16:54 #249528
by SHJ
Replied by SHJ on topic Two problems related to spindle control and stepper motor movement
I changed the orientation in the HAL section in the ini file. From HALFILE = vfd.hal from first to last.When doing this the error messages changed../vfd.hal:5 Pin "spindle.0.speed-out" was already linked to signal "spindle-cmd-rpm" 1738Will add my current files
Attachments:
Last edit: 11 Aug 2022 16:54 by SHJ.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
11 Aug 2022 15:59 #249532
by Todd Zuercher
Replied by Todd Zuercher on topic Two problems related to spindle control and stepper motor movement
Iin your vfd hal file change this line from:to:
There very well could be more simular errors that will be uncovered after this one is corrected. Be patient and fix them one at a time as you find them.
net spindle-speed spindle.0.speed-out => vfd.speed-command
net spindle-cmd-rpm => vfd.speed-command
There very well could be more simular errors that will be uncovered after this one is corrected. Be patient and fix them one at a time as you find them.
Please Log in or Create an account to join the conversation.
- SHJ
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 Aug 2022 16:41 - 11 Aug 2022 16:59 #249535
by SHJ
Replied by SHJ on topic Two problems related to spindle control and stepper motor movement
Hi again,
Sorry for my unpatience.. I struggle to know what parameters to change and I dont want changing the wrong ones.
I have this error message:
pyvcp_options.hal:13: signal"spindle-at-speed" already has writers 11660 11689
I use the files last updated 16:54. The VFD blinks "F00.00".
Sorry for my unpatience.. I struggle to know what parameters to change and I dont want changing the wrong ones.
I have this error message:
pyvcp_options.hal:13: signal"spindle-at-speed" already has writers 11660 11689
I use the files last updated 16:54. The VFD blinks "F00.00".
Last edit: 11 Aug 2022 16:59 by SHJ.
Please Log in or Create an account to join the conversation.
- SHJ
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
11 Aug 2022 17:09 #249537
by SHJ
Replied by SHJ on topic Two problems related to spindle control and stepper motor movement
I manage to make the spindle work, with commenting out
But the visuals in AXIS seems not to work properly#net spindle-at-speed => vfd.spindle-at-speed
#net spindle-at-speed <= spindle.0.at-speed
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
11 Aug 2022 17:37 - 11 Aug 2022 17:39 #249539
by Todd Zuercher
Replied by Todd Zuercher on topic Two problems related to spindle control and stepper motor movement
Open Halmeter or Halshow and check to see that the hal pin "vfd.speed-command" exists, and that it has the correct value (isn't zero when it should be running). Check the other vfd hal pins to see that they are getting the right signals. Make sure the settings for your VFD are correct to receive serial commands.
Disreguard, I didn't see your last post.
Disreguard, I didn't see your last post.
Last edit: 11 Aug 2022 17:39 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 4957
- Thank you received: 1441
11 Aug 2022 17:50 #249540
by Todd Zuercher
Replied by Todd Zuercher on topic Two problems related to spindle control and stepper motor movement
Removing those should not have had any effect on the operation of the VFD. They should only affect the spindle at speed LED and related functions (such as the machine waiting to start a cut until the spindle at speed signal goes true.)
However it is possible that the line "net spindle-at-speed <= spindle.0.at-speed" caused the hal file not to load properly because it is duplicated elsewhere in another hal file. (but I would have thought that would have stopped Linuxcnc from starting.)
However it is possible that the line "net spindle-at-speed <= spindle.0.at-speed" caused the hal file not to load properly because it is duplicated elsewhere in another hal file. (but I would have thought that would have stopped Linuxcnc from starting.)
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
18 Aug 2022 21:55 #250042
by andypugh
Replied by andypugh on topic Two problems related to spindle control and stepper motor movement
Did you solve the slow axis problem?
I see that the Z scale is a smaller number than the others, possibly you have got the gear ratio back-to-front and instead of being about half what the others are it should be twice?
I see that the Z scale is a smaller number than the others, possibly you have got the gear ratio back-to-front and instead of being about half what the others are it should be twice?
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- Two problems related to spindle control and stepper motor movement
Time to create page: 0.168 seconds