FANUC PS0200 Alarm: Illegal S Code Command in Rigid Tapping

FANUC PS0200 means that the S command used for rigid tapping is missing, outside the permitted range, or higher than the maximum spindle speed allowed for the selected gear. On the FANUC Series 0i-D / 0i Mate-D covered by the cited manuals, the relevant rigid-tapping speed limits are set by parameters 5241–5243, with parameter 5244 available for a fourth gear in applicable configurations.

The first action should be to confirm the programmed S value and the gear actually selected by the machine. Do not immediately increase a parameter merely to clear the alarm. The limit must agree with the spindle, position-coder ratio, gearbox, tapping tool and machine-builder specification.

Item Meaning
CNC display PS0200 / ILLEGAL S CODE COMMAND
Operating condition Rigid tapping
Main program cause S is missing, invalid or above the limit for the active gear
Main parameter direction Maximum rigid-tapping spindle speed for each gear, normally 5241–5243 on the cited alarm list
First correction Correct the S command or verify the approved speed limit for the selected gear

For the surrounding CNC alarms, see the FANUC CNC Alarm Codes 0001–0200.

Safety Warning Before Changing Rigid-Tapping Parameters

Rigid tapping synchronizes spindle rotation with movement of the tapping axis. An incorrect speed limit, gear ratio, feed command or machine sequence can break the tap, damage the workpiece or cause unexpected spindle and axis motion.

Do not raise parameters 5241–5243 above the approved machine limit simply to suppress PS0200. Back up the CNC, PMC and spindle parameters first, and use the FANUC manual edition and machine-builder documentation for the exact CNC and machine.

Parameter changes and test operation must be performed by qualified personnel. Keep the tool clear of the workpiece during the initial controlled test whenever the machine-builder procedure permits it.

What Does FANUC PS0200 Mean?

FANUC alarm lists describe PS0200 as an illegal S-code command during rigid tapping. The complete alarm condition is broader than “spindle speed too high.” It can be generated when:

  • No valid S value has been specified for the rigid-tapping operation.

  • The S value is outside the permitted command range.

  • The commanded speed exceeds the maximum rigid-tapping speed assigned to the gear currently in use.

  • The rigid-tapping maximum-speed parameters do not follow the required relationship for the configured gear system.

  • On applicable T-series functions, rigid tapping is commanded while constant surface speed control is still active.

PS0200 is normally a program or configuration alarm. It does not by itself indicate a defective spindle motor, position coder, feedback cable or spindle amplifier.

1. Confirm the Alarm Block and Rigid-Tapping Method

Record the alarm screen and identify the exact block being executed when PS0200 appears. Also record:

  • The complete CNC series and model

  • Whether the control is M series or T series

  • The rigid-tapping cycle used, such as G84 or the machine-specific equivalent

  • The rigid-mode command, commonly M29 when required

  • The programmed S value

  • The selected spindle gear or range

  • Parameters 5241–5244 and the related gear-ratio data

  • Whether the program was restarted, edited or called from a subprogram

  • Whether the alarm began after parameter restoration, spindle work or gearbox work

The rigid-tapping command format varies with the CNC series, parameter setting and machine-tool builder. Some machines require a rigid-mode M code before G84 or G74; other configurations enter rigid tapping without a separate M code. Use the approved program format for that machine.

Do not diagnose PS0200 only from the block containing G84. The S command may be in the preceding rigid-mode block, and modal values may have been cleared by an earlier cycle cancel.

2. Check Whether a Valid S Command Is Present

FANUC's alarm description states that PS0200 can occur when the S value is out of range or not specified. Check the active program path, including subprograms, optional blocks and macro-generated values.

Confirm that:

  • The required S command is present before rigid tapping begins.

  • The S value is positive and within the CNC's permitted format.

  • A macro variable used to generate S is not empty, zero or outside its intended range.

  • The program has not canceled the tapping cycle and then reused an old S value unintentionally.

  • The selected rigid-tapping method places S in the correct block.

On the cited 0i-D machining-center manual, canceling the rigid-tapping canned cycle clears the tapping S command to S0. A later rigid-tapping operation therefore needs the required S command again. This is a useful check when the first hole runs correctly but a later cycle produces PS0200.

If the S command is missing or incorrect, revise the program rather than changing the machine's speed limit.

3. Compare the Commanded Speed With the Active-Gear Limit

FANUC specifies a separate maximum rigid-tapping spindle speed for each gear. For the 0i-D / 0i Mate-D parameter manual, the mapping is:

Parameter FANUC function Unit Application
5241 Maximum spindle speed in rigid tapping for the first gear min⁻¹ Used when the first rigid-tapping gear is selected
5242 Maximum spindle speed in rigid tapping for the second gear min⁻¹ Used when the second rigid-tapping gear is selected
5243 Maximum spindle speed in rigid tapping for the third gear min⁻¹ Used when the third rigid-tapping gear is selected or as required by the configured gear relationship
5244 Maximum spindle speed in rigid tapping for the fourth gear min⁻¹ Available on applicable four-gear configurations

The concise PS0200 alarm list may identify 5241–5243, while the 0i-D parameter manual defines 5241–5244. This is not a reason to edit all four values. Confirm the number of gears supported and used by the exact CNC and machine.

For example, if the program commands S3000 while the active rigid-tapping gear is limited to 2500 min⁻¹, PS0200 is the expected result. The appropriate correction is either to command a safe speed at or below the approved limit or, if the existing parameter is proven incorrect, restore the machine-builder's approved value for that gear.

4. Verify Which Gear Is Actually Selected

A correct S value can still be compared against the wrong parameter when the commanded gear and the gear recognized by the CNC do not agree.

Check:

  • The gear-selection M code or machine-specific range command

  • The PMC gear-selection signals

  • The actual mechanical gear engaged

  • The spindle position-coder gear ratio used for rigid tapping

  • The first-, second-, third- or fourth-gear parameter group selected by the CNC

  • Any recent ladder, gearbox, spindle or parameter changes

Do not assume that “low gear” on the operator panel always means parameter 5241. The machine builder can define the selection sequence and related PMC logic. Use the machine electrical manual and diagnostic signals to identify the active range.

If the wrong gear is being selected, correct the program, PMC signal or mechanical selection fault. Raising the limit for an incorrectly selected gear hides the real problem.

5. Check the Required 5241–5244 Gear Relationships

The FANUC 0i-D parameter manual gives additional rules for M-series gear configurations:

  • For a one-stage gear system, the manual requires the applicable values in parameters 5241 and 5243 to be the same.

  • For a two-stage gear system, the value in parameter 5243 must match the applicable value in 5242.

  • If the required relationship is not satisfied, PS0200 can be issued.

These rules are easy to miss after a partial parameter restore or control replacement. A speed may appear reasonable when each parameter is viewed separately, yet the required relationship between the entries is wrong.

Do not copy this rule blindly to a different FANUC generation, T-series configuration or four-gear machine. Verify the parameter manual that applies to the installed control.

6. Correct Parameters Only When the Existing Setting Is Proven Wrong

If the program S value is valid, the correct gear is selected and the current maximum-speed parameter does not match the approved machine data, restore the correct value for the relevant gear.

Before editing a parameter:

  1. Save a complete backup.

  2. Record the original values of 5241–5244.

  3. Confirm the spindle's permitted rigid-tapping speed.

  4. Confirm the position-coder gear ratio and applicable valid data range.

  5. Check the maximum speed of the tapping holder and tool.

  6. Verify the gearbox and spindle-range specification.

  7. Change only the value required by the applicable FANUC and machine-builder documentation.

In B-64310EN/02, these parameters use min⁻¹ and their permitted numeric range depends in part on the spindle position-coder gear ratio. A value accepted by the parameter screen is not automatically safe for the machine.

If the original parameter matches the machine builder's approved backup, reduce or correct the programmed S value. Do not redefine the machine limit to accommodate an unsuitable tapping program.

7. Check Constant Surface Speed Control on Applicable T Series

On applicable FANUC T-series rigid-tapping functions, the operator's manual states that commanding rigid tapping while constant surface speed control is active causes PS0200. Cancel constant surface speed control using the machine's approved programming sequence before entering rigid tapping.

This branch is configuration-specific. It should not be treated as the first explanation on an M-series machining center. Confirm the CNC type and program mode before changing any G-code sequence.

8. Run a Controlled Verification Test

After correcting the program or restoring the approved parameter:

  • Confirm the expected spindle gear is selected.

  • Test with a safe S value within the approved rigid-tapping limit.

  • Verify the commanded feed matches the thread lead and programming mode.

  • Confirm spindle reversal and tapping-axis synchronization.

  • Check that PS0200 does not recur in each gear used by the program.

  • Verify a second tapping cycle after G80 or another cycle cancel receives a new valid S command.

Begin with a controlled dry-run or machine-builder-approved test condition. Dry run and machine lock can behave differently during rigid tapping, so follow the specific FANUC and machine instructions rather than assuming that the spindle and axis will remain stationary.

Difference Between PS0200 and Related Rigid-Tapping Alarms

Alarm FANUC meaning Main distinction
PS0200 Illegal or missing S command in rigid tapping Check the S value, selected-gear speed limit and applicable 5241-series parameter
PS0201 No F command in rigid tapping The required feedrate is missing
PS0202 Spindle distribution amount is too large The calculated spindle distribution exceeds the control limit
PS0203 Rigid M code or S command is in an incorrect position Check the sequence between M29 and G84/G74 and any intervening command
PS0204 Illegal axis operation in rigid tapping An axis movement or prohibited operation was commanded in the rigid sequence
PS0205 Rigid-mode DI signal is not on Check the PMC ladder and rigid-mode confirmation signal
PS0206 Plane or drilling-axis change in rigid mode Cancel the rigid cycle before changing the drilling axis or plane

PS0200 should not be used as a general label for every G84 failure. Diagnose the exact alarm number shown by the CNC.

For subsequent rigid-tapping alarms, see the FANUC CNC Alarm Codes 0201–0400.

FANUC PS0200 Diagnostic Table

Finding Likely interpretation Recommended action
No S value is active when rigid tapping begins The required spindle-speed command is missing Add the correct S command using the approved rigid-tapping format
S is higher than the limit for the active gear The program exceeds parameter 5241, 5242, 5243 or 5244 as applicable Reduce S or restore the approved gear limit if the parameter is incorrect
The first tapping cycle works but a later one alarms after G80 The rigid-tapping S value may have been cleared to S0 Specify a new S command for the later cycle
Alarm began after parameter restoration One or more rigid-tapping limits or required gear relationships may be wrong Compare 5241–5244 and related gear data with the approved backup
Parameter values look correct but the wrong range is active Gear-selection program, PMC signal or mechanism may disagree Verify the gear actually selected and the parameter group used
T-series alarm occurs with constant surface speed active The operating mode is incompatible with rigid tapping on the applicable control Cancel constant surface speed control using the approved sequence
M29 or S is placed incorrectly relative to G84 A sequencing fault may be present Check whether the actual alarm is PS0203 and revise the program accordingly
PS0200 remains after arbitrary increases to 5241–5243 The root cause has not been identified and the machine limit may now be unsafe Restore approved values and restart diagnosis from the program and gear selection

Recommended Troubleshooting Order

  1. Confirm PS0200 and record the exact program block.

  2. Identify the CNC series, M/T system, rigid-tapping method and active spindle.

  3. Back up the CNC, PMC and spindle parameters.

  4. Confirm that a valid S value is specified for the rigid-tapping cycle.

  5. Check whether G80 or another cycle cancel cleared the previous rigid-tapping S value.

  6. Compare the commanded S value with the maximum for the gear actually selected.

  7. Verify gear-selection commands, PMC signals and the mechanical range.

  8. Compare parameters 5241–5244 and related gear data with the approved machine backup.

  9. On applicable 0i-D M-series configurations, verify the required one-stage or two-stage parameter relationship.

  10. On an applicable T series, confirm constant surface speed control has been canceled.

  11. Correct the program first when S is missing, invalid or unnecessarily high.

  12. Change a maximum-speed parameter only when the existing value is proven incorrect and the replacement value is approved for the machine.

  13. Perform a controlled rigid-tapping test and verify every gear used by the program.

Technical References

  • FANUC Series 0i-MODEL D / 0i Mate-MODEL D User's Manual (Machining Center System), B-64304EN-2/01, rigid-tapping limitations and S-command behavior

  • FANUC Series 0i-MODEL D / 0i Mate-MODEL D Parameter Manual, B-64310EN/02, parameters 5241–5244

  • FANUC Series 0i-MODEL F Operator's Manual (Lathe System), B-64604EN-1/01, rigid tapping and constant surface speed control limitation

  • FANUC alarm list for PS0200 ILLEGAL S CODE COMMAND, rigid-tapping S range and parameters 5241–5243

  • Beijing FANUC PS0200 technical guidance, illegal S-code command during rigid tapping

Always use the manual edition for the exact CNC series, machine type and software. Alarm wording, available gear count, parameter range and rigid-tapping program format can differ between controls.

Need Help With FANUC PS0200 Alarm?

REACO CNC provides independent FANUC CNC troubleshooting, parameter recovery, spindle-drive testing, repair and replacement support. Send us the PS0200 alarm screen, complete CNC model, the rigid-tapping program blocks around M29/G84/G74, programmed S value, active gear, parameters 5241–5244, and details of any recent parameter or spindle work.

Visit the FANUC Technical Support Center for more FANUC alarm guides, or contact REACO CNC for assistance.

Reference Source: Beijing FANUC. This article is based on FANUC technical documentation. The correct rigid-tapping S value, gear selection and maximum-speed parameter depend on the exact CNC, spindle, gearbox, position-coder ratio and machine-builder specification.

Get in touch with REACO CNC

Request Repair Consultation

Have a technical issue or need repair assistance?

Looking for a part quote?

Hours of Operation Mon - Fri: 8 AM to 8 PM(Beijing Time, UTC+8)

Email: sales@reacocnc.com

Hot Selling FANUC Parts

View all