C/S/R Interfaces · SYNTEC

S-Bit Interface — Signals from CNC to PLC in SYNTEC CNC Systems

SYNTEC S-bit interface from CNC to PLC: signal functions, the S029 M-code handshake and practical diagnostics using CNC.LAD.

This page is also available in RU and PL.

In a SYNTEC CNC system, S bits form an important part of the interface between the CNC kernel and the PLC program. The direction of this interface is:

CNC / NCK
    │
    │  S bits
    ▼
PLC / CNC.LAD

S = CNC → PLC.

An S bit therefore allows the CNC side of the control system to report a particular CNC state, event or request to the PLC. The PLC program can then use that S bit as a condition in CNC.LAD.

What Are S Bits?

S bits are system interface signals generated by the CNC and made available to the PLC.

Depending on the particular S address, the signal may indicate, for example:

  • CNC execution state;
  • Feed Hold or Block Stop state;
  • axis Busy state;
  • axis homing completion;
  • an M, S or T code request;
  • CNC Reset;
  • NC Ready state;
  • spindle-related states;
  • specific M00, M01, M02 and M30 states;
  • macro-system-variable interface states;
  • additional CNC system states.

The exact meaning must always be determined from the specific S address. An S bit should not be interpreted simply from its number.

S Bits Are Not Physical Inputs

An S bit must not be confused with a physical PLC input I.

Physical machine signal
        ↓
       Ixxx
        ↓
       PLC

CNC internal state / event
        ↓
       Sxxx
        ↓
       PLC

An I address represents a physical input available to the PLC, while an S address represents information transferred from the CNC side to the PLC.

S and C — Two Directions of the CNC/PLC Interface

When analyzing SYNTEC Ladder logic, the direction of the S and C interfaces is fundamental:

S = CNC → PLC

C = PLC → CNC

This creates a bidirectional communication mechanism between the CNC kernel and the PLC logic.

             S bits
CNC / NCK ───────────► PLC
          ◄───────────
             C bits

Example: S029 — M Code Read

S029 is one of the most important examples for understanding the CNC-to-PLC interface.

When the CNC executes an M code, it activates S029 — M Code Read. The M-code value is placed in R1, allowing the Ladder program to determine which M code must be processed.

NC program
    ↓
M code
    ↓
CNC / NCK
    ↓
S029 = ON
R1 = M-code value
    ↓
PLC / CNC.LAD
    ↓
machine-specific M-code logic

After the PLC completes the required M-code operation, the CNC/PLC interface uses the corresponding M.S.T completion signal C038. This handshake allows the CNC to continue with the next program block.

CNC
 │
 ├── S029 = M Code Read ─────► PLC
 │                             │
 │                             │ machine logic
 │                             ▼
 └── C038 = M.S.T Finish ◄──── PLC

Why S Bits Are Important for Diagnostics

S bits make it possible to determine what state or request the CNC is presenting to the PLC. This is especially useful when a CNC command has been issued but the expected machine action does not occur.

For example, if an M-code operation does not complete, diagnostics can begin by checking whether the expected CNC-to-PLC signal is present and then following that signal through CNC.LAD.

CNC command / state
        ↓
      Sxxx
        ↓
Cross Reference
        ↓
CNC.LAD
        ↓
PLC conditions / interlocks
        ↓
internal logic
        ↓
Oxxx or Cxxx
        ↓
next diagnostic stage

This makes S bits an important diagnostic boundary between the CNC kernel and the machine PLC logic.

How to Read the S-Bit Table

The following table lists the S-bit interface described in the SYNTEC documentation used for this diagnostic reference.

The original documentation contains several short or poorly translated English descriptions. The wording below has been normalized for clarity where the intended meaning is sufficiently clear. Entries for which no function is provided in the source remain unassigned rather than being interpreted or guessed.

S-Bit Interface Table — CNC → PLC

S BitFunctionDescription
S000Cycle Start Light / CNC BusyON indicates that the CNC is in BUSY state.
S001Feed Hold LightON indicates that the CNC is in FEED HOLD state.
S002Block StopON indicates the BLOCK STOP state.
S003Feed Hold InhibitON indicates that Feed Hold is inhibited.
S004Rigid TappingON indicates rigid tapping mode for the first spindle/axis group. The source associates this state with G63.
S005—No function specified in the source.
S006X Axis BusyON indicates that the X axis is busy and cannot accept a new command. OFF indicates that it can accept a new command.
S007Y Axis BusySame function as S006 for the Y axis.
S008Z Axis BusySame function as S006 for the Z axis.
S009C (6th) Axis BusySame Busy-state function as S006 for the C (6th) axis.
S010—No function specified in the source.
S0112nd Multiple M-Code ReadIndicates the second M-code read when the multiple-M-code function is used. No additional description is provided in the source.
S0123rd Multiple M-Code ReadIndicates the third M-code read when the multiple-M-code function is used. No additional description is provided in the source.
S0134th Multiple M-Code ReadIndicates the fourth M-code read when the multiple-M-code function is used. No additional description is provided in the source.
S0145th Multiple M-Code ReadIndicates the fifth M-code read when the multiple-M-code function is used. No additional description is provided in the source.
S015—No function specified in the source.
S016X Axis Home OKTurns ON after X-axis homing is completed. According to the source, the software travel limit becomes enabled after this signal is ON and the signal should be checked in Ladder before Cycle Start.
S017Y Axis Home OKSame Home OK function as S016 for the Y axis.
S018Z Axis Home OKSame Home OK function as S016 for the Z axis.
S019C (6th) Axis Home OKSame Home OK function as S016 for the C (6th) axis.
S020–S028—No function specified in the source.
S029M Code ReadTurns ON while the CNC is processing an M code and informs the Ladder that an M-code operation must be executed. The M-code value is stored in R1. The signal remains active until the PLC returns the M.S.T Finish signal. After completion, the CNC can proceed to the next block.
S030Distribution EndIndicates completion of motion distribution for a block. The source notes its use when G-code motion and an M-code action are executed together.
S031AlarmIndicates an internal CNC alarm condition. The source gives examples including DDA overflow and software-limit exceedance.
S032ResetOutputs a one-shot signal when RESET is activated.
S033NC ReadyIndicates that CNC startup has completed and the NC is in the Ready state.
S034Required Part Count ReachedTurns ON when the required production count is reached. According to the source, it turns OFF on Cycle Start or Reset.
S035Part Count M-Code in Main ProgramThe source states that execution of M99 in the main program produces a pulse on this S bit.
S036In Guidance ModeON when the CNC is operating in Guidance Function mode.
S037Data LossTurns ON when user data is reported as lost.
S038–S040—No function specified in the source.
S041PLC AlarmON while a PLC alarm is present and OFF when the alarm disappears. The source states that this function applies only to WinCE controllers.
S042–S052—No function specified in the source.
S053B Code ReadB-code read signal. No additional description is provided in the source.
S054S Code ReadTurns ON while the CNC requests execution of an S code by the Ladder. The S-code value is stored in R2. The CNC waits for the corresponding S-code completion C-bit before proceeding to the next block.
S055–S057—No function specified in the source.
S058Spindle Cutting Speed ArrivalThe source provides the signal name but no additional description.
S059Spindle Threading Speed ArrivalThe source provides the signal name but no additional description.
S060Spindle Superimposition FinishThe source provides the signal name but no additional description.
S061Spindle Orientation Stop FinishIndicates completion of spindle orientation/positioning.
S062Spindle Synchronization FinishThe source provides the signal name but no additional description.
S063Spindle Axis ModeON indicates position-control mode for the main spindle axis. OFF indicates spindle speed-control mode.
S064–S068—No function specified in the source.
S069T Code ReadTurns ON while the CNC requests execution of a T code by the Ladder. According to the source, the T-code contents are stored in R2. The CNC waits for the corresponding T-code completion C-bit before proceeding to the next block.
S070At Start PointON indicates that the CNC is at the start point of the process.
S071At End PointON indicates that the CNC is at the end point of the process.
S072–S079—No function specified in the source.
S080M00 SignalTurns ON when the CNC reads M00 and remains ON until Reset or M-code completion through C38. The source specifies version and first-MST-axis-group restrictions for this function.
S081M01 SignalTurns ON when M01 is read while C44 enables Optional Stop. It remains ON until Reset or M-code completion through C38.
S082M02 SignalTurns ON when M02 is read and remains ON until Reset or M-code completion through C38.
S083M30 SignalTurns ON when M30 is read and remains ON until Reset or M-code completion through C38.
S084–S095—No function specified in the source.
S096Screen Saver RunningThe source provides the signal name but no additional description.
S097Executable File CRC ErrorThe source provides the signal name but no additional description.
S098OCAPI Server RunningThe source provides the signal name but no additional description.
S099Dipole Connection in UseThe source provides the signal name but no additional description.
S100DOS USB in UseThe source provides the signal name but no additional description.
S101–S132Macro System Variable MappingS101–S132 map to macro system variables #6001–#6032.
S133–S139—No function specified in the source.
S1404th Axis Home OKTurns ON after homing of the 4th axis is completed. According to the source, the software travel limit becomes enabled after this signal is ON.
S1415th Axis Home OKSame Home OK function as S140 for the 5th axis.
S142–S1517th–16th Axis Home OKHome-complete signals for axes 7 through 16. Individual mapping: S142 = 7th axis, S143 = 8th, …, S151 = 16th.
S152–S154—No function specified in the source.
S1554th Axis BusyON indicates that the 4th axis is busy and cannot accept a new command. OFF indicates that it can accept a new command.
S1565th Axis BusySame Busy-state function as S155 for the 5th axis.
S157–S1667th–16th Axis BusyBusy-state signals for axes 7 through 16. Individual mapping: S157 = 7th axis, S158 = 8th, …, S166 = 16th.
S171–S186Servo Alarm StateAlarm-state signals for motion-card ports 1–16: S171 corresponds to port 1, S172 to port 2, through S186 for port 16. The source states that the S bit becomes active when the motion card does not receive the alarm signal. The source also states that this function does not support Servo6.
S190–S320—No function specified in the source.
S321–S400Keyboard S BitsKeyboard-related S-bit range. The source states that S355–S374 are currently supported.
S401–S488Keyboard Scan CodeMapped to keyboard scan codes 1–88.
S489–S511Reserved for CNCReserved for system/CNC use.

Using S Bits in Practical Diagnostics

When troubleshooting a machine, an S bit can help determine whether the CNC has actually generated the state or request expected by the PLC.

Expected CNC operation
        ↓
Is the corresponding S bit active?
        ↓
       YES
        ↓
Trace Sxxx in CNC.LAD
        ↓
Check Ladder conditions and interlocks
        ↓
Check resulting A / R / O / C signals
        ↓
Continue toward the physical machine

This is particularly useful for distinguishing between a problem on the CNC side and a problem occurring later in the PLC or machine sequence.

For example, if the CNC has generated S029 and placed the requested M-code value in R1, the diagnostic investigation can continue inside CNC.LAD. If the expected machine action still does not occur, the relevant Ladder conditions, interlocks, outputs and feedback signals can then be traced.

Diagnostic Principle

CNC internal state / command
            ↓
           Sxxx
            ↓
        CNC.LAD
            ↓
PLC logic / interlocks
            ↓
      A / R / O / C
            ↓
electrical / mechanical system

S bits provide a diagnostic view of information transferred from the CNC side to the PLC. They are therefore one of the key interfaces for tracing a command or CNC state into the machine Ladder logic.

← All materials in C/S/R Interfaces