SPC and MTConnect®
SPC: Saving Process Parameters
Statistical process control (SPC) is a software/hardware feature that saves selected program parameters in real time as a part program is executing. Desired parameters, which may include time and date, position, commanded and/or actual laser power, pulse conditions, etc., are automatically written to a designated hard disk file (see Figure 1).
The G80 command enables SPC and signifies what data should be saved. To save data in a file of your choosing, program G80 “FNAME”, where FNAME is any desired part and file name accessible from Windows (if no directory is specified, the file is written to C:\Cnc-Share\Output). The system first goes to the end of that file (if it exists), then writes a blank line, the time and date, and the SPC data. If no file name is specified, data is written to file Cnc-Share\Output\Process.
Note that although the $ parameters shown below can be used, the newer system parameters that begin with ‘?’ are preferred.
The data in Table 1 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 messages can also include $ commands to display data in the S94P message window.

Figure 1 – Typical options for various SPC configurations
Table 1 – Statistical Process Control (SPC) Data
$T | Time |
$D | Date |
$B0 | Breakthrough Detection logging off |
$B1 | Breakthrough Detection logging on |
$E0 | Do not log system errors |
$E1 | Log system errors with time and date |
$E2 | Log system errors without time and date |
$F | Commanded federate (inch/minute or mm/minute) |
$Vn | System variable value (n=variable number) |
$P0 | Laser commanded power (watts) |
$P1 | Actual power at laser |
$P2 | Actual power at workstation (requires optional power meter) |
$Q0 | Override summary |
$Q1 | Feedrate override (%) |
$Q2 | Power Override (%) |
$M | M-function report; lists those functions that are on: M200-M211 M300-M330 |
$M9 | System model number (430, 795, etc.) |
$L5 | Laser block number executed |
$L9 | Laser type number |
The functions of the following $ commands are dependent on the laser type (CO2, fiber, or Nd:YAG) (see Table 2 and Table 3):
Table 2 – CO2 and Fiber Laser Commands
Command | Function |
---|---|
LAS_NAME | Laser name |
LAS_TYPE | Laser type number |
LAS_DB-REC | Database record |
LAS_SHUTTER_OPEN | 1 if shutter is open |
LAS_PULSE_MODE | 1 if laser is in pulse mode |
LAS_AVE_POWER | Average power |
LAS_PULSE_FREQ | Pulse frequency |
LAS_PULSE_WIDTH | Pulse width |
Table 3 – Nd:YAG Laser Commands
Command | Function |
---|---|
LAS_NAME | Laser name |
LAS_TYPE | Laser type number |
AS_SHOT_COUNT | L Shot count |
LAS_DB_REC | Database record |
LAS_ACTIVE_PULSE | Active pulse tool |
LAS_ACTIVE_WAVE | Active wave tool |
LAS_SHUTTER_OPEN | 1 is shutter is open |
LAS_PULSE_MODE | 1 if laser is in pulse mode |
LAS_DCRAIL1_VOLTS DC | Rail 1 voltage |
LAS_DCRAIL2_VOLTS DC | Rail 2 voltage |
LAS_LAMP1_CURRENT | Lamp 1 current |
LAS_LAMP2_CURRENT | Lamp 2 current |
LAS_LAMP1_VOLTS | Lamp 1 voltage |
LAS_LAMP2_VOLTS | Lamp 2 voltage |
LAS_HIGH_VOLTAGE | 1 if high voltage on |
LAS_LAMP1_POWER | Lamp 1 power |
LAS_LAMP2_POWER | Lamp 2 power |
LAS_DCLINK1_VOLTS DC | Link 1 voltage |
LAS_DCLINK2_VOLTS DC | Link 2 voltage |
LAS_AVE_POWER | Average power |
LAS_POWER_DENSITY | Power density |
LAS_BEAM_DIA | Beam diameter |
LAS_PULSE_FREQ | Pulse frequency |
LAS_PULSE_WIDTH | Pulse width |
LAS_PULSE_ENERGY | Pulse energy |
LAS_DI_WATER_RES DI | Water resistance |
LAS_COOLANT_TEMP | Coolant temperature |
LAS_SECTOR_HGT | Sector height |
LAS_CT_POS CT | Position |
LAS_VSM1_POS VSM 1 | Position |
LAS_VSM2_POS VSM 2 | Position |
Output from $W5 consists of one line for each defined sector. The line contains sector number, sector width (ms), and sector height.
MTConnect®: Getting Real-time Visibility On Laser Processes
MTConnect® is a communication standard used in the manufacturing industry for reporting the current status of a machine tool. MTConnect is an open protocol for integrating machine data into various ERP and manufacturing floor software applications where real-time or near real-time information is being reported. MTConnect will not interfere with workpiece processing but rather streams machine parameters through the MTConnect agent to plant management software.
The standard strives toward supporting a plug-and-play environment to reduce the cost of integration associated with real-time machines status reporting. It is built upon more prevalent standards within the manufacturing and software industry. The MTConnect standard defines a common interface supporting the ability to transfer data via a standard protocol which includes:
- A device identity (i.e. model number, serial number, calibration data, etc.).
- The identity of all the independent components of the device.
- A possible device’s design characteristics (i.e. axis length, maximum speeds, device thresholds, etc.).
- Most importantly, data captured in real or near-real-time (i.e. current speed, position data, temperature data, program block, etc.) by a device that can be utilized by other devices or applications (e.g. utilized by maintenance diagnostic systems, management production information systems, CAM products, etc.).
The types of data that may need to be addressed in MTConnect includes:
- Physical and actual device design data
- Measurement or calibration data
- Near-real-time data from the device
The S94P control supports MTConnect and will automatically connect to any MTConnect® reporting software package that requests a connection, and stream the current state of the machine to it. The process is designed to be seamless, with no input required from the machine operator.
The data stream may be monitored from the MTConnect screen in the Maint94P application (see figure 2).

Figure 2: The MTConnect® Screen
The reporting software packages require setup files, which are unique to each machine. These files may be generated from the MTConnect screen by pressing the “Make Config File” and “Make Device File” buttons. The files are stored in the MTConnect subfolder in the c:\cnc-share\system folder.
The variables/parameters, which are streamed and through the agent are identified in Table 4. Any of these variables can be reported and used to help monitor and improve the laser processes.
Table 4 – Data Variables/Parameters
Data Variable |
Definition | Units |
---|---|---|
Program name |
The name of the program in execution | text string |
Program in operation state |
If the machine is currently executing a program (Ready/Active) |
value |
Program running state |
The current execution of the program (Ready/Stopped/Active/Completed) |
value |
Machine power on time |
Accumulated time of the machine running (processing a workpiece) |
seconds |
E-Stop state |
Has machine hit and maximum movement of the axis. (Value: Armed/Disarmed) |
value |
Control ON state |
State of the axis drives | on/off |
Program name |
The name of the program in execution | text string |
Program in operation state |
If the machine is currently executing a program (Ready/Active) |
value |
Program running state |
The current execution of the program (value states: Ready/Stopped/Active/Completed) |
value |
Program checksum |
The checksum of the NC text | Hex Number |
Axes strokes (X, Y, Z, C, D, A, B, U) |
The physical processing length of each axis |
(X, Y, Z) millimeters (C, D, A, B, U) degrees |
Axes commanded positions |
Commanded axis positions | (X, Y, Z) millimeters (C, D, A, B, U) degrees |
Axes actual positions |
Actual axis positions | (X, Y, Z) millimeters (C, D, A, B, U) degrees |
Feedrate commanded |
The commanded path speed | millimeter/second |
Feedrate actual |
The actual path speed | millimeter/second |
Feedrate override |
The current setting of the feed rate override knob. |
percentage |
Laser ready state |
If the laser is ready for use | on/off |
Laser shutter enabled state |
If the laser shutter is enabled | on/off |
Laser shutter state |
The current state of laser shutter | on/off |
Laser beam state |
If the laser is creating a laser beam | on/off |
Laser power commanded |
Reports the commanded laser power from the laser unit |
watts |
Laser power actual |
Reports the actual laser power from the laser unit (measured by the laser unit at the input to the feed fiber) |
watts |
Gas port states |
The state of the gas ports | on/off |
Gas pressure commanded |
The commanded gas pressure at the gas valve |
pounds/inch2 |
Gas pressure actual |
The actual gas pressure at the gas valve |
pounds/inch2 |
Focus sensor type |
Which type of sensor is presently enabled |
AFC/OFC |
Focus sensor state |
If the enabled sensor is active | on/off |
Focus sensor position error |
The sensor position error from nominal |
millimeters |
Lens number |
The number of the selected lens | integer |
Error numbers |
The numbers of the active errors | integer |
Warning numbers |
The numbers of the active warnings | integer |
By using MTConnect to monitor a given set of machine parameters, one can gather real-time updates on job-status, run parameters, downtime, and machine information, which can be used to make the overall plant, machines, and maintenance more efficient.

Figure 3 – Typical connection for MTConnect®
If you are interested in the learning more about using MTConnect or SPC with your LASERDYNE® system, please contact lds.sales@primapower.com.
References: MTConnect Standard Parts 1-5, MTConnect Institute, March 2018
MTConnect is a registered trademark of AMT – Association for Manufacturing Technology.