Sunteți pe pagina 1din 36

Library Description

WAGO-Software
CODESYS Library
WAGO_DPS_01.lib
for linking to PROFIBUS

Version 1.0.0
2 WAGO-Software
WAGO_DPS_01.lib CODESYS Library

© 2015 by WAGO Kontakttechnik GmbH & Co. KG


All rights reserved.

WAGO Kontakttechnik GmbH & Co. KG

Hansastraße 27
D-32423 Minden

Phone: +49 (0) 571/8 87 – 0


Fax: +49 (0) 571/8 87 – 1 69

E-Mail: info@wago.com

Web: http://www.wago.com

Technical Support

Phone: +49 (0) 571/8 87 – 5 55


Fax: +49 (0) 571/8 87 – 85 55

E-Mail: support@wago.com

Every conceivable measure has been taken to ensure the accuracy and
completeness of this documentation. However, as errors can never be fully
excluded, we always appreciate any information or suggestions for improving the
documentation.

E-Mail: documentation@wago.com

We wish to point out that the software and hardware terms as well as the
trademarks of companies used and/or mentioned in the present manual are
generally protected by trademark or patent.

Library Description
Version 1.0.0
WAGO-Software Table of Contents 3
WAGO_DPS_01.lib CODESYS Library

Table of Contents
1 Notes about this Documentation ................................................................. 4
1.1 Copyright................................................................................................... 4
1.2 Symbols ..................................................................................................... 5
1.3 Number Notation ....................................................................................... 7
1.4 Font Conventions ...................................................................................... 7
2 WAGO_DPS_01.lib ..................................................................................... 8
2.1 Troubleshooting ........................................................................................ 9
2.2 DPS_GET_DEV_STATE ....................................................................... 11
2.3 DPS_GET_SYS_DIAG .......................................................................... 13
2.4 DPS_SEND_DIAG ................................................................................. 15
2.5 DPS_SET_ID_REL_DIAG..................................................................... 17
2.6 DPS_SET_MOD_STAT_DIAG ............................................................. 19
2.7 DPS_SET_CHAN_REL_DIAG ............................................................. 21
2.8 DPS_SET_STATUS_MSG..................................................................... 24
2.9 DPS_SET_ALARM ................................................................................ 27
2.10 DPS_SET_IM_DS .................................................................................. 30
2.11 DPS_GET_IM_DS .................................................................................. 32
List of Tables ........................................................................................................ 34

Library Description
Version 1.0.0
4 Notes about this Documentation WAGO-Software
WAGO_DPS_01.lib CODESYS Library

1 Notes about this Documentation


1.1 Copyright
This Manual, including all figures and illustrations, is copyright-protected. Any
further use of this Manual by third parties that violate pertinent copyright
provisions is prohibited. Reproduction, translation, electronic and phototechnical
filing/archiving (e.g., photocopying) as well as any amendments require the
written consent of WAGO Kontakttechnik GmbH & Co. KG, Minden, Germany.
Non-observance will involve the right to assert damage claims.

Library Description
Version 1.0.0
WAGO-Software Notes about this Documentation 5
WAGO_DPS_01.lib CODESYS Library

1.2 Symbols

Personal Injury!
Indicates a high-risk, imminently hazardous situation which, if not avoided, will
result in death or serious injury.

Personal Injury Caused by Electric Current!


Indicates a high-risk, imminently hazardous situation which, if not avoided, will
result in death or serious injury.

Personal Injury!
Indicates a moderate-risk, potentially hazardous situation which, if not avoided,
could result in death or serious injury.

Personal Injury!
Indicates a low-risk, potentially hazardous situation which, if not avoided, may
result in minor or moderate injury.

Damage to Property!
Indicates a potentially hazardous situation which, if not avoided, may result in
damage to property.

Damage to Property Caused by Electrostatic Discharge (ESD)!


Indicates a potentially hazardous situation which, if not avoided, may result in
damage to property.

Important Note!
Indicates a potential malfunction which, if not avoided, however, will not result in
damage to property.

Library Description
Version 1.0.0
6 Notes about this Documentation WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Additional Information:
Refers to additional information which is not an integral part of this
documentation (e.g., the Internet).

Library Description
Version 1.0.0
WAGO-Software Notes about this Documentation 7
WAGO_DPS_01.lib CODESYS Library

1.3 Number Notation


Table 1: Number Notation
Number Code Example Note
Decimal 100 Normal notation
Hexadecimal 0x64 C notation
Binary '100' In quotation marks, nibble separated with
'0110.0100' dots (.)

1.4 Font Conventions


Table 2: Font Conventions
Font Type Indicates
italic Names of paths and data files are marked in italic-type.
e.g.: C:\Program Files\WAGO Software
Menu Menu items are marked in bold letters.
e.g.: Save
> A greater-than sign between two names means the selection of a
menu item from a menu.
e.g.: File > New
Input Designation of input or optional fields are marked in bold letters,
e.g.: Start of measurement range
“Value” Input or selective values are marked in inverted commas.
e.g.: Enter the value “4 mA” under Start of measurement range.
[Button] Pushbuttons in dialog boxes are marked with bold letters in square
brackets.
e.g.: [Input]
[Key] Keys are marked with bold letters in square brackets.
e.g.: [F5]

Library Description
Version 1.0.0
8 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

2 WAGO_DPS_01.lib
The “WAGO_DPS_01.lib” library provides PROFIBUS-specific functions for the
CODESYS application.

Table 3: Overview of Functions and Function Blocks


Category Label Description
DPS_GET_DEV_STATE Returns the current status of the DPS
device driver
DPS_GET_SYS_DIAG Returns the current information on the
WAGO system diagnostics
DPS_SEND_DIAG Sends the PROFIBUS diagnostics
telegram managed by diagnostics
management to the DP master. Calls the
current sending status
Diagnostics DPS_SET_ID_REL_ Sets or deletes a slot diagnosis in the ID-
DIAG based diagnostics object
DPS_SET_MOD_STAT_ Sets or deletes a slot diagnosis in the
DIAG module status diagnostics object.
DPS_SET_CHAN_REL_ Generates or deletes a channel
DIAG diagnostics object
DPS_SET_STAT_MSG Generates or deletes a user-defined status
message
DPS_SET_ALARM Generates or deletes an alarm object
Identificati DPS_SET_IM_DS Writes and saves the defined I&M data
on and set (I&M1-4) at the PROFIBUS interface
maintenanc DPS_GET_IM_DS Reads the defined I&M data set (I&M1
e (I&M) … -4) from the PROFIBUS interface

All functions and function blocks are non-blocking. This means that the maximum
time for calling up a function or a function block depends on the internal capacity
and loading of the device and not on the reaction time of the peripheral devices
(e.g., DP master confirmation for PROFIBUS alarms).

Note Only assign slot numbers that have actually been programmed for the
“SLOT” input parameter!
When programming the “SLOT” input parameter, only slot numbers which
have actually been configured may be assigned.
This applies to all function blocks of the “WAGO_DPS_01.lib” library
which have a “SLOT” input variable.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 9
WAGO_DPS_01.lib CODESYS Library

2.1 Troubleshooting
Each CODESYS function from this library supplies after execution the following
return values for further troubleshooting:

• The return value of the function indicates whether the function call was
executed error-free. The data type of the return value is “BOOL,” for which
the value “FALSE” stands for error-free processing and “TRUE” for a
faulty processing.

• A status value is also returned in order to define the cause of faulty


execution more precisely. This is exchanged via the “STATUS” parameter.

The following table shows the possible status values that apply to each function in
this library. All status values not listed in this table indicate an internal system
error. In this case, contact WAGO Support stating the status value and the action
performed.

Table 4: Overview of Status Values


Status value Description Remedy
0x0000000 Function was executed error- --
free.
0xC000000 An unknown error has occurred. Contact the WAGO Support.
0xC000003 The operations of the function Check the order of the function
were called in the incorrect calls.
order.
0xC000005 The requested data is not Check the order and parameters
available. for the function call.
0xC000006 The parameters transferred to the Check the parameters for the
function are invalid. function call.
0xC000008 The specified data length is Check the parameters for the
invalid. function call.
0xC00000A Access to the specified data was Check the parameters for the
denied. function call.
This can occur if a function of
this library is used without the
PROFIBUS functionality in
operation.
0xC00000D The specified I&M data set is not Check the parameters for the
supported. function call.
0xC00000E The requested resource is Repeat the function call at a later
assigned. time.
0xC000011 The transferred parameters are Check the parameters for the
invalid. function call.
0xC000012 No free memory available. Release memory via the
appropriate step (e.g., by deleting
diagnostics objects).

Library Description
Version 1.0.0
10 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Table 4: Overview of Status Values


Status value Description Remedy
0xC000013 The specified slot is invalid. Restrict the slot specification to
the limiting values stated in the
device manual.
0xC000014 The specified channel is invalid. Check the parameters for the
0xC000015 The stated “Specifier” parameter function call.
for the “Status message” Note the description of the
diagnostics object is invalid. relevant diagnostics object in the
0xC000016 The specified “Channel Type” device manual.
parameter for the “Channel-
based diagnostics” diagnostics
object is invalid.
0xC000017 The specified “Channel Size”
parameter for the “Channel-
based diagnostics” diagnostics
object is invalid.
0xC000018 The specified “Error Type”
parameter for the “Channel-
based diagnostics” diagnostics
object is invalid.
0xC000019 The specified “Alarm Type”
parameter for the “Channel-
based diagnostics” diagnostics
object is invalid.
0xC00001A The specified “Alarm Specifier”
parameter for the “Channel-
based diagnostics” diagnostics
object is invalid.
0xC00001B The specified “Module Status”
parameter for the “Channel-
based diagnostics” diagnostics
object is invalid.
0xC00001E The specified diagnostics object Repeat the action performed at a
is in the wrong state. later time.
0xC000027 The specified “Status Type” Check the parameters for the
parameter for the “Channel- function call.
based diagnostics” diagnostics Note the description of the
object is invalid. relevant diagnostics object in the
device manual.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 11
WAGO_DPS_01.lib CODESYS Library

2.2 DPS_GET_DEV_STATE
The “DPS_GET_DEV_STATE” function enables the current state of the
PROFIBUS interface to be called.

Category Diagnostics
Name DPS_GET_DEV_STATE
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call
DEV_STATE BYTE Current state of the PROFIBUS
interface

Output parameter
Name Data Type Description
DPS_GET_DEV_ BOOL Status of function execution (see
STATE Section “Troubleshooting”):
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Time referenced behavior


After the function is called error-free, the “DEV_STATE” parameter returns the
actual state of the PROFIBUS interface.

Library Description
Version 1.0.0
12 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Description
The states are coded as follows:
Status Value Description
0 The PROFIBUS interface is not initialized.
1 The PROFIBUS interface is waiting for configuration data from
CODESYS.
2 The PROFIBUS-C0 channel is being opened.
3 The PROFIBUS-C0 channel is open.
4 The actual configuration is being processed.
5 The PROFIBUS-C2 channel is being opened.
6 The PROFIBUS-C0 channel is being started.
7 The PROFIBUS interface is waiting for valid PROFIBUS
parameter data.
8 The PROFIBUS interface is waiting for modified PROFIBUS
parameters or configuration data.
9 The PROFIBUS interface is waiting for valid PROFIBUS
configuration data.
10 The PROFIBUS interface is performing a check of the target and
actual configuration.
11 The PROFIBUS parameters are being processed.
12 The PROFIBUS process data exchange is being started.
13 The PROFIBUS process data exchange is being monitored.
14 The PROFIBUS-C0 channel is being stopped.
15 The processing of the active diagnostics objects (e.g., alarms) is
being aborted.
16 The PROFIBUS-C0 channel is being closed.
17 The PROFIBUS-C2 channel is being closed.
18 The PROFIBUS interface is being closed.
19
The PROFIBUS interface is in an error state.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 13
WAGO_DPS_01.lib CODESYS Library

2.3 DPS_GET_SYS_DIAG
The “DPS_GET_SYS_DIAG” function enables the calling of the current
information of the WAGO system diagnostics.

Category Diagnostics
Name DPS_GET_SYS_DIAG
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call
SLOT BYTE Specifies the slot information of
the diagnostics
CODE BYTE Error code
ARG BYTE Error argument
ETX_ARG BYTE Extended error argument

Output parameter
Name Data Type Description
DPS_GET_SYS_DIAG BOOL Status of function execution (see
Section “Troubleshooting”):
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Library Description
Version 1.0.0
14 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Time referenced behavior


After the error-free call of the function, the “SLOT,” “CODE,” “ARG” and
“EXT_ARG” parameters provide the current information of the WAGO system
diagnostics.

Description
A detailed description of the individual parameters of the WAGO system
diagnostics is available in the device manual.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 15
WAGO_DPS_01.lib CODESYS Library

2.4 DPS_SEND_DIAG
The “DPS_SEND_DIAG” function enables the PROFIBUS diagnostics telegram
managed by the PROFIBUS diagnostics management to be sent to the DP master.

Category Diagnostics
Name DPS_SEND_DIAG
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
REQ BOOL Controls the send operation:
TRUE Starts the sending of the
station diagnostics
FALSE Only call of the status of
the send operation

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call
BUSY BOOL Returns the state of the send
operation:
TRUE Send operation running.
FALSE Send operation
completed.
DONE BOOL Returns the state of the send
operation:
TRUE Send operation
completed.
FALSE Send operation running.
DIAG_OVFL BOOL Indicates an overflow of the
diagnostic data:
TRUE More diagnostics data
present than fits in the
diagnostics data area
available.
FALSE The diagnostics data fits
in the diagnostics data
area available.

Library Description
Version 1.0.0
16 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Output parameter
Name Data Type Description
DPS_SEND_DIAG BOOL Status of function execution (see
Section “Troubleshooting”):
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 17
WAGO_DPS_01.lib CODESYS Library

2.5 DPS_SET_ID_REL_DIAG
The “DPS_SET_ID_REL_DIAG” function enables a group error to be set in the
ID-based diagnostics object for the defined slot. The diagnostics management of
the PROFIBUS interface takes over the management of the diagnostics object.

Category Diagnostics
Name DPS_SET_ID_REL_DIAG
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
SLOT USINT Slot at which the error state is to
be changed. *
ERR_FLAG BOOL Error state of the slot:
TRUE Error present.
FALSE No error present.
* The valid value range of this parameter is provided in the description of this
diagnostics object in the manual of the relevant device.

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)

Output parameter
Name
PS_SET_ID_REL_ Data Type Description
IAG
BOOL Status of function execution (see
Section “Troubleshooting”):
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Library Description
Version 1.0.0
18 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Graphical illustration

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 19
WAGO_DPS_01.lib CODESYS Library

2.6 DPS_SET_MOD_STAT_DIAG
The “DPS_SET_MOD_STAT_DIAG” function enables diagnostics to be
controlled in the module status diagnostics object for a defined slot. The
diagnostics management in the PROFIBUS interface takes over the management
of the diagnostics object.

Category Diagnostics
Name DPS_SET_MOD_STAT_DIAG
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
SLOT USINT Slot at which the error state is to
be changed.
MOD_STAT BYTE Error state of the slot:
0x00 Data valid
0x01 Data invalid
0x10 Incorrect fieldbus
variable
0x11 No fieldbus variable

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)

Output parameter
Name Data Type Description
DPS_SET_MOD_ BOOL Status of function execution (see
STAT_DIAG Section “Troubleshooting”):
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Library Description
Version 1.0.0
20 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Graphical illustration

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 21
WAGO_DPS_01.lib CODESYS Library

2.7 DPS_SET_CHAN_REL_DIAG
The “DPS_SET_CHAN_REL_DIAG” function enables a channel diagnostics
object to be generated or deleted for the defined slot and channel. The diagnostics
management in the PROFIBUS interface takes over the management of the
diagnostics object.

Category Diagnostics
Name DPS_SET_CHAN_REL_DIAG
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
REQ BOOL Controls the processing of the
diagnostics object:
TRUE Processing is started
according to the
“SET_DIAG”
parameter.
FALSE The “BUSY” and
“DONE” parameters are
updated.
SET_DIAG BOOL Controls the processing of the
diagnostics object:
TRUE Diagnostics object is
created. The
identification number of
the new diagnostics
object is output at the
“DIAG_ID” output.
FALSE Diagnostics object is
being deleted. The
identification number of
the diagnostics object to
be deleted must be
specified at the
“DIAG_ID” input.

Library Description
Version 1.0.0
22 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

SLOT BYTE Specifies the slot information in


the diagnostics object.*
CHAN BYTE Specifies the channel number in
the diagnostics object.*
CHAN_TYPE BYTE Specifies the channel type in the
diagnostics object.*
CHAN_SIZE BYTE Specifies the channel size in the
diagnostics object.*
ERR_TYPE BYTE Specifies the error type in the
diagnostics object.*
* The valid value range of this parameter is provided in the description of this
diagnostics object in the manual of the relevant device.

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)
BUSY BOOL Returns the current sending status:

TRUE Diagnostics object was


not yet sent.
FALSE Diagnostics object was
sent.
DONE BOOL Returns the current sending status:

TRUE Diagnostics object was


sent.
FALSE Send operation running.
DIAG_ID DWORD Identification of the diagnostics
object.
The identification number of a
diagnostics object is returned here
when it is created.
When a diagnostics object is
deleted, the associated
identification number must be
transferred here.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 23
WAGO_DPS_01.lib CODESYS Library

Output parameter
Name Data Type Description
DPS_SET_MOD_ BOOL State of the function execution
STAT_DIAG (see Section “Troubleshooting”)
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Description
The created diagnostics object is a fixed part of the station diagnostics until it is
deleted again.
If a diagnostics object is successfully created with the object parameters, a
diagnostics ID is returned at the “DIAG_ID” output.
This diagnostics ID must be specified at the “DIAG_ID” input in order to query
the state of the diagnostics object or delete it. This does not require the
specification of the object parameters.
A maximum of 64 diagnostics objects can be managed simultaneously by the
diagnostics management.

Library Description
Version 1.0.0
24 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

2.8 DPS_SET_STATUS_MSG
The “DPS_SET_STATUS_MSG” function enables a user-specific status message
to be generated or deleted. The diagnostics management in the PROFIBUS
interface takes over the management of the diagnostics object.

Category Diagnostics
Name DPS_SET_STATUS_MSG
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
REQ BOOL Controls the processing of the
diagnostics object:
TRUE Processing is started
according to the
“SET_DIAG”
parameter.
FALSE The “BUSY” and
“DONE” parameters are
updated.
SET_DIAG BOOL Controls the processing of the
diagnostics object:
TRUE Diagnostics object is
created. The
identification number of
the new diagnostics
object is output at the
“DIAG_ID” output.
FALSE Diagnostics object is
being deleted. The
identification number of
the diagnostics object to
be deleted must be
specified at the
“DIAG_ID” input.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 25
WAGO_DPS_01.lib CODESYS Library

SLOT BYTE Specifies the slot information in


the diagnostics object.*
STATUS_TYPE BYTE Specifies the type of status
message*
STATUS_SPEC BYTE Specifies the “Specifier” of the
status message
USR_DATA POINTER_TO_ Specifies the pointer to the
BYTE memory area of the user data*
USR_DATA_LEN USINT Specifies the length of the user
data in number of bytes. User-
specific data with a length of up to
4 bytes are supported.
* The valid value range of this parameter is provided in the description of this
diagnostics object in the manual of the relevant device.

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)
BUSY BOOL Returns the current sending status:

TRUE Diagnostics object was


not yet sent.
FALSE Diagnostics object was
sent.
DONE BOOL Returns the current sending status:

TRUE Diagnostics object was


sent.
FALSE Send operation running.
DIAG_ID DWORD Identification of the diagnostics
object.
The identification number of a
diagnostics object is returned here
when it is created.
When a diagnostics object is
deleted, the associated
identification number must be
transferred here.

Library Description
Version 1.0.0
26 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

Output parameter
Name Data Type Description
DPS_SET_STATUS_ BOOL State of the function execution
MSG (see Section “Troubleshooting”)
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Description
The created diagnostics object is a fixed part of the station diagnostics until it is
deleted again.
If a diagnostics object is successfully created with the object parameters, a
diagnostics ID is returned at the “DIAG_ID” output.
This diagnostics ID must be specified at the “DIAG_ID” input in order to query
the state of the diagnostics object or delete it. This does not require the
specification of the object parameters.
A maximum of 32 diagnostics objects can be managed simultaneously by the
diagnostics management. The length of the user data must not exceed 4 bytes.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 27
WAGO_DPS_01.lib CODESYS Library

2.9 DPS_SET_ALARM
The “DPS_SET_ALARM” function block enables PROFIBUS alarms to be
entered in the alarm memory of the diagnostics management. The diagnostics
management in the PROFIBUS interface takes over the management of the
diagnostics object.

Category Diagnostics
Name DPS_SET_ALARM
Type Function Block
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
REQ BOOL Controls the processing of the
diagnostics object:
TRUE Processing is started
according to the
“SET_DIAG”
parameter.
FALSE The “BUSY” and
“DONE” parameters are
updated.
SET_DIAG BOOL Controls the processing of the
diagnostics object:
TRUE Diagnostics object is
created. The
identification number of
the new diagnostics
object is output at the
“DIAG_ID” output.
FALSE Diagnostics object is
being deleted. The
identification number of
the diagnostics object to
be deleted must be
specified at the
“DIAG_ID” input.

Library Description
Version 1.0.0
28 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

SLOT BYTE Specifies the slot information in


the diagnostics object.*
ALARM_TYPE BYTE Specifies the type of the alarm
ALARM_SPEC BYTE Specifies the “Specifier” of the
alarm*
USR_DATA POINTER_TO_ Specifies the pointer to the
BYTE memory area of the user data*
USR_DATA_LEN USINT Specifies the length of the user
data in number of bytes. User-
specific data with a length of up to
4 bytes are supported.
* The valid value range of this parameter is provided in the description of this
diagnostics object in the manual of the relevant device.

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)
BUSY BOOL Returns the current sending status:

TRUE Diagnostics object was


not yet sent.
FALSE Diagnostics object was
sent.
DONE BOOL Returns the current sending status:

TRUE Diagnostics object was


sent.
FALSE Send operation running.
DIAG_ID DWORD Identification of the diagnostics
object.
The identification number of a
diagnostics object is returned here
when it is created.
When a diagnostics object is
deleted, the associated
identification number must be
transferred here.

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 29
WAGO_DPS_01.lib CODESYS Library

Output parameter
Name Data Type Description
DPS_SET_ALARM BOOL State of the function execution
(see Section “Troubleshooting”)
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Description
If the “SEND_DIAG” function block is called, all alarms waiting in the alarm
memory are also transferred to the DP master.
If a diagnostics object is successfully created with the object parameters, a
diagnostics ID is returned at the “DIAG_ID” output. This diagnostics ID must be
specified at the “DIAG_ID” input in order to query the state of the diagnostics
object or delete it. This does not require the specification of the object parameters.
A maximum of 32 diagnostics objects can be managed simultaneously by the
diagnostics management. The length of the user data must not exceed 4 bytes.

Library Description
Version 1.0.0
30 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

2.10 DPS_SET_IM_DS
The “DPS_SET_IM_DS” function enables the data of the defined I&M data set to
be written.

Category Identification and maintenance (I&M)


Name DPS_SET_IM_DS
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
DS_ID USINT Specifies the number of the I&M
data set. The data sets 0 to 4 are
supported.
DATA POINTER_TO_ Specifies the pointer to the
BYTE memory area of the data set data

Input/output parameter
Name Data Type Description
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)

Output parameter
Name Data Type Description
DPS_SET_IM_DS BOOL Status of function execution (see
Section “Troubleshooting”):
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 31
WAGO_DPS_01.lib CODESYS Library

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Description
The write access is only possible to I&M data sets 1 to 4. When the function is
called, 64 bytes of data are always written from the defined memory to the I&M
data set.

Library Description
Version 1.0.0
32 WAGO_DPS_01.lib WAGO-Software
WAGO_DPS_01.lib CODESYS Library

2.11 DPS_GET_IM_DS
The “DPS_GET_IM_DS” function enables the data of the defined I&M data set to
be read and stored in the defined memory area.

Category Identification and maintenance (I&M)


Name DPS_GET_IM_DS
Type Function
Name of library WAGO_DPS_01.lib
Required libraries ---
Applicable to 750-8206

Input parameter
Name Data Type Description
DS_ID USINT Specifies the number of the I&M
data set. The data sets 0 to 4 are
supported.

Input/output parameter
Name Data Type Description
DATA POINTER_TO_ Specifies the pointer to the
BYTE memory area for the data set data.
STATUS DWORD Detailed identification of a faulty
function call (see Section
“Troubleshooting”)

Output parameter
Name Data Type Description
DPS_GET_IM_DS BOOL State of the function execution
(see Section “Troubleshooting”)
TRUE An error occurred during
the function call.
See the “STATUS”
output parameter for the
detailed identification of
the error.
FALSE The function call was
executed error-free.

Graphical illustration

Library Description
Version 1.0.0
WAGO-Software WAGO_DPS_01.lib 33
WAGO_DPS_01.lib CODESYS Library

Time referenced behavior


After the function is called error-free, all output parameters return the current
values.

Description
The data length of the target memory must be at least 64 bytes in size.

Library Description
Version 1.0.0
34 List of Tables WAGO-Software
WAGO_DPS_01.lib CODESYS Library

List of Tables
Table 1: Number Notation ....................................................................................... 7
Table 2: Font Conventions ...................................................................................... 7
Table 3: Overview of Functions and Function Blocks ............................................ 8
Table 4: Overview of Status Values ........................................................................ 9

Library Description
Version 1.0.0
WAGO-Software 35
WAGO_DPS_01.lib CODESYS Library

Library Description
Version 1.0.0
WAGO Kontakttechnik GmbH & Co. KG
Postfach 2880 • D-32385 Minden
Hansastraße 27 • D-32423 Minden
Phone: +49/5 71/8 87 – 0
Fax: +49/5 71/8 87 – 1 69
E-Mail: info@wago.com

Internet: http://www.wago.com

S-ar putea să vă placă și