Skip to content

ASCII Command Protocol

The MFR modules communicate via a standardized ASCII protocol. This applies to all interfaces (USB, RS232, Ethernet).

Connection Parameters

  • Baud Rate: 9600 Baud
  • Data Format: 8N1 (8 Data bits, No Parity, 1 Stop bit)
  • Handshake: None

Command Structure

Communication follows the Request-Response scheme, although the module also sends automatically upon status changes. Every command ends with a Carriage Return (CR, 0x0D).

Data Encoding (Nibble-to-ASCII)

One byte (8 bits) is split into two 4-bit halves (Nibbles). 0x40 is added to each value (0..15) (@..O).

Value0123...131415
Character@ABC...MNO

Control Commands (Operational)

O - Set Outputs (Group)

Sets all 8 outputs simultaneously.

  • Command: O [DataHigh] [DataLow] ([MaskHigh] [MaskLow]) [CR]
  • Masking: (from Firmware V1.10) Optionally, two additional bytes can be sent to change only specific bits (1=Change, 0=Ignore).
  • Example: O@O (Sets outputs 0-3 to ON, 4-7 to OFF).

o - Set Output (Single Bit)

(from Firmware V1.10) Sets exactly one output without affecting the others.

  • Command: o [Bit-Address] [Bit-Status] [CR]
  • Address: @=Channel 0 ... G=Channel 7.
  • Status: @=Off, A=On.

I - Read Inputs / Simulation

Queries the inputs or simulates input signals.

  • Read: I [CR] Responds with the actual status.
  • Simulation: I [DataHigh] [DataLow] [CR] Performs a logical OR operation with the physical inputs.
    • Usage: Only for testing purposes to "force" inputs via software.

D - Watchdog (Dialog Monitoring)

(from Firmware V1.10) Safety function. Switches off all outputs if no communication occurs for time t.

  • Command: D [TimeHigh] [TimeLow] [CR]
  • Unit: 100ms steps (e.g., value 50 = 5 seconds).
  • Deactivation: D@@ (Time = 0).

X - Reset

Performs a restart (Soft-Reset).

  • Response: The module sends its ID (e.g., XSP01R...).

Automatic Events

The module sends data unsolicited when a state changes.

  1. On Input Change: I [High] [Low] [CR]
  2. On Output Change: O [High] [Low] [CR]

Important for Programmers

Ensure that your reception routine can handle these asynchronous messages. If necessary, flush the input buffer before sending a command.

System & Configuration Commands

These commands are used for management and identification of the module.

U - Module Identification

Queries the hardware configuration (Output type and Interface).

  • Command: U [CR]
  • Response: [Output][Interface] [CR]
  • Return Values:
    1. Character (Output):
      • L = Semiconductor (Logic / Low-Side)
      • R = Relay
    2. Character (Interface):
      • E = Ethernet
      • U = USB
      • R = RS-232
  • Example: Response LR means L-Series (Semiconductor) with RS-232 Interface.

V - Firmware Version

Reads the current firmware version of the microcontroller.

  • Command: V [CR]
  • Response: [Version].[Compilation] [CR] (e.g., 1.10)

S - Serial Number

Reads the unique serial number of the module.

  • Command: S [CR]
  • Response: Hexadecimal String (Device Type, Number, Checksum BCC).

N / n - Module Name

Reads or writes the user-defined name of the module.

  • Read: N [CR] Returns the name (max. 20 characters).
  • Write: n [Name] [CR] Sets the name (e.g., nMachine1).

Q - Read All Info

Returns a combined list of all parameters mentioned above (Name, Version, Serial Number, ID) in one block.

  • Command: Q [CR]

Z / z - Logic Configuration

Reads (z) or writes (Z) the 16-byte parameter block for the MFR time functions of a channel.