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 i systemy SCADA (lub inne oprogramowanie) wykorzystujące protokół Modbus.
Protokół komunikacji: Modbus RTU (połączenie szeregowe RS232/RS485) lub Modbus TCP/IP.
Ten sterownik zastępuje starsze sterowniki mbrtudmn i mbtcpdmn.
Konfiguracja: Sterownik jest konfigurowany w pliku params.xml, wszystkie atrybuty z przestrzeni nazw 'modbus', nie opisane jako opcjonalne, są wymagane.
Przykładowa konfiguracja:
<device xmlns:modbus="http://www.praterm.com.pl/SZARP/ipk-extra" daemon="/opt/szarp/bin/mbdmn" path="/dev/null" modbus:daemon-mode= allowed modes are 'tcp-server' and 'tcp-client' and 'serial-client' and 'serial-server' modbud:tcp-port="502" TCP port we are listenning on/connecting to (server/client) 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="32" (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) 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" modbus:id="49"> modbus:id is optional Modbus unit identifier - number from 0 to 255; default is to use IPK id attribute, but parsed as a character value and not a number; in this example both definitions id="1" and modbud:id="49" give tha same value, because ASCII code of "1" is 49 <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, not supported in client-sends) ... </param> <param name="..." ... modbus:address="0x04" modbus:val_type="float" modbus:val_op="msblsb" 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. (useful when param value is stored as 2B, but we multiply it by large prec) modbus:combined="LSW"> (optional) operator for sending a combined param using its lsw and msw parts, values are 'LSW' and 'MSW', there should be 2 parameters (lsw and msw) with the same register address and different combined attributes - LSW and MSW. Additionally, if a matching defined combined param is found, its precision is used. ... </param> ... <send Sending value using WriteMultipleRegisters (0x10) Modbus function, floats are not supported in client. param="..." type="min" modbus:address="0x1f" modbus:val_type="integer"> ... </send> ... </unit> </device>
Poprzedni | Spis treści | Następny |
Sterownik lecmdmn | Początek rozdziału | Sterownik mbrtudmn |