| System SZARP - dokumentacja techniczna: SZARP v.3.1 | ||
|---|---|---|
| Poprzedni | Rozdział 7. Obsługiwane urządzenia | Następny |
Zgodność ze specyfikacją: 4 .
Obsługiwane urządzenia: Wszystkie urządzenia/oprogramowanie komunikujące się przez protokół Modbus TCP/IP.
Protokół komunikacji: Modbus TCP/IP.
Demon przestarzały, zastąpiony przez uniwersalny demon protokołu Modubs - mbdmn. Pozwala tylko na jedno jednoczesne połączenie.
Konfiguracja: Konfiguracja w params.xml, wszystkie atrybuty z przestrzeni nazw 'modbus' nie oznaczone jako opcjonalne są wymagane.
Przykładowa konfiguracja:
<device
xmlns:modbus="http://www.praterm.com.pl/SZARP/ipk-extra"
daemon="/opt/szarp/bin/mbtcpdmn"
path="/dev/ttyA11"
modbus:tcp-mode="server"
allowe modes are 'server' and 'client'
modbud:tcp-port="502"
TCP port we are listenning on/connecting to (server/client)
port TCP na którym mamy nasłuchiwać/do którego mamy się łączyć(zależnie od trybu)
modbus:tcp-allowed="192.9.200.201 192.9.200.202"
(optional) list of allowed clients IP addresses for server mode, if empty all
addresses are allowed
modbus:tcp-address="192.9.200.201"
server IP address (required in client mode)
modbus:tcp-keepalive="yes"
should we set TCP Keep-Alive options? "yes" or "no"
modbus:tcp-timeout="30"
(optional) connection timeout in seconds, after timeout expires, connection
is closed; default empty value means no timeout
modbus:nodata-timeout="15"
(optional) timeout (in seconds) to set data to 'NO_DATA' if data is not available,
default is 20 seconds
modbus:nodata-value="-1"
(optional) float value to send instead of 'NO_DATA', default is 0
modbus:FloatOrder="msblsb"
(optional) registers order for 4 bytes (2 registers) float order - "msblsb"
(default) or "lsbmsb"; values names are a little misleading, it shoud be
msw/lsw (most/less significant word) not msb/lsb (most/less significant byte),
but it's left like this for compatibility with Modbus RTU driver configuration
>
<unit id="1">
<param
Read value using ReadHoldingRegisters (0x03) Modbus function
name="..."
...
modbus:address="0x03"
modbus register number, starting from 0
modbus:val_type="integer">
register value type, 'integer' (2 bytes, 1 register) or float (4 bytes,
2 registers)
...
</param>
<param
name="..."
...
modbus:address="0x04"
modbus:val_type="float"
modbus:val_op="LSW">
(optional) operator for converting data from float to 2 bytes integer;
default is 'NONE' (simple conversion to short int), other values
are 'LSW' and 'MSW' - converting to 4 bytes long and getting less/more
significant word; in this case there should be 2 parameters with the
same register address and different val_op attributes - LSW and MSW.
słowa
...
</param>
...
<send
Sending value using WriteMultipleRegisters (0x10) Modbus function
param="..."
type="min"
modbus:address="0x1f"
modbus:val_type="float">
...
</send>
...
</unit>
</device>
| Poprzedni | Spis treści | Następny |
| Sterownik mbrtudmn | Początek rozdziału | Sterownik mbusdmn |