drivers for waveshare RS 485 usb serial converter for huangyang vfd

More
2 years 11 months ago #286854 by DaBit
Let's focus on the HuanYang VFD first, shall we? That one is blocking, HB04 accelerations are not. 

Since the wiring and VFD configuration worked fine with 2.7 we have two possibilities for the hardware setup:
- Configuration is correct, issues are purely software related.
- Configuration was not correct, and some setting was not important with 2.7 while it is with 2.9

Does anyone know about such a setting? I am not too familiar with the HY-VFD component. 

@SvenH: can you:
- Check the setting of VFD parameters PD001, PD002, PD163, PD164, PD165? They should match this document: linuxcnc.org/docs/html/man/man1/hy_vfd.1.html
- Check that D+ and D- lines from the USB->RS485 converter match the corresponding terminals on the VFD. The CRC errors could be related to + and - being swapped.  (here is someone else with similar issues:  forum.linuxcnc.org/49-basic-configuratio...h-hy-inverter#148533 )
- Paste the hy-vfd component instantiation from your postgui HAL here too so others can have a look. 


Then about the software. The hy_vfd component seems to have changed 2 months ago: github.com/LinuxCNC/linuxcnc/tree/master...r_comps/huanyang-vfd
Seems unrelated, but could that be causing issues?

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

More
2 years 11 months ago #286858 by SvenH
All errors I now get are:

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

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

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

ERROR Communication time out (-12)
error reading setup from VFD, retrying
Shutting down and cleaning up LinuxCNC...
WAIT_DATA(): comms time out

task: 1567 cycles, min=0.000008, max=0.013308, avg=0.009983, 0 latency excursions (> 10x expected cycle time of 0.010000s)
A non blocked signal was caught
xhc-hb04: connection lost, cleaning up
hm2_5i25.0: dropping AnyIO board at 0000:04:00.0
hm2/hm2_5i25.0: unregistered
RTAPI_PCI: Unmapped 65536 bytes at 0x7fe58895f000
hm2_pci: driver unloaded
hm2: unloading
WAIT_DATA(): comms time out

ERROR Communication time out (-12)
error reading setup from VFD, retrying
Note: Using POSIX realtime

Adding additional info in next post.

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

More
2 years 11 months ago #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
2 years 11 months ago #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
2 years 11 months ago - 2 years 11 months ago #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: 2 years 11 months ago by SvenH.

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

More
2 years 11 months ago - 2 years 11 months ago #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:

Code:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0


If that does not work, you may try this:
Code:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -r 19200 -b 8 -p none -s 1 -t 1 -g 
Last edit: 2 years 11 months ago by DaBit.

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

Time to create page: 0.324 seconds
Powered by Kunena Forum