Created by: gwideman, Aug 2, 2012 10:51 pm
Revised by: gwideman, Sep 29, 2012 10:02 pm (13 revisions)

Overview

This page summarizes notes regarding the components of the LaserCut53 software, in the interests of understanding how to interact with it from other software.
This is primarily an enumeration of the main component and data I/O dependencies in the product, and some description of the nature and function of each.

LaserCut53.exe and PrintDriver.dll relationship

The software includes a module called PrintDriver.dll, which installs as a plugin for CorelDRAW and AutoCAD to allow those packages to send jobs "direct" to a laser cutter.
For example, in CorelDRAW, the addin presents a toolbar, whose output button invokes VBA code which exports the current drawing as an AI file (Illustrator), invokes PrintDriver via COM Automation, then tells PrintDriver to import the AI file and display a dialog that looks similar to the LaserCut application. PrintDriver's dialog shows LaserCut's version of the drawing (no editing allowed), and presents LaserCut's options for associating cut power and speed for each line color, and options for sending some immediate commands and the job files to the laser cutter.
In addition to the similar appearance and functionality, PrintDriver has all the same DLL and COM dependencies as LaserCut53.exe. For these reasons,most of the following details apply to PrintDriver.dll as well as LaserCut53.exe

LaserCut software data I/O

The diagram below summarizes the various data file inputs and outputs.
Lasercut_CompDep_FileIO1.png

Config files

File name
Role
Comments
Default.ini
Misc UI settings

language.ini
Text for many menus and labels
The exe's resources contain many strings for the UI, but strings in language.ini override them. Edit this file to fix UI strings.
syscfg.ini
Parameters for driver cards and laser cutters

LASER.ini
Parameters for laser cutters

Save, load drawing

File name
Role
Comments
ASample.ecp
Saved drawing data
This appears to be the main "drawing document" that you can save and load for further editing. "ecp" corresponds to the "EC" drawing library used by LaserCut53
ASample.ini
Snapshot of LASER.ini, plus changes made for this drawing?

ASample.G00
A binary file, format and purpose unknown

Import

File name
Role
Comments
ADrawing.plt
Import from other graphics package (here in HPGL format)
LaserCut53 will import various drawing program data formats, notably HPGL and Adobe Illustrator.

Outputs to laser cutter; Exports

File name
Role
Comments
[Commands]
Immediate commands from LaserCut53 user interface to the laser cutter
Commands such as "jog the laser head".
CFG01.TXT
Contains series of commands that appear to correspond to settings
Main body contains SYS, SET and SUB commands.
CFG01.MOL
Apparently a compiled version of the corresponding .TXT file

EXP01.TXT
Contains a series of commands that appear to correspond to cutting instructions corresponding to the drawing.
Main body contains SYS, SET, CMD and SUB commands.
EXP01.MOL
Apparently a compiled version of the corresponding .TXT file

The RELaserSoftwareproject has done some work on deducing the functions of the various commands. Also, claims to be able to compile the TXT files to MOL files by calling LaserCut's mpc05ls.dll.

Translation note

Some of the supplied files have text and comments in Simplified Chinese. I used EditPad (there's a free Lite version) to interpret the file's data as Simplified Chinese, then copy-pasted to google translate, and got a quite intelligent translation.

LaserCut53 executable dependencies

The diagram below outlines the structure of the executable by showing the dependencies between executable modules in LaserCut53. The diagram shows only LaserCut modules and omits dependencies on Windows-supplied OS modules.
Lasercut_CompDep_Components2.png
Key:
  • S: Static DLL dependency
  • D: Dynamic DLL dependency
  • C: Caller creates objects via COM Automation that the Callee implements
The Excel image below charts the dependencies, and includes OS DLLsl which gives some additional sense of what the components do.
Lasercut_CompDep_Excel1.png

Additional notes on software components and their responsibilities


Component
Description
Directories

C:\LaserCut53
Default installation directory. (Ie: not installed under Program Files)
Subdirs: amd64, i386, win98, winlh, winlh64, winlh86, winxp&2k, winxp64, winxp86
All of these contain DLLs with info that refers to SenseLock (the dongle code). These appear to be alternative implementations depending on CPU and OS.
...\shx
Fonts relating to AutoCAD
Executables

Lasercut53.exe
Main application
Lasercut53_Demo.exe
Demo version of main application
SetMode.exe
Sets the mode of the dongle (USB or HID).
DLLs

PrintDriver.dll
ActiveX (COM Automation) dll which implements plugin functions for CorelDRAW (and probably AutoCAD).
mkSetup.dll, sense4.dll
SenseLock libraries


Ec.dll, EcObExtend.dll, ExternCommand.dll, ges.dll, CNC.DLL, Halftone.dll, CommM05.dll, language.dll, ,
Other DLLs, roles to be determined.

Imported by Lasercut53.exe and PrintDriver.dll
DLLs and files supporting particular controllers

EZUSB.dll
Cypress dll providing the PC end of the various USB protocols implemented on Cypress microcontrollers.
Used by LaserCut to talk to MPC6515 (which has a Cypress chip on it).
MPC6515.inf
Install INF file for 6515
mpc03ls.inf, mpc03ls.sys, mpc03ls,vxd, mpc03ls.dll
Install and alternative driver files for Leetro MPC03 StepServo board. (Google shows this to be a PCI-bus card with DSP and FPGA.)
LV/LH picture appears to show board with TI DSP and Xilinx FPGA.
mpc03lx.dll
Driver for Leetro MPC03LX PCI-bus controller card, successor to MPC03lv?
mpc05ls.dll
Driver for Leetro MPC05 stand-alone controller. The MPC05 appears to have a TI DSP and Xilinx FPGA, and connects via USB, so may share code with the later MPC6515.
MVC1000.DLL, MVC1000.Inf
Driver for Microview MVC1000 Camera
GT400.sys, GT400.inf, GTDLL.dll
Driver for GoogolTech GT-400 and GoogolTech GW-300 ISA and PCI-slot cards with DSP and FPGA.
GTDLL.dll's exported functions look very similar to the library described in the "Programming Manual for GT Series Motion Controller":

Further Detail

More insight into the detailed functionality of the various DLLs can be gathered from API listings:
  • Import and Export listings for DLLs (use dumpbin or PEExplorer)
  • COM APIs for those dlls with a COM interface; Use Visual Studio COM object tool to produce IDL listing.
[All done, awaiting upload]

Open Questions

The following questions remain open at this point with respect to the most useful ways to bypass or harness Lasercut's modules:
  • If the goal is to replace Lasercut software entirely:
    • What is the vocabulary and coding of the MOL files? Ie: What are the primitives that a Leetro controller understands?
    • What are the immediate commands and how does one send them via USB (ie: replace the functions of CommM05.dll).
    • How sensitive is this to version of firmware on the controller?
  • If the goal is to bypass only the Lasercut executable (or equivalently, the PrintDriver DLL), then:
    • What is the possible vocabulary in the TXT export files?
    • Can it be reliably compiled using Lasercut's mpc05ls.dll?
      • Are the function signatures that ReLaserSoftware has for mpc05ls.dll (not current version) sufficient?
    • What is the API (including function signatures) of CommM05.dll? Or how to replace?
    • What are the version dependencies?

Notes:

The laser cutter driver DLLs mpc03ls, mpc03lx and mpc05ls all export many functions that look like they might be primitive laser cutter functions. What is not clear is whether these commands are sent more-or-less verbatim as SET and CMD commands (in the export files) to the MPC6515 controller, and/or does the compile process (which translates TXT files to MOL files) translate these commands to lower-level finer-grained instructions for the MPC6515's DSP and FPGA?