Profibus Master
The PROFIBUS Master driver allows writing and reading to PROFIBUS slave devices. A maximum of 244 Bytes can be transmitted in each direction.
The PROFIBUS master driver is named: dpmh
The routing address of the first PROFIBUS Master driver is 1060
The data point file of the first PROFINET Master driver is named: dpmh1.txt
The configuration file for global settings of the first PROFIBUS master driver is dpmh1.cfg
In dpmh1.cfg Cfg- and Prm-Data from the *.gsd-files or the slaves must registered here.
For the PROFIBUS Master 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> <slave>.<byte>[.<bit>]“
While following definition is 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 |
slave | ||
byte | 0 - 243 | n Byte in In- resp. output register |
bit | 0 - 7 | Single bit within the n Byte |
The address of inbyte 120 of Slave 2 will be defined in the data point file dpmh1.txt:
[X inbyte 2.120]
In order to read/write the correct value for each address a format must be defined for each data point:
format = <format> [S:<swap>] [F:<fact>]
<format> options:
<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:
[M inbit 2.120.0] name = digital mode query = pe format = BIT
[S outbit 2.120.0] name = digital given value query = pe format = BIT writecache = yes
[M inbyte 2.15] name = multistate value e.g. 0, 1, 2 für Off, On, Auto query = pe format = UINT8 writecache = yes
[S outbyte 2.16] name = multistate given value e.g. level switch 0, 1, 2 für Off, On, Auto query = pe format = UINT8 writecache = yes
[X inbyte 2.17] name = Temperature (Byte 17+18+19+20) query = pe format = FLOAT32
[Y outbyte 2.17] name = Temperature, one decimal point (Byte 17+18) query = pe format = SINT16 F:10