Script call the section where the Max. and Min. Power and the Speed are assigned to each “Cut” (area):
(1) The closed contours are defined by a list of data points;
(2) A given area where the Power and Speed are to be assigned is defined as the area that is the INTERSECTION , UNION , etc. of the two (or multiple) lists [This defines the desired area];
(3) The Power and Speed assignment functions (or classes) are called with the Power and Speed parameters;
(4) The “Download” and the “Start” can be done manually;
If the Laser can be controlled by user written G code (do we need to bypass LaserCAD?), generating G code automatically (is there “Laser Power” equivalent of “F(eed speed)xy.z”?) seems to be the option with more control?
from my understanding LaserCAD is just pipeing gcode to the serial port. I think laser power would be defined by G50 which is spindle speed.
You could always install lasercad on your home machine and listen to the serial port and see what is coming out of it and see if you can reverse engineer it.
Keep in mind that unlike many of the tools in the space, the laser cutter is designated as ‘not hackable’. While it has its limitations, LaserCAD imposes constraints on the parameters that prevent the machine and the laser tube from being damaged. This probably rules out directly interfacing with the machine with G-Code or bypassing LaserCAD. (At least without ample testing and LCC approval.)
Depending on what you’re trying to accomplish, there might be a few other approaches:
A script that automatically/semi-automatically interacts with LaserCAD interface. (This could be done using the Python PyAutoGUI package to control the mouse and keyboard, for example.)
A script/program that imports geometry and outputs a LaserCAD project file (e.g. .pwj5)
If you provide a little bit more information on what you’re trying to accomplish or what limitations you are running into, that would be helpful.
Also, the laser doesn’t just do G-code… any efforts that have been taken in the past (by members or with approval of the LCC) have so far not resulted in anything.
We made a lot of “Engraved” Greeting Cards for Christmas on LaserCAD on home PC and opened the .pwj5 files at the Space (LaserCAD files are not even LaserCAD compatible!). We saw nothing (zoom, zoom to objects, etc. did nothing), which provided the motivation to understand .pwj5 file data.
(@mike , the .pwj5 files are ASCII and special characters)
There is no plan to “hack” the Space’s Laser, but just “monitor” (Bus Analyze) the communication between the Cutter and the PC.
Thank you @Jarrett for awesome Altium hack, that’s seems a real good ‘data scraping’ tool!
The aim(s) is-are:
(1) To edit LaserCAD files either in LaserCAD format (seems many have tried to do that);
(2) Control the laser from G-Code (needs to be safety approved);
(3) “PWM” (Pulse Width Modulate) the Laser safely;
(4) See if a Fiber Laser (it is not procured) can be mounted on Luke Brooks’ wood router and controlled from LaserCAD or G-Code (to cut sheet metal possibly? if the enclosure seals off the cutter);
I’m still not clear if this is the main problem you’re trying to solve or not, but I would have started with this:
This is helpful information. Getting members to use LaserCAD on the own machines was thought to be a good idea to reduce setup time, but only if the project files are compatible. Attempting to sort this out would be a good starting point.
e.g.:
What version of LaserCAD do you have at home?
Which version of LaserCAD was running at the time at the space?
The other approach would be to look at your workflow:
How many different designs are we talking here? 10’s? 100’s?
Do you maintain your design in a ‘neutral’ / compatible format ? e.g. svg, dxf?
Do you use color in the design to indicate different operations (power/speed)?
For example, you can import a first design (with properly setup color), setup the cutting parameters, then save the project. Importing a second design with the first still open retains the cutting parameters of the first. You can then remove the first design, save the project, and repeat.
Yet another option may be to (work with the LCC to?) modify the default cutting parameters of different colors.
–
As far as I understand, LaserCAD transmits an intermediate file to the Laser controller (e.g. a .ud5 file) over an ethernet connection when you ‘download’ a file and doesn’t stream commands. You can save a copy of this (binary) file from the download dialog box and attempt to analyze/reverse engineer it as above.