failure Huanyang VFD HY01D523B

More
26 Feb 2022 14:18 #235848 by Manu663
Hello to all,

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.

More
28 Feb 2022 23:05 #236066 by andypugh
Do you see ttyUSB0 appear and disappear as you plug / unplug the USB / Serial cable?

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.

More
01 Mar 2022 12:32 #236101 by Manu663
Hi Andy,

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.

More
01 Mar 2022 12:41 #236103 by andypugh

Yes as I plug / unplug the serial I can see tty0mUSB0 apearing/ desapearing accordingly.

Is that a typo, or is it really called that? Your hy_vfd command line in the HAL needs to match the exact name.

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.

More
01 Mar 2022 13:17 #236111 by Manu663
Oups typo! ( my fingertips are too big for my cellphone!)
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.

More
07 Mar 2022 13:36 - 07 Mar 2022 20:53 #236578 by Manu663
I'm finally back at home.
Following Andy's (good) advice I've started LinuxCNC with the command line and here's the result:

ERROR Communication time out (-12)
error reading setup from VFD, retrying
WAIT DATA (): comms time out

I've checked the the COM port was the right one  (ttyUSB0) with the Custom HAL file (involved line shown below )

loadusr -wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600

but I have no real doubt about that because I did not change anything since that bloody failure appeared.
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
 
Last edit: 07 Mar 2022 20:53 by Manu663.

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

More
07 Mar 2022 14:24 #236584 by andypugh
I found that my HY VFD was ignoring parity settings so had to configure the driver to suit the VFD rather than vice-versa.

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.

More
10 Mar 2022 18:33 - 10 Mar 2022 18:35 #236872 by Manu663
Thank you again Andy for the follow up!
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 

loadusr -wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600

with one change, I'll replace 19200 with 9600 (baud rate)
Does this make sense to you or am I wrong again?
Last edit: 10 Mar 2022 18:35 by Manu663.

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

More
10 Mar 2022 23:59 #236905 by andypugh
The options are all listed here:
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.

More
12 Mar 2022 16:59 - 13 Mar 2022 20:34 #237007 by Manu663
Well after a bit of adaptation to fit with my config (shown below)
loadusr -Wn vfd hy_vfd -S 24000 -F 400 -n vfd -t 1 -d /dev/ttyUSB0 -p none -r 9600 -s 1 -g
I get this result: 
Any idea ?


I played with baudrate, parity, bit stop, no change .
 
Attachments:
Last edit: 13 Mar 2022 20:34 by Manu663.

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

Moderators: piasdom
Time to create page: 0.195 seconds
Powered by Kunena Forum