PROFIBUS Slave
The PROFIBUS Slave driver provides data points as PROFIBUS slave device. A maximum of 244 Bytes can be transmitted in each direction.
The required GSD-File is here: hil_0b69.gsd.
The PROFIBUS slave driver is named: dpsh
The routing address of the first PROFIBUS Slave driver is 1080
The data point file of the first PROFINET Master driver is named: dpsh1.txt
The configuration file for global settings of the first PROFIBUS slave driver is: dpsh1.cfg
In dpsh1.cfg e.g. the PROFIBUS slave address is registered.
For the PROFIBUS slave driver as well as all other gateway drivers the following definitions are valid:
Type | Description |
---|---|
M | Integer value (binary data points, counters) which can/shall only be read by the gateway |
S | Integer value which can be either read or written by the gateway. (to M-BUS writing is not possible) |
X | Floating point value (with decimal place) which can/shall only be read by the gateway |
Y | Floating point value (with decimal place) which can be either read or written by the gateway. (to M-BUS writing is not possible) |
A | String, is used e.g. with BACnet Trends and ESPA4.4.4 data points |
Addresses are defined as follows:
„<type> <byte>[.<bit>]“
For values or single bit transmission the following definitions are valid.
Range of values | Description | |
---|---|---|
Type | inbyte inbit outbyte outbit | Byte value that can be read by the master Single bit that can be read by the master Byte value that can be written by the master Single bit that can be written by the master |
byte | 0 - 243 | n Byte in In- resp. output register |
bit | 0 - 7 | Single bit within the n Byte |
The address of the first byte transmitted to the master can be written in the file dpsh1.txt as follows:
[Y inbyte 0]
In order to tell the driver how to interpret the data for each data point a must be format must be defined.
format = <format> [S:<swap>] [F:<fact>]
<format> can have following values:
<format> | Description |
---|---|
BIT | single bit |
UINT8 | 8bit unsigned |
SINT8 | 8bit signed |
UINT16 | 16bit unsigned |
SINT16 | 16bit signed |
UINT32 | 32bit unsigned |
SINT32 | 32bit signed |
FLOAT32 | 32bit floating point (IEEE) |
FLOAT64 | 64bit floating point (IEEE) |
Formats larger than 8bit require more than one byte. Following bytes will be used. Those bytes cannot be used for other data points anymore.
For the correct interpretation of data point values it might be necessary to invert the order of bytes. This can be done with the <swap> option.
<swap> can have following values:
<swap> | Description |
---|---|
0 | little endian (Intel) |
1 | big endian (Motorola, default) |
The parameter „F:“ allows for each data point to define a certain factor. The value received will be diverted by the given factor.
In case integer values shall be converted to floating point value the data point on the sending side is multiplied by 10 and divided by 10 on receiver's side. A temperature value of 20.5°C ist shifted to „205“ and transmitted as integer value. Factor can be any floating point value. If no factor is set the default is 1.
Typical data points can be:
[S inbit 1.0] name = digital mode query = pe format = BIT writecache = yes
[M outbit 1.0] name = digital given value query = pe format = BIT
[S inbyte 15] name = multistate value e.g. 0, 1, 2 für Off, On, Auto query = pe format = UINT8 writecache = yes
[M outbyte 16] name = multistate given value e.g. level switch 0, 1, 2 für Off, On, Auto query = pe format = UINT8
[Y inbyte 17] name = Temperature value (Byte 17+18+19+20) query = pe format = FLOAT32 writecache = yes
[X outbyte 17] name = Temperature given value, one decimal point (Byte 17+18) query = pe format = SINT16 F:10