I’ve decided to create this post as the most common issue people run into when starting up their LongMill for the first time is with connecting their machine with UGSPlatform.
From my personal experience helping LongMill users, if you are running into problems with UGS, it is likely just with choosing the right port. However I do cover some of the very very rare cases that other issues might be happening.
This post should cover in detail on connecting to your machine. You can also use some of the tips and info from this if you ever want to use a different g-code sending software as well.
Please note that as long as you follow the instructions in the LongMill resources you should be fine. This post will help you guide you through some of the lesser common issues and go into more detail on how things work.
Before you begin
There are a couple of issues that you may have with your machine that is not caused by UGSPlatform. This can include:
- Motors not running correctly or the right amount
- Issues with accuracy
- Power to the controller
I figured I would mention this in case you are troubleshooting your machine.
With UGSPlatform, you must choose the correct port to ensure that your software and machine are communicating properly.
So what is a “port”. Well essentially it is the address or location of each of the USB ports and can also include other input and output options on our computer such as Bluetooth and Ethernet.
On most Windows computers, each port is called COM then a number. For example, you may have a connection with COM3 and COM8. On most MacOS computer, the ports can be called other things, such as “cu.usbmodem14101” or “tty.Bluetooth-Incoming-Port”. There may be different designations for different computers but this is typically the most common format.
Your computer must 1) recognize that there is something plugged into your computer port 2) know how to communicate to the device that is connected to that port 3) use the correct port to communicate with the device.
For both Windows and MacOS, the baud rate is set to 115200.
For the large majority of computers, the drivers needed to communicate to the Arduino inside the controller comes pre-installed or is automatically installed when you plug in the controller. However, in the rare case that it is not, it is possible to manually install the driver.
Although we found that it is possible to just download the driver itself, we found that it is easier to download and install the Arduino IDE which comes with all of the drivers needed to connect to the Arduino. We can also use the Arduino IDE later on if we need to do additional troubleshooting.
To download the latest version of the Arduino IDE, visit the site here: https://www.arduino.cc/en/main/software
Before you open UGSPlatform
I recommend connecting your controller via USB to your computer before starting UGSPlatform. This allows your computer to download and install any drivers the first time you connect before UGSPlatform starts, as well as allowing the software to check each port for the Arduino as it loads.
Selecting your port in Windows:
Click the refresh icon then the drop down to choose a port. If you have multiple items connected, you may have more than one port available. You can try each port until you find the right one.
When you’ve connected to the correct port, you’ll get a series of messages and other info come through on the “Console” module. This window is typically on the bottom right area of the program. You may also hear a characteristic “clunk” sound when you connect as well.
In some cases, you can connect to each of the different ports, but if you are not connected to your LongMill you will not see the messages in the console.
If you have tried all of the ports and still cannot connect to your machine, you may either need to install the drivers or may need to flash the firmware onto your controller (discussed later in this post).
Selecting your port in MacOS
Click the refresh icon then the drop down to choose a port. If you have multiple items connected, you may have more than one port available. You can try each port until you find the right one. For most Mac computers the USB port is typically denoted by “cu.usbmodem” followed by a number so your best bet is to start with those. The ports with “Bluetooth” or “WirelessAP” are typically for the wireless connection so I would recommend skipping testing them.
When you connect to the right port, you should see a string of messages on your console.
If you still cannot connect
If you try all your ports and have no response, you can check if your Arduino has its firmware flashed.
All the instructions on flashing firmware can be found here: https://sienci.com/dmx-longmill/grbl-firmware/
UGSPlatform uses Java, and thus, you must have Java installed on your computer to make UGSPlaform work. The large majority of computers will already have Java installed as it is typically needed in conjunction with other softwares and your browser to do other things.
You can download the latest version of Java for your operating system here: https://java.com/en/download/manual.jsp
Because of the way MacOS is built and since you don’t have to choose between a 32 bit or 64 bit option, we won’t cover fixing issues with Java since I have not heard of or experienced any issues with Java on Mac.
However, due to the way Java and UGSPlatform work together, you may encounter some issues on Windows.
I highly recommend installing Java first before you run UGSPlatform for the first time, as it will ensure that UGSPlatform can run Java to open the program the first time.
Java not found/access error
When starting UGSPlatform, you may get a “Java not found” or similar message. This can mean several things.
First, you may not have Java installed. If that is the case, make sure to download the latest version online.
Second, UGSPlatform might not be able to find where Java was installed on your computer. The easiest way to solve this issue is to delete all of the files for UGSPlatform and reinstall a fresh version. This will typically point the program to the right direction.
Sometimes if you run into issues such as being able to open UGSPlatform, you can also uninstall and reinstall Java to try to fix this issue.
If you do not wish to delete and reinstall as you will lose your settings and layout on UGSPlatform, you can also follow these additional instructions as well to point UGSPlatform to the right location of where Java is installed:
If USG is still not able to open due to a Java access error, then there is another program on your computer blocking UGS from opening properly. UGS is usually able to automatically detect where Java is located on your computer, but since this detection is being blocked the way to fix this is to explicitly inform UGS where Java is. First you’ll need to locate Java. You can usually find it by going to the Windows file explorer under ‘This PC → Windows (C:) → Programs Files → Java → jre###‘ or ‘This PC → Windows (C:) → Programs Files (x86) → Java → jre###‘. Once inside the ‘jre’ folder, left-click the navigation path at the top of the file explorer then right-click the selected text and left click the ‘Copy’ option to copy the path.
Once the path is copied, navigate to where you downloaded UGS; this will normally be located inside your ‘Downloads’ folder. Once there, go to: ‘ugs-platform-app-2.0-SNAPSHOT → ugsplatform → etc’. In this folder should be a file called ‘ugsplatform.conf’. Opening this with a text editor like Notepad, you’ll want to find the line which says: “#jdkhome=”/path/to/jdk“, delete the ‘#’, then replace the text within the quotes with the Java path by right-clicking and selecting ‘Paste‘. The completed edit should look like this:
To confirm the changes, click ‘File‘ in the top bar and ‘Save‘. With all this done, once you go back to the UGS .exe launcher you should now be able to get UGS to start up without any errors.
The 64 bit version of UGSPlatform does not open but the 32 bit version does on Windows
This part of the post is if you can run the 32 bit version of UGSPlatform (which in practice should not matter), but might not be able to open the 64 bit version. This is likely because you have the 32 bit version of Java installed but not the 64 bit. You can try downloading the 64 bit version of Java on their website here: https://www.java.com/en/download/manual.jsp
You may need to delete and redownload UGSPlatform for it to start working if it doesn’t work right away when you click on the .exe file.
UGSPlatform allows you to choose different connection drivers. I’ve been using JSerialComm which is working well. However, some users may want to try a different driver if they are finding that connection is being lost.
Shielded USB cables with ferrite chokes or other noise reduction cables can help ensure that the connection to your machine is noise free.
The standard USB cable on the LongMill comes with ferrite chokes and shielding and has been working well for customers, however, some customers who have been using non-stock cables without extra protection have reported some issues with UGS. Excess electromagnetic interference can cause UGS to freeze or error out. If you need a longer/new cable, I would recommend a USB cable that come with features to limit EMI.
Other machine interfaces
UGSPlatform is not the only machine interface that is compatible with the LongMill. You can try other ones as well: https://sienci.com/dmx-longmill/machine-interface/
Some programs may have features you might like, or may be built on a platform that is better suited for your particular computer and hardware.
Alarms and errors
Many alarms and errors can be attributed from changes in the LongMill firmware settings. You can double check that your settings are correct by confirming them here: https://sienci.com/dmx-longmill/changing-eeprom-settings/
Arduino coming loose
If your Arduino is coming loose inside your controller, you may have connection/control issues.
You can either use a non-conductive tool to push the Arduino in through the grates of your controller, or take the panels off to get to it more easily.