drivers for waveshare RS 485 usb serial converter for huangyang vfd

More
30 Nov 2023 10:41 #286859 by SvenH
You mean the custom_postgui.hal from my configuration folder?
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.

More
30 Nov 2023 10:55 #286860 by DaBit
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.

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

More
30 Nov 2023 11:08 - 30 Nov 2023 11:13 #286861 by SvenH

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]

 
Last edit: 30 Nov 2023 11:13 by SvenH.

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

More
30 Nov 2023 15:45 - 30 Nov 2023 15:47 #286881 by DaBit
The ground of the USB->RS485 must be connected to COM/DCM on the VFD.

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 
Last edit: 30 Nov 2023 15:47 by DaBit.

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

More
01 Dec 2023 08:29 - 01 Dec 2023 08:58 #286947 by SvenH
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0gives error:

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: 

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

Ground wire connected, makes no difference in anny of the three " loadusr" lines.
Last edit: 01 Dec 2023 08:58 by SvenH.

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

More
04 Dec 2023 06:44 #287170 by SvenH
No one has any thoughts?

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

More
04 Dec 2023 12:26 #287185 by tommylight

No one has any thoughts?

Not me, sorry.

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

More
07 Dec 2023 07:17 #287418 by SvenH
In reading over the product page www.waveshare.com/wiki/USB_TO_RS485

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.

More
07 Dec 2023 09:47 - 07 Dec 2023 09:49 #287424 by andypugh

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.
Last edit: 07 Dec 2023 09:49 by andypugh.

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

Time to create page: 0.221 seconds
Powered by Kunena Forum