Using LB as gcode generator for pen plotter app

Moving along with my special app to drive an OpenBuilds (OB) Acro 1010 equipped with servo driven pen plotter head, driven by gcode generated by LB, derived from Adobe Illustrator svg image files - I have a question with regard to the coordinate boundaries of LB vs OB in the plot area. Using GRBL-M3 mode, LB generates M3/M5 code. Here’s what the test svg file looks like, and the first few lines of gcode for the case of both “absolute coords” and “user origin” mode.

This is the code prior to processing it thru a text editor to convert the M3/M5 “placeholders” to up/down S servo values and dwell delay to give the servo time to move. I tried it out on a very complex svg image and found it to be manageable, as long as I don’t try to add infills - which I don’t need right now.

Over on the OB side of the fence I set a new 0,0 origin a little bit in X,Y from the machine’s physical X,Y limit . For the case of the “absolute coords” file, OB stakes out the gcode properly and displays the graphic in its preview as it appears in LB - as reflected in its “check size” boundary for the plot. But not the case for LB “user origin” code. For that case OB’s display and “check size” stakes out an area the size of LB’s display area. In this case the entire 400 x 400mm LB work space. Why? There are no G91 related moves called for in the file that reach out to that boundary limit.

There is a case to be made for either coordinate choice in my plotter app, but I can live with the “absolute Coords” choice if necessary.

As a side note, notice there is an additional X,Y coordinate search line in the “user origin” version not in the “absolute Coords” file. Curious why that is? Also, the LB preview plot does not reflect this Extra difference. The preview plot moves thru its display in the exact same way for both files.(upload://d2L5HxNtE2Mgr4j54ERbU3tHQO5.png) Again, why is that? That kind of thru me off at one point as I was trying to decipher/compare the text code while walking the tool path thru on the preview display - as I was trying to visualize the timing and direction of servo’s up and down moves.

In User Origin mode, the first move is to send the head to the user origin point. After that the code switches to relative moves, and everything is a relative move from there. In absolute coords mode, the code just sends the machine directly to the first point, because there isn’t an absolute / relative switch in there.

I have no idea how OB’s bounds plot works. My suggestion would be to save the gcode to a file and try running it in an online sim to see if it goes outside where you think it should.

Regarding the preview being a little different, the preview doesn’t check where the physical machine is when it starts, and just assumes the machine origin (If you don’t have a laser physically connected, I don’t want the preview to have to wait for the communication timeout)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.