Spindle control

More
9 years 3 months ago #95810 by Hippy
Spindle control was created by Hippy
Looking into how to control my spindle via linuxcnc....I have seen this is normally done via PWM board or usb-rs485 adapter interfaces to the vfd. I have a HY vfd and i am pretty sure it can be controlled via both methods. I only need to turn it on/off and control the rpm's from linuxcnc dont think i would ever need to change the direction. Since i am pretty sure the usb-rs485 method only controls the rpm's? So i would need a single relay PWM to get done what i what?

Please Log in to join the conversation.

More
9 years 3 months ago #95815 by Todd Zuercher
Replied by Todd Zuercher on topic Spindle control
With most serial VFD controls you can usually have access to all of the VFD's options. (start, stop, forward/revers, setting speed. speed feedback (not the same as encoder feedback), Error feedback, parameter settings...) The main disadvantage of serial control, is that it isn't realtime but for most spindle applications that isn't critical. (rigid tapping might be an exception.).

Please Log in to join the conversation.

More
9 years 3 months ago #95820 by Hippy
Replied by Hippy on topic Spindle control
Thanks for the info Todd....I have a one spindle router without encoders, my machine is running Ubuntu 10.4 with Linuxcnc 2.7.9 can you suggest any good serial controllers? As they sound like thats all i really need and i have no idea what i am looking at on them, they all seem the same too me.

Please Log in to join the conversation.

More
9 years 3 months ago #95823 by Todd Zuercher
Replied by Todd Zuercher on topic Spindle control
Before you commit to any one direction. What kind of VFD do you have. Is it one that LInuxcnc already has drivers for? If there isn't already a serial driver for your drive, then using it just got a lot harder, because you then have to either write a driver for your drive, or use a generic interface like MB2HAL.

Please Log in to join the conversation.

More
9 years 3 months ago #95825 by Hippy
Replied by Hippy on topic Spindle control
I have an HuanYang VFD. I think i remember seeing where it was recently added to Linuxcnc drivers, but i am not sure.

Please Log in to join the conversation.

More
9 years 3 months ago #95890 by andypugh
Replied by andypugh on topic Spindle control
No eBay APP ID and/or Cert ID defined in Kunena configurationNo eBay APP ID and/or Cert ID defined in Kunena configurationNo eBay APP ID and/or Cert ID defined in Kunena configurationI am controlling my HuanYang VFD with one of these:

But I would probably recommend that you find one with three terminals (for an earth / gnd wire). They cost more, but have telltale LEDS and the connection does actually need a GND side.


Be prepared for the possibility that your VFD is a fake and that it does not actually support serial comms. (some others have found this to be the case).

I found that DMX cable is nice for modbus (2 conductor + shield) and in trying to find an example I came across:

Which might be an interesting and neat way to wire up to a VFD. (but there is also a chance that high-frequency noise in the power side would prevent the serial-comms side from working at all)

Please Log in to join the conversation.

More
9 years 3 months ago #96322 by Hippy
Replied by Hippy on topic Spindle control
How would i know if i had one that does not support serial comms? I have installed the usb - rs485 that was suggested in the link above. But there is no connection and when in terminal i use " loadusr hy_vfd /dev/ttyUSB0" it replies with loadusr command not found.
I have verified via lst dev/tty* that indeed it is connected to ttyUSB0
have the adapter connected on the vfd to terminals RS+ RS- ( i have swapped the wires around but no difference) and have a red led lit on the adapter.
I have my vfd set according to man vfd page
I am stumped been at this for days, hopefully it is just my ignorance of some little thing.

Please Log in to join the conversation.

More
9 years 3 months ago #96328 by Hippy
Replied by Hippy on topic Spindle control
Here are my configs. This currently loads & runs, but zero from the vfd works

Please Log in to join the conversation.

More
9 years 3 months ago #96340 by andypugh
Replied by andypugh on topic Spindle control

Hippy wrote: How would i know if i had one that does not support serial comms?

I don't know, because the ones that don't support serial comms simply have the chips missing, as I understand it. If you look through the ebay adverts some of them sellinng genuine HY have a guide to spotting the differences.between genuine and fake.

I have installed the usb - rs485 that was suggested in the link above. But there is no connection

Have you enabled sertial control at the VFD end?

and when in terminal i use " loadusr hy_vfd /dev/ttyUSB0" it replies with loadusr command not found.


You either need "halcmd loadusr..." for a one-off command, "halcmd -kf" to enter the runnning HAL environment and stay there, or "halrun" to start a realtime environment if lInuxCNC is not already running.

Please Log in to join the conversation.

More
9 years 3 months ago #96356 by Hippy
Replied by Hippy on topic Spindle control
Thanks Andy....I can now get into loadusr in the terminal and do some troubleshooting. i have a hardtime remembering all the switches in command line.
Had complete comms failure, but now it is fixed. Had to set parity to odd (pd165 = 5). Now can start/stop spindle in terminal. This is how my loadusr looks now -W hy_vfd -d /dev/ttyUSB0 -p odd -r 19200
Now to finish up connecting HAL pins....Thanks again Andy!

Please Log in to join the conversation.

Time to create page: 0.189 seconds
Powered by Kunena Forum