You are on page 1of 14

Application note CODESYS V3.

Building

Automation

WAGO I/O SYSTEM 750


Module Libraries under a CODESYS-V3.x Soft
PLC
Version 1.0.1
2 Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC
WAGO I/O SYSTEM 750

© 2020 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 – 844 1 69

Email: info@wago.com

Online: http://www.wago.com

Technical Support

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


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

Email: 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.

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

Version 1.0.1
Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC 3
WAGO I/O SYSTEM 750 Description

Information about This Documentation

Copyright
This documentation, including all figures and illustrations contained therein, is
subject to copyright protection. Any use of this documentation that infringes upon
the copyright provisions stipulated herein is prohibited. Reproduction, translation,
electronic, photo-technical filing/archiving and any amendments require the written
consent of WAGO Kontakttechnik GmbH & Co. KG, Minden, Germany. Non-
observance will entail the right of claims for damages.
WAGO is a registered trademark of WAGO Verwaltungsgesellschaft mbH.

Number Notation
Table 1: Number Notation
Number System Example Comment
Decimal 100 Normal notation
Hexadecimal 0x64 C notation
Binary '100' In single quotes,
'0110.0100' nibble separated by a period

Font Conventions
Table 2: Font Conventions
Font Type Explanation
italic Names of paths and files are shown in italics, e.g.:
C:\Programs\WAGO-I/O-CHECK
Menu Menu options are shown in bold, e.g.:
Save
> A “greater than” symbol between two names denotes the selection of
a menu option, e.g.:
File > New
Input Names of input or selection fields are shown in bold, e.g.:
Start of measurement range
“Value” Input or selection values are shown in quotation marks, e.g.:
Enter the value “4 mA” under Start of measurement range.
[Button] Button labels within the dialogs are shown in bold and enclosed in
square brackets, e.g.:
[Input]
[Key] Key labels on the keyboard are shown in bold and enclosed in square
brackets, e.g.:
[F5]

Symbols

Version 1.0.1
DANGER Warning against personal injury!
Indicates a high-risk, imminently hazardous situation which, if not
avoided, will result in death or serious injury.

DANGER Do not work on components while energized!


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

WARNING Warning against personal injury!


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

CAUTION Warning against personal injury!


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

NOTICE Warning against damage to property!


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

ESD Warning against damage to property caused by electrostatic


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

Note Important note!


Indicates a potential malfunction, but one which will not result in damage
to property if not avoided.

Information Additional Information


Refers to additional information which is not an integral part of this
documentation (e.g., the Internet).
Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC 5
WAGO I/O SYSTEM 750 Description

Legal Principles

Subject to Change
WAGO Kontakttechnik GmbH & Co. KG reserves the right to make any
alterations or modifications that serve the purpose of technical progress. WAGO
Kontakttechnik GmbH & Co. KG owns all rights arising from granting patents or
from the legal protection of utility patents. Third-party products are always
mentioned without any reference to patent rights. Thus, the existence of such
rights cannot be excluded.

Personnel Qualification
The use of the product described in this document is exclusively geared to
specialists having qualifications in PLC programming, electrical specialists or
persons instructed by electrical specialists who are also familiar with the
appropriate current standards.

Moreover, the persons named here must also be familiar with all of the products
cited in this document, along with the operating instructions. They must also be
capable of correctly predicting any hazards which may not arise until the products
are combined.

WAGO Kontakttechnik GmbH & Co. KG assumes no liability resulting from


improper action and damage to WAGO products and third-party products due to
non-observance of the information contained in this document.

Limitation of Liability
This documentation describes the use of various hardware and software
components in specific example applications. The components may represent
products or parts of products from different manufacturers. The respective
operating instructions from the manufacturers apply exclusively with regard to
intended and safe use of the products. The manufacturers of the respective
products are solely responsible for the contents of these instructions.

The sample applications described in this documentation represent concepts, that


is, technically feasible applications. Whether these concepts can actually be
implemented depends on various general conditions. For example, different
versions of the hardware or software components may require different handling
than that described here. Therefore, the descriptions contained in this
documentation do not form the basis for assertion of a particular product
characteristic.

Responsibility for safe use of a specific software or hardware configuration lies


with the party that produces or operates the configuration. This also applies if one
of the concepts described in this document was used for implementation of the
configuration.

WAGO Kontakttechnik GmbH & Co. KG assumes no liability for the realization
of these concepts.

Version 1.0.1
Table of Contents
Table of Contents................................................................................................... 6
1 Description .................................................................................................... 7
2 Components Used......................................................................................... 7
2.1 Required Libraries ......................................................................................... 7
2.2 Devices ........................................................................................................... 7
2.3 Tools .............................................................................................................. 7
3 Setup .............................................................................................................. 8
4 Library Installation ..................................................................................... 9
5 General Adaptations .................................................................................. 11
5.1 Declaration section....................................................................................... 11
5.2 Program code ............................................................................................... 11
6 Sample Program......................................................................................... 12
6.1 WagoAppPowerMeasurement example....................................................... 12
6.2 General example .......................................................................................... 13
Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC 7
WAGO I/O SYSTEM 750 Description

1 Description
This Application Note describes the use of the library for special modules, such as
the 750-494 module and the “WagoAppPowerMeasurement” library together with
a Soft PLC from 3S.
Transfer takes place in the same manner as for all other modules and libraries in the
package.

2 Components Used
2.1 Required Libraries
Library Description

WagoAppPowerMeasurement Library for power measurement modules

WagoAuxModbus_3S_SoftPLC Modbus® Communication

WagoSysModuleBase System services for I/O modules

WagoSysModule_75x_yyy System services for special module

WagoTypesModule_75x_yyy System services for special module

WagoSysFieldbusModule System services for modules on the coupler

WagoSysFieldbusService System services for the coupler

2.2 Devices
Supplier Quantity Designation Item No.

1 PC
WAGO 1 Power measurement module 750-494
WAGO 1 Power measurement module 750-495
WAGO 1 Digital output 750-502
WAGO 1 Coupler 750-342
WAGO 2 End module 750-600

2.3 Tools
Designation Item No.

CODESYS-V3.x 32-bit Soft PLC

Version 1.0.1
3 Setup
Note Observe CODESYS Version
This function is possible only with a 32-bit CODESYS-3.x.
The 64-bit version of the development environment is not supported.

Coupler

PC

Fieldbus
Figure 1: Hardware configuration (Modbus®)

The module is plugged into a WAGO coupler.


The coupler is linked to the SoftPLC via the fieldbus (e.g., Modbus®).
Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC 9
WAGO I/O SYSTEM 750 Library Installation

4 Library Installation
The library package is subdivided into multiple subfolders. These subfolders
contain libraries required for commissioning of the associated WAGO modules.

Always install the contents of the 1_General subfolder in the CODESYS library
repository.

This library repository is called up using menu item Tools > Library repository
or in the Library manager > Library repository. Click on Install “...” to go to
the folder path and then select all “*.compiled-library” files.

Figure 2: Calling up the library repository

Any application folders that may be required can also be added in the same way.

Version 1.0.1
Note Internal libraries
“WagoSys*Internal” placeholder libraries cannot be resolved by the Library
Manager when using a soft PLC.
The PLC program can still be downloaded and started however.

Figure 3: Non-resolvable placeholder libraries


Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC 11
WAGO I/O SYSTEM 750 General Adaptations

5 General Adaptations
5.1 Declaration section
Declaring an instance

An instance of module FbModule_75x_yyy from the WagoSysFieldbusModule


library must be declared for each function block.

yyy stands for the last part of the module name, e.g., 494 for the 750-494 module.

The function blocks from the various libraries are accessed via the I_Port input.
This input must be wired to the instance that has previously been declared.

5.2 Program code


Two methods must be called up within the program code from the
“WagoSysFieldbusModule” library:
FbModule_75x_yyy.setNewPaInputs
FbModule_75x_yyy.getNewPaOutputs

Version 1.0.1
6 Sample Program
Note Fieldbus!
In the sample project the data is retrieved by a Modbus® coupler with the
module ETHERNET_MODBUSMASTER_UDP. Connection of the
fieldbus varies according to the fieldbus being used.

6.1 WagoAppPowerMeasurement example


A sample program that serves as a supplement to this Application note is given
under 11_WagoAppPowerMeasurement.

Linking to Modbus® using WagoAuxModbus

The physical structure corresponds to that in Section 3.

Adaptations using the Library Manager:


1) Add “WagoSysFieldbusModule”.
2) Add “WagoSysFieldbusService”.

Adaptations in the program code:


3) Declare instance. → F2: WagoSysFieldbusModule.FbModule_75x_494;

If a module is installed downstream of a fieldbus coupler, an instance of module


“FbModule_75x_494” or “FbModule_75x_495” must be created from the
“WagoSysFieldbusModule” library. This instance (F2 in the example shown here)
must be provided with the input and output data of the corresponding module. The
methods “SetNewPaInputs” and “GetNewPaOutputs” are used for this.
Application Note CODESYS V3.x – Module Libraries under a CODESYS-V3.x Soft PLC 13
WAGO I/O SYSTEM 750 Sample Program

Figure 4: Methods for processing input and output data

The modules from the “WagoAppPowerMeasurement” library can then operate


using this instance name.

Figure 5: Object instance

6.2 General example


Note Libraries!
All libraries have been initially integrated in the sample project. It is
recommended to install all the libraries of a package, as otherwise all non-
required libraries must be deleted in the Library Manager.

The “General_example_3S_SoftSPS.project” project is based on the example for


module 750-494. Transfer takes place in the same manner as for all other libraries
in the package.

Version 1.0.1
WAGO Kontakttechnik GmbH & Co. KG
PO Box 2880 • D-32385 Minden
Hansastraße 27 • D-32423 Minden
Phone: +49 (0) 571/8 87 – 0
Fax: +49 (0) 571/8 87 – 844 1 69
Email: info@wago.com
Web: http://www.wago.com

You might also like