- Configuring LinuxCNC
- Advanced Configuration
- drivers for waveshare RS 485 usb serial converter for huangyang vfd
drivers for waveshare RS 485 usb serial converter for huangyang vfd
Here it is:
# Include your customized HAL commands here
# The commands in this file are run after the AXIS GUI (including PyVCP panel) starts
# Laad het spindel-component en sluit de basissignalen aan
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -r 38400
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw spindle.0.forward => vfd.spindle-forward
net spindle-ccw spindle.0.reverse => vfd.spindle-reverse
net spindle-on spindle.0.on => vfd.spindle-on
net spindle-at-speed <= vfd.spindle-at-speed
net estop-anded => vfd.enable
# **** Setup of spindle speed display using pyvcp -START ****
# **** Use COMMANDED spindle velocity from LinuxCNC because no spindle encoder was specified
# Laat de 'gemeten' snelheid zien
net spindle-fb vfd.spindle-speed-fb => pyvcp.spindle-speed
# **** force spindle at speed indicator true because we have no feedback ****
net spindle-at-speed => pyvcp.spindle-at-speed-led
# net remote-o101 halui.mdi-command-01 <= pyvcp.o101
Please Log in or Create an account to join the conversation.
You probably swapped the data +/- wires?
Now, doublecheck the VFD parameters to see if they match the manual of the hy_vfd component.
Please Log in or Create an account to join the conversation.
That one indeed.
You probably swapped the data +/- wires?
Now, doublecheck the VFD parameters to see if they match the manual of the hy_vfd component.
Sorry, those answers got lost in previous posting...
I have swapped the wires, crc_cal errors are gone.
VFD parameters checked and double checked. I think one or 2 may have been different than the manual states but are now set accordingly.
With regards to the ground. [electronitwit mode]
Can that be connected to any ground I can find, like the steel cabinet, or should this connect to " the" ground in the inverter?
I can only find the big ground (for larger wire) in the inverter and there is a connector that is labeled with a big fat minus, which is not that clear to me.
[/electronitwit mode]
Please Log in or Create an account to join the conversation.
Now that you changed the VFD settings to the ones in the manual, please replace the 'loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -r 38400' line in your custom_postgui.hal with the following:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0
If that does not work, you may try this:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -r 19200 -b 8 -p none -s 1 -t 1 -g
Please Log in or Create an account to join the conversation.
ERROR Communication time out (-12)
error reading setup from VFD, retrying
WAIT_DATA(): comms time out
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -r 19200 -b 8 -p none -s 1 -t 1 -g Gives new errors:
Ground wire connected, makes no difference in anny of the three " loadusr" lines.vfd: device='/dev/ttyUSB0', baud=19200, bits=8, parity='none', stopbits=1, address=1, debug=1, PID=2733
Opening /dev/ttyUSB0 at 19200 bauds (none)
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)...
read 1 bytes: 0x00
message was incomplete, length still to read = [07]
WAIT_DATA(): comms time out
ERROR Communication time out (-12)
read_setup: FAILED
error reading setup from VFD, retrying
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 18789
- Thank you received: 6311
Not me, sorry.No one has any thoughts?
Please Log in or Create an account to join the conversation.
It mentions:
Question:What should I do if the RS485 short-range communication is abnormal?
Answer:
Remove the 120-ohm termination matching resistor from RS485.
Is that something that I might try?
Please Log in or Create an account to join the conversation.
The bits that seem to matter:
xhc-hb04.tcl: !!! <halui.spindle.stop> target pin does not exist, continuing xhc-hb04.tcl: !!! <halui.spindle.start> target pin does not exist, continuing
I think that this might be important too.
It appears that you have updated from 2.7 to 2.8+ and there are hal pin name differences between the two as LinuxCNC now supports multiple spindles.
linuxcnc.org/docs/2.8/html/getting-start...iple_spindle_support
It says there that the update script will fix the hal pin names, but you have found a gap in the coverage, as you seem to have a custom xhc-hb04.tcl file in your config? The updater script only fixes HAL and INI files.
Try editing that file so that halui.spindle.start is halui.spindle.0.start and the same for spindle.stop.
linuxcnc.org/docs/2.8/html/man/man1/halui.1.html
I think that this might be the only problem, the hy_vfd module does send a lot of spurious error messages before it is enabled.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- drivers for waveshare RS 485 usb serial converter for huangyang vfd