XMC Modbus TCP Server Setup
The XMC has Modbus TCP capability with the built in ethernet port.
-
Modbus TCP uses port number 502.
-
The XMC can be a Modbus server.
-
There are a maximum of 8 Channels to be used by the Modbus TCP Server.
-
Up to 512 bytes of data.
This is a dedicated function.
| AREA | Device Type | Size (Word) | Remark |
|---|---|---|---|
| I | %IW0.0.0 to %IW15.15.3 | 1024 | Read, Write Enable |
| Q | %QW0.0.0 t %QW15.15.3 | 1024 | Read, Write Enable |
| M | %MW0 to %MW16383 | 16384 | Read, Write Enable |
| W | %WW0 to %WW32767 | 32768 | Read, Write Enable |
| Function Codes | Function | Modbus Transcription |
|---|---|---|
| Function Code 01 (h01) | Reading output bit | Read coils |
| Function Code 02 (h02) | Reading input bit | Read discrete inputs |
| Function Code 03 (h03) | Reading output word | Reading holding registers |
| Function Code 04 (h04) | Reading input word | Write input register |
| Function Code 05 (h05) | Writing output bit | Write single coil |
| Function Code 06 (h06) | Writing output word | Write single register |
| Function Code 15 (h0F) | Writing output bit sequentially | Write multiple coils |
| Function Code 16 (h10) | Writing output word sequentially | Write multiple registers |
| Step | Action |
|---|---|
| 1 |
Open the Local Ethernet Parameter settings.
|
| 2 |
Setup FEnet parameters.
|
| 3 |
Choose Modbus Server or Smart Server as the Server Mode.
|
| 4 |
Press Modbus Settings button to configure memory address space for the server.
|
| 5 |
Configure Modbus Settings with appropriate memory addresses.
Example mapping:
|
LM203