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.
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
| Code | Meaning | When PortDock PLC Simulator answers with it |
|---|---|---|
| h0001 | More than 16 blocks | Individual read/write with 0 or more than 16 blocks; continuous with a block count other than 1 |
| h0002 | Wrong data type | Data 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 |
| h0003 | Device not serviced | Device 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 |
| h0004 | Device area exceeded | The number is beyond the device size (set in the app) |
| h0005 | Over 1,400 bytes (block) | Continuous read/write of more than 1,400 bytes |
| h0006 | Over 1,400 bytes (total) | (not used by the app — 16 individual blocks never exceed 1,400 bytes) |
| h0075 | Wrong company ID | The first 10 bytes are neither «LSIS-XGT»+00 00 nor «LGIS-GLOFA» |
| h0076 | Wrong header length | The header length field differs from the bytes that follow, or the body is shorter/longer than the blocks and name lengths say |
| h0077 | Wrong header checksum | BCC (sum of the first 19 bytes) differs — not checked when «Check header BCC» is off in the app |
| h0078 | Wrong instruction | Instruction 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
| Letter | Name | Example |
|---|---|---|
| P | I/O relay | %PX0 · %PB0 · %PW0 · %PD0 · %PL0 |
| M | Auxiliary relay | %MX0 · %MB0 · %MW0 · %MD0 · %ML0 |
| K | Keep relay | %KX0 · %KB0 · %KW0 · %KD0 · %KL0 |
| F | Special relay | %FX0 · %FB0 · %FW0 · %FD0 · %FL0 |
| T | Timer | %TX0 · %TB0 · %TW0 · %TD0 · %TL0 |
| C | Counter | %CX0 · %CB0 · %CW0 · %CD0 · %CL0 |
| D | Data register | %DX0 · %DB0 · %DW0 · %DD0 · %DL0 |
| L | Link relay | %LX0 · %LB0 · %LW0 · %LD0 · %LL0 |
| N | Communication data register | %NX0 · %NB0 · %NW0 · %ND0 · %NL0 |
References
- LS ELECTRIC XGT FEnet I/F Module User's Manual V2.30 — chapter 8 dedicated communication (pp. 8-1–8-14: ports 2004/2005, header, instructions h0054/h0058, data types, individual and continuous read/write), 10.4 error codes (p. 10-12)
- LS ELECTRIC XGB FEnet I/F Module XBL-EMTA User's Manual V1.8 — 5.2 XGT dedicated protocol (pp. 5-3–5-7): header table, two company IDs, byte address = word × 2, request/response frame examples (tables 5-6–5-9)
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.