8 Channel Multifunction RS485 Module commamd
Default state : Slave ID is is OX01 ,MODBUS command
AT command (ASCII characters)
Note:
1 In the AT command mode slave ID is invalid
2 AT commands must be uppercase, lowercase invalid
3 Jumper switch status: M0's two pads are soldered together, M1 M2 is random, as shown
9600 Band ,8 Data bits,None Parity,1 Stop Bit
Read Status:
Channel 1: AT+R1
Channel 2: AT+R2
Channel 3: AT+R3
Channel 4: AT+R4
Channel 5: AT+R5
Channel 6: AT+R6
Channel 7: AT+R7
Channel 8: AT+R8
Open :
Channel 1 : AT+O1
Channel 2 : AT+O2
Channel 3: AT+O3
Channel 4: AT+O4
Channel 5: AT+O5
Channel 6: AT+O6
Channel 7: AT+O7
Channel 8: AT+O8
Close:
Channel 1 : AT+C1
Channel 2 : AT+C2
Channel 3 : AT+C3
Channel 4 : AT+C4
Channel 5: AT+C5
Channel 6: AT+C6
Channel 7: AT+C7
Channel 8: AT+C8
Toggle (Self-locking)
Channel 1: AT+T1
Channel 2: AT+T2
Channel 3: AT+T3
Channel 4: AT+T4
Channel 5: AT+T5
Channel 6: AT+T6
Channel 7: AT+T7
Channel 8: AT+T8
Latch (Inter-locking)
Channel 1: AT+L1
Channel 2: AT+L2
Channel 3: AT+L3
Channel 4: AT+L4
Channel 5: AT+L5
Channel 6: AT+L6
Channel 7: AT+L7
Channel 8: AT+L8
Momentary (Non-locking)
Channel 1: AT+M1
Channel 2: AT+M2
Channel 3: AT+M3
Channel 4: AT+M4
Channel 5: AT+M5
Channel 6: AT+M6
Channel 7: AT+M7
Channel 8: AT+M8
Delay
Channel 1: AT+D1=XXXX
Channel 2: AT+D2=XXXX
Channel 3: AT+D3=XXXX
Channel 4: AT+D4=XXXX
Channel 5: AT+D5=XXXX
Channel 6: AT+D6=XXXX
Channel 7: AT+D7=XXXX
Channel 8: AT+D8=XXXX
XXXX refers to the 0000 to 9999 figures, Unit is seconds
Return command : OpenX, CloseX (X = 1/2/3/4/5/6/7/8)
Example 1:
Send command "AT+D1=0010", Channel 1 is "Open", after delay of 10 seconds, channel 1 is
"Close"
Send command "AT+D2=0100", Channel 2 is "Open", after delay of 100 seconds, channel 2 is
"Close"
Example 2:
Send command "AT+L1", Channel 1 is "Open", other Channels is "Close"
Send command "AT+L2", Channel 2 is "Open", other Channels is "Close"
MODBUS command (function code 06 is Control command,03 is Read status command)
Note :
1 MODBUS command must be HEX
2 Slave ID (device address) must be correct, the default slave address is 01, and the Slave ID is set
to see the bottom.
3 Jumper switch status: M0's two pads must be disconnected, M1 M2 is random, as shown
4 If you don't remember the Slave ID, use the command Read Slave ID : FF 03 00 FF 00 01 A1
E4
9600 Band ,8 Data bits,None Parity,1 Stop Bit。
MODBUS 06 Command (Control command ,HEX):
Bytes 1 2 3 4 5 6 7 8
Number
MODBUS Slave ID Function Address Data CRC Check
Definitions
Function Device Function Channel Command Delay CRC Check
Address number time
Open 0x00-0x 0x06 0x0001- 0x01 0x00 2Bytes CRC
2F 0x0008
Close 0x00-0x 0x06 0x0001- 0x02 0x00 2Bytes CRC
2F 0x0008
Toggle 0x00-0x 0x06 0x0001- 0x03 0x00 2Bytes CRC
(Self-locking) 2F 0x0008
Latch 0x00-0x 0x06 0x0001- 0x04 0x00 2Bytes CRC
Inter-locking) 2F 0x0008
Momentary 0x00-0x 0x06 0x0001- 0x05 0x00 2Bytes CRC
(Non-locking) 2F 0x0008
Delay 0x00-0x 0x06 0x0001- 0x06 0x00-0x 2Bytes CRC
2F 0x0008 ff
Open all 0x00-0x 0x06 0x0000 0x07 0x00 2Bytes CRC
2F
Close all 0x00-0x 0x06 0x0000 0x08 0x00 2Bytes CRC
2F
Remarks:
1 Momentary mode, delay time is 1 seconds
2 Delay mode, delay time is 0-255 seconds
Return command:
Command is active, return to send commands; instruction is invalid no return.
MODBUS 03 Command (Read status command ,HEX):
Bytes Number 1 2 3 4 5 6 7 8
MODBUS Slave ID Function Address Data CRC
Definitions Check
Function Device Function Starting Register CRC
Address register length Check
address
Read Channel 1 0x00-0x2F 0x03 0x0001 0x0001
State
Read Channel 2 0x00-0x2F 0x03 0x0002 0x0001
State
Read 2 consecutive 0x00-0x2F 0x03 0x0001-0x00 0x0002
channels status 03
Read 3 consecutive 0x00-0x2F 0x03 0x0001-0x00 0x0003
channels status 02
Read all 8 channels 0x00-0x2F 0x03 0x0001 0x0008
status
Read status command returns (function code 03, HEX format):
Bytes length 1 1 1 2
MODBUS Slave ID Function data length data CRC16 Check
Definitions
Function Device Function data length Relay state CRC16 Check
Address 0x0001 open
0x0000 close
Channel 1 0x00-0x1F 0x03 0x02 0x0001
open
Channel 1 0x00-0x1F 0x03 0x02 0x0000
close
Channel 2 0x00-0x1F 0x03 0x02 0x0001
open
Channel 2 0x00-0x1F 0x03 0x02 0x0000
close
Channel 1 open 0x00-0x1F 0x03 0x04 0x0001 0x0001
Channel 2 open
Channel 1 open 0x00-0x1F 0x03 0x04 0x0001 0x0000
Channel 2 close
Channel 1 close 0x00-0x1F 0x03 0x04 0x0000 0x0001
Channel 2 open
Channel 1 close 0x00-0x1F 0x03 0x04 0x0000 0x0000
Channel 2 close
MODBUS commands you can use "Modbus Poll" input, as shown below
(CRC check generated automatically)
You can also use HyperTerminal serial input, as shown below
(Manually add CRC check)
Examples (Slave ID is 1,DIP switch state)
Channel 1 Open :01 06 00 01 01 00 D9 9A
Channel 1 Close :01 06 00 01 02 00 D9 6A
Channel 1 Toggle:01 06 00 01 03 00 D8 FA
Channel 1 Latch:01 06 00 01 04 00 DA CA
Channel 1 Momentary: 01 06 00 01 05 00 DB 5A
Channel 1 Delay 10 seconds : 01 06 00 01 06 0A 5B AD
Channel 1 Delay 100 seconds: 01 06 00 01 06 64 DA 41
Channel 2 Open :01 06 00 02 01 00 29 9A
Channel 2 Close :01 06 00 02 02 00 29 6A
Channel 2 Toggle :01 06 00 02 03 00 28 FA
Channel 2 Latch :01 06 00 02 04 00 2A CA
Channel 2 Momentary : 01 06 00 02 05 00 2B 5A
Channel 2 Delay 10 seconds : 01 06 00 02 06 0A AB AD
Channel 2 Delay 100 seconds : 01 06 00 02 06 64 2A 41
Read state (assuming that the channel 1 is open, the channel 2 is close).
Read channel 1 state :01 03 00 01 00 01 D5 CA
Return open:01 03 02 00 01 79 84
Read channel 2 state :01 03 00 02 00 01 25 CA
Return close:01 03 02 00 00 B8 44
Read channel 1 and channel 2 state :01 03 00 01 00 02 95 CB
Return channel open and channel 2 close :01 03 04 00 01 00 00 AB F3
Set Slave ID(Device Address)
1. Read Slave ID
Send data
Slave ID Function (1) Register Read number CRC16
(Broadcast address (2) (2) (2)
address)
(1)
Returns data
Slave ID Function (1) Number of bytes data (n) CRC16
( Broadcast (1) (2)
address )
(1)
Broadcast address 0xff
Function code 0x03
Register address:0x00FF
Read number:0x0001
For example:
send data:FF 03 00 FF 00 01 A1 E4
Returns data:FF 03 02 00 01 50 50
FF Broadcast address,03 Function,02 length,01 is the current module
Slave ID, 50 50 crc16
Note: When using this command, only one temperature module can be connected
to the RS485 bus, more than one will be wrong!
2. Write Slave ID
Send data
Slave ID Function Register Setting Content CRC16
( Device Address ) (1) address (2) (2) (2)
(1)
Returns data
Slave ID Function Register Register value CRC16
( Device Address ) (1) address (2) (2)
(1) (1)
Function code 0x06
Register address:0x00FF
Setting Content:2Bytes(1-247)
For example, The current Slave ID is 1, We need to change the Slave ID to 3:
Send data(Slave ID is 1):01 06 00 FF 00 03 F9 FB
Returns data:01 06 00 FF 00 03 F9 FB