PowerWizard Modbus Applications Guide PDF
PowerWizard Modbus Applications Guide PDF
PowerWizard Modbus Applications Guide PDF
Contents
SCADA Data Link ................................................................................................................................................................................................... 4 Introduction............................................................................................................................................................................................................ 4 Hardware installation .............................................................................................................................................................................................. 4 Installation requirements........................................................................................................................................................................................ 4 Control panel configuration ........................................................................................................................................................................... 5 Control panel configuration ........................................................................................................................................................................... 6 Data Link Layer ....................................................................................................................................................................................................... 8 Data Structure ........................................................................................................................................................................................................ 8 Supported Function Codes ..................................................................................................................................................................................... 9 Error Checking..................................................................................................................................................................................................... 18 Exception Responses............................................................................................................................................................................................ 20 Fault Identifiers (FID) .......................................................................................................................................................................................... 22 Reduced Power Mode .......................................................................................................................................................................................... 23 SCADA Data Link Security .................................................................................................................................................................................. 24 Event System .......................................................................................................................................................................................................... 26 Event Breakdown ................................................................................................................................................................................................. 28 Setpoints.................................................................................................................................................................................................................. 29 Setpoint Data Type............................................................................................................................................................................................... 31
Appendices
Appendix A The ASCII character set ............................................................................................................................................................... 32 Appendix B Read register walkthrough ........................................................................................................................................................... 33 Appendix C Write single register walkthrough ............................................................................................................................................... 37 Appendix D Write multiple register walkthrough........................................................................................................................................... 38 Appendix E Security system walkthrough........................................................................................................................................................ 43 Appendix F SPN/FMI combinations list ........................................................................................................................................................... 55 Appendix G Event system walkthrough ........................................................................................................................................................... 58 Appendix H Setpoint system walkthrough ....................................................................................................................................................... 70 Appendix I Setpoints List ................................................................................................................................................................................... 76 Appendix J Setpoint Values list ......................................................................................................................................................................... 87
Hardware installation
The modbus network should be configured as per Fig 1. Installation requirements are outlined below.
Installation requirements
Note 1 Note 2 0.2 mm2 (AWG 24), balanced, screened pair cable with characteristic impedance of 120 Ohm should be used to construct the network Both ends of the network should be terminated using a 120-Ohm, 350 mW or greater resistor Multiple nodes may be connected, in a daisy chain formation, on the same modbus network N.B. Note 4 Note 5 Each node requires a unique node address
Note 3
Only one modbus master may be connected to a modbus network The modbus reference should be connected to ground at one point
Connect Timeout Interval The connect timeout interval is the amount of time the PowerWizard will continue to attempt to send a reply over the RS-485 network before giving up, the default value is 30 seconds. In addition to these setpoints, SCADA access can be restricted by means of assigning a SCADA password.
Address
Slave address, for both query and response. Every control on the network has a unique slave address between 1 and 247. Use 0 to make a broadcast query, which is supported for Function Codes 6 and 16. The PowerWizard will always respond with its own slave address. Function Code for both query and response. See Supported Function Codes for a list and syntax of supported function codes. Data or exception responses. See Supported Function Codes for the format of address, counts, and data. See Exception Responses for the format of exception responses. Cyclic Redundancy Check to catch transmission errors. The low byte is transmitted first, then the high byte.
Function Code
Data
CRC
Send this Function Code to read data, single or up to 123 contiguous registers, from the PowerWizard. Note that the query will contain the register count, while the response will contain the byte count (byte count = register count x 2). Note also that the query has a fixed length of 4 bytes, whereas the response has a variable length depending on the number of registers requested. A read request is structured as below:
Slave function address code starting address hi starting address lo no. of registers hi no. of registers lo CRC
A list of read registers is given in the following table. For a walk through example see Appendix B.
10
11
12
13
14
15
Send this Function Code to write data to a single register on the PowerWizard. Note that the PowerWizard will attempt to write the data, and then respond with the new value in the register. If the query inadvertently attempted to write data to a read-register, the response data bytes will not match the query data bytes. This Function Code may be broadcast, in which case no response will be sent. A read request is structured as below:
Slave function address code starting address hi starting address lo Preset data hi Preset data lo CRC
A list of all write registers is given see the write register table on page 15. For a walkthrough example see appendix C.
16
16 ($10) Write Multiple Registers Send this Function Code to write data to up to 123 contiguous registers on the PowerWizard. Note that the query will contain both the register count and the byte count (byte count = register count x 2). Note also that the query has a variable length depending on the number of registers being written, whereas the response has a fixed length of 4 bytes. The PowerWizard will not respond with any data, only the starting address and the register count as sent in the query. The entire Write will fail, and the slave will return an Exception Response, if any register in this span is a Read register. This Function Code may be broadcast, in which case no response will be sent. A read request is structured as below:
Slave function starting address starting address no. of registers no. of registers Byte Data Data Data Data CRC address code hi lo hi lo count hi lo hi lo
A list of all write registers is given, see the following table. For a walkthrough example see appendix D.
17
18
Error Checking
In PowerWizard SCADA communications, various levels of error checking are performed. The Modbus data link protocol allows for byte-level error checking and packet-level error checking. Byte level error checking refers to parity checks, where the parity is set to either odd or even. For packet-level error checking, the Modbus protocol dictates that a Cyclic Redundancy Check be performed to catch transmission errors; that is, verify that the packet received is identical to the packet that was sent. These occur in the Modbus data link layer. More information on the CRC is given below. Once the packet is verified, the addresses and function codes are checked. This is handled using simple logic, determining whether the function code is supported and determining whether or not the address range or count is within range. If not, an exception response is sent. This occurs in the Modbus application layer. More information on exception responses is given below. Once the addresses and function codes are checked, the data is ready to be handled by the PowerWizard application software. There is error checking at this level to determine whether there are any application-specific errors. For example, if you are attempting to write 101% into a register that is defined to hold 0-100%, then even though the data may fit into the register (and therefore passes the previous error-checking), the application does not accept an input of 101%, and therefore a fault response is sent. This fault response is called a Fault IDentifier, or FID. A fault response is data that is valid over the Modbus data link, but the PowerWizard and the Modbus Master device agree to reserve for use as an FID. More information on Fault Identifiers is given below in the Fault Identifiers section. Parity Check Parity checking uses standard even or odd parity. The parity can be set in the PowerWizard to even, odd, or none. Parity checking occurs at the bytelevel. Upon successful parity check, the checked byte is accepted as part of the transmitted message. If the parity check fails, the byte is discarded.
19
Cyclic Redundancy Check The Cyclic Redundancy Check (CRC) algorithm checks the contents of the entire message. The CRC field consists of a 16bit value, and is appended to the end of the message. When this is done, the loworder byte of the field is appended first, followed by the highorder byte. The CRC highorder byte is the last byte to be sent in the message. The CRC value is calculated by the sending device, which appends the CRC to the message. The receiving device recalculates a CRC using the same algorithm during receipt of the message, and as it receives the CRC field, compares the calculated value to the received value. If the two values are not equal, the message is discarded. A detailed description as well as sample code and a calculation example are given in the Modbus Serial Line Implementation Guide version 1.0 or the most current version, available at www.modbus.org.
20
Exception Responses
Upon a parity or CRC error, the byte or message (respectively) is discarded. If neither of these errors occurs, the read/write status is checked. An Exception Response will be sent if there is a read/write error. If the register cannot be read from or written to at a particular time due to some application software state, it will not generate an Exception Response. Instead, the application layer will respond with data that is in the Fault Identifiers (FID) range. See Fault Identifiers (FID) section for more information. An Exception Response contains a function code that is related to the function code the PowerWizard is responding to; its value is [128 + Function Code for Query]. Any function code 128 ($80) or higher is an Exception Response. If the Exception Response is not listed below, it is in response to an unsupported function code in a query, and should contain an exception code of 01. 131 ($83) Exception Response to Read Registers Query The exception response contains only 1 byte of data, which is comprised of the exception code. Exception Code 02 03 04 Reason Starting or ending (starting + count) register address invalid Register Count was less than 1 or greater than 123 Read error possibly due to some register(s) in the span not being Read registers
134 ($86) Exception Response to Write Single Register Query The exception response contains only 1 byte of data, which is comprised of the exception code.
21
Exception Code 02 03 04
Reason Register address invalid Register value out of range perhaps because longer than 2 bytes Read error possibly due to not being a Write register
144 ($90) Exception Response to Write Multiple Registers Query The exception response contains only 1 byte of data, which is comprised of the exception code. Exception Code 02 03 04 Reason Starting or ending (starting + count) register address invalid Register Count was less than 1 or greater than 123, or byte count was not (Register Count x 2) Write error possibly due to some register(s) in the span not being Write registers
22
Valid Data
0, 1 $0000 or $0001
Not Used
Error
65,256 65,023 4,211,081,214 $FB00 $FDFF $FB000000 $FDFFFFFF 65,024 65,279 4,261,412,864h 4,278,190,079h $FE00 $FEFF $FE000000 $FEFFFFFF 65280 65535 4,278,190,080 4,294,967,294 $FF00 $FFFF $FF000000 $FFFFFFFF
See individual Parameter Descriptions for units, offset, and scaling to convert to physical units These data ranges are not used. FID: Signal saturated, out of range, or error from source transmitter FID: Parameter is not applicable in the current state, not available from the controller, or not requested
Note that 2-bit data is not transmitted individually, but rather within a register.
23
24
For a list of the all security associated registers see the following table. For an example of writing passwords see Appendix E.
25
26
Event System
The PowerWizard displays both internal events and those transmitted over the J1939 data link. Over SCADA, the status of the warning and shutdown lamps on the display can be viewed, and events can be acknowledged. Events can be acknowledged individually or as a group. Details of both PowerWizard and supported optional module events can be read over SCADA. The PowerWizard module uses the j1939 standard format for events, where by an event is defined as a combination of a suspect parameter number (SPN) and a fault mode identifier (FMI). The SPN defines what is at fault and the FMI defines how it is at fault. A list of SPN/FMI combinations can be found in appendix F. For a list of event related registers see the following table.
27
28
Event Breakdown
Event information is distributed over 14 registers, these 14 registers being read as 1 block of information. The breakdown of these registers and their contained information are as below.
29
Setpoints
All of the configuration possible at the PowerWizard control panel can be done over the data link, by reading from and writing to PowerWizard setpoints. As on the display, each setpoint has a minimum security level required to change it associated with it. That required security level can be read by reading the Setpoint Information register for a particular setpoint. Setpoints are grouped in the PowerWizard into Blocks. These Blocks are actually pieces of software that, in some cases, may occur more than once in the software. Blocks are uniquely identified by the combination of their Block Number and Instance Number, and this unique identifier is called the Block ID. This, in combination with the Setpoint Number that identifies the setpoint within that block, is called the Setpoint ID. This Setpoint ID uniquely identifies a setpoint in the PowerWizard. . To read a setpoint data or related information, first the Setpoint ID for Read parameter must be set to the appropriate Setpoint ID. Then, either the Setpoint Information parameter or Setpoint Data Value parameter can be read. Setpoint Information contains various pieces of information regarding the setpoint, as detailed below. In order to write to a setpoint, the Setpoint Write parameter must be sent, which contains both the Setpoint ID and the data value. Immediately prior to reading setpoint information, the Setpoint ID field should be checked to verify that the correct setpoint is being read. The Setpoint ID and Setpoint Information parameters contain multiple pieces of information, and span multiple Modbus registers. The registers may be read separately, but caution should be taken to maintain integrity of the data being read. The following table lists the registers associated with the setpoint system.
30
31
For a walkthrough example of working with setpoints see appendix H. For a list of setpoints and their associated values see appendices I and J.
32
33
(offset by 1)
Response: Breakdown:
01 03 02 01 90 B9 B8 node: function code: byte count: data hi: data lo: CRC hi: CRC lo: 01 03 02 01 90 B9 B8
34
The data must then be interpreted. From the table (page 8) we can get the scale, range and offset and subsequently interpret the transmitted value. scale: 1V/bit range: 0-64255 offset: 0V 1. convert the received data from hex into decimal: 2. multiply by the scale: 3. add the offset, which in this case is 0: 4. now check that the value falls within the acceptable range: 0190 (hex) = 400 (decimal) 400 x 1 = 400 400 + 0 = 400 0 <= 400 <= 64255
35
The following example shows how a read multiple register message and response are constructed and interpreted. The parameter in the example is generator total real power (register 0x006A) Query: Breakdown: 01 03 00 69 00 02 14 17 node: function code: starting address hi: starting address lo: no. of registers hi: no. of registers lo: CRC hi: CRC lo: 01 03 00 69 00 02 14 17
(offset by 1)
Response:
01 03 04 77 35 94 00 9F 49
Breakdown:
node: function code: byte count: Data hi: data lo: Data hi: data lo: CRC hi: CRC lo:
01 03 04 77 35 94 00 9F 49
36
The data must then be interpreted. From the table (page 8) we can get the scale, range and offset and subsequently interpret the transmitted value: scale: 1W/bit range: -2000000000 to 2211081215 offset: -2000000000 1. convert the received data from hex into decimal: 77359400 (hex) = 2000000000 (decimal) 2. add the offset, which in this case is 0: 2000000000 + (-2000000000) = 0 3. now check that the value falls within the acceptable range: 2000000000 <= 0 <= 2211081215 As such the received generator total real power is 0W
37
(offset by 1)
Response: Breakdown:
01 06 01 2D 00 00 18 3F node: function code: starting address hi: starting address lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 06 01 2D 00 00 18 3F
(offset by 1)
Note that if the write is successful the response is the same as the query.
38
39
check that the value we wish to enter is within range: subtract the offset : divide the value by the scale: convert the value into hex
Byte 2 = hour
we wish to set this to 10, 1. 2. 3. 4. check that the value we wish to enter is within range: subtract the offset : divide the value by the scale: convert the value into hex 0 <= 10 <= 250 10 - 0 = 10 10 / 1 = 10 10 (decimal) = A (hex)
40
check that the value we wish to enter is within range: subtract the offset : divide the value by the scale: convert the value into hex
check that the value we wish to enter is within range: subtract the offset : divide the value by the scale: convert the value into hex
41
check that the value we wish to enter is within range: subtract the offset : divide the value by the scale: convert the value into hex
and the value we wish to write to byte 5 is 16 Using all the above information we can construct the query to set the time. Query: 01 10 03 86 00 03 06 00 0F 0A 03 3C 16 39 24 Breakdown: node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 10 03 86 00 03 06 00 0F 0A 03 3C 16 39 24
42
Response: Breakdown:
01 10 03 86 00 03 61 A5 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 01 10 03 86 00 03 61 A5
43
(offset by 1)
Response: Breakdown:
01 03 02 00 02 39 85 node: function code: byte count: Data hi: data lo: CRC hi: CRC lo: 01 03 02 00 02 39 85
44
The data must then be interpreted. From the table (page 22) we can get the scale, range and offset and subsequently interpret the transmitted value. Scale : 1/bit Range : 0-3 Offset : 0 1. convert the received data from hex into decimal: 2. multiply the value by the scale 3. add the offset, which in this case is 0: 4. now check that the value falls within the acceptable range: As such the control panel is at security level 2 02 (hex) = 400 (decimal) 2x1=2 2+0=2 0 <= 2 <= 3
To read the level 3 phone in prompt (0x02DE) Query: Breakdown: 01 03 02 DD 00 08 D5 8E node: function code: starting address hi: starting address lo: no. of registers hi: no. of registers lo: CRC hi: CRC lo: 01 03 02 DD 00 08 D5 8E
(offset by 1)
45
Response:
01 03 10 31 30 35 31 37 36 37 34 38 31 39 35 30 37 39 32 72 3D
Breakdown:
node: function code: byte count: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: CRC hi: CRC lo:
01 03 10 31 30 35 31 37 36 37 34 38 31 39 35 30 37 39 32 72 3D
ASCII CHARACTER 1 ASCII CHARACTER 0 ASCII CHARACTER 5 ASCII CHARACTER 1 ASCII CHARACTER 7 ASCII CHARACTER 6 ASCII CHARACTER 7 ASCII CHARACTER 4 ASCII CHARACTER 8 ASCII CHARACTER 1 ASCII CHARACTER 9 ASCII CHARACTER 5 ASCII CHARACTER 0 ASCII CHARACTER 7 ASCII CHARACTER 9 ASCII CHARACTER 2
So in the above example the L3 phone in prompt is 1051 7674 8195 0792
46
Write access password (0x02BC) This register is used to enter a level 1 or level 2 or level 3 password. Passwords can be 16 characters long. the control panel automatically matches the password to the appropriate security level. This does mean that level 1 and level 2 passwords must be different. The below example shows how to write a level 1 or level 2 security password of 0123 4567 8901 2345. Query: Breakdown: 01 10 02 BB 00 08 10 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 61 C9 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 10 02 BB 00 08 10 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 61 C9
(offset by 1)
ASCII CHARACTER 0 ASCII CHARACTER 1 ASCII CHARACTER 2 ASCII CHARACTER 3 ASCII CHARACTER 4 ASCII CHARACTER 5 ASCII CHARACTER 6 ASCII CHARACTER 7 ASCII CHARACTER 8 ASCII CHARACTER 9 ASCII CHARACTER 0 ASCII CHARACTER 1 ASCII CHARACTER 2 ASCII CHARACTER 3 ASCII CHARACTER 4 ASCII CHARACTER 5
47
Response: Breakdown:
01 10 02 BB 00 08 B0 52 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 01 10 02 BB 00 08 B0 52
(offset by 1)
48
To change level the 1 access password (0x02C4) Passwords can be 16 characters long. Note you must be at level 1 or higher security in order to change this password. The below example shows how to change a level 1 security password to 0000 1111 0000 1111 Query: Breakdown: 01 10 02 C3 00 08 10 30 30 30 30 31 31 31 31 30 30 30 30 31 31 31 31 89 8D node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data hi: preset data hi: preset data hi: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data hi: preset data hi: preset data hi: CRC hi: CRC lo: 01 10 02 C3 00 08 10 30 30 30 30 31 31 31 31 30 30 30 30 31 31 31 31 89 8D
(offset by 1)
ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 1 ASCII CHARACTER 1 ASCII CHARACTER 1 ASCII CHARACTER 1 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 1 ASCII CHARACTER 1 ASCII CHARACTER 1 ASCII CHARACTER 1
49
Response: Breakdown:
01 10 02 C3 00 08 30 4B node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 01 10 02 C3 00 08 30 4B
(offset by 1)
50
To change level 2 access password (0x02CC) Passwords can be 16 characters long. Note you must be at level 2 or higher security in order to change this password. The below example shows how to change a level 2 security password to 0000 2222 0000 2222 Query: Breakdown: 01 10 02 CB 00 08 10 30 30 30 30 32 32 32 32 30 30 30 30 32 32 32 32 37 CE node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data hi: preset data hi: preset data hi: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data hi: preset data hi: preset data hi: CRC hi: CRC lo: 01 10 02 CB 00 08 10 30 30 30 30 32 32 32 32 30 30 30 30 32 32 32 32 37 CE
(offset by 1)
ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 2 ASCII CHARACTER 2 ASCII CHARACTER 2 ASCII CHARACTER 2 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 2 ASCII CHARACTER 2 ASCII CHARACTER 2 ASCII CHARACTER 2
51
Response: Breakdown:
01 10 02 CB 00 08 B1 89 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 01 10 02 CB 00 08 B1 89
(offset by 1)
52
Write SCADA password (0x02BC) This register is used to enter a the SCADA password. The SCADA password can be 8 characters long and is padded with 8 space characters. The below example shows how to write a SCADA password of 0000 1234. Query: Breakdown: 01 10 02 BB 00 08 10 30 30 30 30 31 32 33 34 20 20 20 20 20 20 20 20 F8 DA node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 10 02 BB 00 08 10 30 30 30 30 31 32 33 34 20 20 20 20 20 20 20 20 F8 DA
(offset by 1)
ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 0 ASCII CHARACTER 1 ASCII CHARACTER 2 ASCII CHARACTER 3 ASCII CHARACTER 4 ASCII CHARACTER 'space' ASCII CHARACTER 'space' ASCII CHARACTER 'space' ASCII CHARACTER 'space' ASCII CHARACTER 'space' ASCII CHARACTER 'space' ASCII CHARACTER 'space' ASCII CHARACTER 'space'
53
Response: Breakdown:
01 10 02 BB 00 08 B0 52 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 01 10 02 BB 00 08 B0 52
(offset by 1)
54
To write the current security level (0x02DD) From the table (page 22) we can see that to stop the set we need to write a value of 0 to drop to minimum security level, note that if no level 1 or level 2 passwords have been setup the minimum security level will be 2. Query: Breakdown: 01 06 02 DC 00 00 49 88 node: function code: starting address hi: starting address lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 06 02 DC 00 00 49 88
Response: Breakdown:
01 06 02 DC 00 00 49 88 node: function code: starting address hi: starting address lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 06 02 DC 00 00 49 88
Note that if the write is successful the response is the same as the query.
55
56
57
58
Response: Breakdown:
01 06 01 2D 00 00 18 3F node: function code: starting address hi: starting address lo: preset data hi: preset data lo: CRC hi: CRC lo: 01 06 01 2D 00 00 18 3F
Note that if the write is successful the response is the same as the query.
59
Event log entries - having selected the appropriate modules event log it is possible to pull the event information for the 20 events from register 1500 to 1780. The below example only reads the first event and explains how to interpret the information. To read event log entry #1 (0x05DC) Query: Breakdown: 01 03 05 DB 00 0E B4 F9 node: function code: starting address hi: starting address lo: no. of registers hi: no. of registers lo: CRC hi: CRC lo: 01 03 05 DB 00 0E B4 F9
(offset by 1)
60
Response:
01 03 1C C4 31 0B 03 52 16 90 05 0E 04 17 15 00 0025 9E 00 00 00 00 F5 09 FF 01 F4 FF 00 00 07 89
Breakdown:
node: function code: byte count: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo:
01 03 1C C4 31 0B 03 52 16 90 05 0E 04 17 15 00 00 25 9E
data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: data hi: data lo: CRC hi: CRC lo:
00 00 00 00 F5 09 FF 01 F4 FF 00 00 07 89
(register 8) (register 9) (register 10) (register 11) (register 12) (register 13)
The data must then be interpreted. From the table (page 25) we can get the scale, range and offset and subsequently interpret the transmitted information.
61
Register 13 contains the log entry index. Converting 0x0000 into decimal gives 0, as such this is the first event in the event log (the log has 20 entries, 0-19)
Registers 12 and 11 contain the SPN/FMI information. Firstly convert the value from hex into binary. hex binary = = 0xFF01F4FF 11111111000000011111010011111111
now we need to breakdown the information bits 31:24 bits 23:5 bits 4:0 = = = 11111111 0000000111110100111 11111 these are unused and can be ignored this represents the SPN this represents the FMI
now convert the SPN information into decimal (bits 23:5) binary decimal = = 0000000111110100111 4007
subsequently the SPN of the event is 4007 now convert the FMI information into decimal (bits (4:0) binary decimal = = 11111 31
subsequently the FMI of this event is 31 now we have the SPN/FMI combination we can check this with the SPN/FMI list (Appendix F) and we find that SPN/FMI 4007/31 = generator control not in automatic warning
62
Register 10 contains the event status and occurrence count information. Firstly convert the information into binary.
hex binary
= =
0xF509 1111010100001001
now we need to breakdown the information bits 15:12 bits 11:8 bits 7:0 = = = 1111 0101 00001001 these are unused and can be ignored this represents the event status this represents the number of occurrences of the event
using the information in the event breakdown section (page 25) event status 0101 = Present
now convert the occurrence information into decimal (bits 7:0) binary decimal = = 00001001 9
63
register pairs 9:8 and 7:6 give the engine operating hours when the event first and last occurred. from the event breakdown section (page 25) range : scale : offset : 0-210554060.75 0.000278 hour/bit 0 00000000 (hex) 0 * 0.000278 0+0 0 <= 0 = = = <= 0 (decimal) 0 0 210554060.75
for first hour meter (register 9:8) multiplying by the scale adding the offset and checking the range so the first hour meter is 0 hours
for last hour meter (register 7:6) multiplying by the scale adding the offset and checking the range so the last hour meter is 2.68 hours
= = = <=
64
registers 5:3 and 2:0 contain the first and last time stamp information the information is divided into byte long sections. for the first timestamp Byte 5 contains the year information. From the event breakdown section: scale : 1 year/bit range : 1985-2235 offset : 1985 byte 5 = 15 (hex), converting this to decimal gives 21 multiplying by the scale adding the offset as such the year is 2006 21 * 1 21 + 1985 = = 21 2006
Byte 4 contains the day information. From the event breakdown section: scale : 0.25 days/bit range : 0-62.5 offset : 0 byte 4 = 17 (hex), converting this to decimal gives 23 multiplying by the scale adding the offset 23 * 0.25 5.75 + 0 = = 5.75 5.75
as such the day is the 5 full days of the month had passed and the event occurred on the 6th day
65
Byte 3 contains the month information. From the event breakdown section: scale : 1 month/bit range : 0-250 offset : 0 Byte 3 = 04 (hex), converting this to decimal gives 4 multiplying by the scale adding the offset 4*1 4+0 = = 4 4
Byte 2 contains the hour information. From the event breakdown section: scale : 1 hour/bit range : 0-250 offset : 0 Byte 2 = 0E (hex), converting this to decimal gives 14 multiplying by the scale adding the offset 14 * 1 14 + 0 = = 14 14
66
Byte 1 contains the minute information. From the event breakdown section: scale : 1 minute/bit range : 0-250 offset : 0 Byte 1 = 05 (hex), converting this to decimal gives 5 multiplying by the scale adding the offset 05 * 1 05 + 0 = = 05 05
Byte 0 contains the second information. From the event breakdown section: scale : 0.25 minute/bit range : 0-62.5 offset : 0 Byte 0 = 90 (hex), converting this to decimal gives 144 multiplying by the scale adding the offset 144 * 0.25 36 + 0 = = 36 36
67
for the last timestamp Byte 5 contains the year information. From the event breakdown section : scale : 1 year/bit range : 1985-2235 offset : 1985 byte 5 = 16 (hex), converting this to decimal gives 22 multiplying by the scale adding the offset as such the year is 2007 22 * 1 22 + 1985 = = 22 2007
Byte 4 contains the day information. From the event breakdown section : scale : 0.25 days/bit range : 0-62.5 offset : 0 byte 4 = 52 (hex), converting this to decimal gives 82
82 * 0.25 20.5 + 0
= =
20.5 20.5
as such the day is the 20 full days of the month had passed and the event occurred on the 21st day
68
Byte 3 contains the month information. From the event breakdown section : scale : 1 month/bit range : 0-250 offset : 0 Byte 3 = 03 (hex), converting this to decimal gives 3 multiplying by the scale adding the offset 3*1 3+0 = = 3 3
Byte 2 contains the hour information. From the event breakdown section : scale : 1 hour/bit range : 0-250 offset : 0 Byte 2 = 0B (hex), converting this to decimal gives 11 multiplying by the scale adding the offset 11 * 1 11 + 0 = = 11 11
69
Byte 1 contains the minute information. From the event breakdown section: scale : 1 minute/bit range : 0-250 offset : 0 Byte 1 = 31 (hex), converting this to decimal gives 49 multiplying by the scale adding the offset 49 * 1 49 + 0 = = 49 49
Byte 0 contains the second information. From the event breakdown section: scale : 0.25 minute/bit range : 0-62.5 offset : 0 Byte 0 = C4 (hex), converting this to decimal gives 196 multiplying by the scale adding the offset 196 * 0.25 49 + 0 = = 49 49
as such the event occurred on the 49th second of the minute so the last time stamp for this event was 11:49:49 on the 21st March 2007
70
00 00 00 06 00 00
71
To view or modify a setpoint we must first select the relevant setpoint (register 0x03EA) Query Breakdown: 05 10 03 E9 00 03 06 00 00 00 06 00 00 D3 38 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data hi: CRC hi: CRC lo: 05 10 03 EA 00 03 06 00 00 00 06 00 00 D3 38
(offset by 1)
Response: Breakdown:
05 10 03 E9 00 03 50 3C node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 05 10 03 E9 00 03 50 3C
(offset by 1)
72
To read the information for a selected setpoint (register 0x03ED) Query Breakdown: 05 03 03 EC 00 0C 85 FA node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 05 03 03 EC 00 0C 85 FA
(offset by 1)
Response Breakdown:
05 03 18 00 00 00 01 00 00 01 5E 00 00 00 5F 00 00 00 7E 00 03 00 00 00 06 00 00 A5 DC 05 03 18 00 00 00 01 00 00 01 5E 00 00 00 5f 00 00 00 7E 00 03 00 00 00 06 00 00 A5 DC slave, function, no. bytes resolution maximum value minimum value actual value access level required setpoint I.D. CRC
73
Using the information in the setpoints list we can interpret the information. For this example we will only interpret the actual value. Scale Resolution = = 0 1
Converting from hex to decimal 7E (hex) = Therefore this set has 126 flywheel teeth.
126 (decimal)
74
To change a setpoint (register 0x03F9) To change the number of flywheel teeth to 96 we enter the following query, Query: Breakdown: 05 10 03 F8 00 05 0A 00 00 00 06 00 00 00 00 00 60 9F 28 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: byte count: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: preset data hi: preset data lo: CRC hi: CRC lo: 05 10 03 F8 00 05 0A 00 00 00 06 00 00 00 00 00 60 9F 28
setpoint id setpoint id setpoint id setpoint id setpoint id setpoint id new value new value new value new value (96 in hex)
75
Response: Breakdown:
05 10 03 86 00 0A A0 27 node: function code: starting address hi: starting address lo: no. registers hi: no. registers lo: CRC hi: CRC lo: 05 10 03 86 00 0A A0 27
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92