Inventables Community Forum

Developing my own macros and jog system


I’m developing my own macro sender application. I need it to zero out my X and Y axis using an endoscope camera.

I have already made a prototype for testing, so I know it will work. I love the combination of Easel as G-Code sender + Inventables Z-Prope + Fusion360. I don’t want to use UGCS every time I need to send some macros (stopping and starting EaselLocal service to free up the com-port).

This is my feature list:

  • Developed in C# and placed on GitHub as opensource
  • Talks directly with EaselLocal service using communication without change any code i EaselLocal
  • 20 or more user defined macros
  • All macros can be assigned a hotkey, that will work even when the application don’t have focus
  • One hotkey will activate/deactivate the application and put a visual indicator on the screen. This is to eliminate any macros during carving by accident.
  • Later (when macros is implemented), I will add a camera viewer (instead of AMCap).

That means that I can use a hotkey to move x/y offset after my camera is on my zero point. I will also be able to make G-Code macros that:

  • Move X +/- 1mm
  • Move X +/- 0.1mm
  • Move Y +/- 1mm
  • Move Y +/- 0.1mm
  • Move Z +/- 1mm
  • Move Z +/- 0.1mm

Assigning numpad hotkeys will make it easy to jog without going through the “Carve” button in Easel. I need that to move my camera. It also means that any jog pendant that works as a keyboard can be used.

Now here is my question. Am I allowed to communicate directly with the EaselLocal NodeJS server (asking the Inventables staff) or do I break some kind of copyright’ish thing?

I want to split my milling over days and with tool change.

Day one: Carve with 1/8 mill.Turn off machine.
Day two: Change to 1/16 mill. Home the machine and use the camera to zero x/y at the same start position as yesterday.

It will also help with double sided milling. I don’t need to use pins in my waste board or some other MDF on top of my waste board (and mill holes for pins) that will reduce the X-Carve Z height.

Here are some pictures. I haven’t mounted the camera yet. I have just finished replacing the USB cord after putting it in the drag chain. I’m also in the process of building a new waste board with T-Tracks. That’s why the inventable waste board is missing.

There is 0.1mm between these two images:

If you could send macros w/out stopping the EaselLocal service, that would be a viable option, right?

I can’t answer the copyright part of that question, but from a technical standpoint I can say we wouldn’t encourage trying to use the Easel Driver from programs other than Easel.

We definitely don’t officially support it right now. The communication protocol changes over time, and something that appears to work today might not work tomorrow. And since the Easel Driver is designed to support connections from multiple Easel instances (in multiple tabs or different browsers), and in some cases requires some fairly careful coordination between Easel and the Easel Driver, another program having subtly aberrant behavior potentially could cause problems within Easel.

I don’t want to use UGCS every time I need to send some macros (stopping and starting EaselLocal service to free up the com-port).

Not sure if you were aware or if this makes things any easier on you, but if all your Easel browser tabs are closed, the Easel Driver will close the serial port making it available for other programs.

Fair enough. I will keep my hands off EaselLocal :smiley:

I through that when first EaselLocal had opened the port, it would keep it open. Looking at the log, I can see what you mean. There isn’t any “close port”, but multiple “open port”. I just read somewhere, that you had to stop the Easel Driver service before using UGS. I should have taken my time to test it my self.

I will just open the com-port and talk directly with GRBL. Thx.

I don’t want to us UGS at all. I want to use Easel to stream the gcode. I don’t like UGS. I’ve been developing software for more the 20 years and from my point of view, Easel has the most userfriend UI compared to USG, ChilliPeppr, PicSender.

The only thing I’m missing in Easel is macros.

Charley has made an amazing piece of hardware, but it doesn’t (easily) solve 3 things:

  1. Milling odd shaped stock
  2. Engraving something like emblems
  3. Two-sided-milling

Here is an example image:

This is a stock that is 100mm in one end and 101.3 in the other end. The two line you see in the center, is not on the same side. One is on top and the other one is on the bottom. If the stock is acrylic, the two line should have been overlapping each other, but they don’t. I could kinda solve it like this:

  1. Mill out the odd shaped stock so that I have an exact square.
  2. Make sure that the stock is exactly parallel to the X-axis.
  3. Make sure that the X-axis is 90 degre angled to the y-axis (using Charleys Y-axis spacer tip).
  4. When doing the other side, repeat step 1-3.

It might work, but it is a lot of hassle.

Using the camera I drill two holes (on my drill press) in the stock like this:

  1. Place my stock randomly on my waste board.
  2. Center x/y on the first hole.
  3. Move my camera to the second hole moving only the x-axis.
  4. Ajust the stock so that the camera centers in the second hole, keeping the first hole in place using a 3mm pin (not drilled in the waste board - just holding it by hand).
  5. Repeat 1-3 on the other side of the stock.

If I’m doing single side, I just use a marker to place two dots (engraving emblems).

One importent thing. I’m also doing this because it is fun and the camera only cost $6 on ebay.:wink:

Also - I’m not asking people if they want to use a camera to zero. I’m asking whether or not people what a piece of software to send macros without having to use USG or some other advanced software. Charley is welcome - and I would love to help him - to use/modify the software, so that Easel users can use his Triquetra. My application could be modified to work like his Mach3 script:

  1. Start my application
  2. Choose zero Z axis alone or all axis
  3. Enter endmill size of choose from list.
  4. Press the go button.

Since I’m relasing it under the MIT license, he can even sell it with the Triquetra without paying me anything :smiley:

I the future I would like to upgrade it with autodetection. Using the AForge.NET library, I could let it autodetect a red dot (using a red marker) and auto zero X/Y Why? Because it is fun to do :smiley:

1 Like

Thats cool. I’ll just make it my private project. I’ll save some development time, if I don’t have to add a lot of user options for others.

I will start with a jog pendant made for my phone. Phil talked about the idea in this thread: X-Carve Wireless Pendant

I would probably buy a cheap tablet 7" android tablet, and use that (bigger buttons)

Well … yes … that’s how I understood you and Phil. That I was wasting my time :cry:

Just to make things clear. My project consists of to parts:

  1. Hardware
  2. Software

The hardware part is my camera and some kind of jog pendant like others have done here. Lets forget about the camera. Most people properly would not want that, but I do.

The hardware jog pendant could be any device acting like a keyboard:

  • Numpad keyboard through USB or wireless Bluetooth.
  • Custom build pendant like those others have build (like this X-Carve Wireless Pendant)
  • A mobile phone or tablet connection through Wifi or bluetooth.

That’s possible today using some combination of AutoHotkey and UGS commands or Easel Console. There is just a couple of problems with that:

  1. You have to navigate to UGS Commands or Easels Console.
  2. Click in the edit field to set keyboard focus.
  3. Make sure nothing else is changing keyboard focus (popup windows).

To make this work better, I will make a little software application that:

  1. Receives a keystroke without the need for focus (key is user defined).
  2. Translate the keystroke to a G-Code macro (macro is user defined)
  3. Transmit the macro to GRBL directly through the COM port.

Since I don’t have time to make a hardware jog pendant, I will make a mobile phone version first. These two applications will be released as open source under the MIT license (read about the license here).

Why would I give the software away for free? One day, I may lose the desire to play with the X-Carve and then others could take over. To me, that would just be fair and in the spirit of the X-Carve.

@BrianVraamark Did you ever finish this concept? Macros and a physical jog device would be great for my re-centering process so I can get rid of UGS. I love Charlie’s zeroing jig but I hate opening and closing every Easel browser and unplugging my UBS every time I need to re-center my work. Also, make sure the macros can include semicolons when there are multiple commands. Last time I tried it in the Easel Command, it did not access multiple commands in a single input. Thanks.

It’s on at still stand right now, for two reasons. 1) I’m building an outdoor wood hot tub, and 2) I’m having some annoying problems with the way Easel releases the COM port.
It’s frustration that I have to close the Easel tab in the browser before I can send macros. The way I’m doing it right now is talking directly with the Easel Driver. As you can read in a previous post:

Rodovich thinks it’s a bad idea. That means that I can not make my code public :frowning: Sorry

Inventables should seriously consider making some kind of public interface/API to the Easel Driver. Taking a look at their FAQ, I found the following:

While we do not officially support custom modifications other than what is offered on our configurator, the machine itself is open source and can be modified to suit your needs.

I guess that it only means hardware modifications - not software (I’m not even modifying anything - only using it).

Inventables should seriously consider making some kind of public interface/API to the Easel Driver.

It’s public, but not documented.

If you’re interested in another developers opinion, PM me.

I solved the automatic 3-axis in Easel. Read about it here: Automatic 3-axis in Easel - Yes! it's possible

To me, undocumented equals private API equals don’t touch :slight_smile:

I’m not saying that we should have access to things like firmware updates, software updates and things like that. Just some G-Code pass-through options. What you can do connected directly to the COM port, should be possible through Easel Local Driver. It gives Easel the possibility to actually monitor the X-Carve state, even when some 3rd party tool is talking to the X-Carve. The code is already there in Easel Local Driver. They use it them self when you use the jog arrows in Easel.

BUT I totally respect Inventables decisions. They said no, and that’s it. Maybe things will change in the future.

I know this can be done. I have been using AutoHotkey in a similar way. I just don’t think it is “safe”. Losing focus because some other programs pop up during zeroing, will really mess things up. Making an official API would help a lot of others. I’m sure Charley’s tool would be even greater with that. There is a good reason why so many games support community build mods! :slight_smile:

They already have an API.

I’m not sure it’s what you’re looking for or if it has the features you need, but it doesn’t look like too many people are even developing for Easel. It’s been stagnant for some time now. They’ve introduced a few new features this year, but several of us have made numerous suggestions and they go unacknowledged. Easel ‘could’ be really powerful, but since it’s not a revenue generator, I understand their lack of attention towards it.

Easel is not same as EaselLocal

True, but:

There is no way I can push real time G-Code through the Easel API.

Are you 100% Sure there’s not?