EasyManua.ls Logo

Thytronic SIF5600 - 5.1 Writing WREG Message

Thytronic SIF5600
96 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
77
77
SIF5600 - Manual - 03 - 2008
example: INT [ 1] (INT data type in first position)
LONG[ 2] (LONG data type in second position)
ENUM[ 4] (ENUM data type in position 4)
B32 [ 5] (B32 data type in position 5)
DATA_NAME name.
DIM Structure global size (nr. of 16 bit registers)
SYNOPSIS concise collection of message package informations.
It shows the form:
class ... -> ADR=... (NUM=...), DIM=...
4.2 Example
Following example shows an hypotethetical data framing of WREG class number 5 named <Protection>, with
five basic data:
- one INT <Time>
- one LONG <Range>
- one ENUM <Enable>
- one B32 <Selection>
- one B16 <Configuration>
The structure is made up of seven registers.
WREG NUM=5 Description : Protection
Framing:
INT [ 1] Time (1=10 ms)
1,1000 step 1
LONG[ 2] Range
1000,1000000000 step 1000
ENUM[ 4] Enable
0 OFF
1 ON
B32 [ 5] Selection
bit 0 RELAY1
bit 1 RELAY2
bit 2 RELAY3
bit 3 RELAY4
B16 [ 7] Configuration
bit 0 LED1
bit 1 LED2
bit 2 LED3
Dimension : 7 registers
Synopsis : class WREG -> ADR=4 (NUM=5), DIM=7
Section 5 Communication examples
5.1 Writing WREG message
The objective is to write on the protection Slave with address 33 (21 hex), the WREG structure (NUM=5,
DIM=7) introduced in the preceding section, with the following values:
- Time = 550 0226 hex
- Range = 500885000 1DDAE608 hex
- Enable = ON 0001 hex
- Selection = RELAY2+RELAY4 0000000A hex
- Configuration = LED1+LED2+LED3 0007 hex
WREG writing requires the FUNC=16 (10 hex) ModBus function.
Remember that the structure NUM=5 must be pointed out with ADR=4 in the message, that is with NUM-1.
Request (values in hex format):
|-------------------------------------------------------------------|
|ADDR|FUNC| BODY |CRCH|CRCL|
|----|----|----|----|----|----|--------|----|--------|----|----|----|
|ADR |DIM |NBYT|INT | LONG |ENUM| B32 |B16 |
|----|----|----|----|--------|----|--------|----|
21 10 0004 0007 0E 0226 E6081DDA 0001 000A0000 0007 2C C5
Response (values in hex format):
|-----------------------------|
|ADDR|FUNC| BODY |CRCH|CRCL|
|----|----|----|----|----|----|
|ADR |DIM |
|----|----|
21 10 0004 0007 C7 6A

Table of Contents

Related product manuals