KDNP1

KDNP1

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

The KDNP1 driver is for communication with Kepco's KDNP1 protocol, which is based on the DNP3 standard. In doing so, the driver acts as a Master. At protocol level, serial communication and IP communication to several Outstations are supported via TCP.

  • The KDNP1 driver polls for objects. This polling is cyclical. In addition, this polling can be activated or deactivated with a driver command.
  • In addition, the driver supports communication with Confirmed Data link layer. To do this, the Data link confirm property in the Outstation driver dialog can be activated. Timeout and the number of attempts can be configured for this property.

Definition of terms

In order for you to understand this document better, please find the definition of important terms in the following list.

Term

Definition

Master

Controlling station. A Master sends read queries and control queries to the Outstation.

Objekt Group

Data type or data type in the Outstation with a defined functionality.

Examples of assignments:

  • Object Group 30 is a statistical analog entry.
  • A value change for an analog input is assigned to Object Group 32.
  • Object Group 40 is for reading an analog output.
  • Object Group 41 is for writing to an analog output.

Outstation

SPS or RTU in KDNP1. An Outstation is a slave at protocol level and sends data to the Master on request.

Point

Equivalent of a variable in the Outstation. A Point is addressed with a Point Number (Offset) per Objekt Group, whereby the following is applicable: Point 12 for Object Group 30 and Point 12 for Object Group 32 both have the same analog input as a basis, but Point 12 for Object Group 1 is a completely-independent binary input. The general term for a value, time or status change is DNP Object.

Variation

Format in which the Oustation saves a static value or a value change in Class 0 or Class 1, 2 or 3. This can be configured in the Outstation for each Object Group or for each Point.

The Variation defines (e.g.)

  • a static value (Class 0) or a value change, if this is an integer or a floating point.
  • a time stamp is saved or not, or whether Object Flags are saved or not.

Communication

The communication is mainly polling. In doing so, the driver carries out a corresponding Class Poll. Different polling intervals can be defined for binary inputs, binary outputs and analog inputs.

The driver processes the received values and sends them to the Runtime.

Other topics in this chapter

Driver history

Requirements

Configuration

Creating variables

Driver-specific functions

Driver commands

Error analysis


Driver history

KDNP1 -> Driver history

Date | Build number | Change
15.08.15 | 21913 | Created driver documentation


Requirements

KDNP1 -> Requirements

This chapter contains information on the requirements that are necessary for use of this driver.

Other topics in this chapter

PC


PC

KDNP1 -> Requirements -> PC

Hardware

  • Serial interface
  • Ethernet TCP

CE

The KDNP1 driver is not available for CE.


Configuration

KDNP1 -> Configuration

In this chapter you will learn how to use the driver in a project and which settings you can change.

info Information

Find out more about further settings for zenon variables in the chapter Variables of the online manual.

Other topics in this chapter

Creating a driver

Settings in the driver dialog


Creating a driver

KDNP1 -> Configuration -> Creating a driver

In order to create a new driver:

  1. Right-click on Driver in the Project Manage and select Driver new in the context menu.
  2. In the following dialog the control system offers a list of all available drivers.

  3. Select the desired driver and give it a name:
    • The driver name has to be unique, i.e. if one and the same driver is to be used several times in one project, a new name has to be given each time.
    • The driver name is part of the file name. Therefore it may only contain characters which are supported by the operating system. Invalid characters are replaced by an underscore (_).
    • Attention: This name cannot be changed later on.
  4. Confirm the dialog with OK. In the following dialog the single configurations of the drivers are defined.

Only the respective required drivers need to be loaded for a project. Later loading of an additional driver is possible without problems.

info Information

For new projects and for existing projects which are converted to version 6.21 or higher, the following drivers are created automatically:

  • Internal
  • MathDr32
  • SysDrv.


Settings in the driver dialog

KDNP1 -> Configuration -> Settings in the driver dialog

You can change the following settings of the driver:

Other topics in this chapter

General

Com

Options

Connections


General

KDNP1 -> Configuration -> Settings in the driver dialog -> General

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

The configuration dialog is opened when a driver is created. In order to be able to open the dialog later for editing, double click on the driver in the list or click on the Configuration property.

Parameters

Description

Mode

Allows to switch between hardware mode and simulation mode

  • Hardware:

    A connection to the control is established.

  • Simulation static

    No communication between to the control is established, the values are simulated by the driver. In this modus the values remain constant or the variables keep the values which were set by zenon Logic. Each variable has its own memory area. E.g. two variables of the type marker with offset 79 can have different values in the Runtime and do not influence each other. Exception: The simulator driver.

  • Simulation - counting

    No communication between to the control is established, the values are simulated by the driver. In this modus the driver increments the values within a value range automatically.

  • Simulation - programmed

    N communication is established to the PLC. The values are calculated by a freely programmable simulation project. The simulation project is created with the help of the zenon Logic Workbench and runs in a zenon Logic Runtime which is integrated in the driver. For details see chapter Driver simulation.

Keep update list in the memory

Variables which were requested once are still requested from the control even if they are currently not needed.
This has the advantage that e.g. multiple screen switches after the screen was opened for the first time are executed faster because the variables need not be requested again. The disadvantage is a higher load for the communication to the control.

Output can be written

Active: Outputs can be written.

Inactive: Writing of outputs is prevented.

Note: Not available for every driver.

Variable image remanent

This option saves and restores the current value, time stamp and the states of a data point.

Fundamental requirement: The variable must have a valid value and time stamp.

The variable image is saved in mode hardware if:

  • one of the states S_MERKER_1(0) up to S_MERKER8(7), REVISION(9), AUS(20) or ERSATZWERT(27) is active

The variable image is always saved if:

  • the variable is of the object type Driver variable
  • the driver runs in simulation mode. (not programmed simulation)

The following states are not restored at the start of the Runtime:

  • SELECT(8)
  • WR-ACK(40)
  • WR-SUC(41)

The mode Simulation - programmed at the driver start is not a criterion in order to restore the remanent variable image.

Stop on Standby Server

Setting for redundancy at drivers which allow only on communication connection. For this the driver is stopped at the Standby Server and only started at the upgrade.

Attention: If this option is active, the gapless archiving is no longer guaranteed.

Active: Sets the driver at the not-process-leading Server automatically in a stop-like state. In contrast to stopping via driver command, the variable does not receive status switched off but an empty value. This prevents that at the upgrade to the Server irrelevant values are created in the AML, CEL and Historian.

Note: Not available if the CE terminal serves as a data server. You can find further information in the zenon Operator manual in the CE terminal as a data server chapter.

Global Update time

Active: The set Global update time in ms is used for all variables in the project. The priority set at the variables is not used.
Inactive: The set priorities are used for the individual variables.

Priority

The polling times for the individual priority classes are set here. All variables with the according priority are polled in the set time.

The allocation to the variables takes place separately in the settings of the variable properties.
The communication of the individual variables are graduated in respect of importance or necessary topicality using the priorities. Thus the communication load is distributed better.

Attention: Priority classes are not supported by each driver For example, drivers that communicate spontaneously do not support it.

Close dialog

Parameters | Description
OK | Applies all changes in all tabs and closes the dialog.
Cancel | Discards all changes in all tabs and closes the dialog.
Help | Opens online help.

Update time for cyclical drivers

The following applies for cyclical drivers:

For Set value, Advising of variables and Requests, a read cycle is immediately triggered for all drivers - regardless of the set update time. This ensures that the value is immediately available for visualization after writing. Update times can therefore be shorter than pre-set for cyclical drivers.


Com

KDNP1 -> Configuration -> Settings in the driver dialog -> Com

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Parameters

Description

Com

Selection Com port.
Select from drop-down list:
COM 1 to COM 64

Default: 1

Baud rate

Selection baud rate. Amend to PLC.
Select from drop-down list:
110 to 256000

Default: 9600

Data bit

Number of data bits. Amend to PLC.
Select from drop-down list:
5, 6, 7, 8

Default: 8

Stop bit

Selection stop bit. Amend to PLC.
Select from drop-down list:

  • 1
  • 1.5
  • 2

Default: 1

Parity

Selection of the parity. Amend to PLC.
Selection from drop-down list:

  • No
  • Odd
  • Even

Default: No

Protocol

Selection protocol. Amend to PLC.
Selection from drop-down list:

  • No
  • Xon/Xoff
  • Rts/CTS
  • DTR/DSR

Default: No

Close dialog

Parameters | Description
OK | Applies all changes in all tabs and closes the dialog.
Cancel | Discards all changes in all tabs and closes the dialog.
Help | Opens online help.
info Info
The exact settings depend on the used PLCs. Take the valid values from the manual of your PLC.


Options

KDNP1 -> Configuration -> Settings in the driver dialog -> Options

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

You configure the communication parameters in this tab.

Note: This dialog is only available in English.

Data link

Parameters

Description

TCP/IP
  • Active: Communication is via TCP/IP.

Network connection

Selection of the network connection that is used for communication. Entry in the field or selection from a drop-down list from:

  • Name
    or
  • Network connection
    or
  • IP address.

The names of the network connections available on the local computer are shown in the drop-down list.

For remote Runtime computers, enter the name of the network card or the IP address of the remote computer.

Serial

Active: Communication is via the serial interface.

Default: Inactive

Receive frame timeout [ms]

Timeout in milliseconds for the receipt of a complete telegram. The start time is the first character of the telegram.

Default: 1000

Note: Only active if serial has been activated.

Send frame timeout [ms]

Timeout in milliseconds for the sending of a telegram. If the serial output buffer is filled for longer than this time period, this is considered a transmission error

Default: 5000

Note: Only active if serial has been activated.

Half duplex
  • Active: A telegram is sent again if a response has been received for the telegram that was last sent on the interface.

Default: Inactive

Note: Only active if serial has been activated.

Application

Parameters

Description

Double Point Mapping

Selection of Double Point Mapping to an integer value. Select from drop-down list:

  • SCADA default mapping
  • DNP3 binary mapping
  • Custom legacy mapping

Default: SCADA default mapping

Pulse duration

Setting of the pulse duration for Norm, Trip and Close for each connection. Norm, Trip and Close define which relay is switched

Parameters

Description

Norm

Corresponds to NUL:

Pulse duration norm:

  • On time:
    Period of time in milliseconds in which the Output is ON
    Default: 1000
  • Off time:
    Period of time in milliseconds in which the output is OFF
    Default: 1000

Trip

Pulse duration trip:

  • On time:
    Period of time in milliseconds in which the output is ON
    Default: 1000
  • Off time:
    Period of time in milliseconds in which the output is OFF
    Default: 1000

Close

Pulse duration close:

  • On time:
    Period of time in milliseconds in which the output is ON
    Default: 1000
  • Off time:
    Period of time in milliseconds in which the output is OFF
    Default: 1000

Close dialog

Parameters | Description
OK | Applies all changes in all tabs and closes the dialog.
Cancel | Discards all changes in all tabs and closes the dialog.
Help | Opens online help.


Connections

KDNP1 -> Configuration -> Settings in the driver dialog -> Connections

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

You configure the connection in this tab.

Note: This dialog is only available in English.

Parameters

Description

List of connections

Displays the configured connections.:

  • Net address
    Network address of the outstation. This address must be unique and can only be issued once.
  • Description
    Description of the outstation. Corresponds to the Friendly name.
  • Connection
    Connection port.
    • With a TCP connection
      TCP/IP address, TCP port
    • With a serial connection:
      Corresponds to the Com setting configured in the Com tab.

New

Opens the dialog for creating a new connection.

Edit

Opens dialog for editing the selected connection.

Delete

Deletes the selected connection.

Close dialog

Parameters | Description
OK | Applies all changes in all tabs and closes the dialog.
Cancel | Discards all changes in all tabs and closes the dialog.
Help | Opens online help.

Create new connection

  1. Click on the New button.
    The dialog for the configuration of the outstation is opened.
  2. Enter the connection details.
  3. Click on OK.
    The dialog is closed. The connection that has just been created is listed in the connections list.

Edit connection

  1. Select the connection in the connection list.
  2. Click on the Edit button.
    The dialog for the configuration of an outstation is opened.
  3. Change the connection parameters.
  4. Click on OK.

Delete connection

  1. Select the connection in the connection list.
  2. Click on the Delete button.
  3. The connection will be removed from the list

Other topics in this chapter

Outstation


Outstation

KDNP1 -> Configuration -> Settings in the driver dialog -> Connections -> Outstation

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

You configure connections in this dialog. The dialog is opened if you click, in the Connections tab, on the New or Edit button.

Note: This dialog is only available in English.

General

General settings.

Parameters

Description

Net address

Net address of the connection.

Value between 0 and 255.
Corresponds to the Net address property for the variable.

The network address must be unique.

Default: Last network address issued + 1

Friendly name

Name of connection. Freely selectable.

Connection (IP)

Selection of the TCP channel via which communication with this Outstation takes place.

With virtual Outstations, it is possible that several stations share one channel.

Select from drop-down list. Administration of the connection with the Add and Edit buttons.

(Not available for serial communication.)

Add

Adds a new TCP link configuration. The TCP links dialog is opened.

Edit

Opens the dialog to edit all existing TCP links.

Source address (local)

The driver's own address (KDNP1 Master).

Default: 3

Dest. address (remote)

Link address of the PLC (KDNP1 Slave).

Default: 4

Error wait time

Waiting time in the event of a communication error. After an error, the given time is waited before another attempt at establishing a connection is made.

Default: 20 s

Reply timeout [ms]

Time in milliseconds that is waited for a response from the controller. If this time has expired, a repetition is sent.

If a fragment of a multi-part response is received. The interval starts over with each fragment received.

Default: 10000 ms

Retries

Number of communication retries after timeouts.

Default: 3

Keepalive

If data is received or sent beyond the given time, a LINK_STATUS_REQUEST telegram is sent.

Default: 120 s

Data link confirm

If the Data link confirm property is activated, Confirmed data link layer telegrams are used in communication.

This check is configured in the DL timeout and DL Retries properties.

Default: Inactive

Note: This property should only be activated if Confirmed data link layer is also activated on the outstation.

DL timeout

Time in milliseconds that is waited for a data link response from the controller . If this time has expired, a repetition is sent.

In contrast to the Reply timeout [ms] that is applicable for an application layer telegram, the DL timeout is applicable for a data link layer telegram.
An Application Layer telegram can consist of several Data link layer telegrams.

Default: 1000 ms

Maximum time: 99999 ms

Only active if Data link confirm is active.

DL Retries

Maximum number of repeats for a connection check after a connection error on the Data link layer.

Default: 3

Only active if Data link confirm is active.

Advanced

Parameters

Description

Max. APDU size

Maximum size of a KDNP Application Layer Fragment.

  • Minimum: 249
  • Maximum: 65535

Default: 2048

Timesync LAN
  • Active: Time synchronization via the LAN.

Can only be configured for a TCP connection.

Default: Activated
If serial connection type is selected, the property in the driver dialog is automatically activated and grayed out.

Note: Use variation 3 of the time object. This is not accepted by all stations.

No class poll on IIN1.1, IIN1.2, IIN1.3

Active: Driver ignores Internal Indication Flags IIN1.1, IIN1.2 and IIN 1.3
Compatibility setting: Ensure that polling for events is carried out regularly in order to avoid possible buffer overflows in the Outstation.

No time sync on IIN1.4

Active: The driver ignores the internal indication flag IIN1.4.
Compatibility setting. Time synchronization required.

No integrity poll on IIN2.3

Active: Driver ignores the Internal Indication Flag IIN2.3 (Buffer Overflow). Compatibility setting.

Delay Measurement (Timesync)

If active, the driver carries out a Delay Measurement when time synchronizing.

Active if:

  • Connection type Serial
  • IP connection type (TCP/IP) and Timesync LAN not active.

Note: With a serial connection, Timesync_LAN is active by default and grayed out, Delay Measurement (Timesync) can however be selected.

Poll per object

In this area, you configure the query parameters to the outstation.

The following can be configured:

  • Type of polling (query)
  • Polled objects
  • Time interval of the polling

Parameters

Description

Qualifier: All

If this property is active, all available data points for the respective object type of the outstation are read.

The interval time of the query can be configured for the respective property.

Default: activated

Qualifier: Range start/stop

If this property is active, only variables in the project can be polled for object types.
This means: The driver determines the smallest and largest offset and uses this for the object poll.

Default: Not activated

Binary Input

Polling interval for Binary Input object-type variables.

Default: 10 s

Note: Value 0 deactivates the polling for this object type.

Binary Output

Polling interval for Binary Output object-type variables.

Default: 20 s

Note: Value 0 deactivates the polling for this object type.

Analog Input

Polling interval for Analog Input object-type variables.

Default: 30 s

Note: Value 0 deactivates the polling for this object type.

Device Indication

Polling interval for the Device Indication object type. This object type provides information on the status of the modules in the outstation:

  • 0 = ok
  • 1 = fault

Default: 60 s

Note: Value 0 deactivates the polling for this object type.

Close dialog

Parameters | Description
OK | Applies settings and closes the dialog.
Cancel | Discards all changes and closes the dialog.


TCP/IP link configuration

KDNP1 -> Configuration -> Settings in the driver dialog -> Connections -> Outstation -> TCP/IP link configuration

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Configuration of TCP links.

Note: This dialog is only available in English.

Parameters | Description
IP address (primary) | Entry of the primary IP address.
Port | Primary TCP port of the PLC. Default: 20000
IP address (secondary) | Backup address for redundant connection to the PLC.
Port 2 | Port of the backup address. Default: 20000
TCP re-connect delay [s] | Minimum time period in seconds that must be between two TCP connection attempts. Default: 10 s
TCP disconnect delay [s] | If no data is sent or received over the given time period, the TCP connection is disconnected automatically. Default: 10 s Note: In this case, the Pollingintervals must be configured with a correspondingly low time period. If the time period set here = 0 the TCP connection is not separated.

Navigation

OK | Applies settings and closes the dialog.
Cancel | Discards all changes and closes the dialog.

Error dialog - address already exists

Only one outstation with a port number can be configured per IP address. If two outstations on the same IP address with different port numbers need to be addressed, please use one more driver.

If an IP address conflict occurs during the configuration of an outstation, this is visualized with a warning dialog.

Click on the Browse... button to return to the configuration dialog.

Note: This dialog is only available in English.


TCP/UDP Links

KDNP1 -> Configuration -> Settings in the driver dialog -> Connections -> Outstation -> TCP/UDP Links

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Display and administration of all TCP links.

Note: This dialog is only available in English.

Parameters | Description
Links | Displays the configured TCP channels. The IP address and the TCP port is displayed: [IP address], TCP:[port number]
New | Opens the dialog to create a new TCP channel.
Edit | Opens the dialog to edit the selected TCP channel.
Delete | Deletes selected TCP link. The TCP link is deleted without requesting confirmation.

Navigation

Parameters | Description
OK | Applies settings and closes the dialog.
Cancel | Discards all changes and closes the dialog.

Create a new TCP channel

  1. Click on the New button.
    The TCP/IP link configuration dialog is opened.
  2. Enter the connection details.
  3. Click on the OK button.
    The dialog is closed. The configured TCP channel is displayed in the Links list.

Edit a TCP channel

  1. Select the desired Link in the list.
  2. Click on the Edit button.
    The TCP/IP link configuration dialog is opened.
  3. Change the link parameter.
  4. Close it with OK. .
    The dialog is closed. The configured TCP channel is displayed in the Links list.

Delete a TCP channel

  1. Select the desired Link in the list.
  2. Click on the Delete button.
  3. The connection will be deleted from the list without requesting confirmation.


Creating variables

KDNP1 -> Creating variables

This is how you can create variables in the zenon Editor:

Other topics in this chapter

Creating variables in the Editor

Addressing

Driver objects and datatypes

Creating variables by importing

Driver variables


Creating variables in the Editor

KDNP1 -> Creating variables -> Creating variables in the Editor

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Variables can be created:

  • as simple variables
  • in arrays
  • as structure variables

Variable dialog

To create a new variable, regardless of which type:

  1. Select the New variable command in the Variables node in the context menu

  2. The dialog for configuring variables is opened
  3. configure the variable
  4. The settings that are possible depends on the type of variables

Property

Description

Name

Distinct name of the variable. If a variable with the same name already exists in the project, no additional variable can be created with this name.

Maximum length: 128 character

Attention: The characters # and @ are not permitted in variable names. If non-permitted characters are used, creation of variables cannot be completed and the Finish button remains inactive.
Note: For some drivers, the addressing is possible over the property Symbolic address, as well.

Drivers

Select the desired driver from the drop-down list.

Note: If no driver has been opened in the project, the driver for internal variables (Intern.exe) is automatically loaded.

Driver object type

Select the appropriate driver object type from the drop-down list.

Data type

Select the desired data type. Click on the ... button to open the selection dialog.

Array settings

Expanded settings for array variables. You can find details in the Arrays chapter.

Addressing options

Expanded settings for arrays and structure variables. You can find details in the respective section.

Automatic element activation

Expanded settings for arrays and structure variables. You can find details in the respective section.

Symbolic address

The Symbolic address property can be used for addressing as an alternative to the Name or Identification of the variables. Selection is made in the driver dialog; configuration is carried out in the variable property. When importing variables of supported drivers, the property is entered automatically.

Maximum length: 1024 characters.

Inheritance from data type

Measuring range, Signal range and Set value are always:

  • derived from the datatype
  • Automatically adapted if the data type is changed

Note for signal range: If a change is made to a data type that does not support the set signal range, the signal range is amended automatically. For example, for a change from INT to SINT, the signal range is changed to 127. The amendment is also carried out if the signal range was not inherited from the data type. In this case, the measuring range must be adapted manually.


Addressing

KDNP1 -> Creating variables -> Addressing

The offset determines the KDNP Point Nummer. In combination with the driver object type, the KDNP object group is determined.

Group/Property

Description

General

General variable properties.

Name

Freely definable name.

Attention: For every zenon project the name must be unambiguous.

Identification

Freely-assignable identification, e.g. for descriptions and comments.

Addressing

Properties of the variable addressing.

Net address

Bus address or Net address of the variable.

This address refers to the station address in the connection configuration of the driver. This defines the PLC, on which the variable resides.

Attention: The DNP address of the Outstation is configured separately during the connection.

Data block

not used for this driver

Offset

For variables of all driver object types:

KDNP Point in the Outstation. To see always in combination with the driver object type.

Alignment

not used for this driver

Bit number

not used for this driver

String length

Only available for String variables: Maximum number of characters that the variable can take.

Driver connection

Driver-specific properties.

Driver Object Type

Depending on the employed driver, an object type is selected during the creation of the variable; the type can be changed here later.

Data Type

Data type of the variable. Is selected during the creation of the variable; the type can be changed here later.

Attention: If you change the data type later, all other properties of the variable must be checked and adjusted, if necessary.


Driver objects and datatypes

KDNP1 -> Creating variables -> Driver objects and datatypes

Driver objects are areas available in the PLC, such as markers, data blocks etc. Here you can find out which driver objects are provided by the driver and which IEC data types can be assigned to the respective driver objects.

Other topics in this chapter

Driver objects

Mapping of the data types


Driver objects

KDNP1 -> Creating variables -> Driver objects and datatypes -> Driver objects

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

The following object types are available in this driver:

Driver object type | Channel type | Read | Write | Supported data types | Comment
Analog input | 68 | X | -- | UDINT, DINT, REAL, LREAL, UINT, INT |
Analog output | 69 | X | X | UDINT, DINT, REAL, LREAL, UINT, INT |
Binary Input | 64 | X | -- | BOOL |
Binary Output | 65 | X | X | BOOL, USINT |
Command | 11 | X | X | STRING |
Device indication | 79 | X | -- | USINT |
Driver variable | 35 | X | X | BOOL, SINT, USINT, INT, UINT, DINT, UDINT, REAL, STRING | Variables for the static analysis of the communication; is transferred between driver and Runtime (not to the PLC). Note: The addressing and the behavior is the same for most zenon drivers. Find out more in the chapter about the Driver variables


Mapping of the data types

KDNP1 -> Creating variables -> Driver objects and datatypes -> Mapping of the data types

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Driver object types and supported IEC data types for variables in zenon

Driver object types

Channel type

Supported data types

(DataType)

Read

Write

Comment

Binary Input

Static object group 1

Event object group 2

64

BOOL

X

--

Binary Output

Static object group 10

Event object Group 11

CROB object group 12

65

BOOL

--

X

Value 1: LATCH_ON
Value 0: LATCH_OFF

Binary Output

Static object group 10

Event object group 11

CROB object group 12

65

USINT

--

X

Value 1: PULSE_ON
Value 2: PULSE_OFF
Value 3: LATCH_ON
Value 4: LATCH_OFF

Value 65: CLOSE

Value 129: TRIP

Value 1 for PULSE_ON, LATCH_ON and CLOSE, value 0 for PULSE_OFF, LATCH_OFF and TRIP

Analog Input

Static object group 30

Event object group 32

68

INT, DINT, REAL, LREAL

X

--

Analog Output

Static object group 40

Event object group 42

Analog Output Block object group 41

69

INT, DINT, REAL, LREAL

--

X

written value is mirrored as a response after successful writing

Command

11

STRING

X

X

Initiates an explicit command

For example, explicit reading, ...

Device indication

79

USINT

x

--

Provides information on the status of the modules in the outstation:

  • 0 = ok
  • 1 = fault

Binary Outputs

The writing of Binary Outputs is always carried out by means of a CROB (group 12), with a choice of Direct Operate, Select Before Operate, or Direct Operate No Ack. In doing so, the setting for the variable-specific property Command Mode (accessible via XML export/import and VBA COMMAND_MODE) is used. Direct writing to group 10 is not supported by the driver.

After successful writing, the variable receives the value 0 for Binary Outputs with PULSE_OFF, LATCH_OFF and TRIP, and value 1 for PULSE_ON, LATCH_ON and CLOSE. The value is also updated if a Binary Output Status (group 10) or Binary Output Status Event (group 11) object is received.

Command processing with Binary Output variables:

  • Only dual command or switching commands can be used.
  • The property Select Before Operate must be deactivated for the variable; the KDNP1 driver uses Auto-SBO if necessary.

Use of the Qualifier of Command is recommended for the Command Processing in order to determine the type:

Type | QoC
PULSE OFF/PULSE ON | 1
LATCH OFF/LATCH ON | 0
TRIP/CLOSE | 2

The Qualifier of Command option can be used with both Binary Output variables of the BOOL data type as well as the USINT data type.

Analog Outputs

The writing of Analog Outputs is always with a group 41, with the choice of Direct Operate, Select Before Operate or Direct Operate No Ack. In doing so, the setting for the variable-specific property Command Mode (accessible via XML export/import and VBA COMMAND_MODE) is used.

After successful writing, the variable first receives the value written in Runtime. The value is also updated if an Analog Output Status (group 40) or Analog Output Status (group 42) object is received.

Use the write set value action text for Analog Outputs. According to the Command Mode option for the variable, for Analog Outputs either a direct operate or a select before operate is carried out. The Select Before Operate option must be deactivated for the variable. The Qualifier of Command option is not available for the Write set value action and has no influence with Analog Outputs.

For two-stage command processing, the command is only sent to the outstation at the second stage of the command, including Select with Auto-SBO.

Explicit command

Command driver object type variables are used to instigate a certain action once. The action is initiated by the writing of a string value to the command variable. The result of the action is assigned to the variables.

  • Syntax:
    A command consists of the command name and parameters. The command name and the individual parameters are separated by spaces.
    Example: READ 1 1 Read all binary inputs for network address 1 (Object Group 1, Variation 0 (default variation))

Attention: It is possible, with the compilation of parameters for an explicit command, that there are combinations that do not correspond to a valid command in the meaning of the IEEE 1815 standard. Commands are sent to the outstation without further checking and can, under certain circumstances, trigger incorrect actions here.

Explicit command

Command driver object type variables are used to instigate a certain action once. The action is initiated by the writing of a string value to the command variable. The result of the action is assigned to the variables.

  • Syntax: A command consists of the command name and parameters. The command name and the individual parameters are separated by spaces.
    Example: READ_VAR 1 0 254 Read all device attributes for network address 1 (Object Group 0, Variation 254)
    Example: READ 1 1 Read all binary inputs for network address 1 (Object Group 1, Variation 0 (default variation))

Attention: It is possible, with the compilation of parameters for an explicit command, that there are combinations that do not correspond to a valid command in the meaning of the IEEE 1815 standard. Commands are sent to the outstation without further checking and can, under certain circumstances, trigger incorrect actions here.

Explicit read, variation 0

Command: READ

Read all points of a group: (Qualifier Code 06 - you can use this number of parameters for static Object Groups and Event Object Groups)

  • Parameter 1: Net address
  • Parameter 2: Group

Read n-points of a group: (Qualifier Code 07, 08, 09 - you can use this number of parameters for the Event Object Groups. The use of a number greater than 65535 (Qualifier Code 09) is not recommended))

  • Parameter 1: Net address
  • Parameter 2: Group
  • Parameter 3: Number of the points to be read

Read certain points of a group: (Qualifier Code 00, 01 - you can use this number of parameters for static Object Groups, for example: Group 1 - Binary Input).

  • Parameter 1: Net address
  • Parameter 2: Group
  • Parameter 3: Start index
  • Parameter 4: Stop index

Explicit read

Command: READ_VAR

Read all points of a group: (Qualifier Code 06 - you can use this number of parameters for static Object Groups and Event Object Groups)

  • Parameter 1: Net address
  • Parameter 2: Group
  • Parameter 3: Variation

Read n-points of a group: (Qualifier Code 07, 08, 09 - you can use this number of parameters for Event Object Groups. The use of a number greater than 65535 (Qualifier Code 09) is not recommended))

  • Parameter 1: Net address
  • Parameter 2: Group
  • Parameter 3: Variation
  • Parameter 4: Number of the points to be read

Read certain points of a group: (Qualifier Code 00, 01 - you can use this number of parameters for static Object Groups, for example: Group 1 - Binary Input).

  • Parameter 1: Net address
  • Parameter 2: Group
  • Parameter 3: Variation
  • Parameter 4: Start index
  • Parameter 5: Stop index

Activate/deactivate object poll

Command: CYCLIC_POLL

  • Parameter 1: Net address
    The command is rejected if an invalid network address is entered.
  • Parameter 2: Polling:
    • 0 - deactivated
    • 1 - activated

Command status codes

Status code | Description
16 | Syntax error.
17 | Unknown command.
18 | Net address Not existing.
3 | Command has been sent.
4 | Command completed successfully.
5 | Command could not be processed.
6 | Command received a negative response.
7 | Error when executing the command (Timeout.
8 | Execution of the command was interrupted.


Creating variables by importing

KDNP1 -> Creating variables -> Creating variables by importing

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Variables can also be imported by importing them. The XML and DBF import is available for every driver.

info Information

You can find details on the import and export of variables in the Import-Export manual in the Variables section.

Other topics in this chapter

XML import

DBF Import/Export


XML import

KDNP1 -> Creating variables -> Creating variables by importing -> XML import

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

For the import/export of variables the following is true:

  • The import/export must not be started from the global project.
  • The start takes place via:
    • Context menu of variables or data typ in the project tree
    • or context menu of a variable or a data type
    • or symbol in the symbol bar variables

attention Attention

When importing/overwriting an existing data type, all variables based on the existing data type are changed.

Example:

There is a data type XYZ derived from the type INTwith variables based on this data type. The XML file to be imported also contains a data type with the name XYZ but derived from type STRING. If this data type is imported, the existing data type is overwritten and the type of all variables based on it is adjusted. I.e. the variables are now no longer INT variables, but STRING variables.


DBF Import/Export

KDNP1 -> Creating variables -> Creating variables by importing -> DBF Import/Export

Vorheriges Kapitel Nächstes Kapitel Alle anzeigen Alle anzeigen Alle verbergen Alle verbergen
© Ing. Punzenberger COPA-DATA GmbH. E-Mail: documentation@copadata.com

Data can be exported to and imported from dBase.

info Information

Import and Export via CSV or dBase supported; no driver specific variable settings, such as formulas. Use export/import via XML for this.

Import DBF file

To start the import:

  1. right-click on the variable list
  2. in the drop-down list of Extended export/import... select the Import dBase command
  3. follow the import assistant

The format of the file is described in the chapter File structure.

info Information

Note:

  • Driver object type and data type must be amended to the target driver in the DBF file in order for variables to be imported.
  • dBase does not support structures or arrays (complex variables) at import.

Export DBF file

To start the export:

  1. right-click on the variable list
  2. in the drop-down list of Extended export/import... select the Export dBase... command
  3. follow the export assistant

attention Attention

DBF files:

  • must correspond to the 8.3 DOS format for filenames (8 alphanumeric characters for name, 3 character suffix, no spaces)
  • must not have dots (.) in the path name.
    e.g. the path C:\users\John.Smith\test.dbf is invalid.
    Valid: C:\users\JohnSmith\test.dbf
  • must be stored close to the root directory in order to fulfill the limit for file name length including path: maximum 255 characters

The format of the file is described in the chapter File structure.

info Information

dBase does not support structures or arrays (complex variables) at export.

File structure of the dBase export file

The dBaseIV file must have the following structure and contents for variable import and export:

attention Attention

dBase does not support structures or arrays (complex variables) at export.

DBF files must:

  • conform with their name to the 8.3 DOS format (8 alphanumeric characters for name, 3 characters for extension, no space)
  • Be stored close to the root directory (Root)

Structure

Identification | Type | Field size | Comment
KANALNAME | Char | 128 | Variable name. The length can be limited using the MAX_LAENGE entry in project.ini.
KANAL_R | C | 128 | The original name of a variable that is to be replaced by the new name entered under "VARIABLENNAME" (field/column must be entered manually). The length can be limited using the MAX_LAENGE entry in project.ini.
KANAL_D | Log | 1 | The variable is deleted with the 1 entry (field/column has to be created by hand).
TAGNR | C | 128 | Identification. The length can be limited using the MAX_LAENGE entry in project.ini.
EINHEIT | C | 11 | Technical unit
DATENART | C | 3 | Data type (e.g. bit, byte, word, ...) corresponds to the data type.
KANALTYP | C | 3 | Memory area in the PLC (e.g. marker area, data area, ...) corresponds to the driver object type.
HWKANAL | Num | 3 | Bus address
BAUSTEIN | N | 3 | Datablock address (only for variables from the data area of the PLC)
ADRESSE | N | 5 | Offset
BITADR | N | 2 | For bit variables: bit address For byte variables: 0=lower, 8=higher byte For string variables: Length of string (max. 63 characters)
ARRAYSIZE | N | 16 | Number of variables in the array for index variables ATTENTION: Only the first variable is fully available. All others are only available for VBA or the Recipegroup Manager
LES_SCHR | L | 1 | Write-Read-Authorization 0: Not allowed to set value. 1: Allowed to set value.
MIT_ZEIT | L | 1 | time stamp in zenon (only if supported by the driver)
OBJEKT | N | 2 | Driver-specific ID number of the primitive object comprises TREIBER-OBJEKTTYP and DATENTYP
SIGMIN | Float | 16 | Non-linearized signal - minimum (signal resolution)
SIGMAX | F | 16 | Non-linearized signal - maximum (signal resolution)
ANZMIN | F | 16 | Technical value - minimum (measuring range)
ANZMAX | F | 16 | Technical value - maximum (measuring range)
ANZKOMMA | N | 1 | Number of decimal places for the display of the values (measuring range)
UPDATERATE | F | 19 | Update rate for mathematics variables (in sec, one decimal possible) not used for all other variables
MEMTIEFE | N | 7 | Only for compatibility reasons
HDRATE | F | 19 | HD update rate for historical values (in sec, one decimal possible)
HDTIEFE | N | 7 | HD entry depth for historical values (number)
NACHSORT | L | 1 | HD data as postsorted values
DRRATE | F | 19 | Updating to the output (for zenon DDE server, in [s], one decimal possible)
HYST_PLUS | F | 16 | Positive hysteresis, from measuring range
HYST_MINUS | F | 16 | Negative hysteresis, from measuring range
PRIOR | N | 16 | Priority of the variable
REAMATRIZE | C | 32 | Allocated reaction matrix
ERSATZWERT | F | 16 | Substitute value, from measuring range
SOLLMIN | F | 16 | Minimum for set value actions, from measuring range
SOLLMAX | F | 16 | Maximum for set value actions, from measuring range
VOMSTANDBY | L | 1 | Get value from standby server; the value of the variable is not requested from the server but from the Standby Server in redundant networks
RESOURCE | C | 128 | Resources label. Free string for export and display in lists. The length can be limited using the MAX_LAENGE entry in project.ini.
ADJWVBA | L | 1 | Non-linear value adaption: 0: Non-linear value adaption is used 1: Non-linear value adaption is not used
ADJZENON | C | 128 | Linked VBA macro for reading the variable value for non-linear value adjustment.
ADJWVBA | C | 128 | ed VBA macro for writing the variable value for non-linear value adjustment.
ZWREMA | N | 16 | Linked counter REMA.
MAXGRAD | N | 16 | Gradient overflow for counter REMA.
attention Attention
When importing, the driver object type and data type must be amended to the target driver in the DBF file in order for variables to be imported.

Limit value definition

Limit definition for limit values 1 to 4, or status 1 to 4:

Identification | Type | Field size | Comment
AKTIV1 | L | 1 | Limit value active (per limit value available)
GRENZWERT1 | F | 20 | technical value or ID number of a linked variable for a dynamic limit value (see VARIABLEx) (if VARIABLEx is 1 and here it is -1, the existing variable linkage is not overwritten)
SCHWWERT1 | F | 16 | Threshold value for limit value
HYSTERESE1 | F | 14 | Is not used
BLINKEN1 | L | 1 | Set blink attribute
BTB1 | L | 1 | Logging in CEL
ALARM1 | L | 1 | Alarm
DRUCKEN1 | L | 1 | Printer output (for CEL or Alarm)
QUITTIER1 | L | 1 | Must be acknowledged
LOESCHE1 | L | 1 | Must be deleted
VARIABLE1 | L | 1 | Dyn. limit value linking the limit is defined by an absolute value (see field GRENZWERTx).
FUNC1 | L | 1 | Functions linking
ASK_FUNC1 | L | 1 | Execution via Alarm Message List
FUNC_NR1 | N | 10 | ID number of the linked function (if “-1” is entered here, the existing function is not overwritten during import)
A_GRUPPE1 | N | 10 | Alarm/Event Group
A_KLASSE1 | N | 10 | Alarm/Event Class
MIN_MAX1 | C | 3 | Minimum, Maximum
FARBE1 | N | 10 | Color as Windows coding
GRENZTXT1 | C | 66 | Limit value text
A_DELAY1 | N | 10 | Time delay
INVISIBLE1 | L | 1 | Invisible

Expressions in the column "Comment" refer to the expressions used in the dialog boxes for the definition of variables. For more information, see chapter Variable definition.


Driver variables

KDNP1 -> Creating variables -> Driver variables

The driver kit implements a number of driver variables. These are divided into:

  • Information
  • Configuration
  • Statistics and
  • Error message

The definitions of the variables implemented in the driver kit are available in the import file drvvar.dbf (on the installation medium in the \Predefined\Variables folder) and can be imported from there.

Note: Variable names must be unique in zenon. If driver variables are to be imported from drvvar.dbf again, the variables that were imported beforehand must be renamed.

info Information

Not every driver supports all driver variants.

For example:

  • Variables for modem information are only supported by modem-compatible drivers
  • Driver variables for the polling cycle only for pure polling drivers
  • Connection-related information such as ErrorMSG only for drivers that only edit one connection at a a time

Information

Name from import | Type | Offset | Description
MainVersion | UINT | 0 | Main version number of the driver.
SubVersion | UINT | 1 | Sub version number of the driver.
BuildVersion | UINT | 29 | Build version number of the driver.
RTMajor | UINT | 49 | zenon main version number
RTMinor | UINT | 50 | zenon sub version number
RTSp | UINT | 51 | zenon Service Pack number
RTBuild | UINT | 52 | zenon build number
LineStateIdle | BOOL | 24.0 | TRUE, if the modem connection is idle
LineStateOffering | BOOL | 24.1 | TRUE, if a call is received
LineStateAccepted | BOOL | 24.2 | The call is accepted
LineStateDialtone | BOOL | 24.3 | Dialtone recognized
LineStateDialing | BOOL | 24.4 | Dialing active
LineStateRingBack | BOOL | 24.5 | While establishing the connection
LineStateBusy | BOOL | 24.6 | Target station is busy
LineStateSpecialInfo | BOOL | 24.7 | Special status information received
LineStateConnected | BOOL | 24.8 | Connection established
LineStateProceeding | BOOL | 24.9 | Dialing completed
LineStateOnHold | BOOL | 24.10 | Connection in hold
LineStateConferenced | BOOL | 24.11 | Connection in conference mode.
LineStateOnHoldPendConf | BOOL | 24.12 | Connection in hold for conference
LineStateOnHoldPendTransfer | BOOL | 24.13 | Connection in hold for transfer
LineStateDisconnected | BOOL | 24.14 | Connection terminated.
LineStateUnknow | BOOL | 24.15 | Connection status unknown
ModemStatus | UDINT | 24 | Current modem status
TreiberStop | BOOL | 28 | Driver stopped For driver stop, the variable has the value TRUE and an OFF bit. After the driver has started, the variable has the value FALSE and no OFF bit.
SimulRTState | UDINT | 60 | Informs the status of Runtime for driver simulation.

Configuration

Name from import | Type | Offset | Description
ReconnectInRead | BOOL | 27 | If TRUE, the modem is automatically reconnected for reading
ApplyCom | BOOL | 36 | Apply changes in the settings of the serial interface. Writing to this variable immediately results in the method SrvDrvVarApplyCom being called (which currently has no further function).
ApplyModem | BOOL | 37 | Apply changes in the settings of the modem. Writing this variable immediately calls the method SrvDrvVarApplyModem. This closes the current connection and opens a new one according to the settings PhoneNumberSet and ModemHwAdrSet.
PhoneNumberSet | STRING | 38 | Telephone number, that should be used
ModemHwAdrSet | DINT | 39 | Hardware address for the telephone number
GlobalUpdate | UDINT | 3 | Update time in milliseconds (ms).
BGlobalUpdaten | BOOL | 4 | TRUE, if update time is global
TreiberSimul | BOOL | 5 | TRUE, if driver in sin simulation mode
TreiberProzab | BOOL | 6 | TRUE, if the variables update list should be kept in the memory
ModemActive | BOOL | 7 | TRUE, if the modem is active for the driver
Device | STRING | 8 | Name of the serial interface or name of the modem
ComPort | UINT | 9 | Number of the serial interface.
Baudrate | UDINT | 10 | Baud rate of the serial interface.
Parity | SINT | 11 | Parity of the serial interface
ByteSize | USINT | 14 | Number of bits per character of the serial interface Value = 0 if the driver cannot establish any serial connection.
StopBit | USINT | 13 | Number of stop bits of the serial interface.
Autoconnect | BOOL | 16 | TRUE, if the modem connection should be established automatically for reading/writing
PhoneNumber | STRING | 17 | Current telephone number
ModemHwAdr | DINT | 21 | Hardware address of current telephone number
RxIdleTime | UINT | 18 | Modem is disconnected, if no data transfer occurs for this time in seconds (s)
WriteTimeout | UDINT | 19 | Maximum write duration for a modem connection in milliseconds (ms).
RingCountSet | UDINT | 20 | Number of ringing tones before a call is accepted
ReCallIdleTime | UINT | 53 | Waiting time between calls in seconds (s).
ConnectTimeout | UINT | 54 | Time in seconds (s) to establish a connection.

Statistics

Name from import | Type | Offset | Description
MaxWriteTime | UDINT | 31 | The longest time in milliseconds (ms) that is required for writing.
MinWriteTime | UDINT | 32 | The shortest time in milliseconds (ms) that is required for writing.
MaxBlkReadTime | UDINT | 40 | Longest time in milliseconds (ms) that is required to read a data block.
MinBlkReadTime | UDINT | 41 | Shortest time in milliseconds (ms) that is required to read a data block.
WriteErrorCount | UDINT | 33 | Number of writing errors
ReadSucceedCount | UDINT | 35 | Number of successful reading attempts
MaxCycleTime | UDINT | 22 | Longest time in milliseconds (ms) required to read all requested data.
MinCycleTime | UDINT | 23 | Shortest time in milliseconds (ms) required to read all requested data.
WriteCount | UDINT | 26 | Number of writing attempts
ReadErrorCount | UDINT | 34 | Number of reading errors
MaxUpdateTimeNormal | UDINT | 56 | Time since the last update of the priority group Normal in milliseconds (ms).
MaxUpdateTimeHigher | UDINT | 57 | Time since the last update of the priority group Higher in milliseconds (ms).
MaxUpdateTimeHigh | UDINT | 58 | Time since the last update of the priority group High in milliseconds (ms).
MaxUpdateTimeHighest | UDINT | 59 | Time since the last update of the priority group Highest in milliseconds (ms).
PokeFinish | BOOL | 55 | Goes to 1 for a query, if all current pokes were executed

Error message

Name from import | Type | Offset | Description
ErrorTimeDW | UDINT | 2 | Time (in seconds since 1.1.1970), when the last error occurred.
ErrorTimeS | STRING | 2 | Time (in seconds since 1.1.1970), when the last error occurred.
RdErrPrimObj | UDINT | 42 | Number of the PrimObject, when the last reading error occurred.
RdErrStationsName | STRING | 43 | Name of the station, when the last reading error occurred.
RdErrBlockCount | UINT | 44 | Number of blocks to read when the last reading error occurred.
RdErrHwAdresse | DINT | 45 | Hardware address when the last reading error occurred.
RdErrDatablockNo | UDINT | 46 | Block number when the last reading error occurred.
RdErrMarkerNo | UDINT | 47 | Marker number when the last reading error occurred.
RdErrSize | UDINT | 48 | Block size when the last reading error occurred.
DrvError | USINT | 25 | Error message as number
DrvErrorMsg | STRING | 30 | Error message as text
ErrorFile | STRING | 15 | Name of error log file


Driver-specific functions

KDNP1 -> Driver-specific functions

The driver supports the following functions:

Function | Description
Blockwrite | Not supported.
Redundancy | If the Outstation supports several Masters.
RDA | Not supported.
Real time stamping | If the Variation is configured accordingly in the Outstation.
Browsen | Not supported.
 | Polling for objects, in configurable cycles or controlled manually.
Spontaneous | Not supported.
Number of PLCs | One driver can connect to any number of Outstations. For serial communications, several Outstations can be configured for a serial interface (bus). Mixed operation serial/TCP is also possible with a driver.

Error file

The driver supports central logging on the diagnosis server.

Driver variables

Communication monitoring is possible using the INVALID status bit.

KDNP1 object flags mapping

The DNP object flags ONLINE and COMM_LOST are evaluated by the KDNP1 driver. With ONLINE = false or COMM_LOST = true, the INVALID bit for the variable is set in Runtime.

Note that the variation configured in the outstation determines whether objects are sent with or without flags for an object group.

In addition, the following flags/IIN bits listed are transferred to the variable status bits:

KDNP1 Flag / IIN | Status bit
Restart | NT Bit
Remote forced | SB Bit
Local forced | SB Bit
Rollover | OV Bit
IIN.1.4 Need time | Time-inval Bit

Time synchronization

The driver supports time synchronization of Outstations with the time of the Master station. If the Outstation reports a need for time synchronization by means of an Internal Indication flag 1.4 an, the driver sends the current system time in accordance with the options for UTC/local time and the LAN time synchronization.

Ensure that the Outstation gets the time from a different source in this case (such as a GPS receiver) and as a result may possibly not send any requirement for time synchronization to the Master. In this case, ensure that the Runtime computer with the KDNP1 Master station is synchronized with the same time source.

Hysteresis

The driver supports hysteresis for spontaneous values (unsolicited responses). Hysteresis is not taken into account by:

  • Values that are received as a response to a read request for an event class
  • Variables that are explicitly read as classless variables

If an identical value, however with a more recent time stamp is received, then this value is sent by the driver as a new value in Runtime.


Driver commands

KDNP1 -> Driver commands

This chapter describes standard functions that are valid for most zenon drivers. Not all functions described here are available for every driver. For example, a driver that does not, according to the data sheet, support a modem connection also does not have any modem functions.

Driver commands are used to influence drivers using zenon; start and stop for example.
The engineering is implemented with the help of function Driver commands. To do this:

  • create a new function
  • select Variables -> Driver commands
  • The dialog for configuration is opened

Parameter

Description

Drivers

Drop-down list with all drivers which are loaded in the project.

Current status

Fixed entry which has no function in the current version.

Driver command

Drop-down list for the selection of the command.
  • Start driver (online mode)

Driver is reinitialized and started.
  • Stop driver (offline mode)

Driver is stopped. No new data is accepted.

Note: If the driver is in offline mode, all variables that were created for this driver receive the status switched off (OFF; Bit 20).

  • Driver in simulation mode

Driver is set into simulation mode.
The values of all variables of the driver are simulated by the driver. No values from the connected hardware (e.g. PLC, bus system, ...) are displayed.
  • Driver in hardware mode

Driver is set into hardware mode.
For the variables of the driver the values from the connected hardware (e.g. PLC, bus system, ...) are displayed.
  • Driver-specific command

Enter driver-specific commands. Opens input field in order to enter a command.
  • Driver - activate set setpoint value

Write set value to a driver is allowed.
  • Driver - deactivate set setpoint value

Write set value to a driver is prohibited.
  • Establish connecton with modem

Establish connection (for modem drivers) Opens the input fields for the hardware address and for the telephone number.
  • Disconnect from modem

Terminate connection (for modem drivers)

Show this dialog in the Runtime

The dialog is shown in Runtime so that changes can be made.

Driver commands in the network

If the computer, on which the driver command function is executed, is part of the zenon network, additional actions are carried out. A special network command is sent from the computer to the project server, which then executes the desired action on its driver. In addition, the Server sends the same driver command to the project standby. The standby also carries out the action on its driver.

This makes sure that Server and Standby are synchronized. This only works if the Server and the Standby both have a working and independent connection to the hardware.


Error analysis

KDNP1 -> Error analysis

Should there be communication problems, this chapter will assist you in finding out the error.

Other topics in this chapter

Analysis tool

Check list


Analysis tool

KDNP1 -> Error analysis -> Analysis tool

All zenon modules such as Editor, Runtime, drivers, etc. write messages to a joint log file. To display them correctly and clearly, use the Diagnosis Viewer program that was also installed with zenon. You can find it under Start/All programs/zenon/Tools 7.50 -> Diagviewer.

zenon driver log all errors in the LOG files. The default folder for the LOG files is subfolder LOG in directory ProgramData, example:

%ProgramData%\COPA-DATA\LOG. LOG files are text files with a special structure.

Attention: With the default settings, a driver only logs error information. With the Diagnosis Viewer you can enhance the diagnosis level for most of the drivers to "Debug" and "Deep Debug". With this the driver also logs all other important tasks and events.

In the Diagnosis Viewer you can also:

  • Follow newly-created entries in real time
  • customize the logging settings
  • change the folder in which the LOG files are saved

Note:

  1. The Diagnosis Viewer displays all entries in UTC (coordinated world time) and not in local time.
  2. The Diagnosis Viewer does not display all columns of a LOG file per default. To display more columns activate property Add all columns with entry in the context menu of the column header.
  3. If you only use Error-Logging, the problem description is in the column Error text. For other diagnosis level the description is in the column General text.
  4. For communication problems many drivers also log error numbers which the PLC assigns to them. They are displayed in Error text or Error code or Driver error parameter (1 and 2). Hints on the meaning of error codes can be found in the driver documentation and the protocol/PLC description.
  5. At the end of your test set back the diagnosis level from Debug or Deep Debug. At Debug and Deep Debug there are a great deal of data for logging which are saved to the hard drive and which can influence your system performance. They are still logged even after you close the Diagnosis Viewer.

attention Attention

In Windows CE errors are not logged per default due to performance reasons.

You can find further information on the Diagnosis Viewer in the Diagnose Viewer manual.


Check list

KDNP1 -> Error analysis -> Check list

Questions and hints for fault isolation:

General troubleshooting

  • Is the PLC connected to the power supply?
  • Analysis with the Diagnosis Viewer:
    -> Which messages are displayed?
  • Are the participants available in the TCP/IP network?
  • Can the PLC be reached via the Ping command?

    Ping: Open command line -> ping < IP address> (e.g. ping 192.168.0.100) -> press Enter.

    Do you receive an answer with a time or a time-out?

  • Can the PLC be reached at the respective port via TELNET?

    Telnet: Command line Enter open, telent <IP address port number> Input (e. g. telnet 192,168,0,100 20000) -> press enter.

    If the monitor turns black and the cursor blinks, a connection could be established.

  • Analysis by using a network monitoring program (Sniffer, e.g. Wireshark, Microsoft Network Monitor / Microsoft Message Analyzer)
  • Are you using the correct cable which is recommended by the manufacturer for the connection between the PLC and the PC?
  • Did you select the right COM port?
  • Do the communication parameters match (Baud rate, parity, start/stop bits,...)?
  • Is the COM port blocked by another application?
  • Did you configure the Net address in the address properties of the variable correctly?
    • Does the addressing match with the configuration in the driver dialog?
    • Does the net address match the address of the target station?
  • Did you use the right object type for the variable?

    Example: Driver variables are purely statistics variables. They do not communicate with the PLC. (See chapter Driver variable.)

  • Does the offset addressing of the variable match the one in the PLC?

Some variables report INVALID.

  • INVALID bits always refer to a net address.
  • At least one variable of the net address is faulty.

Values are not displayed, numeric values remain empty

Under circumstances, no answer can be received from the PLC for a reading-request.

Driver is not working. Check the:

  • Installation of zenon
  • the driver installation
  • The installation of all components
    -> Pay attention to error messages during the start of the Runtime.

Variables are displayed with a blue dot

The communication in the network is faulty:

  • With a network project:
    Is the network project also running on the server?
  • With a stand-alone project or a network project which is also running on the server:
    Deactivate the property Only read from Standby Server in node Driver connection/Addressing.

Values are displayed incorrectly

Check the information for the calculation in node Value calculation of the variable properties.

Check the configuration of the Outstation, if the desired variation is sent (p. e.: Float with decimal places).

Values are not displayed promptly

Check in the Outstation, if events are generated for the selected values. Also check in which class they are generated. Check the polling of this event class in the driver configuration.

Check the configuration of unsolicited responses in the outstation.

The time stamp of the variable is incorrect.

Check the configuration of the Outstation, to see whether the KDNP1 objects are actually sent with a time stamp. (corresponding variation selected with time stamp.)

Check to see if the Outstation uses local time or UTC and set the option in the driver configuration accordingly,

Check the time of the local computer and the time of the Outstation, including settings for the time zone.

Driver fails occasionally

Analysis with the Diagnosis Viewer:
-> Which messages are displayed?

Check the time-out of the response time in the driver configuration, especially with outstations with many data points and a slow connection.

With Secure Authentication, check whether the pre-shared Update Key in the driver and in the Outstation is identical.