I’ve written a couple of posts on assembling and communicating with the 2418 CNC mill. This new post summarises how to make your workflow a little more efficient by automating the process of opening a web-based G-Code sender, that relies on a Serial Port JSON Server to communicate with the Mill. If that last sentence doesn’t make any sense, please read my previous post first: How to get a 2418 CNC mill moving.

Let’s automate the launch of JSON Server and G-Code Sender

It’s a bit tedious having to start the JSON server manually then launch the G-Code sender manually. Let’s automate it using Apple’s Automator. Automator is a program that lets you create other little programs, to automate routine tasks.

Here is a screenshot of Automator, showing what we’ll end up with. Step by step instructions are below.

Carl Turner - Mill automator - 1.png

Step by step

  1. Open Automator (find it in your Applications folder) and create a new Application.Carl Turner - Mill automator - 2.png
  2. In the far left-hand column navigate to Utilities.
  3. From the second column, drag Run AppleScript into the empty pane on the right.
  4. Change the script as pictured below, (update the path as appropriate, wherever you’ve put your serial-port-json-server file).Carl Turner - Mill automator - 3.png
  5. Next, select Internet in the far left-hand column.
  6. Drag Get Specified URLs into the right pane, underneath the Run AppleScript you just added.
  7. Remove the apple.com URL. Add http://chilipeppr.com/grbl (or whatever url you want to open).Carl Turner - Mill automator - 4.png
  8. Add another Run AppleScript below Get Specified URLs.
  9. Enter the script as pictured below. (I’m using Chrome)Carl Turner - Mill automator - 4a.png
  10. Save the file as an application. Carl Turner - Mill automator - 5.png
  11. Try it out! It should launch a new Terminal window (just minimise this), and Chilipeppr website in Chrome browser. Ready to go.

Changing the app’s icon

Let’s make the icon for our new app a little more relevant.

  1. Find an image you’d like to use for the icon. I googled milling icon and downloaded this one. It’s a PNG file, 200×200 pixels.
  2. Open the icon in Preview. Select All (CMD + A) and copy (CMD + C).Carl Turner - Mill automator - 6.png
  3. Find the folder in which you saved the new Mill Control application.
  4. Right click on the file and Get Info.Carl Turner - Mill automator - 7.png
  5. LEFT click on the file’s icon. A blue outline will appear around it.Carl Turner - Mill automator - 8.png
  6. Paste (CMD + V). The icon should change. If this doesn’t work, check your file type/size. (Not sure why the file size changed, maybe it’s the addition of the icon.)Carl Turner - Mill automator - 9.png
  7. Then I put the Mill_Control.app in my Applications folder, and dragged a link to the dock, next to my CAD program Fusion 360. So it’s all together, ready to go!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s