PortDock

LS XGT Dedicated Protocol (FEnet) Frame Decoder

Paste an LS XGT FEnet dedicated protocol frame («LSIS-XGT», TCP 2004) as HEX to decode the header, instruction, variables, values and error code.

Examples

Everything is decoded in your browser; nothing you paste is sent anywhere.

Build a request

Builds a request with company ID «LSIS-XGT», source of frame h33 and the BCC filled in.

FAQ

What is %MX1603?

Bit variables are numbered in bits — word number × 16 + bit number (decimal). Bit 3 of %MW100 is 100 × 16 + 3 = 1603, so %MX1603. Manual p. 8-12 says to write bit C of %MW172 as %MX2764, not %MX172C.

How is the BCC calculated?

The low 8 bits of the sum of the first 19 of the 20 header bytes (company ID through FEnet position). This matches the examples in tables 5-7, 5-8 and 5-9 of the XBL-EMTA manual (only table 5-6's 0x4E differs from the header sum 0x3C). The decoder shows the computed value.

Is the error code 1 byte or 2?

The figure in manual 8.1.2 shows 1 byte; the tables in 8.2 and section 10.4 say the low byte of the 2-byte field after the error status is the code. This decoder and PortDock PLC Simulator read and write 2 bytes (little-endian).

What is «Error code PortDock PLC Simulator would return»?

The request checked against PortDock PLC Simulator's handling rules (from 0.10.0). Numbers beyond the device size (error 4) depend on the size set in the app and are not checked here. A real PLC may answer differently depending on model and settings.

Error codes

CodeMeaningWhen PortDock PLC Simulator answers with it
h0001More than 16 blocksIndividual read/write with 0 or more than 16 blocks; continuous with a block count other than 1
h0002Wrong data typeData type field not h00–h04 or h14, the variable's type letter (X/B/W/D/L) differs from it, write data size differs from the type, or continuous with a non-byte variable
h0003Device not servicedDevice letter not P/M/K/F/T/C/D/L/N, or the name does not start with «%», is over 16 characters or the number is not decimal
h0004Device area exceededThe number is beyond the device size (set in the app)
h0005Over 1,400 bytes (block)Continuous read/write of more than 1,400 bytes
h0006Over 1,400 bytes (total)(not used by the app — 16 individual blocks never exceed 1,400 bytes)
h0075Wrong company IDThe first 10 bytes are neither «LSIS-XGT»+00 00 nor «LGIS-GLOFA»
h0076Wrong header lengthThe header length field differs from the bytes that follow, or the body is shorter/longer than the blocks and name lengths say
h0077Wrong header checksumBCC (sum of the first 19 bytes) differs — not checked when «Check header BCC» is off in the app
h0078Wrong instructionInstruction other than h0054/h0058 (status read h00B0 included)

Meanings are shortened from LS ELECTRIC «XGT FEnet I/F Module User's Manual» V2.30 10.4 (p. 10-12). Which condition gets which code was chosen by PortDock PLC Simulator; a real PLC may differ.

Devices and variable names

LetterNameExample
PI/O relay%PX0 · %PB0 · %PW0 · %PD0 · %PL0
MAuxiliary relay%MX0 · %MB0 · %MW0 · %MD0 · %ML0
KKeep relay%KX0 · %KB0 · %KW0 · %KD0 · %KL0
FSpecial relay%FX0 · %FB0 · %FW0 · %FD0 · %FL0
TTimer%TX0 · %TB0 · %TW0 · %TD0 · %TL0
CCounter%CX0 · %CB0 · %CW0 · %CD0 · %CL0
DData register%DX0 · %DB0 · %DW0 · %DD0 · %DL0
LLink relay%LX0 · %LB0 · %LW0 · %LD0 · %LL0
NCommunication data register%NX0 · %NB0 · %NW0 · %ND0 · %NL0

References

Built from LS ELECTRIC's public user's manuals (XGT FEnet and XGB FEnet); not affiliated with LS ELECTRIC.

To test your own program's communication without a PLC, see Testing LS XGT dedicated protocol communication without a PLC · PortDock PLC Simulator.

For Mitsubishi MC protocol (SLMP) frames use the MC Protocol (SLMP) Frame Decoder.