SINUMERIK 840D V24 Transfer: Resolving Archive and Syntax Errors

David Krause14 min read
Other TopicSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Problem Overview

The SINUMERIK 840D operator panel front interface (V24 / RS-232-C) is commonly used to archive and restore part programs (.MPF / .SPF) and to push modified NC code from an external programming station into the controller. Two recurring fault conditions appear on the HMI when a transfer is attempted from a PC to the control but the file lands in the wrong format or the serial framing does not match:

  1. "Die Datei ist kein Archiv" – the HMI parser rejects the incoming byte stream because the leading header bytes do not match the SINUMERIK archive signature. The control expects either a pure 7-bit ASCII Punch-Tape stream or a binary %_N_ archive container with block-check characters (BCC) and a closing %%EOF. Anything else is flagged as a foreign binary and rejected as a non-archive.
  2. "Syntax error: please check file/pathname" – raised by the HMI loader when the framing (parity, stop bits, baud rate) drifts or when the line-discipline protocol (RTS/CTS vs Xon/Xoff) drops characters, producing truncated program headers that the parser cannot interpret.

The combination produces a one-way symptom: read from NC to PC works, but write from PC to NC fails. The asymmetry is the diagnostic fingerprint: outbound RS-232 framing is set on both ends correctly, but inbound framing on the HMI input screen, or the format selector, is misconfigured.

Field signature: If Services → Read out (Lesen) succeeds and produces a readable ASCII file on the PC, but Services → Read in (Einlesen) fails with the two errors above, the issue is format/protocol on the HMI input side, not cable, not connector, not grounding. Replace cable only after ruling out the HMI format selectors.

Root Cause Analysis

Three independent configuration layers must agree between the PC terminal program (e.g. SIMATIC ProTool/ProAgent terminal, Windows HyperTerminal, Tera Term, or the SINUMERIK-side equivalent "Services") and the HMI. Mismatch on any one layer produces the symptoms above.

Layer 1 – File Format (Punch Tape vs Archive)

The 840D HMI accepts two on-the-wire file representations on the V24 channel. According to the official Siemens documentation Setting V24 in the program manager (SINUMERIK 840D sl/840Di sl/828D):

  • Punch Tape – plain ASCII, line-oriented, ISO 7-bit. Each NC block ends with LF. The file is the exact text that would appear in the editor. No BCC, no header, no trailer. This is the format produced by the HMI when the operator selects Punch Tape in the Services screen.
  • Archive – a binary container that begins with the %_N_ identifier, embeds a per-block checksum character, and terminates with %%EOF. Archives are produced when the operator selects Archive in Services or when reading out via the PG interface with a binary protocol.

If the PC sends an ASCII Punch-Tape file while the HMI is configured to expect an Archive (or vice-versa), the loader compares the first bytes against the expected magic string. An ASCII file with %_N_MPF1 may superficially match the archive header but will fail the BCC validation on the first block, producing "Die Datei ist kein Archiv". The inverse case – sending a binary archive while the HMI expects ASCII – produces truncated or garbage lines and surfaces as the "Syntax error: please check file/pathname" message.

Layer 2 – Transfer Protocol (RTS/CTS vs Xon/Xoff)

The same Siemens manual lists two supported line protocols for V24 transfer:

  • RTS/CTS (hardware handshake) – the default. Uses pins 4 (RTS) and 5 (CTS) of the 25-pin SUB-D connector (X6 on the operator panel front). The HMI raises RTS when its input buffer has space; the PC raises CTS when its output buffer has space. The two control signals throttle the data flow.
  • Xon/Xoff (software handshake) – uses DC1 (0x11) and DC3 (0x13) characters embedded in the data stream. The receiver transmits DC1 to resume, DC3 to pause. Pins 4 and 5 are not used for flow control in this mode and must not be looped back, as the handshake is in-band.

If the PC and HMI disagree on which handshake is active, characters are dropped or duplicated, producing the syntax error path described above.

Layer 3 – Serial Framing (Baud, Data, Parity, Stop)

The HMI default and the recommended PC-side settings are listed in the table below. Any drift produces a framing error which the HMI surfaces as either an archive mismatch (Layer 1) or a pathname syntax error (Layer 2 path).

Step-by-Step Resolution

Apply the following procedure in the order given. Do not skip the verification step at the end of each phase.

Step 1 – Confirm the Cable and Connector

  1. Use a shielded V24 (RS-232-C) cable, maximum length 15 m at 19200 baud or 5 m at 38400 baud per the EIA-232 standard.
  2. Identify the connector on the 840D operator panel front: 25-pin male SUB-D, labelled X6 (or COM1 on PCU 50.3 / PCU 50.5 panels). The PC end is a 9-pin female SUB-D on virtually all industrial PCs built after 2000.
  3. Pin-out reference (X6 / PCU 50 COM1):
Signal 25-pin X6 (840D) 9-pin PC COM
TXD 2 2 Receive on PC (input)
RXD 3 3 Transmit from PC (output)
RTS 4 7 PC side asserts when ready
CTS 5 8 PC side reports clear-to-send
DSR 6 6 Data set ready
Signal GND 7 5 Mandatory reference
DCD 8 1 Carrier detect (optional)
DTR 20 4 Data terminal ready

Cross-over must be applied: pin 2 to pin 3, pin 4 to pin 5, pin 6 to pin 20, pin 7 to pin 7. A null-modem adapter or pre-made Siemens 6FC9341-1HA cable is the field-proven choice.

Step 2 – Configure the HMI Input Screen

  1. On the operator panel, navigate to Services → Read in (or the older HMI Advanced menu path Start → Services → V24).
  2. Set the following values exactly:
Parameter Value
Interface V24 (RS232)
Baud rate 9600 (or 19200 for newer panels)
Data bits 7
Parity Even
Stop bits 1
Protocol RTS/CTS
File format Punch Tape
End-of-block character (EOB) LF (0x0A)
  1. If your part programs were previously written as Archive files by an external tool (e.g. SINUTRAIN export, or a third-party CAM post-processor set to "Siemens Archive"), switch the format selector to Archive instead of Punch Tape. The selector is on the same HMI screen, immediately under the protocol field.
Critical: The HMI default is Punch Tape with Even parity and 7 data bits. If your PC terminal is set to 8-N-1 (8 data bits, no parity, 1 stop bit) the byte stream will be corrupted silently and you will see the archive error. Match the HMI, do not match a Windows default.

Step 3 – Configure the PC Terminal

Configure the terminal program on the PC (Windows-side example, equivalent for Linux stty parameters shown for reference):

Windows COM port settings (Device Manager → Ports → COM1 → Properties → Port Settings):
  Bits per second: 9600
  Data bits:       7
  Parity:          Even
  Stop bits:       1
  Flow control:    Hardware (RTS/CTS)

Linux equivalent:
  stty -F /dev/ttyS0 9600 cs7 parenb -parodd cstopb crtscts -ixon -ixoff raw

Set the terminal program to send the file as raw text with no protocol translation. In Tera Term this is the File → Send file menu with the Binary checkbox off. In Windows HyperTerminal, use Transfer → Send Text File. Do not use Zmodem, Xmodem, Kermit, or Ymodem on the V24 interface of the 840D – these protocols are not implemented on the HMI side and will be rejected as non-archives.

Step 4 – Use the PG Interface as an Alternative

If the V24 path continues to misbehave after the configuration above, the field-proven alternative documented in service practice is to switch the HMI input selector from V24 to PG (programming device interface). The PG interface uses a different framing and protocol stack and is more tolerant of file-format mismatches because the HMI performs auto-detection of Punch Tape vs Archive on the PG channel.

  1. On the HMI Services screen, change the top selector from V24 to PG.
  2. Re-send the file. The archive error will not appear because the PG path performs header sniffing before format commitment.
The PG interface was originally designed for connecting a Siemens PG720 / PG740 programming device. Modern replacements are the SIMATIC Field PG M5/M6 or any PC running SIMATIC ProTool/STEP 7 with the SINUMERIK connect option. The V24 path remains supported but is more sensitive to format and parity settings.

Verification Procedure

After applying Steps 1–4, perform the following verification sequence. Each step must pass before the next is attempted.

  1. Loopback test: With the cable disconnected, run a serial loopback (pin 2 shorted to pin 3 on the PC end). Send any text from the terminal program; the local echo should show the same bytes. This proves the PC UART and the terminal program are configured.
  2. Read-out from NC to PC: On the HMI, run Services → Read out → V24. Select a known-good .MPF file. On the PC, capture the text into a file. Open the captured file in a hex editor; the first bytes must be %_N_MPF... for an Archive, or a plain NC block (e.g. G01 X0 Y0) for Punch Tape.
  3. Read-in from PC to NC (round-trip): Rename the existing program on the NC (e.g. MPF1 to MPF1_OLD) so the loader creates a fresh entry. Send the captured file back to the NC. The HMI must accept it and the new program must appear in the program manager with the original name restored.
  4. Block-count check: Compare the line count of the file on the PC with the block count reported by the HMI after the transfer. A discrepancy of more than 2 blocks indicates that the line discipline dropped characters – re-check the RTS/CTS wiring or the Xon/Xoff setting.

Troubleshooting Matrix

Symptom on HMI Likely Layer First Check Remediation
"Die Datei ist kein Archiv" 1 – File format HMI format selector (Punch Tape vs Archive) Match selector to the actual file format being sent. If the file starts with %_N_ and contains %%EOF, select Archive. Otherwise select Punch Tape.
"Syntax error: please check file/pathname" 2 – Protocol / framing Parity and stop-bit settings on both sides Reset both ends to 7-E-1 and RTS/CTS. Verify the PC flow control matches the HMI flow control.
File transfers but block count off by N 2 – Protocol Handshake wiring (RTS/CTS pins 4 and 5) Replace the cable. Confirm pins 4 and 5 are cross-over, not looped back at the same end.
Read-out works, read-in fails 1 or 2 Directional framing on HMI The HMI has separate read and read-in screens. Verify the input screen, not the output screen.
No response at all, no HMI error 3 – Cable / port COM port number on PC Confirm Device Manager shows the COM port on the assigned number, and that the terminal program opens that COM port, not COM3 when the cable is on COM1.
Garbage characters mixed with text 3 – Baud rate Baud rate parity Set both ends to 9600. If the panel supports 19200, use 19200 on both ends. Mismatched baud is the most common cause of garbage without errors.
File uploads but contains additional blank lines at the top 1 – EOB character End-of-block setting on the sending terminal Set the terminal to translate CR to CR+LF or to LF only, depending on the HMI expectation. Default is LF only.

Format Reference – Punch Tape vs Archive

The two on-the-wire formats are structurally different. Operators must know which their CAM post-processor emits.

Property Punch Tape Archive
Encoding 7-bit ASCII (ISO 646) 7-bit ASCII + checksum characters
First bytes First NC block directly, e.g. ;MPF1 or G01 ... %_N_MPF1_MPF (or _SPF for subprograms)
Per-block structure Block text + LF Block text + BCC character + LF
Trailer None %%EOF
File extension on PC .MPF / .SPF (renamed by the loader) .ARC or .ZIP (depending on the HMI version)
Created by Editor save on HMI, or CAM post set to ASCII Services → Read out with Archive selected, or CAM post set to "Sinumerik Archive"
Read with Any text editor SINUMERIK archive tools only

Protocol Reference – RTS/CTS vs Xon/Xoff

Property RTS/CTS Xon/Xoff
Type Hardware (out-of-band) Software (in-band)
Pins used 4 (RTS), 5 (CTS) None, all on TXD/RXD
Control characters None in data stream DC1 (0x11) = Xon, DC3 (0x13) = Xoff
Distance limit 15 m at 19200 baud per EIA-232 15 m at 19200 baud, but sensitive to terminal emulation
Default on 840D HMI Yes Optional
When to use Default for all V24 transfers Only when the cable lacks pins 4 and 5, or when connecting to a terminal server that translates RTS/CTS incorrectly
Common pitfall Pins 4 and 5 looped back at one end (acts like Xon/Xoff) DC1/DC3 stripped by a terminal emulator set to "raw" or "binary" mode

For the procedure described in the official Siemens manual (Setting V24 in the program manager), leave the protocol at RTS/CTS unless there is a documented reason to switch.

Edge Cases and Field-Proven Caveats

  1. PG-vs-V24 selector persistence: The HMI does not remember the last-used interface across a power cycle on all firmware versions. After a cold restart, the selector may default back to V24. After any NCK reset, re-verify the interface selector before re-trying a transfer.
  2. Long program names with spaces: The syntax error path is also triggered if the file on the PC contains spaces or non-ASCII characters in the path. Store the file in a path with no spaces and 7-bit ASCII characters only (e.g. C:\NC\MPF1.MPF).
  3. CR vs LF line endings: Windows tools often emit CR+LF. The 840D HMI expects LF only. Configure the terminal to translate CR to nothing or to LF, otherwise a stray 0x0D appears in the first block and breaks the archive header check.
  4. Touch panel vs keyboard on HMI: On PCU 50.3 panels with touch, the Services menu is reached via the system menu, not via a hard key. The parameter fields are entered with the virtual keyboard.
  5. Operator panel vs NCU: The V24 connector discussed here is on the operator panel front (PCU 50 / OP 010 / OP 010C / OP 012 / OP 015 / OP 015A). Do not confuse it with the X122 / X132 interfaces on the NCU, which are fieldbus interfaces, not serial V24.
  6. Firmware version sensitivity: On SW 4.5 and later (840D sl), the HMI input screen layout is unchanged but the default for the protocol selector was extended to include "None". Setting the protocol to "None" disables both handshakes and produces intermittent block drops. Always set an explicit protocol.

Commissioning Checklist

  1. Confirm V24 cable pin-out against the table above.
  2. Open the HMI Services screen, set the interface to V24, and the protocol to RTS/CTS.
  3. Set baud 9600, 7 data bits, Even parity, 1 stop bit on the HMI.
  4. Set the same values on the PC terminal program. Match the file format (Punch Tape or Archive) to the actual file.
  5. Run a loopback test on the PC side.
  6. Read out a known-good program from NC to PC. Verify the file content in a hex editor.
  7. Rename the original on the NC, then read the same file back in. Verify block count.
  8. If Steps 6–7 fail, switch the HMI selector from V24 to PG and retry Steps 6–7.
  9. Document the final settings on the machine's commissioning sheet for future operators.

What does the error "Die Datei ist kein Archiv" mean on a SINUMERIK 840D?

It means the incoming byte stream on the V24 interface does not match the expected SINUMERIK archive header. The HMI is configured to expect an Archive (binary, with BCC and %%EOF trailer) but is receiving a plain ASCII Punch-Tape file, or vice-versa. Switch the format selector on the HMI Services screen from Archive to Punch Tape (or the reverse) to match the file you are sending.

What are the correct V24 serial parameters for SINUMERIK 840D program transfer?

The HMI default and the recommended PC-side settings are: 9600 baud, 7 data bits, Even parity, 1 stop bit, RTS/CTS hardware handshake. Some operator panels support 19200 baud. Do not use 8-N-1 (the Windows default for COM ports) – it will corrupt the 7-bit ASCII stream and the loader will reject the file.

What is the difference between V24 and PG interface on the 840D operator panel?

V24 is the raw RS-232-C serial interface that the operator selects for file transfers with full manual control over baud, parity, and protocol. PG (programming device) is a higher-level interface that auto-detects Punch Tape vs Archive format and uses a more tolerant framing stack. If the V24 path repeatedly fails, switching the HMI selector to PG is a field-proven workaround that resolves both the archive and the syntax error symptoms.

Can I read out a program from the 840D but not read one in?

Yes, this is the classic one-way symptom of a V24 misconfiguration. The outbound direction uses the HMI read-out screen, which has its own framing parameters. The inbound direction uses the HMI read-in screen, with separate framing parameters. Set both screens to the same values, and verify that the file format selector on the read-in screen matches the file you are sending.

Which file format should my CAM post-processor emit for the 840D V24 transfer?

For the simplest V24 transfers, configure the CAM post-processor to emit plain 7-bit ASCII with LF line endings (Punch Tape). Save the file with the extension .MPF for main programs or .SPF for subprograms. Avoid the binary Archive format unless your CAM system or the HMI archive tool is required for traceability – it adds a checksum character per block and a %%EOF trailer that must match exactly or the loader rejects the file as a non-archive.

Back to blog