Author Topic: Morbidelli/XXL format  (Read 8611 times)

Offline lamanna

  • Ewok
  • *
  • Posts: 3
    • View Profile
Morbidelli/XXL format
« on: July 06, 2014, 23:17:05 pm »
Hi all,

I began writing some code to convert Mach3 post-processor output into something a Morbidelli machine I have access to can understand. I was wondering if it's a bit over kill and perhaps can be achieved by Cambam macros, etc.. The Morbidelli wants the file in pgm format (binary) but I've used a converted to get it into xxl format (text). Here's a very short snippet of the style:
Code: [Select]
H DX=670 DY=500 DZ=25 -A R1 /DEF
F1         
O Y=0 Z=-13
C0
G0 X=70 Y=80 Z=0 V3 T11
G1 X=70 Y=235 Z=20 V4
G1 X=70 Y=70 Z=20 V4
G0 X=100 Y=80 Z=0 V3 T11
G1 X=100 Y=235 Z=20 V4
G1 X=100 Y=70 Z=20 V4

The obvious thing is how explicit it is, it must have the stock dimensions at the top (DX, etc..) and each movement command must specify an X, Y and Z. Is there a way to get this type of output from Cambm or should I continue writing my application?

Cheers.

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8331
    • View Profile
Re: Morbidelli/XXL format
« Reply #1 on: July 06, 2014, 23:55:19 pm »
Lamanna,

I don't know what the C0 is about.  You'll have to explain.

CB can output a stock line, and it can produce what you need with a post-build processor (part of the post processor mechanism), if not by the internal post processor macros already in effect.

The rest of the code displayed as you have shown it can be done by CamBam's post processor system without any external help.  But that's text... you say it must be binary???

I wonder if it's just text in a .pgm type file -- is that possible?  If not, can you give us the precise format?   The post-build processor feature is likely the best way to get there.  It can invoke any process you need.  It's easy, and becomes an 'automatic' part of CB's g-code creation, so you don't need to run any external scripts to get your code right.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline lamanna

  • Ewok
  • *
  • Posts: 3
    • View Profile
Re: Morbidelli/XXL format
« Reply #2 on: July 07, 2014, 00:22:57 am »
Hi Lloyd thanks for your help.

I'm currently awaiting the machine's documentation (should have it tonight sometime) for explanations of commands like C0 (there's a few others I'm not sure of). I imagine they're machine specific and not much cambam can do about it other than maybe insert them verbatim.

The PGM format to XXL format, or, more precisely the binary to text conversion (and vice versa) is done by a separate process. That part is all under control now and I can probably get that to run post-build processor. Basically, the plan is to generate the gcode in cambam then run it through the binary converter before sending it to the CNC machine (via floppy disk, it's a very old machine).

EDIT: I've managed to get it outputting each axis' location on every G line so it will print X and Y coords even if they haven't changed. Haven't figured out how to change "X50" to "X=50" but I have done it in a separate application which is good enough for now.

I've managed to get the header working (DX=stock_height, etc...) but I've stumbled on two other aspects. What's the strategy for for changing the way G0, G1 codes are formatted? For example:

Code: [Select]
G0 Z3.75    # Turn this into G0 X=0 Y=0 Z=3.75
G0 X-55.0 Y-37.0    # Turn this into G0 X=-55.0 Y=-37.0 Z=3.75
G1 F300.0 Z77.6     # Turn this into G1  X=-55.0 Y=-37.0 Z=7.6
G1 F800.0 X21.0    # Turn this into G1  X=.0 Y=-37.0 Z=7.6

The feedrate I'll have to work out separately but I think I control it with V commands, I'll verify that with the documentation I get hold of tonight.

« Last Edit: July 07, 2014, 00:46:10 am by lamanna »

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8331
    • View Profile
Re: Morbidelli/XXL format
« Reply #3 on: July 07, 2014, 01:14:32 am »
Here's an example of what you can do with the post.

It creates parser errors, but good g-code (generally, although there are some problems I haven't explored, yet).

The parser errors can be suppressed in Tools/options, once you're sure a post is working properly.

Here's the code, down near the end of the post:

  <Rapid>G0 X={$move.x} Y={$move.y} Z={$move.z} V=100 (or whatever your max feedrate is...)</Rapid>
  <FeedMove>G1 X={$move.x} Y={$move.y} Z={$move.z} V={$mop.cutfeedrate}</FeedMove>
</PostProcessor>

And here's the code it makes:

G0 X=NaN Y=NaN Z=0.125 V=100
G0 X=-1.5156 Y=-1.0104 Z=NaN V=100
G1 X=-1.5156 Y=-1.0104 Z=-0.02 V=20.0
G1 X=1.5781 Y=-1.0104 Z=-0.02 V=20.0

As you can see, there are some undefined values to start with, but those can be 'fixed' with the $set commands at the beginning of the post.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline lamanna

  • Ewok
  • *
  • Posts: 3
    • View Profile
Re: Morbidelli/XXL format
« Reply #4 on: July 07, 2014, 03:17:17 am »
Ah cool that worked, thanks Lloyd

Offline buqi

  • Ewok
  • *
  • Posts: 1
    • View Profile
Re: Morbidelli/XXL format
« Reply #5 on: December 09, 2015, 12:26:10 pm »
Hi , I wana ask you something
how can I convert files to jpg , example from artcam to my cnc
I have morbidelli 430 author and I don't know how can I put files from artcam to my cnc

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8331
    • View Profile
Re: Morbidelli/XXL format
« Reply #6 on: December 09, 2015, 12:52:18 pm »
I'm kind of new at this art myself.  I've never seen a CNC machine that accepted .jpg files as the final 'machining' code.

All the ones I've worked with accept either g-code or GRBL.

Lloyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 2985
    • View Profile
Re: Morbidelli/XXL format
« Reply #7 on: December 09, 2015, 13:30:50 pm »
I'm kind of new at this art myself.  I've never seen a CNC machine that accepted .jpg files as the final 'machining' code.

All the ones I've worked with accept either g-code or GRBL.

Lloyd

 ;D ;D ;D
My 2ยข

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540