S7-SoftPLC:Configuring Modbus TCP with PLC43.INI

From IBHsoftec Wiki English
Revision as of 07:56, 23 January 2013 by Jonas (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Setting the slaves

Syntax for setting the slaves:

01_parameter phrase for the first Modbus TCP slave

02_parameter phrase for the second Modbus TCP slave

...

10_parameter phrase for the tenth and last Modbus TCP slave

The parameter phrases of the slaves must be numbered consecutively, otherwise reading the parameters is stopped at the gap.

Example:

01_IPAdr=192.168.0.80
02_IPAdr=192.168.0.81
06_IPAdr=192.168.0.84

The sequence is stopped at 03_. In this case, only the settings for the slaves from 01_ to 02_ are read.


PLC43.INI parameterisation

The parameterisation fo the PLC43.INI can be conducted manually or with the help of the user inteface.

[OEM]
;Name of I/O driver
DLL0=ilbeth24.dll
[ILBETH24]
;general settings
TypeFC=0 ;create as FC 0= no (SFC), 1 = yes (FC) (default = 0)
StatusSFC=193 ;SFC/FC Number (default = 193)
Prio=251 ;Priority of Connect-Thread (default = 251)
;first Slave
01_IPAdr=192.168.0.21 ;IP address of connection 01
01_Port=502 ;Port of connection 01 (default = 502)
01_ModbusFC=0x17 ;ModbusFunctionCode of connection 01 (default = 0x17)
01_Timeout=2000 ;Timeout of connection in Milliseconds
01_AdrPLC_AW=1 ;output word in process image of the PLC of connection 01
01_AdrI/O_AW=2 ;output word of I/O-module of connection 01
01_Count_AW=1 ;number of output words of connection 01
01_AdrPLC_EW=1 ;input word in process image of the PLC of connection 01
01_AdrI/0_EW=0 ;input word of I/O-module of connection 01
01_Count_EW=1 ;number of output words of connection 01
;second slave
02_IPAdr=192.168.0.22
02_ModbusFC=0x04
02_AdrPLC_EW=0
02_AdrI/O_EW=0
02_Count_EW=10
;third slave
03_IPAdr=192.168.0.23
03_ModbusFC=0x06
03_AdrPLC_AW=10
03_AdrI/O=0

The number of parameters, that are to be generated for one slave, depends on the used Modbus function (see chart).

To be able to query the current connection status from the PLC program, the driver installs the SFC 193 (as parameterised in PLC43.INI) into the block list of S7-SoftPLC. This block can be called from the PLC-program, to monitor the hardware status.