Modbus IP
Modbus IP Server Configuration
CoolMasterNet Modbus IP Server is activated with below command:
|
>modbus IP enable |
CoolMasterNet has to be restarted to run Modbus IP server for the first time. Same way Modbus IP server can be disabled, in this case instead of enable type disable
To quire current Modbus IP server configuration use modbus command without parameters:
|
>modbus |
Modbus IP default TCP/IP port is 502. This is the so called well-known Ethernet port. If required port number can be changed with:
|
>modbus server port 500 |
Understanding Virtual Address (VA) Concept
In order to simplify translation of the UID (like L5.102) into Modbus object address, CoolMasterNet uses VA, associated with UID. Each UID can have none, one or a number of VA's. VA's are plain numbers starting from 001 (decimal). To let CoolMasterNet automatically associate VA's to existing (visible with ls command) UID's run:
|
>va auto |
This will delete all existing associations and will create new associations one to one (one VA to one UID). At any time VA associations list can be retrieved with plain va command:
|
>va |
Hex and Dec numbers printed after VA are Base Address used to access Modbus objects corresponding to UID - VA association. CoolMasterNet versions before 0.1.5 did not print Base Address. In this case Base Address can be calculated as BaseAddress = VA*16 + 1. For example Indoor Unit L1.102 has associated VA = 002, thus Base Address = 2*16+1 = 33.
Discrete Inputs, Coils and Registers
| Base Address |
Discrete Inputs |
Coils | Input Registers |
Holding Registers |
|---|---|---|---|---|
| +0 | Reserved | On/Off | Mode | UID |
| +1 | Filter | Fan Speed | UID | |
| +2 | Reserved | Set Temperature x10 | UID | |
| +3 | On/Off | UID | ||
| +4 | Filter | UID | ||
| +5 | Swing | UID | ||
| +6 | Room Temperature x10 (RO) | UID | ||
| +7 | Failure Code (RO) | UID | ||
| +8 | Lock Bits | UID | ||
| +9 | Digital Input 1 | Digital Output 1 | Reserved | UID |
| +10 | Digital Input 2 | Digital Output 2 | UID | |
| +11 | Digital Input 3 | Digital Output 3 | UID | |
| +12 | Digital Input 4 | Digital Output 4 | UID | |
| +13 | Digital Input 5 | Digital Output 5 | UID | |
| +14 | Digital Input 6 | Digital Output 6 | UID | |
| +15 | Reserved | Reserved | Reserved |