Competing interests of VFD and XHC-HB04 (with my own ignorance!)

More
8 years 4 months ago #112371 by TRAUPMANN00
After some trial and 'computer language" (wife's term) i got the xhc-hb04 running. Now I am trying to get the VFD spindle running with the a RS485-USB connector. The LinuxCNC Error messages are complaining about the xhc-hb04 pin existences.

Data:
LINUXCNC - 2.8.0-pre1-3732-g6ab2798
MESA 6i25 Board
MESA 7i76 Daughter Board (minor stepgen add due to 1st bay being dead)

Machine self-built 48x48x10 inches
(4) NEMA 34 Steppers
Huanyang hy02d223b VFD spindle
xhc-hb04 wireless
RS485 /USB connector (attempted both wirings)


Machine runs OK
XHC-HB04 worked OK prior to starting VFD implementation.
Spindle ran OK in Manual, before attempting the RS485 set-up changes


File Attachment:

File Name: LinuxCNCErrors.txt
File Size:125 KB


File Attachment:

File Name: 48x48x10_G...6-14.hal
File Size:12 KB

File Attachment:

File Name: 48x48x10_G...6-14.ini
File Size:13 KB

File Attachment:

File Name: custom_postgui.hal
File Size:0 KB

File Attachment:

File Name: custom.hal
File Size:0 KB

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

More
8 years 4 months ago - 8 years 4 months ago #112428 by andypugh
Does the PyVCP panel load?

The important errors are
Code:
xhc-hb04.tcl: !!! <halui.spindle-manual-stop> target pin does not exist, continuing xhc-hb04.tcl: !!! <probe-in> target pin does not exist, continuing ... custom_postgui.hal:7: Pin 'pyvcp.spindle-at-speed' does not exist

The first two indicate that all is not ideal with the xhc setup but those are not causing the problem as far as I can see. The real problem seems to be the missing "pyvcp.spindle-at-speed" LED on the custom panel.

Looking at the [HAL] section
Code:
[HAL] # TWOPASS = on HALUI = halui HALFILE = 48x48x10_Gantry.hal HALFILE = custom.hal # HALFILE = LIB:basic_sim.tcl HALFILE = LIB:xhc-hb04.tcl POSTGUI_HALFILE = postgui_call_list.hal SHUTDOWN = shutdown.hal POSTGUI_HALFILE = custom_postgui.hal HALUI = halui

You have HALUI = halui twice. I think it should exist only once, but that probably doesn't cause a problem.

I am not sure if you can have two POSTGUI_HALFILE entries, though it does seem to be calling the second one (as that is where the error is being raised).
Last edit: 8 years 4 months ago by andypugh.

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

More
8 years 4 months ago #112444 by TRAUPMANN00
By removing the duplications, and moving some commands to custom.hal and commenting out some in custom_postgui the linuxcnc panel how shows. But the VFD does not respond to any command

I have done what the hy_vfd man page and the vfd instructions in several other locations suggest. From all indications, linuxcnc is recognizing the VFD, but for some reason I cannot get data to the VFD.

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

More
8 years 4 months ago - 8 years 4 months ago #112456 by curtisa
Are you sure you have your comms set up correctly in the VFD settings (baud rate, parity, slave address, RS485 enabled etc)?

I'm not sure if it makes a difference, but this line in your 48x48x10_Gantry_2018_06_14.hal file:

Code:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 19200

...in the examples I've seen usually is inserted in custom.hal. It certainly is in my case and it works fine on my machine. IME if Axis can't initiate comms to the VFD for whatever reason, it just carries on regardless and you end up with a spindle that you can't run and no reported errors as to why.

You can manually invoke the hy_vfd comms routines in a terminal window to check it will actually work. This post by Andypugh should get you going. Note that the commands he lists assumes that the default comms values are being used by your VFD (ie bits = 8, baud = 38400, parity = odd, stop bits = 1, slave address = 1) and that your USB-RS485 converter does actually appear at ttyUSB0. If not, modify the loadusr command with the appropriate switches and values as required (note, the '-g' switch Andy gives in his example didn't work for me and gave me an error if I used it. You can leave it out if you wish)
Last edit: 8 years 4 months ago by curtisa.

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

More
8 years 4 months ago #112562 by TRAUPMANN00
Sorry for the delay (-- visiting Relatives)

I am sure the settings are correct.
I have moved the loadusr statement back and forth several times with no difference.
USB0 is correct.


I read the other post you referred me to and made the same errors as the other person until I got what looks like the same result as the other fellow.

File Attachment:

File Name: show_pins.txt
File Size:2 KB


So now I know that the computer is talking to the VFD, but my program is not. Little has changed in the files other than repairing the issues you mentioned earlier. I have followed the code from the examples.

I don't own or have access to a decoder ring, I just copy the examples and play with what is there until something works.
I know very little python
I know even less structure of LinuxCNC
I realize you are doing this as a courtesy on your time, and I'd repay with my equal time if I could (need a dummy?)

So can you provide me with some part of that decoder ring to get me off dead zero! I have obviously missed the first classes of the LinuxCNC world and am trying to catch up.
Attachments:

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

More
8 years 4 months ago - 8 years 4 months ago #112601 by curtisa
Have you tried issuing the other suggested commands in the terminal window to verify you can manually start the spindle as well?

Edit: in your custom.hal file you have:
Code:
# setp vfd.enable 1

The # symbol is commenting-out the command that enables the hy_vfd comms to the spindle
Last edit: 8 years 4 months ago by curtisa.

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

Time to create page: 0.171 seconds
Powered by Kunena Forum