74
74
SIF5600 - Manual - 03 - 2008
Every LONG or B32 data, expressed by two register (4 bytes) , is sent according to the following order
(left to right):
... | REG L | REG H | ...
... | H | L | H | L | ...
|--------|--------|--------|--------|
byte n byte n+1 byte n+2 byte n+3 example:
99h AAh 77h 88h --> LONG == 778899AAh (2005440938 dec)
3.6 Function 03: read holding registers WREG
Body field framing:
Request:
| ADR | DIM |
| H | L | H | L |
|------|------|------|------|
byte 1 byte 2 byte 3 byte 4
Response:
|NBYTES| WREG1 | WREG2 | ... | WREG(DIM) |
| | H | L | H | L | ... | H | L |
|------|------|------|------|------| |--------|------|
byte 1 byte 2 byte 3 byte 4 byte 5 ... byte n-1 byte n
where:
ADR reference to the data structure of WREG class:
ADR =0 if NUM=1, ADR =1 if NUM=2, ... etc.
DIM size of the WREG data structure (number of registers)
NBYTES number of bytes from WREG1 to WREG(DIM): double of DIM
WREG1.. registers that have been read
3.7 Function 04: read input registers RREG
Body field framing:
Request:
| ADR | DIM |
| H | L | H | L |
|------|------|------|------|
byte 1 byte 2 byte 3 byte 4
Response:
|NBYTES| RREG1 | RREG2 | ... | RREG(DIM) |
| | H | L | H | L | ... | H | L |
|------|------|------|------|------| |--------|------|
byte 1 byte 2 byte 3 byte 4 byte 5 ... byte n-1 byte n
where:
ADR reference to the data structure of RREG class:
ADR=0 if NUM=1, ADR=1 if NUM=2, ... etc.
DIM size of the RREG data structure(number of registers)
NBYTES number of bytes from RREG1 to RREG(DIM): double of DIM
RREG1.. registers that have been read
3.8 Function 06: Preset single register WREG
Body field framing:
Request:
This service can be used only for data structures WREG composed by one only register.
Message framing:
Request:
| ADR | VALUE |
| H | L | H | L |
|------|------|------|------|
byte 1 byte 2 byte 3 byte 4