Boxford CNC Program can't find machine plugged into to ttyS0

Questions about Wine on Linux
Locked
noah.gleason
Newbie
Newbie
Posts: 1
Joined: Thu Sep 27, 2018 4:58 pm

Boxford CNC Program can't find machine plugged into to ttyS0

Post by noah.gleason »

Hello, I'm trying to run a Boxford 160 TCL lathe using the Boxford V10 software, which (unsurprisingly) I couldn't find the AppDB. I'm using Ubuntu 18.04 and Wine v3.0.3, and I've used winetricks to install mfc42.dll. My default windows version is set to XP because I got this software working on an XP laptop before. I've made the symlink from ~/.wine/dosdevices/com1 to /dev/ttyS0, and added myself to dialout. I know ttyS0 is the correct serial port because the first line of output from

Code: Select all

sudo cat /proc/tty/driver/serial
changes from

Code: Select all

0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
to

Code: Select all

0: uart:16550A port:000003F8 irq:4 tx:0 rx:0 CTS
when I plug in the lathe. However, when I try to use the Boxford software to run the lathe it says it isn't plugged in. The output from wine is:

Code: Select all

005a:fixme:font:get_outline_text_metrics failed to read full_nameW for font L"Ani"!
005a:fixme:htmlhelp:HtmlHelpW HH case HH_INITIALIZE not handled.
005a:fixme:ntdll:server_ioctl_file Unsupported ioctl 1b0044 (device=1b access=0 func=11 method=0)
005a:fixme:ntdll:server_ioctl_file Unsupported ioctl 1b001c (device=1b access=0 func=7 method=0)
005a:fixme:htmlhelp:HtmlHelpW HH case HH_UNINITIALIZE not handled.
My computer is a Dell Optiplex 360. Thanks in advance for the help!
ldkraemer
Level 1
Level 1
Posts: 6
Joined: Sat Oct 20, 2018 12:19 pm

Re: Boxford CNC Program can't find machine plugged into to t

Post by ldkraemer »

On your Windows machine running the CNC Software search for the Fonts that are being used, to see if any
are *ANI*.* or L*ANI*.* (fon or ttf). You need to copy those to a FONTS folder that is in:

Code: Select all

/home/user/.wine/drive_c/windows/Fonts/
Or, copy all Font files and paste then into the above folder.


Are you trying to use the standard Serial Port on a Windows or Linux Box to access the CNC Machine?
Or, do you have a USB to Serial Dongle that is connected to the CNC Machine?

I'm going to assume it's a standard Serial port for now. To locate the possible COMM PORTS in Linux,
cut and paste the following commands into a Terminal Window:

Code: Select all

ls -l /dev/ttyS*
Notice that ttyS0 through ttyS3 are detected as shown.
crw-rw---- 1 root dialout 4, 64 2009-11-27 15:26 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2009-11-27 15:26 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2009-11-27 15:26 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2009-11-27 15:26 /dev/ttyS3

Your commands should be very similar, showing dialout has permission (rw) to use the port.
Now you need to determine the Baud rate of the Port:

Code: Select all

stty -F /dev/ttyS0 -a
and to change it to what the CNC Machine requires. (perhaps 9600,8,1,N)

Code: Select all

stty -F /dev/ttyS0 9600
stty -F /dev/ttyS0 -a
Something like this:
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^A; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke
If you connect the serial port to another computer or Dumb Terminal for testing you can transmit out an "ATZ"
to see that everything is working.

Code: Select all

echo ATZ > /dev/ttyS0
You should have documentation on the CNC Software telling Baud Rate, Bits per Char, Stop Bits, and Parity.
Those will all have to be set correctly, to get the communications working.

Code: Select all

man stty
will give you the information on setting those changes.

Now that you have the Serial Port Transmitting (and Receiving), then make the symbolic link
to the Port for the Windows CNC Software running from Wine.

Code: Select all

ln -s /dev/ttyS0 ~/.wine/dosdevices/com1
But, you also need to edit the registry.

Code: Select all

gedit ~/.wine/system.reg
This is the common option that works with most applications:

[Hardware\\Devicemap\\Serialcomm] 1231984861
"Serial0"="COM1"

The other one is:

[Hardware\\Devicemap\\Serialcomm] 1131331688
"COM1"="COM1"

There may be apps that don't read this registry key when looking for serial ports.
You also may need to provide Hardware Handshaking between the Computer and CNC Machine.
You can OHM out the current cable and draw out the diagram to figure out if it a NULL Model
or Full Handshake Cable.

If you have a USB Dongle I also have the extra information for that.


REF: https://www.onetransistor.eu/2015/12/wi ... linux.html
http://www.burnsim.com/linux.asp

Thanks.

Larry
Locked