Parport to 7i92

More
04 Jul 2022 12:08 #246576 by andypugh
Replied by andypugh on topic Parport to 7i92
I had trouble with one of my HY VFDs. I can't remember in which direction the problem went, it was either that the VFD was ignoring its front panel, or the HAL driver was not responding to settings changes in the loadrt line.

Looking around previous forum threads I found a suggestion (from me) that the VFDs might ignore their parity setting, so it is worth experimenting with -pnone even if that is not the setting in the VFD.
forum.linuxcnc.org/12-milling/45214-fail...523b?start=10#237485

In fact, you might want to try connecting to the VFD at the command line and working through all the variations...

Open a terminal and:
halrun
loadusr -W hy_vfd -d /dev/ttyUSB0 -r 19200 -b8 -pnone -s1  -t1
setp hy_vfd.enable 1

Then if that doesn't work, you can
unload hy_vfd
And try again with different baud rate, parity, etc.

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

More
04 Jul 2022 21:51 #246599 by looping
Replied by looping on topic Parport to 7i92
Ok
On my new LinuxCnc computer, added a second hard drive and installed Win10. Dual boot. So now exactlty the same hardware.
Booting on Win10, with SpindleTalker2 I have everything working well : Com1, 8 bits, 9600bds, 1 stop, no parity
Logic analyser capture on Rs232 pins Rx, Tx, Dtr Rts (see:SpindleTalker2.png)

Reboot on Linux

loadusr -W hy_vfd -d /dev/ttyS0 -r 9600 -b8 -pnone -s1  -t1 --debug
setp hy_vfd.enable 1
Comms error (see IMG_20220704_232136.jpg)

But the LinuxCnc and the analyser agree on Tx data :0x01 0x01 0x03 0x05 0x00 0x00 0x2C 0x4F
But on Rx they don't display the same data
The analyser sees 8 bytes incomming, no framing error.( LinuxCnc.png ) The same query occurs every 600ms and the same response.
LinuxCnc expects 8 bytes, only detects 6 and not the sames values

There's an other difference SpindleTalker and LinuxCnc don't drive Dtr Rts the same way.

The more I work on this, the less I understand
Attachments:

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

More
04 Jul 2022 22:48 #246604 by andypugh
Replied by andypugh on topic Parport to 7i92
Maybe try a higher baudrate. I think that hy_vfd defaults to 19600. Possibly something is timing-out?

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

More
05 Jul 2022 10:03 #246635 by looping
Replied by looping on topic Parport to 7i92
I did try all the possible comm settings. The vfd send response only when it matches the driver settings. Obviously
But always the same comm error on incorrect number bytes received.

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

More
05 Jul 2022 10:07 #246636 by looping
Replied by looping on topic Parport to 7i92
I will try to disconnect Dtr from my pc com port and force it to Gnd to have the same level as SpindleTalker2. Regarding the rs485 adaptor schematic, it is used

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

More
05 Jul 2022 11:50 #246640 by andypugh
Replied by andypugh on topic Parport to 7i92

I did try all the possible comm settings. The vfd send response only when it matches the driver settings

Did you try 19200 at both ends? 

(And does the scope show the expected baud rates in both directions according to settings? I have have my suspicions that the hy_vfd component doesn't always honour the baudrate modifier. It would be good to have a definitive answer either way.)
 

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

More
05 Jul 2022 16:22 #246660 by looping
Replied by looping on topic Parport to 7i92
I make it run !!!

I cut the link to the Rs232 port of the PC to the Rs485 adaptor on RTS and DTR.
I straped RTS to Gnd to be in the same state as SpindleTalker2 and it's working !!!
Attachments:

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

More
05 Jul 2022 16:45 #246665 by andypugh
Replied by andypugh on topic Parport to 7i92
Good news. But weird.

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

More
05 Jul 2022 18:05 #246670 by arvidb
Replied by arvidb on topic Parport to 7i92
Maybe hy_vfd does not set up the serial port the same way as SpindleTalker2 does? It is possible to use stty to enable/disable RTS/CTS handshaking on the serial port (see 'man stty'), but I'd think those settings would be overridden by any program actually using the port later. Anyway, serial ports and their myriad of settings have always been a mystery to me under Linux... Good job of getting it working!

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

More
06 Jul 2022 15:36 #246725 by looping
Replied by looping on topic Parport to 7i92
From the sources (hy_comm.c) , no hardware flow control enabled

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

Moderators: cmorley
Time to create page: 0.096 seconds
Powered by Kunena Forum