Calling all communications systems experts - please share your knowledge here!
Byte | Value | Description |
1 | 247 | Modbus Device Address |
2 | 131 | Opcode (03) with 8th bit set i.e. 128+3=131 |
3 | 2 | Modbus Exception Code 02 (invalid address) |
4 | 32 | CRC - low byte |
5 | 195 | CRC - high byte |
Modbus Register | Remove Prefix | Offset Decimal | Offset Hex |
40001 | 0001 | 1 | 0000 |
40002 | 0002 | 2 | 0001 |
: : | : : | : : | : : |
46235 | 6235 | 6234 | 185A |
: : | : : |
Node | Func | Add Hi | Add Lo | # Hi | # Lo | CRC Lo | CRC Hi | |||||||
01 | 03 | 18 | 5A | 00 | 02 | E2 | B8 |
Node | Func | Bytes | Data 1 Hi byte | Data 1 Lo byte | Data 2 Hi byte | Data 2 Lo byte | CRC Lo | CRC Hi | |||||||
01 | 03 | 04 | 04 | 88 | 00 | 00 | 7B | 29 |
Node | Func | Add Hi | Add Lo | # Hi | # Lo | CRC Lo | CRC Hi | |||||||
F7 | 03 | 07 | D0 | 00 | 02 | 93 | 33 |
Node | Func | Bytes | Data 1 Hi byte | Data 1 Lo byte | Data 2 Hi byte | Data 2 Lo byte | CRC Lo | CRC Hi | |||||||
F7 | 03 | 04 | FF | FF | FF | FF | 6D | A8 |
Node | Func | Add Hi | Add Lo | # Hi | # Lo | # Bytes | Data Hi | Data Lo | CRC Lo | CRC Hi | ||||||||||
F7 | 10 | 07 | D0 | 00 | 01 | 02 | 00 | 00 | EC | A4 |
Node | Func | Addr Hi byte | Addr Lo byte | # Regs Hi byte | # Regs Lo byte | CRC Lo | CRC Hi | |||||||
F7 | 10 | 07 | D0 | 00 | 01 | 15 | D2 |
Modbus Address | INCOM Address | |
Main 4-1 | 001 | 001 |
Tie 4-1 | 002 | 002 |
Modbus Address | Subnet Master Stored Here | Device Address Stored Here | ||
001 | 42101 | 42102 |
Modbus Address | INCOM Main Network Address | INCOM Sub- NetworkAddress |
001 | 42101 | 42102 |
002 | 42103 | 42104 |
: : | : : | : : |
246 | 42591 | 42592 |
Modbus Address | Points to: | INCOM Main Network Address | INCOM Sub- NetworkAddress |
001 | Main 3-1 | 42101=003 | 42102=001 |
002 | Main 4-1 | 42103=004 | 42104=001 |
Running a Script | Entering a Message Manually | |
//
// Modbus Test Script for ModScan Application
//
// Each Script entry consists of the following comma delimited data fields:
// TEST NAME, NODE, FUNCTION, ADDRESS, LENGTH, DATA, CONTROL CODE
//
// Double slashes on the front of a line denote comments
//
// The following Control Codes may be used (i.e. last field on each line)
// \ -- Continue DATA fields on next line"
// C -- Generate Bad CRC message to slave"
// D -- Check response data quantity only", (ignore actual data)
// 1 -- Expect Exception Response 01"
// 2 -- Expect Exception Response 02"
// 4 -- Expect Exception Response 04"
// R -- Expect no Response"
// T (default) -- Verify Response Data"
//
//
// -----------------------------------------------
// mMINT diagnostics communications (SW2-1 ""OPEN"")"
// -----------------------------------------------
//
// mMINT Echo Test:
// Echo Test (Diagnostic Function 08 SubFunction 0x0000)
// TEST NAME, NODE, FUNCTION, SUBFUNCTION, LENGTH, DATA, CONTROL CODE
E1. mMINT Echo Test,248,8,0x0000,1,0xAA55,T
//
// Config Block (Preset Multiple Registers 0x10 Address 2100)
// TEST NAME, NODE, FUNCTION, ADDRESS, NBR REGS,Data
1A. Config Map 0-1,248,16,2101,64,\
,0x00010001,0x00020001,0x00030001,0x00040001,0x00050001,0x00060001,0x00070001,0x00080001,\
,0x00010002,0x00020002,0x00030002,0x00040002,0x00050002,0x00060002,0x00070002,0x00080002,\
,0x00010003,0x00020003,0x00030003,0x00040003,0x00050003,0x00060003,0x00070003,0x00080003,\
,0x00010004,0x00020004,0x00030004,0x00040004,0x00050004,0x00060004,0x00070004,0x00080004,\
T
// This message will send out the following data:
//N - Modbus node address
//fn - Modbus function code
//add- Starting register address - 1 (e.g. 42101 dec = 0835 hex subtract 1 = 0834 address)
//num- Number of registers to write
//by - Bytes sent (redundant to num, but Modbus uses as a form of error checking)
// 1 - Hi byte, Lo byte of first register value
// 2 - Hi byte, Lo byte of second register value
// : : : :
//64 - Hi byte, Lo byte of 64th register value
//
//N fn add num by 1 2 3 4 5 6 7 8 9 10
//F8,10,08,34,00,40,80,00,01,00,01,00,01,00,02,00,01,00,03,00,01,00,04,00,01,00,05,
// 11 12 13 14 15 16 17 18 19 20 21 22 23
//00,01,00,06,00,01,00,07,00,01,00,08,00,02,00,01,00,02,00,02,00,02,00,03,00,02,
// 24 25 26 27 28 29 30 31 32 33 34 35 36 37
//00,04,00,02,00,05,00,02,00,06,00,02,00,07,00,02,00,08,00,03,00,01,00,03,00,02,00,03,
// 38 39 40 41 42 43 44 45 46 47 48 49 50
//00,03,00,03,00,04,00,03,00,05,00,03,00,06,00,03,00,07,00,03,00,08,00,04,00,01,
// 51 52 53 54 55 56 57 58 59 60 61 62 63 64
//00,04,00,02,00,04,00,03,00,04,00,04,00,04,00,05,00,04,00,06,00,04,00,07,00,04,00,08,
//CL CH
//76,49
//
//
// END OF SCRIPT
end