Table of Contents

Calculate

<big>

 Generate a temp BMP in the $PROGDIR$ folder
 Generates a G00 file ( Binary format, not same as MOT/TXT)

Download

 Converts the G00 to a TXT/MOT which is then uploaded to the laser. Needs laser to be on.

Printer Driver

 Have a Windows 7 raster print driver to start with, need some more CMD's from the TXT file.
 Checked in basic windows xpsras ddk sample into SVN (probably needs to be in DDK src/print/ folder)

SDK/API

 typedef int (WINAPI *t_M05_access_flash)(DWORD type,PDWORD data);
 typedef int (WINAPI *t_M05_arc_center)(int ch1,int ch2,long cenx,long ceny,double angle);
 typedef int (WINAPI *t_M05_arc_final)(int ch1,int ch2,int dir,long fx,long fy,long r);
 typedef int (WINAPI *t_M05_call_sub)(int subid, double* param, int paramnum);
 typedef int (WINAPI *t_M05_change_voltage)(int v);
 typedef int (WINAPI *t_M05_check_alarm)(int ch);
 typedef int (WINAPI *t_M05_check_batch_done)();
 typedef int (WINAPI *t_M05_check_buffer)(int BufferType);
 typedef int (WINAPI *t_M05_check_done)(int ch);
 typedef int (WINAPI *t_M05_check_ecp_num)();
 typedef int (WINAPI *t_M05_check_EncA)(int ch);
 typedef int (WINAPI *t_M05_check_EncB)(int ch);
 typedef int (WINAPI *t_M05_check_EncZ)(int ch);
 typedef int (WINAPI *t_M05_check_home)(int ch);
 typedef int (WINAPI *t_M05_check_limit)(int ch);
 typedef int (WINAPI *t_M05_check_SD)(int ch);
 typedef int (WINAPI *t_M05_check_status)(int ch);
 typedef unsigned int (WINAPI *t_M05_check_status32)(int ch);
 typedef int (WINAPI *t_M05_checkin_bit)(int cardno,int bitno);
 typedef int (WINAPI *t_M05_checkin_byte)(int cardno);
 typedef int (WINAPI *t_M05_close_file)();
 typedef int (WINAPI *t_M05_close_link)(int ch);
 typedef int (WINAPI *t_M05_compile_work_file)(char* filename);
 typedef int (WINAPI *t_M05_comm_read_data)(DWORD dwDataLenBytes, PBYTE pchDataIn, PBYTE pchDataOut);
 typedef int (WINAPI *t_M05_control_func)(int FuncID);
 typedef int (WINAPI *t_M05_con_hmove)(int ch , int dir);
 typedef int (WINAPI *t_M05_con_hmove2)(int chx , int dirx , int chy , int diry);
 typedef int (WINAPI *t_M05_con_hmove3)(int chx , int dirx , int chy , int diry , int chz , int dirz);
 typedef int (WINAPI *t_M05_con_line2)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_con_line3)(int chx , long disx ,int chy , long disy ,int chz , long disz);
 typedef int (WINAPI *t_M05_con_pmove)(int ch,long step);
 typedef int (WINAPI *t_M05_con_pmove2)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_con_pmove3)(int chx , long disx ,int chy , long disy ,int chz , long disz);
 typedef int (WINAPI *t_M05_con_vmove)(int ch , int dir);
 typedef int (WINAPI *t_M05_con_vmove2)(int chx , int dirx , int chy , int diry);
 typedef int (WINAPI *t_M05_con_vmove3)(int chx , int dirx , int chy , int diry , int chz , int dirz);
 typedef int (WINAPI *t_M05_create_file)(PBYTE filename, DWORD filelenbytes);
 typedef int (WINAPI *t_M05_c_change_voltage)(int v);
 typedef int (WINAPI *t_M05_c_curve_begin)();
 typedef int (WINAPI *t_M05_c_curve_end)();
 typedef int (WINAPI *t_M05_c_curve_vertex)(int IsMove);
 typedef int (WINAPI *t_M05_c_delay_time)(int ms);
 typedef int (WINAPI *t_M05_c_fast_line2)(int chx,long disx,int chy,long disy);
 typedef int (WINAPI *t_M05_c_move_start)();
 typedef int (WINAPI *t_M05_c_move_pause)();
 typedef int (WINAPI *t_M05_c_move_resume)();
 typedef int (WINAPI *t_M05_c_move_stop)();
 typedef int (WINAPI *t_M05_c_set_laser_mode)(int mode);
 typedef int (WINAPI *t_M05_c_set_blow_mode)(int mode);
 typedef int (WINAPI *t_M05_c_set_commonIO_3)(int mode);
 typedef int (WINAPI *t_M05_c_set_common_IO)(int PortID,int mode);
 typedef int (WINAPI *t_M05_c_set_max_accel)(double ac);
 typedef int (WINAPI *t_M05_c_set_move_profile)(double ls, double hs, double ac);
 typedef int (WINAPI *t_M05_c_set_power)(int LowPower,int HighPower, double LowSpeed, double HighSpeed, int Mode);
 typedef int (WINAPI *t_M05_c_set_vector_profile)(double ls,double hs,double ac);
 typedef int (WINAPI *t_M05_decel_stop)(int ch);
 typedef int (WINAPI *t_M05_decel_stop2)(int ch1,int ch2);
 typedef int (WINAPI *t_M05_decel_stop3)(int ch1,int ch2,int ch3);
 typedef int (WINAPI *t_M05_delay_time)(int ms);
 typedef int (WINAPI *t_M05_del_file)(int FileID);
 typedef int (WINAPI *t_M05_del_all_file)(void);
 typedef int (WINAPI *t_M05_download_work_file)(char* filename);
 typedef int (WINAPI *t_M05_fast_arc_center)(int ch1,int ch2,long cenx,long ceny,double angle);
 typedef int (WINAPI *t_M05_fast_hmove)(int ch , int dir);
 typedef int (WINAPI *t_M05_fast_hmove2)(int chx , int dirx , int chy , int diry);
 typedef int (WINAPI *t_M05_fast_hmove3)(int chx , int dirx , int chy , int diry , int chz , int dirz);
 typedef int (WINAPI *t_M05_fast_line2)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_fast_line2_to)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_fast_pmove)(int ch,long step);
 typedef int (WINAPI *t_M05_fast_pmove2)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_fast_pmove3)(int chx , long disx ,int chy , long disy ,int chz , long disz);
 typedef int (WINAPI *t_M05_fast_vmove)(int ch , int dir);
 typedef int (WINAPI *t_M05_fast_vmove2)(int chx , int dirx , int chy , int diry);
 typedef int (WINAPI *t_M05_fast_vmove3)(int chx , int dirx , int chy , int diry , int chz , int dirz);
 typedef int (WINAPI *t_M05_get_abs_pos)(int ch,long *pos);
 typedef int (WINAPI *t_M05_get_board_info)(int* info);
 typedef DWORD  (WINAPI *t_M05_get_board_ver)(); // returns as packed DWORD 10.10.10.10 etc
 typedef int (WINAPI *t_M05_get_cmd_counter)();
 typedef int  (WINAPI *t_M05_get_debug_info)(LPCTSTR info);
 typedef int (WINAPI *t_M05_get_dll_info)(double* info);
 typedef int (WINAPI *t_M05_get_encoder)(int ch,long *enc);
 typedef DWORD (WINAPI *t_M05_get_err)(int index);
 typedef int (WINAPI *t_M05_get_file_num)(int* CurFileID, int* FileNum);
 typedef DWORD  (WINAPI *t_M05_get_hdw_ver)();// returns as packed DWORD 10.10.10.10 etc
 typedef DWORD (WINAPI *t_M05_get_last_err)();
 typedef DWORD  (WINAPI *t_M05_get_lib_ver)();// returns as packed DWORD 10.10.10.10 etc
 typedef int (WINAPI *t_M05_get_rel_pos)(int ch,long *pos);
 typedef double (WINAPI *t_M05_get_rate)(int ch);
 typedef int  (WINAPI *t_M05_get_sn)(unsigned char* sn);
 typedef unsigned int (WINAPI *t_M05_get_status)(int ch);
 typedef int (WINAPI *t_M05_init_board)(void);
 typedef int (WINAPI *t_M05_main_begin)();
 typedef int (WINAPI *t_M05_main_end)();
 typedef int (WINAPI *t_M05_mi_checkin_bit)(int bitno);
 typedef int (WINAPI *t_M05_mi_checkin_byte)();
 typedef int (WINAPI *t_M05_move_pause)();
 typedef int (WINAPI *t_M05_move_resume)();
 typedef int (WINAPI *t_M05_m_move_pause)();
 typedef int (WINAPI *t_M05_m_move_resume)();
 typedef int (WINAPI *t_M05_m_move_stop)();
 typedef int (WINAPI *t_M05_m_move_start)();
 typedef int (WINAPI *t_M05_m_fast_line2)(int chx,long disx,int chy,long disy);
 typedef int (WINAPI *t_M05_m_set_vector_profile)(double ls,double hs,double ac);
 typedef int (WINAPI *t_M05_m_set_vector_profile2)(double start_ls, double hs, double end_ls, double ac, double dc);
 typedef int (WINAPI *t_M05_m_curve_vertex)();
 typedef int (WINAPI *t_M05_m_curve_begin)();
 typedef int (WINAPI *t_M05_m_curve_end)();
 typedef int (WINAPI *t_M05_m_set_period)(double period);
 typedef int (WINAPI *t_M05_m_set_power)(int LowPower,int HighPower);
 typedef int (WINAPI *t_M05_m_set_laser_mode)(int mode);
 typedef int (WINAPI *t_M05_m_set_blow_mode)(int mode);
 typedef int (WINAPI *t_M05_m_set_commonIO_3)(int mode);
 typedef int (WINAPI *t_M05_m_set_common_IO)(int PortID,int mode);
 typedef int (WINAPI *t_M05_m_delay_time)(int ms);
 typedef int (WINAPI *t_M05_m_change_voltage)(int v);
 typedef int (WINAPI *t_M05_mc_set_vector_conspeed)(double conspeed);
 typedef int (WINAPI *t_M05_mc_con_line2)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_mc_delay_time)(int ms);
 typedef int (WINAPI *t_M05_mc_change_voltage)(int v);
 typedef int (WINAPI *t_M05_mc_set_laser_mode)(int mode);
 typedef int (WINAPI *t_M05_mc_set_blow_mode)(int mode);
 typedef int (WINAPI *t_M05_mc_set_commonIO_3)(int mode);
 typedef int (WINAPI *t_M05_mc_set_common_IO)(int mode);
 typedef int (WINAPI *t_M05_mc_set_vector_profile)(double vl , double vh , double ad);
 typedef int (WINAPI *t_M05_mc_fast_line2)(int chx , long disx ,int chy , long disy);
 typedef int (WINAPI *t_M05_mc_begin_cut)();
 typedef int (WINAPI *t_M05_mc_end_cut)();
 typedef int (WINAPI *t_M05_on_comm)(int ch);
 typedef int (WINAPI *t_M05_outport_bit)(int cardno,int bitno,int status);
 typedef int (WINAPI *t_M05_outport_byte)(int cardno,int byte);
 typedef int (WINAPI *t_M05_outport_data)(DWORD Addr,DWORD Data);
 typedef int (WINAPI *t_M05_open_file)(BYTE fileID, PDWORD filelen, PBYTE filename);
 typedef int (WINAPI *t_M05_open_link)(int ch, int rate);
 typedef DWORD (WINAPI *t_M05_read_data)(DWORD addr);
 typedef int (WINAPI *t_M05_reset_cmd_counter)();
 typedef int (WINAPI *t_M05_reset_err)();
 typedef int (WINAPI *t_M05_reset_pos)(int ch);
 typedef int (WINAPI *t_M05_end_backlash)(int ch);
 typedef int (WINAPI *t_M05_send_cmd)(DWORD dwDataLenDword, PDWORD pdwData);
 typedef int (WINAPI *t_M05_send_data)(DWORD dwDataLenBytes, PBYTE pchData);
 typedef int (WINAPI *t_M05_set_abs_pos)(int ch,long pos);
 typedef int (WINAPI *t_M05_set_backlash)(int ch,int blash);
 typedef int (WINAPI *t_M05_set_batch_flag)(int flag);
 typedef int (WINAPI *t_M05_set_cmd_counter)(int type,int counter);
 typedef int (WINAPI *t_M05_set_comm)(LPVOID pcMSComm);
 typedef int (WINAPI *t_M05_set_conspeed)(int ch , double conspeed);
 typedef int (WINAPI *t_M05_set_ellipse_ratio)(float ratio);
 typedef int (WINAPI *t_M05_set_encoder_mode)(int ch,int mode,int multip,int count_unit);
 typedef int (WINAPI *t_M05_set_getpos_mode)(int ch,int mode);
 typedef int (WINAPI *t_M05_set_home_mode)(int ch,int origin_mode);
 typedef int (WINAPI *t_M05_set_laser_mode)(int mode);
 typedef int (WINAPI *t_M05_set_blow_mode)(int mode);/*Add on 21.09.2005*/
 typedef int (WINAPI *t_M05_set_commonIO_3)(int mode);/*Add on 25.02.2006*/
 typedef int (WINAPI *t_M05_set_common_IO)(int PortID,int mode);/*Add on 02.03.2006*/
 typedef int (WINAPI *t_M05_set_pulse_per_milimter)(double pulseX,double pulseY,double pulseZ);
 typedef int (WINAPI *t_M05_set_level_in)(int ch,int status);
 typedef int (WINAPI *t_M05_set_level_sprt)(int ch,int status);
 typedef int (WINAPI *t_M05_set_maxspeed)(int ch , double maxpeed);
 typedef int (WINAPI *t_M05_set_outmode)(int ch,int mode,int logic);
 typedef int (WINAPI *t_M05_set_power_mode)(int mode);
 typedef int (WINAPI *t_M05_set_profile)(int ch , double vl , double vh , double ad);
 typedef int (WINAPI *t_M05_set_pwm_frq)(double frq);
 typedef int (WINAPI *t_M05_set_ramp_flag)(int flag);
 typedef int (WINAPI *t_M05_set_scan_backlash)(int p);
 typedef int (WINAPI *t_M05_set_scan_step)(int step);
 typedef int (WINAPI *t_M05_set_scan_startpos)(int pos);
 typedef int (WINAPI *t_M05_set_senddata_flag)(int flag);
 typedef int (WINAPI *t_M05_set_s_curve)(int ch,int mode);
 typedef int (WINAPI *t_M05_set_s_section)(int ch,double rate1,double rate2);
 typedef int (WINAPI *t_M05_set_signal_in)(int ch,int status);
 typedef int (WINAPI *t_M05_set_vector_conspeed)(double conspeed);
 typedef int (WINAPI *t_M05_set_vector_profile)(double vl , double vh , double ad);
 typedef int (WINAPI *t_M05_set_work_mode)(int mode);
 typedef int (WINAPI *t_M05_set_work_file)(char* file);
 typedef int (WINAPI *t_M05_set_xy_ratio)(double r);
 typedef void (WINAPI *t_M05_show_err)(int flag);
 typedef int (WINAPI *t_M05_start_backlash)(int ch);
 typedef int (WINAPI *t_M05_start_run)();
 typedef int (WINAPI *t_M05_stop_run)();
 typedef int (WINAPI *t_M05_sub_begin)(int subid);
 typedef int (WINAPI *t_M05_sub_end)(int subid);
 typedef int (WINAPI *t_M05_sudden_stop)(int ch);
 typedef int (WINAPI *t_M05_sudden_stop2)(int ch1,int ch2);
 typedef int (WINAPI *t_M05_sudden_stop3)(int ch1,int ch2,int ch3);
 typedef int (WINAPI *t_M05_system_test)(int type,int* pdata);
 typedef int (WINAPI *t_M05_sys_set)(int id, double* param, int paramnum);
 typedef int (WINAPI *t_M05_sysset_end)();
 typedef int (WINAPI *t_M05_trig_position)(int ch,int destpos,int condition);
 typedef int (WINAPI *t_M05_verify_ecp_num)(unsigned char* pnum,int len); 
 typedef int (WINAPI *t_M05_work_begin)();
 typedef int (WINAPI *t_M05_work_end)();
 typedef int (WINAPI *t_M05_write_data)(DWORD Addr,DWORD Data);
 typedef int (WINAPI *t_M05_write_data_block)(DWORD DataLen,PDWORD Data);
 typedef int (WINAPI *t_M05_write_ecp_num)(unsigned char* pnum,int len); 
 typedef int (WINAPI *t_M05_write_file)(DWORD dwDataLenBytes, PBYTE pchFileData);
 typedef int (WINAPI *t_M05_write_power_data)(DWORD DataLen,PUCHAR Data);
 typedef int (WINAPI *t_M05_write_power_tab)(int TabType,DWORD DataLen,PDWORD Data);
 typedef int (WINAPI *t_M05_GetCanUseTime)(void);

// working on (parameters not confirmed)

 typedef int (WINAPI *t_M05_c_set_multi_power)( int a1,  int a2,  int a3,  int a4, double a5, double a6, int a7);
 typedef int (WINAPI *t_M05_change_multi_voltage)( int a1,  int a2);
 typedef int (WINAPI *t_M05_ReadDogNumber)(char *a1);
 typedef int (WINAPI *t_M05_WriteDogNumber)(char *a1);
 typedef int (WINAPI *t_M05_change_voltage2)(int a1);
 typedef int (WINAPI *t_M05_SetHasUseTime)(int a1);
 typedef int (WINAPI *t_M05_SetCanUseTime)(int a1);
 typedef int (WINAPI *t_M05_GetCardNumber)(int a1);
 typedef int (WINAPI *t_M05_GetHasUseTime)(void);
 typedef int (WINAPI *t_M05_set_power_compensate)(int a1, int a2, int a3);
 typedef int (WINAPI *t_M05_set_pwm2_frq)(double a1);
 typedef int (WINAPI *t_M05_mc_change_multi_voltage)(int a1, int a2); // @8

TXT File format

Header

 VER,1,0,0,0
 FNM,Test.ext
 FLG,0,0,0
 TYP,1

Body

 SUB001 
 CMD101,0 
 SET002,20000 
 SET014,1,0,2,2 
 CMD109,1 
 CMD102,416,20833,97222 
 CMD104,6944 
 CMD401,416,880,41666,900 
 CMD402,900 
 CMD409,416,880,3000,41666,900,5000 //set  ramp speeds and power 
 CMD408,900,5000 
 CMD050,2,1 
 CMD002,63556,42631 
 CMD050,1,1 //laser on 
 CMD103,416,41666,69444 
 CMD001,63556,42631 // move 
 CMD050,1,0 //laser off 
 i’m surprised it rasterises the vectors though, i was expecting to see a command 
 for a circle that defined a center,radius etc. 

speed change. 100 to 300 changes servo ramp up/down

 CMD401,416,880,13888,900 
 CMD409,416,880,3000,13888,900,5000 
 CMD103,416,13888,69444 
 CMD401,416,880,<span style="color:#FF0000">41666<span style="color:#000000">,900 
 CMD409,416,880,3000,<span style="color:#FF0000">41666<span style="color:#000000">,900,5000 
 CMD103,416,<span style="color:#FF0000">41666<span style="color:#000000">,69444 

power change 9 to 99 ( *100)

 CMD401,416,880,13888,900 
 CMD402,900 
 CMD409,416,880,3000,13888,900,5000 
 CMD408,900,5000 
 CMD401,416,880,13888,<span style="color:#FF0000">9900<span style="color:#000000"> 
 CMD402,<span style="color:#FF0000">9900<span style="color:#000000"> 
 CMD409,416,880,3000,13888,<span style="color:#FF0000">9900<span style="color:#000000">,5000 
 CMD408,<span style="color:#FF0000">9900<span style="color:#000000">',5000 

horizontal line moved in y

 CMD002,62466,45271 
 CMD001,62466,45271 
 CMD001,69328,45271 
 CMD002,69328,45271 
 SUB603,416,20833,97222,69328,45271 
 CMD001,69328,45271 
 CMD001,69328,45271 
 CMD001,62466,45271 
 CMD001,62466,45271 
 CMD001,69328,45271 
 CMD001,69605,44993 
 CMD001,69605,45548 
 CMD001,62188,45548 
 CMD001,62188,44993 
 CMD001,69605,44993 
 CMD002,62466,45175 
 CMD001,62466,45175 
 CMD001,69328,45175 
 CMD002,69328,45175 
 SUB603,416,20833,97222,69328,45175 
 CMD001,69328,45175 
 CMD001,69328,45175 
 CMD001,62466,45175 
 CMD001,62466,45175 
 CMD001,69328,45175 
 CMD001,69605,44898 
 CMD001,69605,45453 
 CMD001,62188,45453 
 CMD001,62188,44898 
 CMD001,69605,44898 

horizontal line moved in x

 CMD001,69328,45271 
 CMD002,69328,45271 
 SUB603,416,20833,97222,69328,45271 
 CMD001,69328,45271 
 CMD001,69328,45271 
 CMD001,69328,45271 
 CMD001,69605,44993 
 CMD001,69605,45548 
 CMD001,69605,44993 
 CMD001,69492,45271 
 CMD002,69492,45271 
 SUB603,416,20833,97222,69492,45271 
 CMD001,69492,45271 
 CMD001,69492,45271 
 CMD001,69492,45271 
 CMD001,69770,44993 
 CMD001,69770,45548 
 CMD001,69770,44993

CMD's

 CMD401,416,4000,2777,6000(Power)
 CMD402,6000(Power)
 CMD409,416,4000,3000,2777,6000(Power),5000
 CMD408,6000(Power),5000
   6000 is 60
 CMD401,416,5000(Corner Speed),2777,7000
 CMD402,7000
 CMD409,416,5000(Corner Speed),3000,2777,7000,5000
  5000 is 50
 CMD401,416,4000,2777(speed),6000
 CMD409,416,4000,3000,2777(speed),6000,5000
 CMD103,416,2777(speed),69444
  1388 is 10
  2777 is 20
  13888 is 100
  41666 is 300
   Multiply by 138.88888 ish

changed speed to 100000 didn't seem to affect it, probably limited in controller

I think 416 means its addressing the config, or speed settings

 Engrave second number (1 or 2) is Axis, second number is probably amount -/+ to move , delta

SUBS

SUB609 is what the machine does when you press TEST

 SUB609 // Start TEST routine
 CMD102,416,20833,97222 // setup speeds
 CMD103,416,20833,97222
 CMD104,13888
 CMD001,69444,48615 // move position
 CMD001,62489,48615 // move
 CMD001,62489,41667 // move 
 CMD001,69444,41667 // move
 CMD001,69444,48615 // move
 SUB609 // end

SUB610 is what the machine does when you press CUT

 SUB610 // start CUT routine
 CMD104,13888 // in both
 CMD102,416,20833,97222
 CMD001,69722,48893
 CMD103,416,3472,69444 
 CMD401,416,4000,3472,4000 // set power etc
 CMD409,416,4000,4000,3472,4000,4000 // set speeds
 CMD050,1,1  // Laser on 
 CMD001,62211,48893 // move to position
 CMD001,62211,41389 // move
 CMD001,69722,41389 // move
 CMD001,69722,48893 // move
 CMD050,1,0 // Laser off
 SUB610 // end routine

M05_control_func

  8 Back
  9 Fwd
 10 X Left
 11 X Right
 12 Stop all ( except laser )
 13 Z Up
 14 Z Down
 0x10 toggle laser on/off (CMD050 1,1)

M05 Initialise the machine/dll

 M05_on_comm(1);
 if( M05_open_link(1,115200) ) \t\t { 
 \tMessageBox(L"Failed to open comm");
 \treturn ;
 }
 if ( M05_init_board() )  {
 }

==== M05_download_work_file ===\t\t\t

 Send the MOL file to the laser control board.
 M05_download_work_file("C:\\\\laser.mol");

M05_compile_work_file

 Compile a TXT file to a MOL file, replaces .txt with .mol, saves in same place.
 M05_compile_work_file("c:\\\\laser.txt");

M05_del_all_file

 Delete all the files on the laser cutter
 M05_del_all_file();

Upload SYSCFG

 VER,1,0,0,0
 FNM,Test.ext
 FLG,0,0,0
 TYP,2
 SYS001
 SET001,0
 SET002,20000
 SET003,4
 SET004,3
 SET005,2
 SET006,0
 SET007,201733
 SET008,126083
 SET009,0
 SET010,25216
 SET011,-25216
 SET012,0
 SET013,0
 SET014,1,0,2,0
 SET015,1,252.1670610,2,252.1670610,3,252.1670610
 SET016,1000
 SET017,50
 SET018,0
 SET019,1,1,0
 SET020,10000,300.0000000,10000,300.0000000
 SET021,5.0000000,0.0115000,0.0028750,5.0000000,0.0115000,0.0028750
 SET022,100,100
 SET023,0,0
 SET024,5.0000000,5.0000000
 SET025,3276,3276
 SET026,0
 SET027,0,0
 SET028,0,100
 SUB601,1,2521,75650,50433,378250,3782505,1260
 SUB601,2,2521,75650,50433,378250,3782505,1260
 SUB601,3,1260,75650,25216,126083,2521670,756
 SUB602,2521,10086,378250,3782505,2521,10086,378250,3782505,1,1,2521,126083,378250,3782505,1260,1260,201733,126083
 SUB611,1260,5043,126083,2521670,1,1260,75650,126083,2521670,504,0
 SYS001

Scratchpad

The laser stores the cut type, power, speed in a second file, if you save as test.ecp there will be a test.ini too

For engrave it'll look like

(these are the diffs for a multilayer file)

 LayerColor_0=12615680
 LayerColor_1=16636309
 SPLITBLOCK_NUMBER=0
 TechnicsMode=**TECHNICS_LASERENGRAVE**
 LaserCutConnerPower=**55.00000**
 LaserCutWorkPower=**60.00000**
 LaserCutSpeed=**20.00000**
 LaserEngravePower=50.00000
 LaserEngraveSpeed=50.00000
 TechnicsMode=TECHNICS_LASERENGRAVE
 LaserCutConnerPower=55.00000
 LaserCutWorkPower=60.00000
 LaserEngravePower=50.00000
 LaserEngraveSpeed=55.00000
 TechnicsMode=TECHNICS_LASERENGRAVE
 LaserCutConnerPower=55.00000
 LaserCutWorkPower=60.00000
 LaserCutSpeed=20.00000
 LaserEngravePower=50.00000
 LaserEngraveSpeed=60.00000

for cut

 LayerColor_0=16636309 
 LayerColor_1=12615680
 OneWorkNeedTimes=2
 TotalWorkTimes=0
 SPLITBLOCK_NUMBER=2
 SPLITBLOCK_NUMBER_0=0.00000
 SPLITBLOCK_NUMBER_1=100000.00000
 TechnicsMode=**TECHNICS_LASERCUT**
 LaserCutConnerPower=5.00000
 LaserCutWorkPower=10.00000
 LaserCutSpeed=30.00000
 LaserEngravePower=//20.00000//
 LaserEngraveSpeed=//100.00000//
 TechnicsMode=TECHNICS_LASERCUT
 LaserCutConnerPower=5.00000
 LaserCutWorkPower=10.00000
 LaserEngravePower=20.00000
 LaserEngraveSpeed=100.00000
 TechnicsMode=TECHNICS_LASERCUT
 LaserCutConnerPower=5.00000
 LaserCutWorkPower=10.00000
 LaserCutSpeed=40.00000
 LaserEngravePower=20.00000
 LaserEngraveSpeed=100.00000

VER,1,0,0,0 FNM,Test.ext FLG,0,0,0 TYP,1

SUB001 SET002,20000 CMD101,2 CMD405,4861,1 CMD102,416,20833,97222 CMD107,1,4166,41666,1388888 CMD108,2,1388 CMD402,1000 CMD408,1000,6000 CMD001,-4761,19 CMD050,2,1 CMD406,2752513,11052f CMD005,1,6288 CMD006,2,33 CMD406,2818050,0b0000,aaaaaa CMD005,1,-4789 CMD006,2,47

CMD402,1000 CMD408,1000,6000

CMD005,1,6288 CMD006,2,61

CMD005,1,-4789 CMD006,2,75

CMD005,1,6288 CMD006,2,89

CMD402,1100 CMD408,1100,6000

CMD005,1,-4789 CMD006,2,103

CMD402,1200 CMD408,1200,6000

CMD005,1,6288 CMD006,2,117

CMD402,1300 CMD408,1300,6000

CMD005,1,-4789 CMD006,2,130

CMD402,1400 CMD408,1400,6000

CMD005,1,6288 CMD006,2,144

CMD402,1500 CMD408,1500,6000

CMD005,1,-4789 CMD006,2,158

CMD402,1600 CMD408,1600,6000

CMD005,1,6288 CMD006,2,172

CMD005,1,-4789 CMD006,2,186

CMD005,1,6288 CMD006,2,200

CMD402,1700 CMD408,1700,6000

CMD005,1,-4789 CMD006,2,214

CMD005,1,6288 CMD006,2,228

CMD005,1,-4789 CMD006,2,242

CMD402,1800 CMD408,1800,6000

CMD005,1,6288 CMD006,2,255

CMD005,1,-4789 CMD006,2,269

CMD005,1,6288 CMD006,2,283

CMD005,1,-4789 CMD006,2,297

CMD402,1900 CMD408,1900,6000

CMD005,1,6288 CMD006,2,311

CMD005,1,-4789 CMD006,2,325

CMD005,1,6288 CMD006,2,339

CMD005,1,-4789 CMD006,2,353

CMD005,1,6288 CMD006,2,367

CMD005,1,-4789 CMD006,2,380

CMD005,1,6288 CMD006,2,394

CMD402,2000 CMD408,2100,6000

CMD005,1,-4789 CMD006,2,408