Methods for Testing CNC Encoder Signals: Fanuc, Siemens, Mitsubishi
Learn how to test and diagnose CNC encoder signals on Fanuc, Siemens, and Mitsubishi systems. Prevent scrap parts and hard collisions with expert methods.
Introduction to Encoder Signal Testing
When cutting fluid breaches a pulse coder's enclosure on a CNC machine, the liquid corrupts the internal optical coding disks and triggers an immediate software phase alarm. For operators, this failure is witnessed first as a sudden axis deviation or an unexpected drive interlock, instantly halting active interpolation. If this breakdown occurs during a critical finishing cycle, the sudden loss of positioning feedback leads to an overcut, resulting in a severely damaged scrap part and forcing costly emergency turret realignment. Maintaining stable encoder signals is the only way to prevent these catastrophic mechanical failures, protect delicate workpiece clamping units, and avoid violent hard collisions against the machine's chuck, clamp, or turret.
Technical Summary
| Technical Element | Specification Details |
|---|---|
| Command Codes | MEAS, MEAW, MEASA, MEAWA (Siemens) / G00, G01, G04, M19, S, M03, M04 (General / Diagnostic) |
| Modal Group / Modality | Measuring, Spindle Diagnostic, Axis Feedback Loop, and Encoder Signal Testing |
| Supported Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters |
|
| Main Constraints |
|
Quick Read
- Always verify that the physical seals and connectors are properly seated before completing pulse coder repairs to prevent cutting fluid intrusion.
- Prioritize oscilloscope checking using the Fanuc check pin board A06B-6071-K290 to verify phase A/B voltages remain within the 0.8 to 1.2 Vp-p tolerance band.
- Enable autonomous diagnostic tools like the Siemens Sensor Module Data logger (p0437.0 = 1) to capture high-resolution traces of feedback failures directly onto the CF card.
- Double-check cable compatibility on Siemens systems to avoid interchanging 6FX2002-2EQ00 and 6FX2002-2CH00 cables, which reverses voltage pins and destroys the encoder.
- Monitor percentage-based signal contamination variables on the Mitsubishi drive monitor screens (ABS. TRACK and INC. TRACK) to catch optical degradation before hard failures occur.
- Ensure zero-point initialization is meticulously performed on Mitsubishi absolute systems after absolute position data loss (Z71) to avoid violent collisions with the chuck or clamp.
Basic Concepts of CNC Encoder Diagnostics
Testing encoder signals and monitoring feedback loops is essential to guarantee that axes and spindles maintain their absolute mechanical mechanical positioning. The practical programming effect of executing measurement commands is the ability to instantaneously read hardware switching operations and lock the exact machine or workpiece coordinate into memory without deceleration delays. Programmers and operators must meticulously configure signal thresholds to watch for early degradation; if optical coding disks become soiled or internal lighting ages, the signal amplitude decays.
Without early detection, a sudden dropout of the actual value feedback during high-speed interpolation paralyzes the channel. If closed-loop position control drops unexpectedly, critical peripheral equipment could lose synchronization—for instance, an indexing turret (which strictly requires a completed reference point approach prior to NC Start for safe operation) or a clamping unit may fail to apply the required clamping torque. This loss of physical tracking forces an immediate drive interlock and shutdown response, throwing a severe alarm code to halt the machine before mechanical damage occurs.
When testing and analyzing encoder signals on a Mitsubishi CNC, operators and maintenance personnel must remain highly vigilant regarding environmental contamination and backup power stability, as a loss of accurate encoder feedback completely cripples the machine's spatial awareness. If liquid coolant or cutting oil penetrates the encoder connector, it frequently corrupts the feedback loop and triggers serial data errors or memory alarms. The practical programming effect of such an anomaly is severe: the CNC immediately invalidates all automatic movement commands (including zero returns) to prevent catastrophic runaway.
Command Structure and Syntax
The command structure for testing encoder signals integrates motion commands with measurement instructions to verify signal integrity under dynamic loads. When an axis performs standard movements using commands like G00 or G01, the CNC feedback loop counts pulses from the encoder and cross-checks them against the programmed destination. Measuring commands allow the system to evaluate feedback accuracy in real time by capturing encoder position coordinates at the exact millisecond a hardware probe triggers. This eliminates any interpolation delay, ensuring that the feedback captured represents the physical axis position.
During spindle orientation cycles command by M19, the control relies directly on the spindle encoder's one-rotation marker signal to locate the exact mechanical angle. The dwell command G04 is similarly utilized to pause movement, which stabilizes the velocity tracking loop and lets the drive unit monitor signal ripples when the motor is stationary or running at constant speed. These combined programming commands provide a structured method to evaluate encoder stability across both steady-state and high-speed dynamic conditions.
Syntax of Diagnostic and Measuring Commands:
; Fanuc Waveform Testing Motion G01 Z50.0 F200.0 ; (Activate axis rotation for check pin board measurements) G04 X5.0 ; (Dwell to stabilize velocity tracking loop); Siemens NC Measuring Cycle MEAS=1 G1 X100 F150 ; (Measurement with delete distance-to-go) R1=$AA_MM[X] ; (Read axis machine coordinate into variable R1)
; Mitsubishi Spindle Spindle Test S1000 M03 ; (Spindle CW rotation to test analog feedback) M19 ; (Execute spindle orientation using encoder one-rotation marker)
| Brand | Parameter / Variable | Functional Description | Permissible Range |
|---|---|---|---|
| Fanuc | Parameter No. 1815 Bit 1 (OPTx) | Configures position detector type. | 0 (Built-in detector) or 1 (Separate detector or scale) |
| Fanuc | Parameter No. 2023 | Defines the number of velocity feedback pulses. | e.g., 8192 (for alpha i serial encoder) |
| Fanuc | Parameter No. 2024 | Defines the number of position feedback pulses per motor revolution. | e.g., 12500 |
| Siemens | MD30240 $MA_ENC_TYPE | Defines the type of actual value acquisition. | 0 (Simulation), 1 (Raw incremental), 4 (Absolute) |
| Siemens | p4649 | Signal level limit for early encoder failure detection. | Higher than 170 mV but less than 500 mV |
| Siemens | p0408 | Encoder pulse number setting. | 1000 to 8192 (SAC) / 1000 to 16384 (DAC) |
| Mitsubishi | #2225 SV025 MTYP | Configures position detector, speed detector, and motor type. | HEX pattern: 2 (semi-closed), 6 (serial rotary), A (serial linear) |
| Mitsubishi | #2220 SV020 RNG2 | Sets main side encoder resolution per magnetic pole pitch. | 0 to 32767 (kp) when SV118=0 / 0 to 65535 (p) when SV118≠0 |
Brand-Specific Applications
Fanuc
For Fanuc controllers, checking built-in detectors versus separate scales is configured via Parameter 1815 Bit 1. The software tracks noise impact using register DGN 356.
Operators execute a standard diagnostic sweep by running an axis program like `G01 Z50.0 F200.0` while monitoring check board pins.
| Category | Fanuc Technical Inventory |
|---|---|
| Parameters | Parameter No. 1815 Bit 1 (OPTx), Parameter No. 2023 (velocity feedback pulses), Parameter No. 2024 (position feedback pulses) |
| Alarms | Alarm 361 (Abnormal Phase), Alarm 364 (Soft Phase Alarm), Alarm 366 (Pulse Miss), Alarm 453 (SPC Soft) |
| Versions | For compact Beta iS motor series (e.g., Beta iS 0.2/5000, 0.4/5000, 1/6000), the pulse coder is permanently married to the chassis and cannot be replaced alone. |
Warning: Attempting to replace the pulse coder alone on compact Beta iS motor series will damage the unit; the entire servo motor assembly must be replaced.
Siemens
Siemens controls configure the encoder acquisition type through MD30240, while signal limits are adjusted via parameter p4649.
NC programs capture dynamic probe positions with measuring commands such as `MEAS=1 G1 X100 F150`.
| Category | Siemens Technical Inventory |
|---|---|
| Parameters | MD30240 $MA_ENC_TYPE (acquisition type), p4649 (failure limit), p0408 (encoder pulses), MD36310 $MA_ENC_ZERO_MONITORING |
| Alarms | Alarm 25000 (Hardware fault), Alarm 26022 (Measurement with simulated encoder not possible), Alarm 231123 (Signal level outside tolerance) |
| Versions | Firmware version >= 4.7 increases crosswise data comparison (CDC) parameters. Older SMC30 modules (Article Nos. -5CA0 and -5CA1) require manual jumpers. |
Warning: Removing an absolute encoder while not in a parked state invalidates safety checksums, requiring a full system POWER ON reboot.
Mitsubishi
Mitsubishi systems define the feedback device through parameter #2225, with pulse resolution specified by parameter #2220.
Operators test axis feedback using program lines like `G04 X1.0` to stabilize the spindle before performing orientation.
| Category | Mitsubishi Technical Inventory |
|---|---|
| Parameters | #2225 SV025 MTYP (motor type), #2220 SV020 RNG2 (main side encoder resolution), #1762 cfgPR12 Bit 5 (BiSS validation) |
| Alarms | Sub side encoder errors S01 1B, 1C, 1D, 1E; S01 1F (communication error); Z71 0005 (serial data error); M01 0350 (BiSS comm error) |
| Versions | M800V/M80V series features native PLC ZR13090-ZR13094 registers for third-party BiSS encoder communication. Older M700/M70 series controls do not support this interface. NC Analyzer2 variable torsion support is from version A1. |
Warning: Setting external encoder pulse R-registers between 0 and 0x1FF will force a default of 1,024 pulses, compromising feedback scaling.
Cross-Brand Comparison
| Comparison Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Main Resolution Parameter | Parameter No. 2024 (Position feedback pulses per revolution) | p0408 (Encoder pulse number) | #2220 SV020 RNG2 (Main side encoder resolution) |
| Feedback Detector Selection | Parameter No. 1815 Bit 1 (OPTx) | MD30240 $MA_ENC_TYPE | #2225 SV025 MTYP (Motor/Encoder type) |
| Analog Signal Checking Board | Check pin board A06B-6071-K290 | SMC30 module with diagnostic oscilloscope | Standard Drive monitor screen / NC Analyzer2 |
| Noise & Contamination Diagnostics | Diagnostic registers DGN 356 / DGN 357 | Autonomous Sensor Module Data logger (p0437.0=1) | Percentage variables ABS. TRACK and INC. TRACK |
| Serial Error Alarm Codes | Alarm 361, Alarm 364, Alarm 366 | Alarm 25000, Alarm 231123 | Z71 0005, M01 0350 |
| Hardware Locking & Jumpers | Compulsory replacement of beta iS motor unit upon Pulsecoder failure | Jumpers required between pin 10-7 and pin 11-4 on SMC30 for square-wave | ZR-register mapping (ZR13090 to ZR13094) for third-party BiSS interfaces |
Technical Analysis and Brand Differences
Fanuc's architecture exhibits highly distinct behaviors in its encoder diagnostics. First, Fanuc provides dedicated hardware check pin boards (like the A06B-6071-K290) that physically plug into the amplifier to isolate raw differential signals (ADIF, BDIF) and reference voltages (TO) from the digital processing side. Second, Fanuc systems embed smart noise diagnostics directly into the control via specific memory registers (DGN 356/357), which increment dynamically only when the pulse coder data is mathematically destabilized by noise, giving technicians a real-time software quantifier for invisible electrical interference. Finally, Fanuc utilizes a strict lock-out on specific compact motors (like the beta iS 0.2/5000), where the encoder is permanently married to the chassis and mandates a total motor replacement upon failure, prioritizing factory sealing over field repairability.
Siemens heavily distinguishes its encoder architecture from other control brands through three advanced diagnostic integrations. First, Siemens embeds an autonomous 'Data logger' directly into the Sensor Module (p0437.0 = 1); when an encoder evaluation fault triggers, the module automatically captures high-resolution binary traces of internal electrical states and saves them directly to the CF card (e.g., SMTRC00.BIN), eliminating the need for external oscilloscopes. Second, Siemens provides a deeply integrated Bode diagram measurement function directly in the control interface, allowing engineers to graphically test the 'Encoder combination' and differential position feedback through the speed and position controller frequency responses. Finally, Siemens leverages the PROFIdrive protocol to grant the PLC unprecedented, bit-level authority over the measuring hardware, permitting logic routines to natively command flying measurements, request reference marks, or safely park the encoder without relying on complex external relays.
Mitsubishi systems exhibit several unique behaviors that set them apart from other control brands regarding encoder signal diagnostics. The most prominent distinction is the native integration of scale contamination diagnostics directly into the standard HMI; the control dynamically displays ABS. TRACK (%) and INC. TRACK (%) variables that represent the raw electrical signal strength, where a dropping percentage visually warns the operator that the scale is becoming badly contaminated before a hard hardware failure actually occurs. Second, Mitsubishi features a highly granular, dual-channel diagnostic approach on the Drive Monitor screen that explicitly separates Encoder Diagn L (Low) and Encoder Diagn H (High) signal outputs for both the motor-side and machine-side PLGs, allowing technicians to instantly determine which specific transmission line in a differential pair has failed without using an external oscilloscope. Finally, Mitsubishi deeply integrates third-party absolute encoder protocols (like BiSS) directly into its internal PLC architecture via extended ZR devices, which allows the machine tool builder to write custom ladder logic that intercepts encoder communication errors and dynamically initiates safety interlocks before the NC software even generates a standard servo alarm.
Program Examples and Dry Run Procedures
Fanuc Spindle Waveform Test
; Fanuc: Spindle Waveform Test Program
G00 X100.0 ;
G01 Z50.0 F200.0 ;
G04 X5.0 ;
Dry Run Analysis: Executing this sequence in dry run allows the maintenance technician to monitor diagnostic screens. While the Z-axis feeds at a stable 200.0 mm/min and enters the 5-second dwell (G04), the physical check pin board K290 is monitored via oscilloscope to confirm phase A/B voltages remain within the 0.8 to 1.2 Vp-p range without fluctuations.
Siemens High-Speed Measurement Cycle
; Siemens: High-Speed Measurement Cycle
MEAS=1 G1 X100 F150 ;
IF $AC_MEA[1]==0 GOTOF FEHL1 ;
R1=$AA_MM[X] ;
Dry Run Analysis: During a dry run of this Siemens block, the axis moves toward X100 at a feed of 150 mm/min. When the probe triggers, the control immediately captures the machine coordinate in $AA_MM[X] and stops movement. If no hardware edge is triggered, the system jumps to label FEHL1, letting the operator verify the electrical loop without risking a physical turret crash.
Mitsubishi Spindle Orientation and Stabilization
; Mitsubishi: Spindle Orientation and Stabilization
G04 X1.0 ;
S1000 M03 ;
G04 X3.0 ;
M19 ;
Dry Run Analysis: In a dry run scenario, the spindle ramps to 1000 rpm. The 3-second dwell (G04) provides sufficient time for velocity feedback loops to stabilize. When M19 is executed, the spindle orientates to the one-rotation marker. Technicians monitor the drive display to verify that no S01/S03/S04 communication alarms trigger during deceleration.
Error and Alarm Analysis
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | Alarm 361 (Abnormal Phase) | Phase data error or ID data error in the built-in pulse coder. | The CNC screen displays 361, disabling axis movements and halting the active automatic cycle immediately. | Pulse coder hardware failure or high-frequency electrical noise. Check cable shielding, ground connections, or replace the pulse coder. |
| Fanuc | Alarm 364 (Soft Phase) | Digital servo software detects mathematically invalid positioning data. | The axis stops suddenly mid-cycle, throwing a 364 alarm, potentially leaving tool marks on the part. | Electrical noise interference or entry of cutting fluid into the detector connector. Dry/clean connectors and verify seals. |
| Fanuc | Alarm 366 (Pulse Miss) | Small internal signal amplitude inside the built-in pulse coder. | The machine halts with a 366 alarm, indicating that encoder feedback tracks have decayed below limits. | Internal optical sensor failure. Requires replacement of the pulse coder. For compact beta iS motors, replace the complete motor. |
| Siemens | Alarm 25000 (Hardware Fault) | Signals from active encoder are missing, phase mismatched, or short-circuited. | Immediate drive interlock and shutdown (OFF1/OFF2 response). Spindle clamps or turrets fail to operate safely. | EMC interference on unshielded cables, damaged EnDat supply lines, or interchanged cables (e.g. 6FX2002-2EQ00 vs. 6FX2002-2CH00). Replace cable or encoder. |
| Siemens | Alarm 231123 (Signal Level A/B Outside Tolerance) | Unipolar A/B track levels fall outside the 2500 mV ± 500 mV band (trips at < 1700 mV or > 3300 mV). | The controller flags a warning or alarm during axis movement, warning of impending feedback dropouts. | Optical coding disks are soiled, or the internal lighting ages. Clean the scale or replace the sensor module. |
| Mitsubishi | Z71 0005 (Serial Data Error) | Serial data format error is received from the absolute position detector. | The system invalidates automatic movement commands (including G28 returns) to prevent runaway, throwing Z71. | Corrupted serial packets due to fluid ingress at the encoder connector. Clean the connector, verify absolute batteries, and perform zero-point initialization. |
| Mitsubishi | M01 0350 (BiSS Comm Error 1) | Communication with a third-party BiSS absolute encoder fails. | The drive unit locks out and outputs M01 0350, stopping all axis interpolation. | Incorrect setup parameters #11376 through #11380, or CRC initialization failure. Check configuration values and baud rates. |
Professional Application Note
A catastrophic mechanical crash occurs when a technician attempts an axis movement without completing zero-point initialization after an absolute position data loss. Maintenance teams must prevent these events by executing a rigorous hardware verification protocol before cycling the machine. When replacing a standard Fanuc built-in pulse coder, personnel must first remove the four M4 hexagon socket head cap screws and extract the Oldham's coupling with extreme care to avoid damaging the mating surfaces. After installing a new encoder, the physical seals must be inspected to ensure that no cutting fluid can breach the enclosure, which would instantly trigger a soft phase alarm. On Siemens systems using older SMC30 modules, technicians must verify whether article numbers ending in -5CA0 or -5CA1 require hardwired jumpers between pins 10 and 7 and pins 11 and 4 to properly run square-wave encoders without an R-track. Finally, on Mitsubishi drives, developers must ensure that any custom ladder logic intercepts communication statuses via register ZR13090, immediately pausing the automatic cycle before a Z71 format error can cause an uncontrolled axis movement against the machine's chuck, clamp, or turret.
Related Command Network
- MEAS / MEAW / MEASA / MEAWA: These Siemens NC G-code instructions directly trigger probes to measure axis coordinates by reading switching states and capturing positions into variables.
- G00 / G01: These standard linear movement commands generate axis rotation to verify that the feedback loop counts scale pulses correctly under rapid and feed rates.
- G04: This dwell command pauses axes to stabilize the velocity tracking loops before technicians evaluate stationary encoder signal noise.
- M19: The spindle orientation instruction relies on spindle encoder one-rotation marker signals to lock the spindle at the exact mechanical angle.
- M03 / M04: Spindle clockwise and counterclockwise commands rotate the spindle to test analog sinusoidal waveform feedback using checking boards.
Conclusion
Reliable CNC operation rests on the continuous integrity of the position feedback loops. Establishing a predictive maintenance schedule that combines digital screen monitoring with physical waveform measurements prevents sudden axis dropouts and expensive mechanical crashes. Technicians should systematically log DGN noise values, monitor contamination percentages, and verify voltage offsets during every major service interval. Safeguarding these signal pathways ensures that high-precision machining centers maintain spatial accuracy, protecting both raw workpieces and complex peripheral tooling.
Frequently Asked Questions
How does a Fanuc system detect noise interference in the built-in pulse coder?
Fanuc systems track noise interference through diagnostic screen registers DGN 356 for the built-in detector and DGN 357 for the separate detector. Under normal operating conditions, these registers display 0. If the position data becomes unstable due to electrical noise, the registers dynamically increment. Technicians can use these screens to confirm noise issues before replacing hardware. For a robust diagnostics workflow, refer to a 7-step approach to CNC fault diagnosis to systematically isolate encoder errors from other servo problems.
What are the critical voltage specifications for measuring Fanuc spindle encoder signals?
When measuring spindle encoder signals using the servo check pin board A06B-6071-K290 and an oscilloscope, the amplitude of the phase A and B signals (PA1/PB1, PA2/PB2) must measure between 0.8 and 1.2 Vp-p. Additionally, the offset voltages (Voffs, Voffz) must strictly read 2.5 V ± 100 mV. If these signals decay below limits, the system triggers Alarm 366 (PULSE MISS) to prevent part overcuts. For categorization of such faults, see the SETAL CNC alarm classification manual.
How do you troubleshoot a Mitsubishi Z71 absolute encoder serial data error?
A Mitsubishi Z71 0005 absolute encoder serial data error is triggered by communication failures or corrupted data packets, often due to coolant entry into the encoder connector. Technicians must check and replace cables, verify batteries, and complete a meticulous zero-point initialization procedure. Failing to do so before initiating rapid moves can result in spatial disorientation and a hard collision. If you suspect an anomaly, check the X01 anomaly detection alarm guidelines for safety protocols.
Still not resolved?
Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

- CNC CARE Co-Founder (May 2025 - Present)
- Mitsubishi Electric NC Sales & Service Section Manager (2008 - 2025)
- Reis CNC Service Engineer (2003 - 2005)
- Ören Kalıp CNC Mold Line Team Leader (1999 - 2002)
With over 25 years of experience working in all areas of the CNC machine industry, I continue my activities as a co-founder of CNC CARE, where we offer brand-independent consulting, engineering, and original spare parts services.
Related Articles
Other articles on this topic
Siemens CYCLE800 G-Code: Swivel Planes & Tool Alignment
Master Siemens CYCLE800 for 3+2 axis machining. Learn plane swiveling, tool alignment, parameter setup, and how to troubleshoot Alarm 61190 and 61153.
Siemens CYCLE72 Contour Milling: Guide to Sinumerik Path Milling
Master Siemens CYCLE72 for contour milling on Sinumerik CNC controls. Learn parameter setup, avoid simulation alarm 61123, and prevent machine collisions.
Siemens CYCLE952 Contour Turning Cycle Programming Guide
Master Siemens CYCLE952 contour turning on Sinumerik CNC controls. Learn parameter lists, resolve Alarm 61051, and configure balance cutting.
Siemens SLOT1 and SLOT2 Slot Milling Cycles Programming Guide
Master slot milling on Siemens Sinumerik controls using SLOT1 and SLOT2 cycles. Learn parameter configurations, alarm 61000 prevention, and optimal tool paths.