Software Features


Tracking Program and Processing Parameters with SPC

Statistical Process Control (SPC) is a feature within the S94P software which can save selected machine and program parameters to a file as a part program is executing. The desired parameters, which may include time, date, position, commanded power, actual laser power, pulse conditions, etc., are written to a designated file on the hard disk or network. Additionally, SPC can be used to help monitor processing parameters over a longer period of time. I.e. if the laser processing parameters are changed over time, one can monitor the parameter changes and compare the current parameters to original parameters defined when the process was first setup.

The G80 command enables SPC and signifies what data should be saved. To save data to a file of your choosing, use the program G80 “FNAME”, where FNAME is any desired path and file name accessible from Windows (if no directory is specified, the file is written to C:\Cnc-Share\Output). If data already exists in the file, the system adds the new data after the existing data. The new data will start with a date and time stamp followed by the new SPC data. If no file name is specified, data is written to file Cnc-Share\Output\Process.

The process critical parameters can be added the program file by programming G80 command followed by text containing appropriate commands or system parameters beginning with a “?”. It is important to note that text in a G80 block without ?commands is also transferred and saved to the output file. G58 messages can also include ?commands to display the data in the S94P message window.

Most importantly, the various ?commands capture the actual parameters (i.e. current speed, position data, temperature data, program block, etc.) being used by the machine. Additionally the data can be utilized by other devices or applications (e.g. utilized by maintenance diagnostic systems, management production information systems, CAM products, etc.).

Some of the more common data parameters which can be written to a file are identified in Table 1. (Note: Nearly any parameter used for laser processing is available through the SPC. The complete list of the available SPC parameters are listed in the S94P controller manual.) It is important to note: the data is written to the file as the program executes. If the program errors out, the subsequent data from the program steps not executed will not be in the file. In table 1 [N] represents the number of elements (array size) for the variable. If N=0, the data variable is a string of characters, it cannot be assigned a variable value and can only be used in a G58 or G80 statement.

Table 1. A sample listing of the common G80 commands used for laser processing

Data Variable Definition [N]
?DATE Date, formatted month/day/year, e.g., 1/28/2018 0
?DATE1 Date, formatted day/month/year, e.g., 28/1/2018 0
?ERROR_STOP 1 => part program stopped because of error 1
?FEEDRATE Programmed feedrate times feedrate override 1
?FIXID Scanned Fixture ID number 1
?HOUR Hours portion of current time (2 digits) 0
?LAS_NAME Laser name, e.g., CL50k 0
?LAS_PROG_AVE_POWER Programed average power 1
?LAS_PROG_PEAK_POWER Programed peak power 1
?LAS_PULSE_MODE 1 => pulse mode, 0 => CW mode 1
?LAS_TYPE Laser type number 1
?LAST_ERROR Number of last error displayed on system 1
?LINPERF_PASS Current pass number 1
?LINPERF_ROW Current row number 1
?MINUTE Minutes portion of current time (2 digits) 0
?MODEL System model number (e.g., 795) 1
?MONTH Month (2 digits) 0
?PRESSURE Assist gas pressure 1
?PROGNAME Part program name 0
?RUNTIME Program run time in seconds 1
?SECOND Seconds portion of current time (2 digits) 0
?SERIAL_NUM System serial number 1
?SYS_STATUS System status: 0 = ESTOP, 1 = Control on, 2 = Cycle active, 3 = Feedhold 1
?TIME Time of day hour:minutes:seconds 0
?TIMER 1 Time in seconds since system was started 1
?USER_ACTUAL_POS Actual position as shown on display 10
?USER_CMD_POS Commanded position as shown on display 10
?YEAR Year (4 digits) 0


The following data parameters can be selectively saved by programming G80 followed by text containing appropriate ?commands (text in a G80 block without commands is also transferred to the output file) G58 commands (operator messages) can also include these commands. For a full list of commands refer the SPC programming section in the manual.

Command Value
?Time Time of day from the system PC in hour:minute:seconds
?Date Date formatted as Month/Day/Year
?Feedrate Commanded feedrate (inch/minute or mm/minute)
$Vn:m System variable value (n = variable number; optional m = number of decimal places)
$P0 Laser commanded power (watts)
$M M-function report; lists those functions that are on: inputs M200 – M211 outputs M300 – M330


Sample program:

G80 “C:\0123.DAT” ; Save data to file C:\0123.DAT
V35=125.0 ; Set process variable
G80PART NO.= 0123 DESC: ROTOR ; Information written to file
G80?DATE ; Write the date to file MONTH/DAY/YEAR
G80?MODEL ?SERIAL_NUM ; Write system model and serial number
V1=X V2=Y
G80ABS POS=$V1:3 $V2:3 ; Write X and Y positions with 3 decimal places
G80Process variable V35=$V35

NOTE: Comments can be added and used with G80 commands. All characters from the semicolon to the end of the line will be ignored; however, all spaces leading to the semicolon will be printed.

When file (0123.DAT) is opened, the data will appear as follows:

11/30/2018 8:22:09 AM
795 999
ABS POS=-3.000 0.000
Process variable V35=125.0000

By understanding the machine parameters used to process the workpiece, collecting those parameters, and then correlating the parameters to the process output; one can improve the process based on real data.

If you are interested in the learning more about using SPC with your LASERDYNE® system, please contact


Laser Welding 101

Free 62 page Laser Welding overview