HIWIN Modbus TCP User Guide Functions Of HIMC Modbus TCP
HIWIN MIKROSYSTEM Corp. 3-3
MH02UE01-1804
3.3 Exception codes
When a request is received but cannot be processed, an exception response with an exception code will
be sent from HIMC. Supported exception codes in HIMC are as below.
Table 3.3.1
Exception Code
Definition
Description
01 (01 hex)
Illegal function code
An unsupported function code is requested. For example, function
code 20 (14 hex) is specified in a request.
02 (02 hex)
Illegal data address
The requested register is not allowable. For example, for a controller
with 100 registers, the controller will reply exception code 02 if a
request with starting address 96 and register length 5 is received.
03 (03 hex)
Illegal data value
The value specified in a request is not allowable. For example, the
initial address of a parameter is 0 and it occupies two registers. If a
request with starting address 1, or starting address 0 and register
length 1 is received to read or write the parameter, the controller will
reply exception code 03.
3.4 Data type
Parameters in HIMC are of different data types. Data types in HIMC are as below.
Table 3.4.1
Data Type
Data Size
Range
int8_t
8 bits
–128 ~ 127
uint8_t
8 bits
0 ~ 255
int16_t
16 bits
–32,768 ~ 32,767
uint16_t
16 bits
0 ~ 65,535
int32
32 bits
–2,147,483,648 ~ 2,147,483,647
uint32
32 bits
0 ~ 4,294,967,295
float
32 bits
3.4E +/- 38 (7-digit)
double
64 bits
1.7E +/- 308 (15-digit)
Parameter data are stored in respective registers according to data types. Users need to follow the
instructions described below to read parameter data.