Combining Two G-code Files

This forum is for general discussion about PhotoVCarve.
Post Reply
User avatar
JJWMACHINECO
Vectric Craftsman
Posts: 143
Joined: Tue Aug 04, 2009 2:15 pm
Model of CNC Machine: Re-worked/Modified K2CNC KG-3925
Location: Deep South

Combining Two G-code Files

Post by JJWMACHINECO »

We have been experimenting with combining two CNC processes (Spindle + Laser) and have not been very successful using Photovcarve. We need to generate a spindle g-code file ("Z" axis Depth) using a greyscale height map image and a laser gcode ("A" laser power) from the original image the height map was created from for lasering shades on the spindle relief afterwards. The reason for doing this to have the laser's focal point follow the relief's contours to stay in focus to shade it properly.

In order for this to work, the two files need to have the same line count in the two files. My son wrote a program that copies the A axis commands from one file and pastes it next to the Z axis commands in the other file and it creates a third file with the commands combined.

Synchronization is very important for this to work properly and we have been successful using another image to gcode program, but not with PVC yet.

So here is my question. Is there a way to write a PP for PVC so it will generate all g-code axis positions for every incremental move regardless if areas next to each other are the same color? Or is it the nature of the PVC program to skip over the same color areas? This is the problem we are running across. The two different image files are shaded different, therefore the total line count is different.

To be clear, the two image sizes are the same, same tool is used, but even though the depths are different, we are able to adjust the settings to get the same line count in PVC before the codes are generated. It does require two separate PP, one for the spindle and one for the laser and we know how to edit them to change the axis letters.

Thanks. Jeff
Extensivly Re-worked/Re-designed/Modified Servo K2CNC KG-3925 and the Mini Laser Engraver

dlgabry
Vectric Craftsman
Posts: 104
Joined: Sun Apr 13, 2008 2:20 pm
Location: Olivebridge, NY

Re: Combining Two G-code Files

Post by dlgabry »

Hi Jeff,
Just sent you an email
Dave

Post Reply