Two problems related to spindle control and stepper motor movement

More
11 Aug 2022 12:13 #249505 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  

File Attachment:

File Name: postgui_ca...8-11.hal
File Size:0 KB

File Attachment:

File Name: shj_2022-08-11.hal
File Size:3 KB

File Attachment:

File Name: pyvcp_opti...8-11.hal
File Size:1 KB

File Attachment:

File Name: shj_2022-08-11.ini
File Size:2 KB

File Attachment:

File Name: vfd_2022-08-11.hal
File Size:1 KB

File Attachment:

File Name: custompane...8-11.xml
File Size:1 KB

File Attachment:

File Name: custom_2022-08-11.hal
File Size:0 KB

File Attachment:

File Name: custom_pos...8-11.hal
File Size:0 KB
Attachments:

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

More
11 Aug 2022 13:57 #249516 by Todd Zuercher
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:
HALFILE = vfd.hal

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

More
11 Aug 2022 15:25 #249527 by SHJ
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

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

More
11 Aug 2022 15:29 - 11 Aug 2022 16:54 #249528 by SHJ
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 

File Attachment:

File Name: vfd_2022-08-11-2.hal
File Size:1 KB

File Attachment:

File Name: shj_2022-08-11-2.hal
File Size:3 KB

File Attachment:

File Name: shj_2022-08-11-2.ini
File Size:3 KB

File Attachment:

File Name: custom_pos...11-2.hal
File Size:0 KB

File Attachment:

File Name: postgui_ca...11-2.hal
File Size:0 KB
Attachments:
Last edit: 11 Aug 2022 16:54 by SHJ.

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

More
11 Aug 2022 15:59 #249532 by Todd Zuercher
Iin your vfd hal file change this line from:
net spindle-speed spindle.0.speed-out => vfd.speed-command
to:
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.

More
11 Aug 2022 16:41 - 11 Aug 2022 16:59 #249535 by SHJ
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".
Last edit: 11 Aug 2022 16:59 by SHJ.

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

More
11 Aug 2022 17:09 #249537 by SHJ
I manage to make the spindle work, with commenting out

#net spindle-at-speed => vfd.spindle-at-speed
#net spindle-at-speed <= spindle.0.at-speed

But the visuals in AXIS seems not to work properly

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

More
11 Aug 2022 17:37 - 11 Aug 2022 17:39 #249539 by Todd Zuercher
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.
Last edit: 11 Aug 2022 17:39 by Todd Zuercher.

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

More
11 Aug 2022 17:50 #249540 by Todd Zuercher
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.)

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

More
18 Aug 2022 21:55 #250042 by andypugh
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?

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

Time to create page: 0.168 seconds
Powered by Kunena Forum