Huanyang VFD timeout errors

More
02 Dec 2021 22:31 - 02 Dec 2021 22:36 #228233 by DZ
Hey all,

I am building a PrintNC and I'm stuck on getting the Huanyang VFD to work with linuxCNC. I started from LinuxCNC trying to get the spindle to turn on. This wouldn't work, and after making multiple new configurations with and without spindle options I narrowed things down to the communication between linux and the Huanyang VFD. I've scoured this forum, github, youtube and every other resource i could find dating back to hy_vfd.c from 2003 in order to get LinuxCNC to work with my Huanyang VFD with 2.2Kwh spindle, but i haven't been able to connect to the vfd.

The error that i have

printnc@printnc:~$ halrun
halcmd: loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600 -s 1 -g
vfd: device='/dev/ttyUSB0', baud=9600, bits=8, parity='none', stopbits=1, address=1, debug=1, PID=6344
Opening /dev/ttyUSB0 at 9600 bauds (none)
halcmd: setp vfd.enable 1
halcmd: read_setup: reading setup parameters:

query_length = 6
hycomm query = [01][01][03][05][00][00][2C][4F]
query_ret = 8
response_length_computed = 8
waiting for message (8 bytes)...
WAIT_DATA(): comms time out

ERROR Communication time out (-12)
read_setup: FAILED
error reading setup from VFD, retrying
read_setup: reading setup parameters:

Note: Using POSIX realtime
VFD settings:
PD001 = 2
PD002 = 2
PD163 = 1
PD164 = 1
PD165 = 3

My user is part of the dialout group.
getent group dialout -> dialout:x:20:printnc

The USB address is ttyUSB0 (linuxCNC wont boot if I use another address.)
executed:
sudo chmod 666 /dev/ttyUSB0

USB to RS485 adapter name: QinHeng Electronics hl340
The jumper on the VFD is set to VR
VFD type: 
HY SERIES
HY02D223B

Things I've tried:

- Change dongles (I've got 2 QinHeng Electronics hl340, both the same error)
- Change wires multiple times, normal wires, normal wires twisted, cat 6 wire, shielded control cable
- Change wire polarity RS+ on dongle - RS- on dongle +
- Reset and repgrogrammed VFD multiple times
- Checked continuity with a multimeter from RS+ / RS- to the dongle to see if i havent connected to the insulation
- Changed usb ports (and changed to ttyUSB1 when changed)
- changed baud rate on vfd and in the hy_vfd command
- tried hy_gt_vfd, couldn't get any response, maybe i should use other arguments?

There are two things I can still do:
-  buy a new RS485 adapter: www.kiwi-electronics.nl/nl/industrial-us...rs485-converter-9944
- Install LinuxCNC on a raspberry pi (i don't have any other pc) to try if i can communicate that way. Unfortunately I don't have a windows pc to test spindle connectivity. 

I'm pulling my hair out, I don't know how to debug this any further. Any help is really appreciated
Last edit: 02 Dec 2021 22:36 by DZ.

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

More
06 Dec 2021 22:41 #228472 by DZ
Replied by DZ on topic Huanyang VFD timeout errors
I managed to resolve this issue by buying a new usb stick from Waveshare The "Industrial USB to RS485"
The following user(s) said Thank You: tommylight, RobC

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

More
06 Dec 2021 23:22 #228483 by tommylight
Thank you for reporting back.

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

Time to create page: 0.151 seconds
Powered by Kunena Forum