../pvss.htm menu.gif basics.gif

IEC driver config file

This page provides sample IEC driver config files. Please refer to Possible IEC driver config entries for details on the entries.

note.gifNote

It is not possible to mix IEC 101 and IEC 104 in one driver! This requires two drivers.

caution.gifCaution

With the WinCC OA version 3.10 the internal DPE _IecConnection.Config.ConnInfo was implemented. This replaces the config entries "connection" and "connection_101". Thus, the creation of new connections can take place in the panel for connection settings. Because of that an IEC driver restart is not necessary anymore when a new IEC device was added or if connection parameters (e.g. IP address) have changed. The entry from the internal DPE (if available) has a higher weight than this from the config file (if available).

IEC 104

For the correct start-up of an IEC104 driver the following config entries are possible:

example.gifSample IEC 104 config file

 

Because WinCC OA is acting as a client in the example, you do not need to specify a tcpServerPort:

 

[iec_1]
connection = "Gateway1" "GW1" 2404 10 //Connection to Gateway1
connection = "Gateway2" "GW2" 2404 10 //Connection to Gateway2  

 

Definition of terms:

note.gifNOTE

In theory for IEC-104 up to 32766 connections can be established! In practice the range acts in accordance with the performance demands.

 

caution.gifCaution

For each connection ("connection = " in the config file) there must be a DP of the type _IecConnection that is automatically created in the panel for connections (see Panel for connections).

IEC 101

example.gifSample IEC 101 config file, unbalanced mode

 

WinCC OA is configured as master:

 

[iec_1]
connection_101 = "Gateway1" "Com1" 2   
connection_101 = "Gateway2" "Com1" 1
device_101 = "Com1" "V24" "com1;9600,e,8,1"  
balanced_101 = "No"  
master_101 = "Yes"   
timeout_t2 = 10000

sizeof_LA_101 = 1

 

# The configuration of the IEC101 driver under Linux:

[iec_1]

connection_101 = "Gateway1" "Ser0" 5

device_101 = "Ser0" "V24" "/dev/ttyS0;9600,e,8,1"

station_101 = 1

balanced_101 = "no"

master_101 = "Yes"

timeout_t2 = 1000

sizeof_LA_101 = 1

 

Definition of terms:

example.gifSample IEC 101 config file, balanced mode

 

Requires 2 drivers as balanced mode is being used (both stations have equal rights; in this example 2 drivers are used for testing purposes. In normal cases you need of course only one driver):

 

[iec_1]
connection_101 = "Gateway1" "Com1"
device_101 = "Com1" "V24" "com1;9600,e,8,1"
balanced_101 = "Yes"  // balanced mode

 

Definition of terms:

The other entries mean the same as in unbalanced mode.

IEC 101 - Extension: Serial communication over TCP connection

The IEC 101 driver has been extended to be able to use a serial protocol also over a TCP connection. This functionality simplifies the usage ethernet-serial converter, because no virtual COM interface will be necessary anymore. The converter can be TCP server or TCP client and can be operated transparent or with RFC2217 mode. Therefore the config entry "device_101" must be modified.

device_101 = <devname> <type> <specific device data>

The settings for <devname> and <type> are the same as when using a serial connection without TCP but the <specific device data> has to be modified as follows:

tcp[s][rfc]:<Host:Port (IPv4 oder IPv6)> [tcp timeout]

Element

Description

tcp

Prefix which determines that a TCP connection should be used..

s

Additional parameter that defines if the connection is to a server. If s is not stated it is a client connection. (optional)

rfc

Additional parameter that defines whether the RFC2217 Mode shall be used or not. (optional)

Host

Name or IP of the host

Note

The host name of a server must not be set. It will be ignored even when the host name is set for a server, i.e. the server will accept connections from any host name.

Port

Port that should be used for the connection. This port number is the "listening port" for a server.

tcp timeout

Time-out that should be used for the TCP connection. Default: 10 seconds. (optional)

example.gifExample

The following 3 examples show possible configurations of the <specific device data> when using a TCP connection:

"tcp:127.0.0.1:3040" => Client with 10sec time-out

"tcps:localhost:3041 5" => Server with 5sec time-out

"tcprfc:[::1]:3042 2" => Client with RFC2217 mode, IPv6 address and 2sec time-out

Top Of Page

 

V 3.11 SP1

Copyright ETM professional control GmbH 2013 All Rights Reserved