Response
with register value
40124 / 30124 (Cp SV value)
Byte no.
Designation
Size
Value [hex]
00
Converter Address
1- Byte
40 [01 to F7]
01
Code of the function
1- Byte
03 / 04
02
Number of data bytes N- Byte
02
03
Data1-Hi
1- Byte
04
04
Data1- Lo
1- Byte
D2
05
CRC-Lo
1- Byte
- - -
06
CRC-Hi
1- Byte
- - -
Example.
Reading value from the register address 40124 / address 30124 (Cp SV value).
40-03-02-04-D2-CRCLo-CRCHi
40-04-02-04-D2-CRCLo-CRCHi
In response value from the register (Cp SV value) is introduced to 2-byte with values:
T_SV = 0x04D2 = 1234, real value = T_SV/DW = 1234 / 1000 = 1,234 ° C
Response
- in case of error
Byte no.
Designation
Size
Value [hex]
00
Converter Address
1- Byte
40 [01 to F7]
01
Function Code
1- Byte
83 / 84
02
Error code
1- Byte
01-unknown function
02-unknown data address
03-unknown amount of data
04-JCT controller is not responding, is not
connected, or is damaged
03
CRC-Lo
1- Byte
04
CRC-Hi
1- Byte
8.3.2. 0x06 FUNCTION - SAVE VALUES TO 16-BITS REGISTER [4 X-REFERENCES]
0x06 function is used for save values to 16-bits of the MODBUS register of the ADA-4040PC8 converter.
The saved value in the register is processed and transmitted to the JCT controller.
MODBUS registers are in the format of the 16-bits integral number with the character (in C/C++ type short int).
The value saved in the MODBUS register of ADA-4040PC8, is obtained by multiplying real measurement value by the
DW
factor,
according to the following algorithm.
Algorithm 1.
The value of the MODBUS siMeasureReg register is obtained by multiplying the real value of the measurement
represented by the variable fMeasureVal of the float type by the DW
factor
(table above).
/ / Fragment of code in C language (VS6.0) presenting above algorithm
short int siMeasureReg;
float fMeasureVal;
siMeasureReg = (short int) (fMeasureVal * DW);
siMeasureReg = 1,235 * 1000 = 1235 = 0x04D3 (HEX)
Data saving to register 40124 (Cp SV value)
Byte no.
Designation
Size
Value [hex]
00
Converter Address
1 Byte
40 [01 to F7]
01
Code of the function
1 Byte
06
02
Address of the register Hi
1 Byte
00
03
Address of the register Lo
1 Byte
7C
04
Value of the register Hi
1 Byte
04
05
Value of the register Lo
1 Byte
D3
06
CRC-Lo
1 Byte
- - -
07
CRC-Hi
1 Byte
- - -
14
ADA-4040PC8