failure Huanyang VFD HY01D523B
- Manu663
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 0
I have been an happy LinuxCNC user for almost 5 years, but I had an incident (Problem with the LINUXCNC VFD link since the VFD lost its power supply) and since then, I can't control the spindle through the LinuxCNC panel.
VFD Huanyang HY01D523B (1.5 kW)
Background
I was machining a part when suddenly the VFD suffered a power failure. (The PC with linux was left running while the spindle stopped)
+ Once the power was restored, the spindle would not restart and I restarted the PC hosting LinuxCNC.
No change
+ I then wanted to check the USB RS-485 plug connection and I noticed that a slight movement of the plug caused a short circuit and I could hear the processor and power supply fan stop (after disassembling, the motherboard was found warped by the pressure of the radiator/fan on the processor and I presume that the PCB was touching the case)
+ Having a second identical PC ready to use, I just swapped the hard drive and tried again with this computer.
Still no communication with the VFD
+ I then changed the configuration of the VFD to control it from its front panel. (jumper + PD001 and PD002). The spindle starts and the front panel potentiometer actually varies the spindle speed. (Phew the VFD and the spindle are not burnt out!!!)
+ I checked the serial link and all is OK in continuity-isolation.
+ Blaming the failure on the USB RS-485 adapter, I ordered another one and as soon as I received it I installed it on the machine.
No change.
+ I checked that the USB routing configuration of the rs485 adapter is in agreement with the HAL custom file (with the command ls /dev/tty* I get ttyUSB0: no change)
+ I checked that LinuxCNC was communicating correctly with the RS485 adapter with: "getent group dialout".
Communication OK "dialout:x:20:<my_username>"
+ I tried to check if the output voltage of the RS-485 varied according to the linux CNC command: but not being equipped with an oscilloscope, I don't see much (200 mV difference).
+To be sure not to miss an error so big that I would not see it, I redid a test linuxCNC configuration with the Spindle at speed display and the speed display): but still nothing!
I know that for the moment I can use the CNC by controlling the spindle start and the speed by hand but one quickly gets used to the comfort and I would like to go back to the automatic control!
I don't know what to do, test or try anymore...
The only thing I have left is the help of the forum, otherwise I think I'll go for voodoo incantations...
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23279
- Thank you received: 4933
If you start LinuxCNC from the command line you might see some debug messages from the hy_vfd component.
Please Log in or Create an account to join the conversation.
- Manu663
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 0
Glad to see you around!
Yes as I plug / unplug the serial I can see tty0mUSB0 apearing/ desapearing accordingly.
I'm away from my cnc for 2 days at least but i'll try what you suggest asap.
If i may ask :
What is the command line to start linux cnc ? ( sorry i'm a real noob with linux!)
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23279
- Thank you received: 4933
Is that a typo, or is it really called that? Your hy_vfd command line in the HAL needs to match the exact name.Yes as I plug / unplug the serial I can see tty0mUSB0 apearing/ desapearing accordingly.
What is the command line to start linux cnc ? ( sorry i'm a real noob with linux!)
Just "linuxcnc" (This will bring up the config chooser. You can use linuxcnc -l to load the last-loaded config, or provide the path to an INI file. But just type "linuxcnc" and pick your config.
Please Log in or Create an account to join the conversation.
- Manu663
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 0
Ok then I'll try that as soon as I'll be back at home. Thanks for the advice Andy!
Please Log in or Create an account to join the conversation.
- Manu663
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 0
Following Andy's (good) advice I've started LinuxCNC with the command line and here's the result:
I've checked the the COM port was the right one (ttyUSB0) with the Custom HAL file (involved line shown below )ERROR Communication time out (-12)
error reading setup from VFD, retrying
WAIT DATA (): comms time out
but I have no real doubt about that because I did not change anything since that bloody failure appeared.loadusr -wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
So I've applied a factory reset to the VFD and entered again all the data to be sure not to miss something (I have fiddled with the settings so much during troubleshooting that I preferred to start with a clean config!)
I made sure that the serial baud rate was set to 9600 baud on the VFD but no improvement
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23279
- Thank you received: 4933
More details here: forum.linuxcnc.org/24-hal-components/292...-2-7?start=50#205997
Please Log in or Create an account to join the conversation.
- Manu663
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 0
Well, today I wanted to know more about the VFD and its ability to communicate on the serial port.
So I downloaded a little software on a window laptop : github.com/GilchristT/SpindleTalker2/releases and after a few adjustments, I was finally able to start the spindle and vary its speed with my USB - RS232 dongle.
a little more reassured, I took the opportunity to check the baud rate: 9600
I read carefully the topic you quoted in which you had to adapt the driver to the VFD and I can't think of anything else to try:
Linuxcnc config identical to before the failure
VFD and its identical config
the only things that have changed:
the computer and the USB-RS232 adapter
I don't understand all the arguments you use in :
loadusr -Wn spindle-vfd hy_vfd -S 24000 -F 400 -n spindle-vfd -t 1 -d /dev/ttyUSB0 -p none -r 19200 -s 1 -g
and so I'll just copy the line over and replace my actual one which is
with one change, I'll replace 19200 with 9600 (baud rate)loadusr -wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
Does this make sense to you or am I wrong again?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
- Posts: 23279
- Thank you received: 4933
linuxcnc.org/docs/2.8/html/man/man1/hy_vfd.1.html
I think that I decided to set them all (or most of them)
I think that
-t 1
was important, and
-p none -s 1
Because the VFD was ignoring my parity / stop settings and so I had to make LinuxCNC match the VFD.
-g is there to give more feedback. I probably ought to turn it off now.
Please Log in or Create an account to join the conversation.
- Manu663
- Offline
- Junior Member
-
- Posts: 26
- Thank you received: 0
Please Log in or Create an account to join the conversation.