LS ELECTRIC — XGI / XBC / XBM
Communicates with LS ELECTRIC (formerly LS Industrial Systems) XGI / XBC / XBM PLC series over the FEnet (Fast Ethernet) standard protocol.
This is the most commonly used communication method on the XGT series. The gateway first verifies ICMP (ping) reachability, then begins actual communication.
Registration form entries
| Field | What to enter | Example |
|---|---|---|
| IP address | IP of the PLC's FEnet module | 192.168.0.80 |
| Port | FEnet port | 2004 (XGT default) |
| Connect timeout (connect-timeout) | Maximum time for a connection attempt (ms) | 3000 |
| Read timeout (read-timeout) | Maximum time for a read response (ms) | 3000 |
| Use checksum (use-checksum) | BCC checksum option | Usually false |
| Use hex bit index (use-hex-bit-index) | Whether to interpret bit numbers as hexadecimal | Usually false. Set to true only when using hex indices such as F in the P area |
On the PLC side, register the FEnet module's IP / port in advance using XG5000.
Before attempting communication, the gateway checks whether the LS PLC is reachable via ping. If ICMP (ping) is blocked on the corporate network, even a healthy PLC will be reported as "Ping failed" — check your firewall policy.
PLC address notation for tags
For LS PLCs the short form (D00309) is recommended; the gateway automatically converts it to the standard form (%DW00309).
Memory areas
| Letter | Area |
|---|---|
D | Data Register — most common |
M | Memory (memory bit) |
K | Keep Relay |
F | Flag |
T | Timer |
C | Counter |
R | (depends on series) |
P | I/O |
Notation examples
| Notation (short form) | Meaning |
|---|---|
D00309 | Data Register 309 (16-bit) |
D00600 | Data Register 600 (to use it as 32-bit, specify DW in [format qualifier]) |
M02704 | Memory bit 2704 |
P0001F | I/O bit (when using hex indices) |
Because the same LS address can be interpreted as 16-bit / 32-bit / 64-bit / floating point, the [format qualifier] is essential.
Data type matching
| PLC value | Data type | Format qualifier | PLC address example |
|---|---|---|---|
| Bit (M, K, T, P) | Boolean | (empty) | M02704 |
| A specific bit within a word | Boolean | BIN[3] (bit 3) | D00309 |
| 16-bit integer | Integer | (empty) | D00309 |
| 16-bit unsigned | Integer | UI | D00300 |
| 32-bit integer | Integer | DW | D00600 (uses D00600–D00601) |
| 32-bit unsigned | Integer | UDW | D00690 |
| 64-bit integer | Long | (empty) | D00700 |
| 32-bit float (most common float type) | Float | REAL | D00450 |
| 64-bit float | Double | LREAL | D00500 |
| String of N words (= 2N characters) | String | STR[N] | D00500 |
It is read as 16-bit, so the value comes out as a completely different number. Always specify DW for 32-bit integers and REAL for 32-bit floats.
Common problems and solutions
| Symptom / message | Possible cause | Solution |
|---|---|---|
| "Ping failed" | ICMP is blocked | Allow ICMP on the firewall. If that is not possible, contact your system administrator |
| "Connect failed" | FEnet module not running, or wrong port | Check the FEnet module IP/port (2004) in XG5000 |
| 32-bit value looks wrong | Format qualifier left empty | Specify DW (integer) / REAL (float) |
| Bit is not read | Registered as D00100 (D is a word area) | Use a bit area such as M02704, or extract the bit from the word with format=BIN[3] |
| Garbled string characters | LS sends data low-byte-first | The gateway handles this automatically. Take care when decoding directly with external tools |
Frequently used examples
Registering a general line PLC
| Tag name | PLC address | Data type | Format qualifier |
|---|---|---|---|
| Run bit | M02704 | Boolean | (empty) |
| Counter (16-bit) | D00309 | Integer | (empty) |
| Cumulative production (32-bit) | D00600 | Integer | DW |
| Pressure (float) | D00100 | Float | REAL |
| Pressure (kPa, converted) | D00100 | Float | REAL (formula ${VALUE}*0.1) |
| Batch name (10 words) | D00500 | String | STR[10] |
Extracting bits from a word
If several bit signals are packed into the same word, you can register them one per row using BIN[비트번호].
| Tag name | PLC address | Data type | Format qualifier |
|---|---|---|---|
| Bit 0 | D00309 | Boolean | BIN[0] |
| Bit 3 | D00309 | Boolean | BIN[3] |
| Bit 15 | D00309 | Boolean | BIN[F] (hex F = 15) |
Setting the PLC registration option with use-hex-bit-index=true enables the use of hex indices (F, etc.).
More detailed examples / automated registration
See the LS examples in Advanced — REST API.