-
-
Notifications
You must be signed in to change notification settings - Fork 768
Connecting the Controller
UGS connects to controllers either through a serial connection (typically through a USB serial port on your machine), or a network connection.
UGS has different drivers for each type of connection. The default driver, JSerialComm
, is for serial connections. These connections require a port and a baud rate to connect to the controller. There are also drivers for direct TCP connections (TCP
), WebSocket connections (WebSocket
) for connecting to controllers over a network.
Note: Another serial driver JSSC
is available, which uses the JSSC library. Most users should use JSerialComm
.
Connecting UGS to a serial controller such as Grbl, TinyG, g2core, or Smoothie requires that the correct firmware, port, and baud rate for serial connections are set. Connecting to network based controllers such as FluidNC requires the correct firmware, host, and TCP port for network based connections.
If you don't know which serial port to connect to, generally it can be determined by downloading Arduino, and then selecting each port (Tools -> Port) then going to the serial monitor (Tools -> Serial Monitor), until you get a screen that shows some output that looks like coordinates, some help text, or some version information.
This process can also be used to rule out damaged or faulty boards, however, each type of board will have its own troubleshooting instructions for that. Board handling must be done with extreme care. Modern circuit boards have many components easily destroyed through static electricity.
The following information assumes connection to an official Arduino Uno board via a USB port, with a standard Grbl hex file. Some low cost Arduino clones have trouble, notably those using a CH340
type chip. The official boards use a different chip which typically works straight away. Unofficial Grbl downloads and custom builds may use different speed settings.
Port: Varies slightly for each OS and style of Arduino board.
- Windows: Try
COMx
wherex
is a number. Examples:COM6
orCOM12
for example. You may seeCOM1
is often a dedicated serial port on the PC's motherboard. Very old Arduino boards use this style of connected, "D-sub 9", though incredibly rare. - Linux: Try
/dev/ttyACMx
or/dev/ttyAMAx
wherex
is a number (usually0
). Example:/dev/ttyAMA0
. You may see/dev/ttyS0
as an option, this is the same asCOM1
in Windows. - Mac OS X: Try
/dev/tty.usbmodemfdxxxx
wherexxxx
are some numbers.
Speed: for v0.9
and newer speed: 115200
; for older than v0.9
use 9600
.
If you are still having problems and you have a clone board, the CH340
chip may be to blame. Some users have trouble, while others report success. It may be a certain combination of drivers and/or circuit layout that is to blame, and using a different Arduino board may be the answer. If you have a CH340
chip and are running Windows or Mac OS X, check you have the drivers installed. CH340
Drivers for Windows. CH340
Drivers for Mac OS X.
The Grbl Wiki has additional information.
The following assumes you have some sort of network to USB serial port sharing (such as socat
on a Raspberry Pi), or a Grbl board that has an ethernet port, and that it is set up and tested to connect to the serial port already.
To configure UGS for Grbl + Network, first enable the TCP driver:
- In UGS select Tools -> Options (Windows and Linux) or ugsplatform -> Preferences (macOS).
- Click UGS.
- Select the Sender Options tab.
- Under Connection driver select
TCP
and click OK
Then, configure the controller:
- Back in the main page, under Firmware at the top select
Grbl
. - For Host, enter the IP address or hostname of your Grbl board.
- For Port enter
23
.
TinyG has excellent and detailed setup documentation.
Smoothie support is still open per issue #204. Your mileage may vary.
The process for connecting over USB remains the same for Grbl. The official Smoothie Wiki USB page will help provide some specific details for the driver.
There is also support for connecting over a network. The official Smoothie Wiki network page has instructions for setting up the configuration file. The main values you need under the network settings are:
network.enable true # enable the ethernet network services
network.telnet.enable true # enable the telnet server
The remaining network settings in Smoothie should be confirmed from the Smoothie wiki or sample configuration and checked against your local network. It is recommended to enable the webserver and check you can access it before configuring UGS.
To configure UGS for Smoothie + Network, first set the correct driver:
- In UGS select Tools -> Options (Windows and Linux) or ugsplatform -> Preferences (macOS).
- Click UGS.
- Select the Sender Options tab.
- Under Connection driver select
TCP
and click OK.
Then configure the controller:
- Back in the main page, under Firmware at the top select
Smoothie
. - For Host, enter the IP address or hostname of your Smoothie board.
- For Port, enter
23
.
To connect to FluidNC over the network, you first need to enable the Telnet port in FluidNC.
Note: UGS does not use a Telnet client, but will use this port to send and receive commands and responses.
First, make sure the TCP driver is enabled:
- In UGS select Tools -> Options (Windows and Linux) or ugsplatform -> Preferences (macOS).
- Click UGS.
- Select the Sender Options tab.
- Under Connection driver select
TCP
and click OK.
Then, configure the controller:
- Back in the main page, under Firmware at the top select
FluidNC
. - For Host, enter the IP address or hostname of your Smoothie board.
- For Port, enter
23
.