Introduction
I. Configuring SCU map
1. In Cx-Programmer, set port 2 mode User, Gateway, 9600, 8, N, 1:

2. Transfer the settings in the map.
Warning: the value of Serial Gateway Response timout should always be less than the timeout defined in the CMND (C 5) multiplied by the number of tests
II. Programming instruction CMND
| @CMND490 | |
| Source | Modbus Query preceded FINS command code 2804 (Modbus conversion) |
| Destination | Mailing address for reply |
| Control | Execution parameters of the instruction |
The destination instructions CMND, SEND, RECV are intelligently made using the traditional routing PURPOSES, No network N + No node n + u. No Unit
Since the V3 version of CPU CJ / CS, the recipient unit may be appointed directly from the Unit No. added as an offset. This trick of writing allows you to dispense with a routing table in the PLC.
| Without routing table | Network | Node | Unit |
| SCB (card inserted in the UC) | 0 | 0 | Port 1 : E4 Port 2 : E5 |
| SCU (maps) | 0 | 0 | Port 1 : 80 + 4x n° Unit Port 2 : 81 + 4x n° Unit |
1. Writing Query (0x10) from ABCD in 0002 via the register map SCU21 port 1 Unit No. 0
| Description of the Source block | Example | ||
| S | 2804 -> FINS Code for Modbus conversion | 2804 | |
| S+1 | No. of slave | Function code | 0110 |
| S+2 | Modbus write register address | 0002 | |
| S+3 | Amount of write register | 0001 | |
| S+4 | Qty bytes (S 3) x2 | data (MSB) | 02AB |
| S+5 | data (low) | not used | CD00 |
| Description of the Destination block | Example | ||
| D | 2804 -> FINS Code for Modbus conversion | 2804 | |
| D+1 | Code to execute the FINS command | 0000 | |
| D+2 | No. of slave | Function Code | 0110 |
| D+3 | Modbus register address | 0002 | |
| D+4 | Amount of Modbus register | 0001 | |
| Description of the Control block | Example | |||
| C | Size of the query S (11 bytes) | 000B | ||
| C+1 | Size of the expected response D (10 bytes) | 000A | ||
| C+2 | Recipient network. The FINS command | 0000 | ||
| C+3 | Destination node | Unit destination | 0080 | |
| C+4 | Response | Logical port | Number of tests | 0000 |
| C+5 | Response time 2s 1 = 0000 to FFFF (0.1 to 6553.5 s) | 0000 | ||
2. Reading Query (0x03) of words to address 01FF via map SCU21 port 2 Unit No. 2
| Description of Source block | Example | ||
| S | 2804 -> FINS Code for Modbus conversion | 2804 | |
| S+1 | No. of slave | Function Code | 0103 |
| S+2 | Modbus read register address | 01FF | |
| S+3 | Amount of read register | 0002 | |
| Description of Destination block | Example | |||
| D | 2804 -> FINS Code command | 2804 | ||
| D+1 | Code to execute the FINS command | 0000 | ||
| D+2 | No. of slave | Function code | 0103 | |
| D+3 | Quantity of bytes | Data (MSB) | 0400 | |
| D+4 | 1st read data (low) | 2nd read data (MSB) | 0100 | |
| D+5 | 2nd read data (low) | Not used | 0200 | |
| Description of Control block | Example | |||
| C | Size of the query S (8 bytes) | 0008 | ||
| C+1 | Size of the expected response D (11 bytes) | 000B | ||
| C+2 | Recipient network. The FINS command | 0000 | ||
| C+3 | Destination node | Unit destination | 0089 | |
| C+4 | Response | Logical port | Number of test | 0000 |
| C+5 | Response time 2s 1 = 0000 to FFFF (0.1 to 6553.5 s) | 0000 | ||
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article