Wago IO Pro Manual
Wago IO Pro Manual
Wago IO Pro Manual
WAGO-I/O-PRO 32
n t
e
u m
o c
D
ed
iv
h
User Manual
r c
Installation, Programm Development,
Test and Start-up Functions
A
759-122/000-002
Version 1.0
Copyright ã 2000, by WAGO Kontakttechnik GmbH
All rights reserved.
t
Germany
n
Information: Support:
e
Tel.: +49 (0) 571/8 87 – 0 Tel.: +49 (0) 571/8 87 – 5 55
Fax: +49 (0) 571/8 87 - 1 69 Fax: +49 (0) 571/8 87 - 4 30
E-mail: info@wago.com E-mail: support@wago.com
m
Web: http://www.wago.com
c u
o
D
ed
iv
ch
Ar Every conceivable measure has been taken to ensure the correctness and
completeness of this documentation. However, as errors can never be fully
excluded we would appreciate any information or ideas at any time.
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 trademark or patent protected.
Contents
Contents
1 General
n t 1-1
e
Component Parts of the IEC 61131-3 Programming Tool................................................. 1-1
Legal Stipulation ................................................................................................................ 1-1
m
Symbols.............................................................................................................................. 1-2
Start .................................................................................................................................... 1-3
u
System Requirements ............................................................................................... 1-3
Set-up........................................................................................................................ 1-4
c
Uninstall.................................................................................................................... 1-4
Start........................................................................................................................... 1-5
o
Latest Informaten on WAGO-I/O-PRO 32 V2.1 ...................................................... 1-6
Important Information ........................................................................................................ 1-7
D
2 WAGO-I/O-PRO 32 2-1
d
A Brief Introduction to WAGO-I/O-PRO 32..................................................................... 2-1
What is WAGO-I/O-PRO 32.................................................................................... 2-1
e
Overview of WAGO-I/O-PRO 32 Functions ........................................................... 2-1
Project Components ........................................................................................................... 2-2
v
Languages......................................................................................................................... 2-12
i
Instruction List (IL)................................................................................................. 2-12
Structured Text (ST ................................................................................................ 2-13
h
Sequential Function Chart (SFC)............................................................................ 2-20
c
Function Block Diagram (FBD) ............................................................................. 2-26
Ladder Diagram (LD) ............................................................................................. 2-26
r
Debugging, Online Functions .......................................................................................... 2-28
The Standard .................................................................................................................... 2-30
A
3 We Write a Little Program 3-1
WAGO-I/O-PRO 32 iii
Contens
t
5 Editors in WAGO-I/O-PRO 32 5-1
n
The Declaration Editor ....................................................................................................... 5-1
The Text Editors................................................................................................................. 5-8
e
The Instruction List Editor...................................................................................... 5-12
The Editor for Structured Text ............................................................................... 5-13
The Graphic Editors ......................................................................................................... 5-14
m
The Function Block Diagram Editor ...................................................................... 5-16
The Ladder Editor................................................................................................... 5-22
u
The Sequential Function Chart Editor .................................................................... 5-28
The Continuous Function Chart Editor (CFC) ....................................................... 5-36
6 The Resources
o c
Overview of the Resources ................................................................................................ 6-1
6-1
D
Global Variables................................................................................................................. 6-1
Global Variables ....................................................................................................... 6-2
Variable Configuration ............................................................................................. 6-3
d
Document Frame ...................................................................................................... 6-4
PLC Configuration ............................................................................................................. 6-6
e
Task Configuration............................................................................................................. 6-6
Sampling Trace .................................................................................................................. 6-9
iv
Watch and Receipt Manager ............................................................................................ 6-16
h
7 Library Manager 7-1
c
Library Manager................................................................................................................. 7-1
8 Visualization
A r 8-1
iv WAGO-I/O-PRO 32
Contents
t
Standard Data types.......................................................................................................... 11-1
n
Defined Data Types.......................................................................................................... 11-4
e
12 IEC Operators 12-1
m
IEC Operators................................................................................................................... 12-1
Bitstring Operators ........................................................................................................... 12-3
u
Bit-Shift Operators ........................................................................................................... 12-5
Selection Operators .......................................................................................................... 12-8
c
Comparison Operators ................................................................................................... 12-10
Address Operators .......................................................................................................... 12-12
o
Calling Operator............................................................................................................. 12-13
Type Conversion Functions ........................................................................................... 12-13
Numeric Functions ......................................................................................................... 12-18
D 13-1
d
String Functions ............................................................................................................... 13-1
e
Bistable Function Blocks ................................................................................................. 13-5
Trigger.............................................................................................................................. 13-6
v
Counter............................................................................................................................. 13-8
i
Timer .............................................................................................................................. 13-10
h
14 The UTIL.LIB Library 14-1
r c
BCD conversion ............................................................................................................... 14-1
Bit/byte functions ............................................................................................................. 14-2
A
Mathematical help functions ............................................................................................ 14-3
Controllers........................................................................................................................ 14-4
Signal generators .............................................................................................................. 14-6
Function manipulators...................................................................................................... 14-7
Analogue value processing............................................................................................... 14-9
WAGO-I/O-PRO 32 v
Contens
t
Error messages ................................................................................................................. 17-1
n
18 Quick Start 18-1
e
m
19 Compliance List 19-1
c u
Appendix A: Additional Libraries A-1
o
Installation..........................................................................................................................A-1
Contens...............................................................................................................................A-3
Additional Libraries .................................................................................................................
D B-1
d
Installation..........................................................................................................................B-1
e
Contens...............................................................................................................................B-3
Communication Drivers ...........................................................................................................
iv
20 Bibliography 20-1
21 Glossary
ch 21-1
22 Index
A r 22-1
vi WAGO-I/O-PRO 32
Chapter 1 - General
1 General
Component Parts of the IEC 61131-3 Programming Tool
t
The IEC 61131-3 Programming Tool comprises of the following components:
n
• 1 pc user manual, WAGO-I/O-PRO 32, Item number: 759-122/000-002
English
e
• 1 pc communication cable Item number: 750-920
• 1 pc CD rom
• 1 pc Software Licence Agreement
m
= IEC 61131-3 Programming Tool Item number: 759-330/000-002
c u
Legal Stipulation
o
D
This manual including all of its illustrations is copyrighted, deviations from the
copyright stipulations are strictly prohibited. Reproduction, translation as well
d
as electronic and photographic archiving or changes require the written
e
approval of WAGO Kontakttechnik GmbH. Non observance will result in
claims for damage.
v
WAGO Kontakttechnik GmbH reserves all rights for changes or amendments
i
which serve technical progress. All rights for the issuing of patents or the
protection of registered designs are reserved by WAGO Kontakttechnik GmbH.
h
Products of other suppliers are always referred to without reference to patent
c
rights. For this reason the existence of such rights cannot be excluded.
r
The use of the product described in this manual is solely intended for qualified
persons trained in PLC programming, qualified electricians or persons
instructed by qualified electricians who are also familiar with the applicable
A
standards and directives. WAGO Kontakttechnik GmbH declines all liability
for faulty operation and damages to WAGO products and products from other
suppliers resulting from non-observance of the information contained in this
manual.
The components are delivered ex works with a defined hardware and software
configuration for each case of application. Changes are only permitted within
the framework of the possibilities outlined in the manuals. All other changes or
modifications to the hardware or software as well as the use of the components
not conforming with that intended will result in the exclusion from any liability
on the part of WAGO Kontakttechnik GmbH.
WAGO-I/O-PRO 32 1-1
Symbols
Symbols
n t
e
The ATTENTION symbol refers to
m
a) incorrect handling which can result in damage or destruction to
u
the hardware or software
c
b) possible injuries to persons when operating with dangerous
o
peripheral process units.
D
The FINGER symbol describes routines or gives suggestions for
the efficient use of the unit and optimisation of the software.
iv
ch
A r
1-2 WAGO-I/O-PRO 32
Chapter 1 - General
Start
System Requirements
t
Operating system: Microsoft Windows 95 or better
Main memory: Windows 95: 16 MB or
n
Windows NT 4.0: 64 MB
Hard disk storage: recommanded: 10 MB
e
Monitor: VGA or comparable
Mouse: required
m
CD rom drive: required
u
Others: free serial interface, COM 1...4
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 1-3
Start
Set-up
t
case you would like to use another drive, please enter the corresponding letter.
n
To install WAGO-I/O-PRO 32:
e
1. Put the WAGO-I/O-PRO 32-CD in the D drive.
2. In case "Autoplay" is selected in your system the set-up will be started
automatically. Proceed with step 6.
m
If the set-up is not starting automatically please proceed with step 3.
u
3. Select "Execute" in the Windows "Start" menu
c
4. Start the WAGO-I/O-PRO 32 set-up.
5. Enter "D:\setup.exe" (D is the drive with the WAGO-I/O-PRO-32-
o
CD) and start the set-up by clicking on "OK".
6. Select the set-up language.
D
The rest of the set-up is taking place via menus. Please follow the instructions
to complete the set-up. If possible the proposed settings should be adopted.
d
The set-up type will be requested during the set-up.
& Click on "Complete new installation" and confirm with "Next".
v e
Uninstall
c
1. Select "Settings" in the Windows "Start" menu and open "System
control".
r
2. Click on "Software".
A
3. Select WAGO-I/O-PRO 32 in the list and click on "Remove".
4. Click on "Yes" to confirm the removal.
1-4 WAGO-I/O-PRO 32
Chapter 1 - General
Start
Menu "Start"
To start WAGO-I/O-PRO 32 :
t
1. Click on the "Start" symbol in the Windows system tray to open the
"Start" menu.
n
2. Select the "Programs" option in the "Start" menu to open the
"Programs" folder.
e
3. Select "WAGO-I/O-PRO 32*" to open the "WAGO-I/O-PRO 32*"
folder.
m
4. Click on the "WAGO-I/O-PRO 32 English" link to start the
programming system.
c u
o
"My Computer" or
Windows Explorer
D
You can start "WAGO-I/O-PRO 32" using the icon "My Computer" or the
Windows-Explorer. You can find the "WAGO-IO-PRO 32.exe" file on the drive
and in the folder you indicated during the set-up. If you did not change the pre-
d
settings during the set-up you can find the "WAGO-IO-PRO 32.exe" in the
folder:
e
C:\Programs\WAGO-IO-PRO 32\English
v
& Doubleclick on the "WAGO-IO-PRO 32.exe" file or highlight the file
i
and press the <ENTER**> key.
** or CR, ↵
ch
A r
WAGO-I/O-PRO 32 1-5
Start
Menu "Start"
This will provide you with updated information concerning WAGO-I/O-PRO
32. This information resulting from the realisation of projects in practice using
WAGO-I/O-PRO 32 could not be included in the manual at the time of its
t
preparation.
n
README can be started in one of the following manners:
e
1. Click on the "Start" symbol in the Windows task bar in order to open
the "Start" menu.
m
2. Select the "Programs" option in the "Start" menu to be able to open
the "Programs" folder.
u
3. Select "WAGO-I/O-PRO 32*" to open the "WAGO-I/O-PRO 32*"
folder.
c
4. Click on the "Latest Informaten on WAGO-I/O-PRO 32 V2.1" link to
o
open the "Readme_E" file.
* or the name you have selected
D
"My Computer" or
Windows Explorer
d
You can start "Readme_E" by means of the symbol "My Computer" or from
the Windows-Explorers. You will find the file "Readme_E.exe" on the drive
e
and in the folder you have selected during the installation. If you did not change
the preset settings during installation, "Readme_E.exe"will be in:
iv
C:\Programs\WAGO-IO-PRO 32\English
& Double-click on the "Readme_E.exe" file or select the file and press
h
<ENTER**>.
c
** or CR, ↵
A r
1-6 WAGO-I/O-PRO 32
Chapter 1 - General
Important Information
t
Warning!
n
If during a status change from "Run" to "Stop" outputs are still active
(e.g. for motor contactors or valves), they will remain active! Software cut-
e
outs (e.g. by initiators) are then ineffective as the programme is not
processed any more! The change of operation mode takes place internally
at the end of a programme cycle!
Endless loop
u m
c
In the event of a endless loop the outputs deactivate via the Watchdog of the
output terminal blocks. In this case, a communication with the controller is
o
impossible. (To restore communication, switch the supply voltage of the
controller off and on again. You can re-establish the communication by
pressing the function selector. This selector must then be either in the top or
D
central position.)
The Programmer has to ensure that no endless loop can occur!
ed
iv
ch
A r
WAGO-I/O-PRO 32 1-7
Important Information
n t
e
u m
o c
D
ed
iv
ch
Ar
1-8 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
2 WAGO-I/O-PRO 32
A Brief Introduction to WAGO-I/O-PRO 32
t
What is WAGO-I/O-PRO 32
n
WAGO-I/O-PRO 32is a complete development environment for your PLC.
(WAGO-I/O-PRO 32 stands for WAGO-I/O-System-Programming, 32 Bit)
e
WAGO-I/O-PRO 32 puts a simple approach to the powerful IEC language at
the disposal of the PLC programmer. Use of the editors and debugging
m
functions is based upon the proven development program environments of
advanced programming languages (such as Visual C++).
u
Overview of WAGO-I/O-PRO 32 Functions
c
How is a project
o
structured?
A project is put into a file named after the project. The first POU (Program
D
Organization Unit) created in a new project will automatically be named
PLC_PRG. The process begins here (in compliance with the main function in a
C program), and other POUs can be accessed from the same point (programs,
d
function blocks and functions).
e
Once you have defined a Task Configuration, it is no longer necessary to create
a program named PLC_PRG. You will find more about this in the Task
v
Configuration chapter.
i
There are different kinds of objects in a project: POUs, data types, display
h
elements (visualizations) and resources.
The Object Organizer contains a list of all the objects in your project.
r c
How do I set up my
project?
A
First you should configure your PLC in order to check the accuracy of the
addresses used in the project.
Then you can create the POUs needed to solve your problem.
Now you can program the POUs you need in the desired languages.
Once the programming is complete, you can compile the project and remove
errors should there be any.
WAGO-I/O-PRO 32 2-1
Project Components
Now open the window with your PLC Configuration and test your project for
correct sequence. To do this, enter input variables manually and observe
whether outputs are as expected. You can also observe the value sequence of
the local variables in the POUs. In the Watch and Receipt Manager you can
configure data records whose values you wish to examine.
Debugging
t
In case of a programming error you can set breakpoints. If the process stops at
n
such a breakpoint, you can examine the values of all project variables at this
point in time. By working through sequentially (single step) you can check the
e
logical correctness of your program.
Additional Online
Functions
m
An additional debugging function: You can set program variables and inputs
u
and outputs at certain values. You can use the flow control to check which
program lines have been run. The Sampling Trace allows you to trace and
c
display the actual course of variables over an extended period of time.
o
Once the project has been set up and tested, the hardware can be loaded in the
hardware and tested as well. The same online functions you used with the
simulation are available.
D
Additional WAGO-I/O-
PRO 32 Features
d
The entire project can be documented or exported to a text file at any time.
e
Summary
v
WAGO-I/O-PRO 32 is a complete development tool used to program your
i
PLC which will save you a measurable amount of time setting up your
applications.
h
Project Components
Project
r c
A
A project contains all of the objects in a PLC program. A project is saved in a
file named after the project. The following objects are included in a project:
POUs (Program Organization Units), data types, visualizations, resources, and
libraries.
POU (Program
Organization Unit)
Functions, function blocks, and programs are POUs.
Each POU consists of a declaration part and a body. The body is written in one
of the IEC programming languages which include IL, ST, SFC, FBD and LD.
2-2 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
WAGO-I/O-PRO 32 supports all IEC standard POUs. If you want to use these
POUs in your project, you must include the library standard.lib in your project.
POUs can call up other POUs. However, recursions are not allowed.
Function
A function is a POU, which yields exactly one data element (which can consist
t
of several elements, such as fields or structures) when it is processed, and
whose call in textual languages can occur as an operator in expressions.
n
When declaring a function do not forget that the function must receive a type.
This means, after the function name, you must enter a colon followed by a type.
e
A correct function declaration can look like this example:
FUNCTION Fct: INT
m
In addition, a result must be assigned to the function. That means that function
name is used as an output variable.
u
A function declaration begins with the keyword FUNCTION and ends with
c
END_FUNCTION.
Example in IL of a function that takes three input variables and returns the
o
product of the first two divided by the third:
D
ed
iv
ch
r
Image 2.1: Function
A
Functions do not have any internal conditions. That means that calling up a
function with the same argument (input parameters) always produces the same
value (output).
Examples for calling up the function described above:
in IL:
LD 7
Fct 2,4
ST Result
in ST:
Result := Fct(7, 2, 4);
WAGO-I/O-PRO 32 2-3
Project Components
in FBD:
In SFC a function call can only take place within a step or a transition.
n t
e
CheckBounds, you can use it to check for range overflows in your project! The
name of the function is defined and may have only this identifier. An example
of how this function is implemented is shown below:
u m
o c
D
ed
Image 2.2: Example of the Implementation of the Function CheckBounds
iv
The following typical program for testing the CheckBounds function goes
beyond the boundaries of a defined array. The CheckBounds functions makes
h
sure that the value TRUE is not assigned to the position A[10], but rather to the
upper area boundary A[7] which is still valid. Therefore, the CheckBounds
c
function can be used to correct extensions beyond array boundaries.
Ar
Image 2.3: Test Program for the CheckBounds Function
2-4 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
n t
e
u m
c
Bild 2.4: Example for the implementation of the funciton CheckDivReal
o
Operator DIV uses the output of function CheckDivReal as Divisor. In a
program like shown in the following example this avoids an division by 0, the
D
divisor (d) is set from 0 to 1. So the result of the division is 799.
ed
iv
ch
A r
Functionblock
Bild 2.5: Example program of the function CheckDivReal
A function block is a POU which provides one or more values during the
procedure. As opposed to a function, a function block provides no return value.
A function block declaration begins with the keyword FUNCTION_BLOCK
and ends with END_FUNCTION_BLOCK.
WAGO-I/O-PRO 32 2-5
Project Components
Example in IL of a function block with two input variables and two output
variables. One output is the product of the two inputs, the other a comparison
for equality:
n t
e
u m
Image 2.6: Function Block
o c
D
Function Block Instances
d
Reproductions or instances (copies) of a function block can be created.
Each instance possesses its own identifier (the Instance name), and a data
e
structure which contains its inputs, outputs, and internal variables. Instances are
declared locally or globally as variables, whereas the name of the function
iv
block is indicated as the type of an identifier.
Example of an instance with the name INSTANCE of the FUB function block:
h
INSTANCE: FUB;
c
Function blocks are always called through the instances described above.
r
Only the input and output parameters can be accessed from outside of an
function block instance. This means the internal variables of the function blocks
A
remain invisible to the user of the function block.
Example for accessing an input variable:
The function block FB has an input variable in1 of the type INT.
PROGRAM prog
VAR
inst1:fb;
END_VAR
LD 17
ST inst1.in1
CAL inst1
END_PROGRAM
2-6 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
The declaration parts of function blocks and programs can contain instance
declarations. Instance declarations are not permitted in functions.
Access to a function block instance is limited to the POU in which it was
declared unless it was declared globally.
The instance name of a function block instance can be used as the input for a
function or a function block.
n t
Note: All values are retained after processing a function block until the
next it is processed. Therefore, function block calls with the same arguments do
e
not always return the same output values!
m
You can use the variables of the function block by entering the instance name, a
point, and then the variable name.
u
If you would like to set the input parameters when you open the function block,
c
you can do this in the text languages IL and ST by assigning values to the
parameters after the instance name of the function block in parentheses (this
o
assignment takes place using ":=" just as with the initialization of variables at
the declaration position).
D
Examples for calling function block FUB described above: The multiplication
result is saved in the variable ERG, and the result of the comparison is saved in
QUAD. An instance of FUB with the name INSTANCE is declared.
d
In IL the function block is called as shown in the following image:
v e
h i
r c
A Image 2.7: Function Block Call in IL
In the example below the call is shown in ST. The declaration part is the same
as with IL:
WAGO-I/O-PRO 32 2-7
Project Components
t
Image 2.8: Function Block Call in ST
n
In FBD the instance of a function block is called as shown in the following
e
image (declaration part the same as with IL):
u m
o c
D
d
Image 2.9: Function Block Call in FBD
e
In SFC function block calls can only take place in steps.
iv
Program
A program is a POU which returns several values during operation. Programs
h
are recognized globally throughout the project. All values are retained from the
last time the program was run until the next.
r c
A
Image 2.10: Example of a program
Programs can be called. A program call in a function is not allowed. There are
also no instances of programs.
2-8 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
If a POU calls a program, and if thereby values of the program are changed,
then these changes are retained the next time the program is called, even if the
program has been called from within another POU.
This is different from calling a function block. There only the values in the
given instance of a function block are changed.
These changes therefore play a role only when the same instance is called.
t
A program declaration begins with the keyword PROGRAM and ends with
n
END_PROGRAM.
e
Examples of calls of the program described above:
In IL:
m
CAL PRGExample
LD PRGexample.PAR
u
ST ERG
in ST:
c
PRGExample;
Erg := PRGexample.PAR;
o
In FBD:
D
Example for a possible call sequence for PLC_PRG:
d
LD 0
ST PRGexample.PAR (*Default setting for PAR is 0*)
e
CAL IL call (*ERG in IL call results in 1*)
CAL ST call (*ERG in ST call results in 2*)
v
CAL FBD call (*ERG in FBD call results in 3*)
i
If the variable PAR from the program PRGexample is initialized by a main
h
program with 0, and then one after the other programs are called with above
named program calls, then the ERG result in the programs will have the values
c
1, 2, and 3. If one exchanges the sequence of the calls, then the values of the
r
given result parameters also change in a corresponding fashion.
PLC_PRG
A
The PLC_PRG is a special predefined POU. Each project must contain this
special program. This POU is called exactly once per control cycle.
The first time the "Project" "Object Add" command is used after a new
project has been created, the default entry in the POU dialog box will be a POU
named PLC_PRG of the program type. You should not change this default
setting!
If tasks have been defined, then the project may not contain any PLC_PRG,
since in this case the procedure sequence depends upon the task assignment.
WAGO-I/O-PRO 32 2-9
Project Components
Action
t
Actions can be defined to function blocks and programmes. The action
n
represents a further implementation which can be entirely created in another
language as the ”normal” implementation. Each action is given a name.
e
An action works with the data from the function block or programme which it
belongs to. The action uses the same input/output variables and local variables
as the ”normal” implementation uses.
u m
o c
D
ed
v
Image 2.11:Example for an action of a function block
i
In the example given, calling up the function block Counter increases or
h
decreases the output variable ”out”, depending on the value of the input
variable ”in”. Calling up the action Reset of the function block sets the output
c
variable to zero. The same variable ”out” is written in both cases.
r
An action is called up with <Program_name>.<Action_name> or
<Instance_name>.<Action_name>. If it is required to call up the action within
A
its own block, one just uses the name of the action in the text editors and in the
graphic form the function block call up without instance information.
Examples for the calling-up of the above action:
Declaration for all Examples:
PROGRAM PLC_PRG
VAR
Inst : Counter;
END_VAR
In AWL:
CAL Inst.Reset(In := FALSE)
LD Inst.out
2-10 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
ST ERG
In ST:
Inst.Reset(In := FALSE);
Erg := Inst.out;
In FUP:
n t
e
Note: Actions play an important role in blocks in sequential function
charts, see the chapter Sequential Function Chart - SFC.
m
The IEC standard does not recognise actions other than actions of the sequential
function chart.
u
Resources
c
You need the resources for configuring and organizing your project and for
tracing variable values:
o
• Global Variables which can be used throughout the project
• PLC Configuration for configuring your hardware
D
• Task Configuration for guiding your program through tasks
• Sampling Trace for graphic display of variable values
• Watch and Receipt Manager for displaying variable values and setting
d
default variable values
e
See the chapter called "The Resources".
v
Libraries
i
You can include in your project a series of libraries whose POUs, data types,
and global variables you can use just like user-defined variables. The library
h
"standard.lib" is a standard part of the program and is always at your disposal.
c
See the chapter called "Library Manager".
r
Data types
Along with the standard data types the user can define his own data types.
A
Structures, enumeration types and references can be created.
See "Standard" and "Defined data types" in the appendix.
Visualization
WAGO-I/O-PRO 32provides visualizations so that you can display your
project variables. You can plot geometric elements off-line with the help of the
visualization. They can then change their form online, depending upon certain
variable values.
See the chapter called "Visualization".
WAGO-I/O-PRO 32 2-11
Languages
Languages
t
operation, one or more operands separated by commas.
n
In front of an instruction there can be an identification mark (label) followed
by a colon (:).
e
A comment must be the last element in a line. Empty lines can be inserted
between instructions.
Example:
m
LD 17
ST lint (* comment *)
u
GE 5
c
JMPC next
LD idword
o
EQ istruct.sdword
STN test
next:
D
Modifiers and operators
in IL
d
In the IL language the following operators and modifiers can be used.
e
Modifiers:
• C with JMP, CAL, RET: The instruction is only then executed if the
v
result of the preceding expression is TRUE.
i
• N with JMPC, CALC, RETC: The instruction is only then executed if the
result of the preceding expression is FALSE.
h
• N otherwise: Negation of the operand (not of the accumulator)
c
Below you find a table of all operators in IL with their possible modifiers and
r
the relevant meaning:
Operator Modifiers Meaning
LD N Make current result equal to the operand
A
ST N Save current result at the position of the operand
S Then put the Boolean operand exactly at TRUE if
the current result is TRUE
R Then put the Boolean operand exactly at FALSE if
the current result is TRUE
AND N,( Bitwise AND
OR N,( Bitwise OR
XOR N,( Bitwise exclusive OR
ADD ( Addition
SUB ( Subtraction
MUL ( Multiplication
DIV ( Division
2-12 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
GT ( >
GE ( >=
EQ ( =
NE ( <>
LE ( <=
LT ( <
JMP CN Jump to the label
t
CAL CN Call programor function block or
RET CN Leave POU and return to caller.
n
) Evaluate deferred operation
e
You find a list of all IEC operators in the appendix.
Example of an IL program while using some modifiers:
m
LD TRUE (*load TRUE in the accumulator*)
ANDN BOOL1 (*execute AND with the negated value of the BOOL1
u
variable*)
c
JMPC mark (*if the result was TRUE, then jump to the label "mark"*)
o
LDN BOOL2 (*save the negated value of *)
ST ERG (*BOOL2 in ERG*)
label:
D
LD BOOL2 (*save the value of *)
ST ERG *BOOL2 in ERG*)
It is also possible in IL to put parentheses after an operation. The value of the
d
parenthesis is then considered as an operand.
e
For example:
LD 2
v
MUL 2
i
ADD 3
ST ERG
h
Here is the value of Erg 7. However, if one puts parentheses:
c
LD 2
r
MUL 2
(
ADD 3
A
)
ST ERG
Here the resulting value for Erg is 10, the operation MUL is only then evaluated
if you come to ")"; as operand for MUL 5 is then calculated.
WAGO-I/O-PRO 32 2-13
Languages
Example:
IF value < 7 THEN
WHILE value < 8 DO
value:=value+1;
END_WHILE;
END_IF;
t
Expressions
n
An expression is a construction which returns a value after its evaluation.
Expressions are composed of operators and operands. An operand can be a
e
constant, a variable, a function call, or another expression.
Valuation of expressions
m
The evaluation of an expression takes place by means of processing the
operators according to certain binding rules. The operator with the strongest
u
binding is processed first, then the operator with the next strongest binding,
c
etc., until all operators have been processed.
Operators with equal binding strength are processed from left to right.
o
Below you find a table of the ST operators in the order of their binding
strength:
D
Operation Symbol Binding strength
Put in parentheses (expression) Strongest binding
Function call Function name
d
(parameter list)
Exponentiation EXPT
e
Negate -
Building of complements NOT
iv
Multiply *
Divide /
h
Modulo MOD
Add +
c
Subtract -
r
Compare <,>,<=,>=
Equal to =
Not equal to <>
A
Boolean AND AND
Boolean XOR XOR
Boolean OR OR Weakest binding
There are the following instructions in ST, arranged in a table together with
example:
Instruction type Example
Assignment A:=B; CV := CV + 1; C:=SIN(X);
Calling a function block and CMD_TMR(IN := %IX5, PT := 300);
use of the FB output A:=CMD_TMR.Q
RETURN RETURN;
2-14 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
IF D:=B*B;
IF D<0.0 THEN
C:=A;
ELSIF D=0.0 THEN
C:=B;
ELSE
C:=D;
t
END_IF;
CASE CASE INT1 OF
n
1: BOOL1 := TRUE;
2: BOOL2 := TRUE;
e
ELSE
BOOL1 := FALSE;
BOOL2 := FALSE;
m
END_CASE;
u
FOR J:=101;
c
FOR I:=1 TO 100 BY 2 DO
IF ARR[I] = 70 THEN
o
J:=I;
EXIT;
END_IF;
D
END_FOR;
WHILE J:=1;
WHILE J<= 100 AND ARR[J] <> 70
d
DO
J:=J+2;
e
END_WHILE;
v
REPEAT J:=-1;
i
REPEAT
J:=J+2;
h
UNTIL J= 101 OR ARR[J] = 70
END_REPEAT;
c
EXIT EXIT;
r
Empty instruction ;
Instruction in Structured
A
Text
The name already indicates, the Structured Text is designed for structure
programming, i.e. ST offers predetermined structures for certain often used
constructs such as loops for programming.
This offers the advantages of low error probability and increased clarity of the
program.
For example, let us compare two equally significant program sequences in IL
and ST:
A loop for calculating powers of two in IL:
Loop:
WAGO-I/O-PRO 32 2-15
Languages
LD Counter
JMPC end
LD Var1
MUL 2
ST Var1
t
LD Counter
n
SUB 1
ST Counter
e
JMP Loop
End:
m
LD Var1
u
ST ERG
The same loop programmed in ST would produce:
c
WHILE counter<>0 DO
Var1:=Var1*2;
o
Counter:=counter-1;
END_WHILE
D
Erg:=Var1;
You can see, the loop in ST is not only faster to program, but is also
d
significantly easier to read, especially in view of the convoluted loops in larger
constructs.
e
The different structures in ST have the following significance:
iv
Assignment operator
On the left side of an assignment there is an operand (variable, address) to
h
which is assigned the value of the expression on the right side with the
assignment operator :=
r c
Example:
Var1 := Var2 * 10;
A
After completion of this line Var1 has the tenfold value of Var2.
2-16 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
RETURN instruction
The RETURN instruction can be used to leave a POU, for example depending
on a condition.
IF instruction
With the IF instruction you can check a condition and, depending upon this
t
condition, execute instructions.
Syntax:
n
IF <Boolean_expression1> THEN
e
<IF_instructions>
{ELSIF <Boolean_expression2> THEN
<ELSIF_instructions1>
m
.
.
u
ELSIF <Boolean_expression n> THEN
<ELSIF_instructions n-1>
c
ELSE
<ELSE_instructions>}
o
END_IF;
The part in braces {} is optional.
D
If the <Boolean_expression1> returns TRUE, then only the <IF_Instructions>
are executed and none of the other instructions.
d
Otherwise the Boolean expressions, beginning with <Boolean_expression2>,
are evaluated one after the other until one of the expressions returns TRUE.
e
Then only those instructions after this Boolean expression and before the next
ELSE or ELSIF are evaluated.
v
If none of the Boolean expressions produce TRUE, then only the
i
<ELSE_instructions> are evaluated.
h
Example:
IF temp<17
c
THEN heating_on := TRUE;
r
ELSE heating_on := FALSE;
END_IF;
A
Here the heating is turned on when the temperature sinks below 17 degrees.
Otherwise it remains off.
CASE instruction
With the CASE instructions one can combine several conditioned instructions
with the same condition variable in one construct.
Syntax:
CASE <Var1> OF
<Value1>: <Instruction 1>
<Value2>: <Instruction 2>
<Value3, Value4, Value5>: <Instruction 3>
<Value6 .. Value10>: <Instruction 4>
WAGO-I/O-PRO 32 2-17
Languages
...
<Value n>: <Instruction n>
ELSE <ELSE instruction>
END_CASE;
A CASE instruction is processed according to the following model:
• If the variable in <Var1> has the value <Value i>, then the instruction
t
<Instruction i> is executed.
• If <Var 1> has none of the indicated values, then the <ELSE Instruction>
n
is executed.
• If the same instruction is to be executed for several values of the
e
variables, then one can write these values one after the other separated by
commas, and thus condition the common execution.
• If the same instruction is to be executed for a value range of a variable,
m
one can write the initial value and the end value separated by two dots
one after the other. So you can condition the common condition.
u
Example:
c
CASE INT1 OF
1, 5: BOOL1 := TRUE;
o
BOOL3 := FALSE;
2: BOOL2 := FALSE;
BOOL3 := TRUE;
D
10..20: BOOL1 := TRUE;
BOOL3:= TRUE;
ELSE
d
BOOL1 := NOT BOOL1;
BOOL2 := BOOL1 OR BOOL2;
e
END_CASE;
v
FOR loop
i
With the FOR loop one can program repeated processes.
h
Syntax:
c
INT_Var :INT;
r
FOR <INT_Var> := <INIT_VALUE> TO <END_VALUE> {BY <Step
size>} DO
A
<Instructions>
END_FOR;
The part in braces {} is optional.
The <Instructions> are executed as long as the counter <INT_Var> is not
greater than the <END_VALUE>. This is checked before executing the
<Instructions> so that the <instructions> are never executed if <INIT_VALUE>
is greater than <END_VALUE>.
When <Instructions> are executed, <INT_Var> is always increased by <Step
size>. The step size can have any integer value. If it is missing, then it is set to
1. The loop must also end since <INT_Var> only becomes greater.
2-18 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
Example:
FOR Counter:=1 TO 5 BY 1 DO
Var1:=Var1*2;
END_FOR;
Erg:=Var1;
Let us assume that the default setting for Var1 is the value 1. Then it will have
t
the value 32 after the FOR loop.
n
Note: <END_VALUE> must not be equal to the limit value of the counter
e
<INT_VAR>. For example: If the variable Counter is of type SINT and if
<END_VALUE> is 127, you will get an endless loop.
m
WHILE loop
u
The WHILE loop can be used like the FOR loop with the difference that the
c
break-off condition can be any Boolean expression. This means you indicate a
condition which, when it is fulfilled, the loop will be executed.
o
Syntax:
WHILE <Boolean expression>
<Instructions>
D
END_WHILE;
The <Instructions> are repeatedly executed as long as the
d
<Boolean_expression> returns TRUE. If the <Boolean_expression> is already
FALSE at the first evaluation, then the <Instructions> are never executed. If
e
<Boolean_expression> never assumes the value FALSE, then the
<Instructions> are repeated endlessly which causes a relative time delay.
iv Note: The programmer must make sure that no endless loop is caused. He
h
does this by changing the condition in the instruction part of the loop, for
example, by counting up or down one counter.
r c
Example:
WHILE counter<>0 DO
Var1 := Var1*2;
A
Counter := Counter-1;
END_WHILE
The WHILE and REPEAT loops are, in a certain sense, more powerful than the
FOR loop since one doesn't need to know the number of cycles before
executing the loop. In some cases one will, therefore, only be able to work with
these two loop types. If, however, the number of the loop cycles is clear, then a
FOR loop is preferable since it allows no endless loops.
REPEAT loop
The REPEAT loop is different from the WHILE loop because the break-off
condition is checked only after the loop has been executed. This means that the
WAGO-I/O-PRO 32 2-19
Languages
loop will run through at least once, regardless of the wording of the break-off
condition.
Syntax:
REPEAT
<Instructions>
UNTIL <Boolean expression>
t
END_REPEAT;
The <Instructions> are carried out until the <Boolean expression> returns
n
TRUE.
e
If <Boolean expression> is produced already at the first TRUE evaluation, then
<Instructions> are executed only once. If <Boolean_expression> never assumes
the value TRUE, then the <Instructions> are repeated endlessly which causes a
m
relative time delay.
u
Note: The programmer must make sure that no endless loop is caused. He
c
does this by changing the condition in the instruction part of the loop, for
example by counting up or down one counter.
o
Example:
REPEAT
D
Var1 := Var1*2;
Counter := Counter-1;
UNTIL
d
Counter=0
END_REPEAT;
e
EXIT instruction
v
If the EXIT instruction appears in a FOR, WHILE, or REPEAT loop, then the
i
innermost loop is ended, regardless of the break-off condition.
ch
Sequential Function Chart (SFC)
r
The Sequential Function Chart is a graphically oriented language which makes
it possible to describe the chronological order of different actions within a
A
program.
2-20 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
n t
e
u m
o c
D
Image 2.12: Network in SFC
Step
d
A POU written in a Sequential Function Chart consists of a series of steps
e
which are connected with each other through directed connections (transitions).
There are two types of steps.
v
• The simplified type consists of an action and a flag which shows if the
i
step is active. If the action of a step is implemented, then a small triangle
h
appears in upper right corner of the step.
• An IEC step consists of a flag and one or more assigned actions or
c
boolean variables. The associated actions appear to the right of the step.
r
More on this later.
Action
A
An action can contain a series of instructions in IL or in ST, a lot of networks in
FBD or in LD, or again in Sequential Function Chart (SFC).
With the simplified steps an action is always connected to a step. In order to
edit an action, click twice with the mouse on the step to which the action
belongs. Or select the step and select the menu command "Extras" "Zoom
Action/Transition".
Actions of IEC steps hang in the Object Organizer directly under their SFC-
POU and are loaded with a doubleclick or by pressing <Enter> in their editor.
New actions can be created with "Project" "Add Action".
WAGO-I/O-PRO 32 2-21
Languages
t
The entry and exit action can be implemented in any language. In order to edit
n
an entry or exit action, doubleclick in the corresponding corner in the step with
the mouse.
e
Example of a step with entry and exit action:
Transition / Transition
u m
c
condition
Between the steps there are so-called transitions.
o
A transition condition can be a Boolean variable, a boolean address, a boolean
constant, or a series of instructions with a Boolean result in ST syntax (i.e. (i <=
D
100) AND b) or fully programmed in any language.
Active step
d
After calling the SFC POU, the action (surrounded by a double border)
belonging to the initial step is executed first. A step, whose action is being
e
executed, is called active. If the step is active, then the appropriate action is
v
executed once per cycle. In Online mode active steps are shown in blue.
i
In a control cycle all actions are executed which belong to active steps.
Thereafter the respective following steps of the active steps become active if the
h
transition conditions of the following steps are TRUE. The currently active
c
steps will be executed in the next cycle.
r
IEC step
Along with the simplified steps the standard IEC steps in SFC are available.
A
Any number of actions can be assigned to an IEC step. The actions of IEC steps
lie separated from the steps and can be used repeatedly within their POU. For
this they must be associated to the single steps with the command "Extras"
"Associate action".
Along with actions, Boolean variables can be assigned to steps. Through the so-
called qualifiers the actions and Boolean variables are activated and
deactivated, partially with time delays. Since an action can still be active, even
if the next step has been processed, for example through the qualifier S (Set),
one can achieve concurrent processes.
An associated boolean variable is set or reset with each call of the AS. That
means, that with each call it gets the value TRUE or FALSE.
2-22 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
The actions associated with an IEC step are shown at the right of the step in a
two-part box. The left field contains the qualifier, possibly with time constant,
and the right field contains the action name respectively boolean variable name.
t
qualifier P).
n
In case of a call first the deactivated actions, then the active actions are
executed, in alphabetical order each time.
e
An example for an IEC step with two actions:
u m
In order to make it easier to follow the processes, all active actions in online
mode are shown in blue like the active steps. After each cycle a check is made
c
to see which actions are active.
o
Whether a newly inserted step is an IEC step depends upon whether the menu
command "Extras" "Use IEC-Steps" has been chosen.
In the Object Organizer the actions hang directly underneath their respective
D
SFC POUs. New actions can be created with "Project" "Add Action".
In order to use IEC steps you must include in your project the special SFC
d
library Iecsfc.lib .
v e
h i
c
Image 2.13: SFC POU with actions in the Object Organizer
r
Qualifier
A
In order to associate the actions with IEC steps the following qualifiers are
available:
N Non-stored The action active as long as the step
R overriding Reset The action is deactivated
S Set (Stored) The action is activated and remains active until
a Reset
L time Limited The action is activated for a certain time,
maximum as long as the step is active
D time Delayed The action becomes active after a certain time if
the step is still active and then it remains active
as long as the step is active.
WAGO-I/O-PRO 32 2-23
Languages
t
SL Stored and time The action is activated for a certain time
limited
n
The qualifiers L, D, SD, DS and SL need a time value in the TIME constant
e
format.
m
There are implicitly declared variables in the SFC which can be used.
u
A flag belongs to each step which stores the state of the step. The step flag
(active or inactive state of the step) is called <StepName>.x for IEC steps or
c
just <StepName> for the simplified steps. This Boolean variable has the value
TRUE when the associated step is active and FALSE when it is inactive. It can
o
be used in every action and transition of the SFC block.
One can make an enquiry with the variable <ActionName>.x. as to whether an
D
IEC action is active or not.
d
Note: During the deactivation of the IEC action the variable already has
the value FALSE.
e
For IEC steps the implicit variables <StepName>.t can be used to enquire
about the active time of the steps.
iv
SFC Flags
h
If a step is active in SFC for longer than its attributes state, some special flags
are set. There are also variables which can be set in order to control the program
c
flow in the sequential function chart. To use the flags it is necessary,
r
somewhere, globally or locally, to declare them as output or input variables.
SFCEnableLimit: This variable is of the type BOOL. When it has the value
A
TRUE, the timeouts of the steps will be registered in SFCError. Other timeouts
will be ignored.
SFCInit: This variable is also of the type BOOL. When the variable has the
value TRUE the sequential function chart is set back to the Init step and the
other SFC flags are reset. The Init step remains active, but is not executed, for
as long as the variable has the value TRUE. It is only when SFCInit is again set
to FALSE that the block can be processed normally again.
SFCQuitError: A variable of the type BOOL. Execution of the SFC diagram
is stopped for as long as the variable has the value TRUE whereby a possible
timeout in the variable SFCError is reset. All previous times in the active steps
are reset when the variable again assumes the value FALSE.
2-24 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
t
SFCErrorStep: This variable is of the type STRING. In this variable the name
n
of the step is stored which has caused a timeout to occur.
SFCErrorPOU: This variable of the type STRING contains the name of the
e
block in which a timeout has occurred.
SFCCurrentStep: This variable is of the type STRING. The name of the step
m
is stored in this variable which is active, independently of the time monitoring.
In the case of simultaneous sequences the step is stored in the branch on the
u
outer right.
No further timeout will be registered if a timeout occurs and the variable
c
SFCError is not reset again.
o
Alternative branch
Two or more branches in SFC can be defined as alternative branches. Each
D
alternative branch must begin and end with a transition. Alternative branches
can contain parallel branches and other alternative branches. An alternative
branch begins at a horizontal line (alternative beginning) and ends at a
d
horizontal line (alternative end) or with a jump.
If the step which precedes the alternative beginning line is active, then the first
e
transition of each alternative branch is evaluated from left to right. The first
v
transition from the left whose transition condition has the value TRUE is
i
opened and the following steps are activated (see active step).
h
Parallel branch
Two or more branches in SFC can be defined as parallel branches. Each parallel
c
branch must begin and end with a step. Parallel branches can contain alternative
r
branches or other parallel branches. A parallel branch begins with a double line
(parallel beginning) and ends with a double line (parallel end) or with a jump.
A
If the parallel beginning line of the previous step is active and the transition
condition after this step has the value TRUE, then the first steps of all parallel
branches become active (see active step). These branches are now processed
parallel to one another. The step after the parallel end line becomes active when
all previous steps are active and the transition condition before this step
produces the value TRUE.
Jump
A jump is a connection to the step whose name is indicated under the jump
symbol. Jumps are required because it is not allowed to create connections
which lead upward or cross each other.
WAGO-I/O-PRO 32 2-25
Languages
t
An example of a typical network in the Function Block Diagram as it could
appear in WAGO-I/O-PRO 32:
e n
Image 2.14: Network in Function Block Diagram
u m
c
See also chapter 'The Continuous Function Chart Editor' at 'The Editors in
WAGO-I/O-PRO 32'.
o
D
Ladder Diagram (LD)
d
approaches the structure of an electric circuit.
On the one hand, the Ladder Diagram is suitable for constructing logical
e
switches, on the other hand one can also create networks as in FBD. Therefore
v
the LD is very useful for controlling the call of other POUs.
i
The Ladder Diagram consists of a series of networks. A network is limited on
the left and right sides by a left and right vertical current line. In the middle is a
h
circuit diagram made up of contacts, coils, and connecting lines.
c
Each network consists on the left side of a series of contacts which pass on
r
from left to right the condition "ON" or "OFF" which correspond to the
Boolean values TRUE and FALSE. To each contact belongs a Boolean
variable. If this variable is TRUE, then the condition is passed from left to right
A
along the connecting line. Otherwise the right connection receives the value
OFF.
Example of a typical network in the Ladder Diagram as it could appear in
WAGO-I/O-PRO 32:
2-26 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
n t
e
Image 2.15: Network in a Ladder Diagram made up of Contacts and Coils
m
Contact
u
Each network in LD consists on the left side of a network of contacts (contacts
are represented by two parallel lines: | |) which from left to right show the
c
condition "On" or "Off".
These conditions correspond to the Boolean values TRUE and FALSE. A
o
Boolean variable belongs to each contact. If this variable is TRUE, then the
condition is passed on by the connecting line from left to right, otherwise the
D
right connection receives the value "Out".
Contacts can be connected in parallel, then one of the parallel branches must
transmit the value "On" so that the parallel branch transmits the value "On"; or
d
the contacts are connected in series, then contacts must transmit the condition
"On" so that the last contact transmits the "On" condition. This therefore
e
corresponds to an electric parallel or series circuit.
v
A contact can also be negated, recognizable by the slash in the contact symbol:
i
|/|. Then the value of the line is transmitted if the variable is FALSE.
h
Coil
c
On the right side of a network in LD there can be any number of so-called coils
which are represented by parentheses:( ). They can only be in parallel. A coil
r
transmits the value of the connections from left to right and copies it in an
appropriate Boolean variable. At the entry line the value ON (corresponds to
A
the Boolean variable TRUE) or the value OFF (corresponding to FALSE) can
be present.
Contacts and coils can also be negated (in the example the contact SWITCH1
and the coil %QX3.0 is negated). If a coil is negated (recognizable by the slash
in the coil symbol: (/)), then it copies the negated value in the appropriate
Boolean variable. If a contact is negated, then it connects through only if the
appropriate Boolean value is FALSE.
WAGO-I/O-PRO 32 2-27
Debugging, Online Functions
can be used at the same places as contacts, that is on the left side of the LD
network
Set/Reset coils
Coils can also be defined as set or reset coils. One can recognize a set coil by
the "S" in the coil symbol: (S)) It never writes over the value TRUE in the
t
appropriate Boolean variable. That is, if the variable was once set at TRUE,
then it remains so.
n
One can recognize a reset coil by the "R" in the coil symbol: (R)) It never
writes over the value FALSE in the appropriate Boolean variable: If the
e
variable has been once set on FALSE, then it remains so.
LD as FBD
m
When working with LD it is very possible that you will want to use the result of
the contact switch for controlling other POUs. On the one hand you can use the
u
coils to put the result in a global variable which can then be used in another
c
place. You can, however, also insert the possible call directly into your LD
network. For this you introduce a POU with EN input.
o
Such POUs are completely normal operands, functions, programs, or function
blocks which have an additional input which is labeled with EN. The EN input
is always of the BOOL type and its meaning is: The POU with EN input is
D
evaluated when EN has the value TRUE.
An EN POU is wired parallel to the coils, whereby the EN input is connected to
d
the connecting line between the contacts and the coils. If the ON information is
transmitted through this line, this POU will be evaluated completely normally.
e
Starting from such an EN POU, you can create networks similar to FBD.
iv
ch
r
Image 2.16: Part of a LD Network with an EN POU
A
Debugging, Online Functions
Sampling Trace
The Sampling Trace allows you to trace the value sequence of variables,
depending upon the so-called trigger event. This is the rising edge or falling
edge of a previously defined Boolean variable (trigger variable). WAGO-I/O-
PRO 32 permits the tracing of up to 20 variables. 500 values can be traced for
each variable.
2-28 WAGO-I/O-PRO 32
Chapter 2 - WAGO-I/O-PRO 32
Debugging
The debugging functions of WAGO-I/O-PRO 32 make it easier for you to find
errors.
In order to debug, run the command "Project" "Options" and in the dialog
box that pops up under Build options select the item Debugging.
t
Breakpoint
n
A breakpoint is a place in the program at which the processing is stopped. Thus
it is possible to look at the values of variables at specific places within the
e
program.
Breakpoints can be set in all editors. In the text editors breakpoints are set at
line numbers, in FBD and LD at network numbers, and in SFC at steps.
m
Single step
u
Single step means:
• In IL: Execute the program until the next CAL, LD or JMP command.
c
• In ST: Execute the next instruction.
• In FBD, LD: Execute the next network.
o
• In SFC: Continue the action until the next step.
D
By proceeding step by step you can check the logical correctness of your
program.
Single Cycle
d
If Single cycle has been chosen, then the execution is stopped after each cycle.
e
Change values online
v
During operations variables can be set once at a certain value (write value) or
i
also described again with a certain value after each cycle (forcing). In online
mode one also can change the variable value by double click on the value. By
h
that boolean variables change from TRUE to FALSE or the other way round,
c
for each other types of variables one gets the dialog Write Variable xy, where
the actual value of the variable can be edited.
r
Monitoring
A
In addition to the variable declarations visible on the screen, the current values
from the PLC are continuously read and displayed.
In Online mode WAGO-I/O-PRO 32 monitors all variables visible on the
screen. At the same time variables can be put together in the Watch and Receipt
Manager whose data you would like to see all in one place.
Simulation
During the simulation the created PLC program is not processed in the PLC,
but rather in the calculator on which WAGO-I/O-PRO 32 is running. All
online functions are available. That allows you to test the logical correctness of
your program without PLC hardware.
WAGO-I/O-PRO 32 2-29
The Standard
The Standard
The IEC 61131-3 standard from 1993 is an international standard for modern
systems with PLC functionality. Based on a structured software model it
t
defines a series of high-capacity programming languages, which can be
employed for different automation tasks. Here the development environment of
n
PLC systems has not been taken into consideration.
The use of standardised controls which are in accordance with this standard
e
provides the user with the following advantages:
• The optimum programming language can be selected for each individual
application.
m
• Software structure and command block of the standard are better suited to
meet the increasingly complex requirements than the functions of earlier
u
systems
• When using systems from different manufacturers the programmer
c
training time is reduced
• Programs and program elements can be more simply transmitted from
o
other supplier systems
• PLC systems are comparable
D
The 5 programming languages realisable in WAGO-I/O-PRO 32 IL, LD, FBD,
ST and SFC conform with the requirements of the standard.
d
According to this standard, a program consists of the following elements:
• Structures
e
• POUs
• Global Variables
iv
The processing of a WAGO-I/O-PRO 32 program begins with the special POU
PLC_PRG. The POU PLC_PRG can call other POUs.
ch
A r
2-30 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
t
Let us now start to write a small example program. It is for a simple traffic
signal unit which is supposed to control two traffic signals at an intersection.
n
The red/green phases of both traffic signals alternate and, in order to avoid
accidents, we will insert yellow or yellow/red transitional phases. The latter will
e
be longer than the former.
In this example you will see how time dependent programs can be shown with
m
the language resources of the IEC 61131-3 standard, how one can edit the
different languages of the standard with the help of WAGO-I/O-PRO 32, and
u
how one can easily connect them while becoming familiar with the simulation
of WAGO-I/O-PRO 32.
c
Create POU
o
The beginning is always easy: Start WAGO-I/O-PRO 32 and choose "File"
"New".
D
In the dialog box which appears, the first POU has already been given the
default name PLC_PRG. Keep this name, and the type of POU should
definitely be a program. Each project needs a program with this name. In this
d
case we choose as the language of this POU the Continuous Function Chart
Editor (CFC).
e
Now create three more objects with the command "Project" "Object Add"
v
with the menu bar or with the context menu (press right mouse button in the
i
Object Organizer): a program in the language Sequential Function Chart (SFC)
named SEQUENCE, a function block in the language Function Block Diagram
h
(FBD) named TRAFFICSIGNAL, along with a POU WAIT, also of the type
function block, which we want to program as an Instruction List (IL).
r c
What does
TRAFFICSIGNAL do?
A
In the POU TRAFFICSIGNAL we will assign the individual trafficsignal
phases to the lights, i.e. we will make sure that the red light is lit red in the red
phase and in the yellow/red phase, the yellow light in the yellow and yellow/red
phases, etc.
WAGO-I/O-PRO 32 3-1
Controlling a Traffic Signal Unit
t
In PLC_PRG the input start signal is connected to the traffic lights' sequence
and the 'color instructions' for each lamp are provided as outputs.
n
"TRAFFICSIGNAL"
e
declaration
Let us now turn to the POU TRAFFICSIGNAL. In the declaration editor you
declare as input variable (between the keywords VAR_INPUT and END_VAR)
m
a variable named STATUS of the type INT. STATUS will have four possible
conditions, that is one for the TRAFFICSIGNAL phases green, yellow,
u
yellow/red andred.
c
Therefore our TRAFFICSIGNAL has three outputs, that is RED, YELLOW and
GREEN. You should declare these three variables. Then the declaration part of
o
our function block TRAFFICSIGNAL will look like this:
D
ed
iv
ch
A r Image 3.1: Function block TRAFFICSIGNAL, declaration part
"TRAFFICSIGNAL" body
Now it is time to determine from the input STATUS of the POU the values of
the output variables. For this go into the body of the POU. Click on the field to
the left beside the first network (the gray field with the number 1). You have
now selected the first network. Now choose the menu item "Insert"
"Operator".
In the first network a box is inserted with the operator AND and two inputs:
3-2 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
Click on the text AND with the mouse pointer and change the text into EQ.
Select the three question marks from the upper of the two inputs and enter the
variable STATUS. Then select the lower of the three question marks and put a
t
1 underneath it. You get the following network:
e n
Click now on a place behind the EQ Box. Now the output of the EQ operation
is selected. Choose "Insert" "Assignment". Change the three question marks
m
??? to GREEN. You now have created a network with the following structure:
c u
o
STATUS is compared with 1, the result is assigned to GREEN. This network
thus switches to GREEN if the preset state value is 1.
D
For the other TRAFFICSIGNAL colors we need two more networks. You
create them with the command "Insert" "Network (after)". These networks
should be set up as in the example. The finished POU now is as follows:
ed
iv
ch
A r
WAGO-I/O-PRO 32 3-3
Controlling a Traffic Signal Unit
n t
e
u m
o c
D
ed
iv
Image 3.2: Function block TRAFFICSIGNAL, instruction part
h
In order to insert an operator in front of another operator, you must select the
c
place where the input to which you want to attach the operator feeds into the
r
box.
Then use the command "Insert" "Operator". Otherwise you can setup these
A
networks in the same way as the first network.
Now our first POU has been finished. TRAFFICSIGNAL, according to the
input of the value STATUS, controls whichever light color we wish.
Connecting the
standard.lib
For the timer in the POU WAIT we need a POU from the standard library.
Therefore, open the library manager with "Window" "Library Manager".
Choose "Insert" "Additional library". The dialog box appears for opening
files. From the list of the libraries choose standard.lib.
3-4 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
"WAIT" declaration
Now let us turn to the POU WAIT. This POU is supposed to become a timer
with which we can determine the length of the time period of each
TRAFFICSIGNAL phase. Our POU receives as input variable a variable TIME
of the type TIME, and as output it produces a Boolean value which we want to
call OK and which should be TRUE when the desired time period is finished.
t
We set this value with FALSE by inserting at the end of the declaration (before
the semicolon, however) " := FALSE ".
n
For our purposes we need the POU TP, a clock generator. This has two inputs
(IN, PT) and two outputs (Q, ET). TP does the following:
e
As long as IN is FALSE, ET is 0 and Q is FALSE. As soon as IN provides the
value TRUE, the time is calculated at the output ET in milliseconds. When ET
m
reaches the value PT, then ET is no longer counted. Meanwhile Q produces
TRUE as long as ET is smaller than PT. As soon as the value PT has been
u
reached, then Q produces FALSE again. In addition you will find a short
description of all POUs from the standard library in the appendix.
c
In order to use the POU TP in the POU WAIT we must create a local instance
from TP. For this we declare a local variable ZAB (for elapsed time) of the type
o
TP (between the keywords VAR, END_VAR).
The declaration part of WAIT thus looks like this:
D
ed
iv
ch Image 3.3: Function Block WAIT, Declaration Part
r
"WAIT" body
A
In order to create the desired timer, the body of the POU must be programmed
as follows:
WAGO-I/O-PRO 32 3-5
Controlling a Traffic Signal Unit
n t
e
u m
c
Image 3.4: Function Block WAIT, Instruction Part
o
At first it is checked whether Q has already been set at TRUE (as though the
counting had already been executed), in this case we change nothing with the
D
occupation of ZAB, but rather we call the function block ZAB without input (in
order to check whether the time period is already over).
Otherwise we set the variable IN in ZAB at FALSE, and therefore at the same
d
time ET at 0 and Q at FALSE. In this way all variables are set at the desired
initial condition. Now we assign the necessary time from the variable TIME
e
into the variable PT, and call ZAB with IN:=TRUE. In the function block ZAB
the variable ET is now calculated until it reaches the value TIME, then Q is set
v
at FALSE.
i
The negated value of Q is saved in OK after each execution of WAIT. As soon
h
as Q is FALSE, then OK produces TRUE.
c
The timer is finished at this point. Now it is time to combine our two function
blocks WAIT and TRAFFICSIGNAL in the main program PLC_PRG.
r
"SEQUENCE" first
A
expansion level
First we declare the variables we need. They are: an input variable START of
the type BOOL, two output variables TRAFFICSIGNAL1 and
TRAFFICSIGNAL2 of the type INT and one of the type WAIT (DELAY as
delay). The program SEQUENCE now looks like shown here:
3-6 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
n t
e
u m
o c
D
Image 3.5: Program Sequence, First Expansion Level, Declaration Part
d
The beginning diagram of a POU in SFC always consists of an action "Init" of a
e
following transition "Trans0" and a jump back to Init. We should expand that
somewhat.
v
First let us determine the structure of the diagrams before we program the
i
individual action and transitions. First we need for each TRAFFICSIGNAL
h
phase a step.. Insert it by marking Trans0 and choosing "Insert" "Step
transition (after)". Repeat this procedure three more times.
c
If you click directly on the name of a transition or a step, then this is marked
r
and you can change it. Name the first transition after Init "START", and all
other transitions "DELAY.OK".
A
The first transition switches through, if START is TRUE and all others switch
through when DELAY in OK produces TRUE, i.e. when the set time period is
finished.
The steps (from top to bottom) receive the names Switch1, Green2, Switch2,
Green1, whereby Init of course keeps its Name. "Switch" should include a
yellow phase, at Green1 TRAFFICSIGNAL1 will be green, at Green2
TRAFFICSIGNAL2 will be green. Finally change the return address of Init
after Switch1. If you have done everything right, then the diagram should be as
follows:
WAGO-I/O-PRO 32 3-7
Controlling a Traffic Signal Unit
n t
e
u m
o c
D
ed
iv
h
Image 3.6: Program SEQUENCE, First Expansion Level, Instruction Part
c
Now we have to finish programming the individual steps. If you doubleclick on
r
the field of a step, then you open a dialog to open a new action. In our case we
will use IL (Instruction List).
A
Actions and transition
conditions
In the action of the step Init the variables are initialized, the STATUS of
TRAFFICSIGNAL1 should be 1 (green). The state of TRAFFICSIGNAL2
should be 3 (red). The action Init then is as follows:
3-8 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
n t
e
Image 3.8: Action Switch1
m
With Green2 TRAFFICSIGNAL1 is red (STATUS:=3), TRAFFICSIGNAL2
green (STATUS:=1), and the delay time is at 5000 milliseconds.
c u
o
D
Image 3.9: Action Green2
d
At Switch2 the STATUS of TRAFFICSIGNAL1 changes to 4 (yellow-red),
that of TRAFFICSIGNAL2 to 2 (yellow). A time delay of 2000 milliseconds is
e
now set.
iv
ch
r
Image 3.10: Action Switch2
A
With Green1 TRAFFICSIGNAL1 is green (STATUS:=1), TRAFFICSIGNAL2
is red (STATUS:=3), and the time delay is set at 5000.
WAGO-I/O-PRO 32 3-9
Controlling a Traffic Signal Unit
The first expansion phase of our program is completed. Now you can compile it
and also test the simulation.
"SEQUENCE" second
expansion level
In order to ensure that our diagram has at least one alternative branch, and so
t
that we can turn off our traffic light unit at night, we now include in our
program a counter which, after a certain number of TRAFFICSIGNAL cycles,
n
turns the unit off.
At first we need a new variable COUNTER of the type INT. Declare this as
e
usual in the declaration part of PLC_PRG, and initialize it in Init with 0.
u m
Image 3.12: Action Init, Second Version
o c
D
Now select the transition after Switch1 and insert a step and then a transition.
Select the resulting transition and insert an alternative branch to its left. After
the left transition insert a step and a transition. After the resulting new transition
d
insert a jump after Switch1.
Name the new parts as follows: the upper of the two new steps should be called
e
"Count" and the lower "Off". The transitions are called (from top to bottom and
from left to right) EXIT, TRUE and DELAY.OK. The new part should
v
therefore look like the part with the black border:
h i
r c
A
3-10 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
n t
e
u m
o c
D
ed
Image 3.13: Program SEQUENCE, Second Expansion Level, Instruction Part
iv Now two new actions and a new transition condition are to be implemented. At
h
the step Count, the only thing that happens is that COUNTER is increased by
one:
r c
A Image 3.14: Action Count
The EXIT transition checks whether the counter is greater than a certain
number, for example 7:
WAGO-I/O-PRO 32 3-11
Controlling a Traffic Signal Unit
At Off the state of both lights is set at 5(OFF), (or each other number not equal
1,2,3 or 4) the COUNTER is reset to 0, and a time delay of 10 seconds is set:
n t
e
Image 3.16: Action Off
The result
m
In our hypothetical situation, night falls after seven TRAFFICSIGNAL cycles,
u
for ten seconds the TRAFFICSIGNAL turns itself off, then we have daylight
again, the traffic light unit turns itself on again, and the whole process starts
c
again from the beginning.
o
PLC_PRG
We want to start-up the traffic lights system over an ON switch and we want to
D
send each of the six lamps (each traffic light red, green, yellow) the
corresponding ”signal command” for each step of the SEQUENCE. We are
now declaring appropriate Boolean variables for these six outputs and one
d
input, before we create the programme in the editor, and are allocating them, at
the same time, to the corresponding IEC addresses.
e
The next step is to declare the variables LIGHT1 and LIGHT2 of the type
TRAFFICSIGNAL in the declaration editor.
iv
ch
A r
Figure 3.17: Declaration LIGHT1 and LIGHT2
These deliver the Boolean value of each of the six lights to the above
mentioned six outputs for each step of the block SEQUENCE. We are not,
however, declaring the output variables which are foreseen within the
PLC_PRG block but under Resources for Global Variables instead. The
Boolean input variable IN, which is used to set the variable START in the block
SEQUENCE to TRUE, can be set in the same way. ON is also allocated to an
IEC address.
Select the tab Resources and open the list Global Variables.
Make the declaration as follows:
3-12 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
n t
e
Figure 3.18: Declaration of the Input-/Output Variables
The name of the variable (e.g. IN) is followed, after AT, by a percent sign
m
which begins the IEC address. I stands for input, Q for output, B (used in this
example) stands for byte and the individual bits of the module are addressed
u
using 0.0 (0.1, 0.2, etc.). We will be handling the controller configuration
afterwards but we want, first of all, to finish off the block PLC_PRG.
c
For this we go into the editor window. We have selected the Continuous
Function Chart editor and we consequently obtain, under the menu bar, a CFC
o
symbol bar with all of the available elements (see Chapter The Continuous
Function Chart Editor).
D
Click on the right mouse key in the editor window and select the element Box.
Click on the text AND and write ”SEQUENCE” instead. This brings up the
block SEQUENCE with all of the already defined input and output variables.
d
Insert two further block elements which you name PHASES. Phases is a
function block and this causes you to obtain three red question marks over the
e
block which you replace with the already locally declared variables LIGHT1
v
and LIGHT2. Now set an element of the type Input, which award the title ON
i
and six elements of the type Output which you award variable names to, as
described, namely L1_green, L1_yellow, L1_red, L2_green, L2_yellow,
h
L2_red.
c
All of the elements of the programme are now in place and you can connect the
inputs and outputs, by clicking on the short line at the input/output of an
r
element and dragging this with a constantly depressed mouse key to the
input/output of the desired element.
A
Your program should finally look like the example shown here.
WAGO-I/O-PRO 32 3-13
Visualizing a Traffic Signal Unit
n t
e
u m
Figure 3.19: PLC_PRG, Declaration and presentation with the Continuous Function Chart Editor
c
TRAFFICSIGNAL
o
simulation
Now test your program. For this you must compile it ("Project" "Rebuild
D
all") login ("Online" "Login" and then load it "Online" "Download"). If
you now select "Online" "Run", the chronological order of the individual
steps of your main program can be followed. The window of the POU
d
PLC_PRG has now changed to the monitor window. Click twice on the plus
sign in the declaration editor, the variable display drops down, and you can see
e
the values of the individual variables.
iv
Visualizing a Traffic Signal Unit
ch
With the visualization of WAGO-I/O-PRO 32 you can quickly and easily bring
r
project variables to life. You find an complete description of the visualization
in chapter 8. We will now plot two traffic signals and an ON-Switch for our
traffic light unit which will illustrate the switching process.
A
Creating a new
visualization
In order to create a visualization you must first select the range of
Visualization in the Object Organizer. First click on the lower edge of the
window on the left side with the POU on the register card with this symbol
and the name Visualization. If you now choose the command "Project"
"Object Add", then a dialog box opens.
3-14 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
t
Enter here any name. When you confirm the dialog with OK, then a window
opens in which you can set up your new visualization.
n
Insert element in
e
Visualization
For our TRAFFICSIGNAL visualization you should proceed as follows:
m
• Give the command "Insert" "Ellipse" and draw a medium sized circle
(∅2cm). For this click in the editor field and draw with pressed left mouse
u
button the circle in its length.
c
• Now doubleclick the circle. The dialog box for editing visualization
elements opens
o
• Choose the category Variables and enter in the field Change color the
variable name .L1_red or choose this variable using the input assistance (button
D
<F2>). This addresses the variable RED of the function block instance
TRAFFICSIGNAL1 of the POU PLC_PRG.
ed
iv
ch
A r Image 3.21: Visualization Dialog Box Variables
• Then choose the category Color and click on the button Inside in the area
Color. Choose as neutral a color as possible, such as black.
• Now click on the button within in the area Alarm color and choose the
red which comes closest to that of a red light.
WAGO-I/O-PRO 32 3-15
Visualizing a Traffic Signal Unit
n t
Image 3.22: Visualization Configuration Dialog Box (Color category)
e
m
The resulting circle will normally be black, and when the variable RED from
u
TRAFFICSIGNAL1 is TRUE, then its color will change to red. We have
therefore created the first light of the first traffic signal !
c
The other traffic lights
o
Now enter the commands "Edit" "Copy" (<Ctrl>+<C>) and then twice
"Edit" "Paste" (<Ctrl>+<V>). That gives you two more circles of the exact
D
same size lying on top of the first one. You can move the circles by clicking on
the circle and dragging it with pressed left mouse button. The desired position
should, in our case, be in a vertical row in the left half of the editor window.
d
Doubleclick on one of the other two circles in order to open the configuration
dialog box again. Enter in the field Change Color of the corresponding circle
e
the following variables:
v
for the middle circle: L1_yellow
i
for the lowest circle: L1_green
h
Now choose for the circles in the category Color and in the area Alarm color
the corresponding color (yellow or green).
r c
The TRAFFICSIGNAL
case
A
Now enter the command "Insert" "Rectangle", and insert in the same way as
the circle a rectangle which encloses the three circles. Once again choose as
neutral a color as possible for the rectangle and give the command "Extras"
"Send to back" so that the circles are visible again.
If simulation mode1 is not yet turned on, you can activate it with the command
"Online" "Simulation".
1
The simulation mode is active if a check mark (ü) appears in front of the
menu item "Simulation" in the "Online" menu..
3-16 WAGO-I/O-PRO 32
Chapter 3 - We Write a Little Program
If you now start the simulation with the commands "Online" "Login" and
"Online" "Run", then you can observe the color change of the first traffic
signal.
t
elements of the first traffic signal. For this you select all elements of the first
traffic signal and copy them (as before with the lights of the first traffic signal)
n
with the commands "Edit" "Copy" and "Edit" "Paste". You then only have
to change the text "TRAFFICSIGNAL1" in the respective dialog boxes into
e
"TRAFFICSIGNAL2", and the visualization of the second traffic signal is
completed.
The ON switch
m
Insert a rectangle and award it, as described above, a colour for a traffic light of
u
your choice and enter .ON at Variables for the Change color. Enter ”ON” in
the input field for Content in the category Text.
o c
D
ed
iv
h
Image 3.23: Dialog to configure the visualization elements (Category Text)
c
In order to set the variable ON to TRUE with a mouse click on the switch, the
variable .ON must be entered into the category Variables. Also select the
r
Option Variable keying and enter the variable .ON at this point. Variable
keying means that when a mouse click is made on the visualization element the
A
variable .ON is set to the value TRUE but is reset to the value FALSE when the
mousekey is released again (we have created hereby a simple switch-on device
for our traffic lights program).
WAGO-I/O-PRO 32 3-17
Visualizing a Traffic Signal Unit
n t
e
Image 3.24: Dialog to configure the visualization elements (Category Input)
m
Font in the visualization
u
In order to complete the visualization you should first insert two more
c
rectangles which you place underneath the traffic signals.
o
In the visualizations dialog box set white in the category Color for Frame and
write in the category Text in the field Contents "Light1" or "Light2". Now your
visualization looks like this:
D
ed
iv
ch
A r Image 3.25: Visualization for the Sample Project Trafficsignal
3-18 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
u m
o c
D
d
Image 4.1: The Main Window
e
The following elements are found in the main window of WAGO-I/O-PRO 32
iv
(from top to bottom):
• The menu bar
• The Tool bar (optional); with buttons for faster selection of menu
h
commands.
c
• The Object Organizer with register cards for POUs, Data types,
r
Visualizations, and Resources
• A vertical screen divider between the Object Organizer and the Work
space of WAGO-I/O-PRO 32
A
• The Work space in which the editor windows are located
• The message window (optional)
• The Status bar (optional); with information about the current status of
the project
Menu bar
The menu bar is located at the upper edge of the main window. It contains all
menu commands.
WAGO-I/O-PRO 32 4-1
The Main Window
Tool bar
By clicking with the mouse on a symbol you can select a menu command more
quickly. The choice of the available symbols automatically adapts itself to the
active window.
The command is only carried out when the mouse button is pressed on the
symbol and then released.
t
If you hold the mouse pointer for a short time on a symbol in the tool bar, then
n
the name of the symbol is shown in a Tooltip.
In order to see a description of each symbol on the tool bar, select in Help the
e
editor about which you want information and click on the tool bar symbol in
which you are interested.
m
The display of the tool bar is optional (see "Project" "Options" category
Desktop).
c u
o
Object Organizer
D
The Object Organizer is always located on the left side of WAGO-I/O-PRO.32
At the bottom there are four register cards with symbols for the four types of
d
objects POUs, Data types, Visualizations and Resources. In
order to change between the respective object types click with the mouse on the
e
corresponding register card or use the left or right arrow key.
You will learn in chapter Creating and Deleting Objects, etc.how to work with
iv
the objects in the Object Organizer.
ch
A r Image 4.4: Object Organizer
Screen divider
The screen divider is the border between two non-overlapping windows. In
WAGO-I/O-PRO 32 there are screen dividers between the Object Organizer
and the Work space of the main window, between the interface (declaration
part) and the implementation (instruction part) of POUs and between the Work
space and the message window.
4-2 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
You can move the screen divider with the mouse pointer. You do this by
moving the mouse with the left mouse button pressed.
Make sure the screen divider always remains at its absolute position, even when
the window size has been changed. If it seems that the screen divider is no
longer present, then simply enlarge your window.
Work space
t
The Work space is located on the right side of the main window in WAGO-
n
I/O-PRO 32. All editors for objects and the library manager are opened in this
area.
e
You find the description of the editors in the chapter Editors in WAGO-I/O-
PRO 32
m
Under the menu item "Window" you find all commands for window
management.
u
Message window
c
The message window is separated by a screen divider underneath the work
space in the main window.
o
It contains all messages from the previous compilations, checks , or
comparisons.
D
If you doubleclick with the mouse in the message window on a message or
press <Enter>, the editor opens with the object. The relevant line of the object
d
is selected. With the commands "Edit" "Next error" and "Edit" "Previous
error" you can can quickly jump between the error messages.
e
The display of the message window is optional (see "Window" "Messages").
v
Status bar
i
The status bar at the bottom of the window frame of the main window in
h
WAGO-I/O-PRO 32 gives you information about the current project and about
menu commands.
c
If an item is relevant, then the concept appears on the right side of the status bar
r
in black script, otherwise in gray script.
When you are working in online mode, the concept Online appears in black
A
script. If you are working in the offline mode it appears in gray script.
In Online mode you can see from the status bar whether you are in the
simulation (SIM), the program is being processed (RUNS), a breakpoint is set
(BP), or variables are being forced (FORCE).
With text editor the line and column number of the current cursor position is
indicated (e.g. Line:5, Col.:11). In online mode 'OV' is indicated black in the
status bar. Pressing the <Ins> key switches between Overwrite and Insert mode.
If the mouse point is in a visualization, the current X and Y position of the
cursor in pixels relative to the upper left corner of the screen is given. If the
mouse pointer is on an Element, or if an element is being processed, then its
WAGO-I/O-PRO 32 4-3
Options
number is indicated. If you have an element to insert, then it also appears (e.g.
Rectangle).
If you have chosen a menu command but haven't yet confirmed it, then a short
description appears in the status bar.
The display of the statusbar is optional (see "Project" "Options" category
Desktop).
t
Context Menu
n
Shortcut: <Shift>+<F10>
e
Instead of using the menu bar for executing a command, you can use the right
mouse button. The menu which then appears contains the most frequently used
commands for a selected object or for the active editor. The choice of the
m
available commands adapts itself automatically to the active window. The
choice of the available commands adapts itself automatically to the active
u
window.
Options
o c
About WAGO-I/O-PRO 32 there can be of course only one viewpoint. In
D
WAGO-I/O-PRO 32, however, you can configure the view of the main
window (and have more than one viewpoint). In addition you can make other
settings. For this you have the command "Project" Options" at your disposal.
d
The settings you make thereby are, unless determined otherwise, saved in the
file "WAGO-IO-PRO.ini" and restored at the next WAGO-I/O-PRO 32
e
startup.
iv
"Project" "Options"
With this command the dialog box for setting options is opened. The options
h
are divided into different categories. Choose the desired category on the left
side of the dialog box by means of a mouse click or using the arrow keys and
c
change the options on the right side.
r
You have at your disposal the following categories:
• Load & Save
A
• User information
• Editor
• Desktop
• Color
• Directories
• Build
• Passwords
4-4 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
m
Image 4.5: Option dialog box of the category Load & Save
u
When activating an option, a check (ü) appears before the option.
c
If you choose the option Create Backup, then WAGO-I/O-PRO 32 creates a
backup file at every save with the extension ".bak". In this way you can always
o
restore the versions before the last save.
If you choose the option Auto Save , then while you work your project is
D
constantly saved to a temporary file with the extension ".asd" according to a set
time interval (Auto Save Interval). This file is erased at a normal exit from the
program. If for any reason WAGO-I/O-PRO 32 is not shut down "normally"
d
(e.g. due to a power failure), then the file is not erased. When you open the file
again the following message appears:
v e
h i
r c
A
Image 4.6: There is an auto save backup.
You can now decide whether you want to open the original file or the auto save
file.
If you request the option Ask for project info, then when saving a new project,
or saving a project under a new name, the project info is automatically called.
You can visualize the project info with the command "Project" "Project
info" and also process it.
If you choose the option Auto Load, then at the next start of WAGO-I/O-PRO
32 the last open project is automatically loaded. The loading of a project at the
WAGO-I/O-PRO 32 4-5
Options
start of WAGO-I/O-PRO 32 can also take place by entering the project in the
command line.
User information
If you choose this category , then you get the following dialog box:
n t
e
u m
o c
Image 4.7: Options dialog box of the category User information
D
To User information belong the Name of the user, his Initials and the
Company for which he works. Each of the entries can be modified.
d
Editor
If you choose this category , then you get the following dialog box:
v e
h i
r c
A Image 4.8: Options dialog box of the category Editor
4-6 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
• Tab width
• Font
• Display of the text selection
• Display of the Bitvalues
Autodeclaration
t
If you have chosen the Autodeclaration, then (following the input of a not-yet-
n
declared variable) a dialog box will appear in all editors with which this
variable can be declared.
e
Autoformat
If the option Autoformat in the category Editor of the options dialog box has
m
been chosen, then WAGO-I/O-PRO 32 executes automatic formatting in the IL
editor and in the declaration editor. When you finish with a line, the following
u
formatting is made:
• Operators written in small letters are shown in capitals;
c
• Tabs are inserted to that the columns are uniformly divided.
o
Declarations as tables
If the option Declarations as tables in the Editor category in the Options
D
dialog box is selected, then you can edit variables in a table instead of using the
usual declaration editor (see chapter The Declaration Editor). This table is
arranged as a card-index box in which there are register cards for input, output,
d
local, and input/output variables. For each variable you have available the fields
Name, Address, Type, Initial, and Comment.
e
Tab-Width
iv
In the field Tab-Width in the category Editor of the Options dialog box you
can determine the width of a tab as shown in the editors. The default setting is
h
four characters, whereby the character width depends upon the font which is
chosen.
r c
Font
By clicking on the button Font in the category Editor of the Options dialog box
A
you can choose the font in all WAGO-I/O-PRO 32 editors. The font size is the
basic unit for all drawing operations. The choice of a larger font size thus
enlarges the printout, even with each editor of WAGO-I/O-PRO 32.
After you have entered the command, the font dialog box opens for choosing
the font, style and font size.
WAGO-I/O-PRO 32 4-7
Options
n t
e
u m
c
Image 4.9: Dialog box for setting the font
Mark
o
D
When choosing Mark in the Editor category in the Options dialog box you can
choose whether the current selection in your graphic editors should be
d
represented by a dotted rectangle (Dotted), a rectangle with continuous lines
(Line) or by a filled-in rectangle (Filled). In the last case the selection is shown
e
inverted.
The selection is activated in front of which a (•) point appears.
iv
Bitvalues
h
When choosing Bitvalues in the category Editor of the Options dialog box you
can choose whether binary data (type BYTE, WORD, DWORD) during
c
monitoring should be shown Decimal, Hexadecimal, or Binary.
r
The selection is activated in front of which a (•) point appears.
A
Desktop
If you choose this category , then you get the following dialog box:
4-8 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
m
Image 4.10: Options dialog box of the category Desktop
u
If the option Tool bar has been chosen, then the tool bar with the buttons for
c
faster selection of menu commands becomes visible underneath the menu bar.
If the option Status bar has been chosen, then the status bar at the lower edge
o
of the WAGO-I/O-PRO 32 main window becomes visible.
If the option Online in Security mode has been chosen, then in Online mode
D
with the commands "Run", "Stop", "Reset", "Toggle Breakpoint", "Single
cycle", "Write values", "Force values" and "Release force", a dialog box
appears with the confirmation request whether the command should really be
d
executed. This option is saved with the project.
e
In language you can define, in which language the menu and dialog texts are
displayed.
iv Note: Please note, that the language choice is only possible under
h
Windows NT !
c
Colors
r
If you choose this category , then you get the following dialog box:
WAGO-I/O-PRO 32 4-9
Options
n t
e
m
Image 4.11: Options dialog box of the category Color
u
You can edit the default color setting of WAGO-I/O-PRO 32. You can choose
c
whether you want to change the color settings for Line numbers (default
setting: light gray), for Breakpoint positions (dark gray), for a Set breakpoint
o
(light blue), for the Current position (red), for the Reached Positions (green)
or for the Monitoring of Boolean values (blue).
D
If you have chosen one of the indicated buttons, the dialog box for the input of
colors opens.
ed
iv
ch
A r
Image 4.12: Dialog box for setting colors
Directories
If you choose this category , then you get the following dialog box:
4-10 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
m
Image 4.13: Options dialog box of the category Directories
u
In the input fields Libraries and Compilation Files you can indicate
c
directories from which WAGO-I/O-PRO 32 should extract the libraries or
compilation files. If you activate the button (...) behind a field, then the dialog
o
box for selecting a directory opens.
Build
D
If you choose this category , then you get the following dialog box:
ed
iv
ch
A r Image 4.14: Options dialog box of the category Build
If the option Debugging has been chosen, then the code can significantly
increase in size. Choosing this option makes it possible to generate additional
debugging codes. This is necessary in order to use the WAGO-I/O-PRO 32
debugging functions. If you deactivate this option, then you make possible
faster processing and a smaller code. This option is saved with the project.
If the option Save before compile, then your project will be saved every time
before compilation.
WAGO-I/O-PRO 32 4-11
Options
With the indication of the Number of data segments you can determine how
much space is reserved in the PLC for the data of your project. If during Build
you get the message: "The global variables need too much memory", then
increase the number of segments in "Project" "Build" ", which increases the
number of the data segments.
These options are saved with the project.
t
Passwords
n
If you choose this category , then you get the following dialog box:
e
u m
o c
D
Image 4.15: Options dialog box of the category Passwords
d
To protect your files from unauthorized access WAGO-I/O-PRO 32 offers the
e
option of using a password to protect against your files being opened or
v
changed.
i
Enter the desired password in the field Password. For each typed character an
asterisk (*) appears in the field. You must repeat the same word in the field
h
Confirm Password. Close the dialog box with OK. If you get the message:
"The password does not agree with the confirmation",
r c
then you made a typing error during one of the two entries. In this case repeat
both entries until the dialog box closes without a message.
A
If you now save the file and then reopen it, then you get a dialog box in which
you are requested to enter the password. The project can then only be opened if
you enter the correct password. Otherwise WAGO-I/O-PRO 32 reports:
"The password is not correct."
Along with the opening of the file, you can also use a password to protect
against the file being changed. For this you must enter a password in the field
Write Protection Password and confirm this entry in the field underneath.
A write-protected project can be opened without a password. For this simply
press the button Cancel, if WAGO-I/O-PRO 32 tells you to enter the write-
protection password when opening a file. Now you can compile the project,
load it into the PLC, simulate, etc., but you cannot change it.
4-12 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
t
Sourcedownload
The following dialog will be opened when you select this category:
e n
u m
o c
D
Image 4.16: Option dialog for the category Sourcedownload
You can choose to which Timing and what Extent the project is loaded into the
d
controller system. The option Sourcecode only exclusively involves just the
WAGO-I/O-PRO 32 file (file extension .pro). The option All files also
e
includes files such as the associated library files, visualization bitmaps,
configuration files, etc.
iv
Using the option Implicit at load allows the selected file range to be
automatically loaded into the controller system on the command "Online"
h
"Load".
c
Using the option Notice at load offers a dialog, when the command "Online"
r
"Load" is given, with the question ”Do you want to write the source code into
the controller system?”. Pressing Yes will automatically load the selected range
of files into the controller system, or you can alternatively finish with No.
A
When using the option On demand the selected range of files must be
expressly loaded into the controller system by giving the command "Online"
"Sourcecode download".
The project which is stored in the controller system can be retrieved by using
"File" "Open" with Open project from PLC. The files will be unpacked in the
process.
See Chapter 4.3, "File" "Open" for details !
Symbol configuration
If you choose this category , then you get the following dialog box:
WAGO-I/O-PRO 32 4-13
Options
n t
e
Image 4.17: Option dialog for the category Symbol configuration
m
If the Dump symbol entries option has been selected you get a text file in
which you can find symbols for the I/O variables and the memory address.
u
When selecting Create binary file of the application a binary file of the
c
application is created. This function is not necessary in WAGO-I/O-PRO 32
for the time being.
o
D
ed
iv
ch
Ar
4-14 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
Memory layout
If you choose this category , then you get the following dialog box:
n t
e
Image 4.18: Option dialog for the category Memory layout
u m
c
If the menu item Memory Layout is selected the start addresses of various
memory areas of the controller are displayed. The addresses should not be
o
changed.
D
If you choose this category , then you get the following dialog box:
ed
iv
ch
A r Image 4.19: Option dialog for the category C16x Compiler output
When selecting Hex-File the application is written in a Intel Hex file which can
be loaded into the selected controller.
Bin-File is not supported for the time being.
Both functions are not needed in WAGO-I/O-PRO 32 for the time being.
WAGO-I/O-PRO 32 4-15
Managing Projects
Managing Projects
The commands which refer to entire project are found under the menu items
"File" and "Project". Some of the commands under "Project" deal with objects
and are therefore described in the chapter Creating and Deleting Objects, etc..
t
"File" "New"
n
Symbol:
With this command you create an empty project with the name "Untitled". This
e
name must be changed when saving.
"File" "Open"
m
Symbol:
u
With this command you open an already existing project. If a project has
already been opened and changed, then WAGO-I/O-PRO 32 asks whether this
c
project should be saved or not.
o
The dialog box for opening a file appears, and a project file with the extension
"*.pro" or a library file with the extension "*.lib" must be chosen. This file
must already exist. It is not possible to create a project with the command
D
"Open".
To upload a project from the PLC, press PLC at Open project from PLC. If
d
there is no current connection to the PLC, the dialog Communication
parameters appears to define the transmission parameters. If an online
e
connection is made, there will be checked whether there are already project files
with equal names in the local PC directories. In this case the dialog Load
v
project from PLC is opened where you can decide to replace or not to replace
i
the local files by that used in the PLC.
h
Note: Please note, that you in any case have to give a new name to a
c
project, when you load it from the PLC to your local directory, otherwise it is
r
unnamed.
If there has not yet been loaded a project to the PLC, you get an error message.
A
(See also "Project" "Options" category "Sourcedownload").
4-16 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
u m
c
Image 4.20: Standard dialog box for opening a file in WAGO-I/O-PRO 32
o
The most recently opened files are listed under the command "File" "Exit". If
you choose one of them, then this project is opened.
D
If Passwords or User groups have been defined for the project, then a dialog
box appears for entering the password.
d
"File" "Close"
With this command you close the currently-open project. If the project has been
e
changed, then WAGO-I/O-PRO 32 asks if these changes are to be saved or
not.
iv
If the project to be saved carries the name "Untitled", then a name must be
given to it (see "File" "Save as").
h
"File" "Save"
r c
Symbol: Shortcut: <Ctrl>+<S>
With this command you save any changes in the project.
A
If the project to be saved is called "Untitled", then you must give it a name (see
"File" "Save as").
WAGO-I/O-PRO 32 4-17
Managing Projects
n t
e
m
Image 4.21: Dialog box for Save as
u
If the project is to be saved under a new name, then choose the file type
c
WAGO-I/O-PRO 32 Project (*.pro).
If you choose the file type Project Version 1.5 (*.pro), respectively Project
o
Version 2.0 (*.pro) then the current project is saved as if it were created with
the version 1.5 respectively 2.0. Specific data of the version 2.0 can thereby be
D
lost! However, the project can be executed with the version 1.5 or 2.0.
You can also save the current project as a library in order to use it in other
projects. Choose the file type Internal library (*.lib) if you have programmed
d
your POUs in WAGO-I/O-PRO 32.
e
Choose the file type External library (*.lib) if you want to implement and
integrate POUs in other languages (e.g. C). This means that another file is also
v
saved which receives the file name of the library, but with the extension "*.h".
i
This file is constructed as a C header file with the declarations of all POUs, data
types, and global variables. Is external libraries are used, in the simulation
h
mode the implementation, written for the POUs in WAGO-I/O-PRO 32, will
be executed. Working with the real hardware the implementation written in C
c
will be executed.
r
Then click OK. The current project is saved in the indicated file. If the new file
name already exists, then you are asked if you want to overwrite this file.
A
When saving as a library, the entire project is compiled. If an error occurs
thereby, then you are told that a correct project is necessary in order to create a
library. The project is then not saved as a library.
"File" "Print"
Shortcut: <Ctrl>+<P>
With this command the content of the active window is printed.
After the command has been chosen, then the Print dialog box appears. Choose
the desired option or configure the printer and then click OK. The active
window is printed.
4-18 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
u m
c
Image 4.22: Print dialog box
o
You can determine the number of the copies and print the version to a file.
With the button Properties you open the dialog box to set up the printer.
D
You can determine the layout of your printout with the command "File"
"Printer Setup".
d
During printing the dialog box shows you the number of pages already printed.
When you close this dialog box, then the printing stops after the next page.
e
In order to document your entire project, use the command "Project"
v
"Document".
i
If you want to create a document frame for your project, then open a global
variables list and use the command "Extras" "Make Docuframe file".
h
"File" "Printer setup"
r c
With this command you can determine the layout of the printed pages. The
following dialog box is now opened:
WAGO-I/O-PRO 32 4-19
Managing Projects
In the field File you can enter the name of the file with the extension ".dfr" in
which the page layout should be saved. The default destination for the settings
is the file DEFAULT.DFR.
If you would like to change an existing layout, then browse through the
t
directory tree to find the desired file with the button Browse
You can also choose whether to begin a new page for each object and for
n
each subobject. Use the Printer Setup button to open the printer
configuration.
e
If you click on the Edit button, then the frame for setting up the page layout
appears. Here you can determine the page numbers, date, filename and POU
m
name, and also place graphics on the page and the text area in which the
documentation should be printed.
c u
o
D
ed
iv
ch
Image 4.24: Window for pasting the placeholders on the page layout
r
With the menu item "Insert" "Placeholder" and subsequent selection among
A
the five placeholders (Page, POU name, File name, Date, and Content),
insert into the layout a so-called placeholder by dragging a rectangle2 on the
layout while pressing the left mouse button. In the printout they are replaced as
follows:
Command Placeholder Effect
Page {Page} Here the current page number appears in
the printout.
POU name {POU Name} Here the current name of the POU
appears.
2
Drawing a rectangle on the layout by dragging the mouse diagonally while
pressing the left mouse button.
4-20 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
File name {File Name} Here the name of the project appears.
Date {Date} Here the current date appears.
Contents {Contents} Here the contents of the POU appear.
In addition, with "Insert" "Bitmap" you can insert a bitmap graphic (e.g. a
company logo) in the page. After selecting the graphic, a rectangle should also
be drawn here on the layout using the mouse. Other visualization elements can
t
be inserted (see chapter Visualizations).
If the template was changed, then WAGO-I/O-PRO 32 asks when the window
n
is closed if these changes should be saved or not.
e
"File" "Exit"
Shortcut: <Alt>+<F4>
m
With this command you exit from WAGO-I/O-PRO 32.
u
If a project is opened, then it is closed as described in "File" "Save".
c
"Project" "Check all"
With this command you can check the static correctness of your program. If an
o
error crops up, then it is announced in the message window, as with the
building of the program.
D
In contrast to the command "Rebuild all", no code is created
"Project" "Build"
d
With this command all changed POUs are built. When loading the program,
only the modified POUs are sent to the PLC. The rest of the program remains
e
unchanged in the PLC.
iv
Note: The command "Build" is only supported if WAGO-I/O-PRO 32 is
equipped with the Online Change function. Otherwise the command "Build"
h
acts like "Rebuild all".
c
With larger changes use the function "Project" "Register changes".
r
Online Change function means that parts of a program can be exchanged (sent
to the PLC) without interrupting the PLC. All data is retained as far as possible.
WAGO-I/O-PRO 32 4-21
Managing Projects
With this command you rebuild all POUs. The message window is opened
which shows the progress of the building process and any errors which may be
be discovered.
A list of all error messages is to be found in the appendix.
n t
e
u m
c
Image 4.25: Message window of a project with three POUs and two error messages
o
With the command "Online" "Login" the command "Rebuild all" is
automatically executed if the project has been modified since the last
D
compilation.
If the option Save before compile in the Options dialog box in the category
Build has been chosen, then the project is backed up before compilation.
ed
Note: The cross references are created during compilation and are not
saved in the project! In order to use the commands "Show call tree”, "Show
iv
cross reference list, and "Show unused variables the project must be rebuilt
after loading and after a modification.
h
"Project" "Document"
c
This command lets you print the documentation of your entire project. The
r
elements of a complete documentation are:
• The POUs,
• the contents of the documentation,
A
• the data types,
• the visualizations
• the resources (Global variables, variables configuration, the Sampling
Trace, the PLC Configuration, the Task Configuration, the Watch and
Receipt Manager)
• the call trees of POUs and data types, as well as
• the cross reference list.
For the last two items the project must have been built without errors.
4-22 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
u m
o c
D
d
Image 4.26: Dialog box for project documentation
e
Only those areas in the dialog box are printed which are highlighted in blue.
v
If you want to select the entire project, then select the name of your project in
i
the first line.
If, on the other hand, you only want to select a single object, then click on the
h
corresponding object or move the dotted rectangle onto the desired object with
c
the arrow key. Objects which have a plus sign in front of their symbols are
organization objects which contain other objects. With a click on a plus sign
r
organization object is expanded, and with a click on the resulting minus sign it
can be closed up again. When you select an organization object, then all
A
relevant objets are also selected. By pressing the <Shift> key you can select a
group of objects, and by pressing the <Ctrl> key you can select several
individual objects.
Once you have made your selection, then click on OK. The Print dialog box
appears. You can determine the layout of the pages to be printed with "File"
"Printer setup".
"Project" "Export"
With WAGO-I/O-PRO 32 projects can be exported or imported. That allows
you to exchange programs between different IEC programming systems.
WAGO-I/O-PRO 32 4-23
Managing Projects
There is a standardized exchange format for POUs in IL, ST, and SFC (the
Common Elements format of IEC 61131-3). For the POUs in LD and FBD and
the other objects WAGO-I/O-PRO 32 has its own filing format since there is
no text format for this in IEC 61131-3. The selected objects are written to an
ASCII file.
POUs, data types, visualizations, and the resources can be exported.
t
Once you have made your selection in the dialog box window (the same way as
with "Project" "Document" ), you can decide, whether you want to export the
n
selected parts to one file or to export in separate files, one for each object.
Switch on or off the option One file for each object then click on OK. The
e
dialog box for saving files appears. Enter a file name with the expansion ".exp"
respectively a directory for the object export files, which then will be saved
there with the file name <objectname.exp>.
m
"Project" "Import"
u
In the resulting dialog box for opening files select the desired export file.
c
The data is imported into the current project. If an object with the same name
already exists in the same project, then a dialog box appears with the question
o
"Do you want to replace it?": If you answer Yes, then the object in the project is
replaced by the object from the import file. If you answer No, then the name of
D
the new objects receives as a supplement an underline and a digit ("_0", "_1",
..). With Yes, all or No, all this is carried out for all objects.
In the message window the import is registered.
d
"Project" "Compare"
e
With this command you can compare the open project with another. For
v
example, if you prepare to save and want to know where you have made
i
changes in the current project, then you can compare the open project with the
last saved version of it.
h
After you have given this command, then the dialog box for opening files
appears. Choose the project with which you want to compare the current
c
project. If you press OK, then you will see the result of the comparison in the
r
message window. All of the objects of the chosen project are listed and the
changes in the object are shown afterward in parentheses. There are five
A
possible messages:
• "Unchanged": The object was not changed.
• "Deleted": The object is no longer present in the current project.
• "Implementation changed": The instruction part of the POU has been
changed.
• "Interface changed": The declaration part of the object has been changed.
• "Interface and implementation changed": Both the instruction part and the
declaration part of the POU have been changed.
A doubleclick on a message selects the first change in this object.
4-24 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
"Project" "Merge"
With this command you can merge objects (POUs, data types, visualizations,
and resources) from other projects into your project.
When the command has been given, first the standard dialog box for opening
files appears. When you have chosen a file there, a dialog box appears in which
you can choose the desired object. The selection takes place as described with
t
"Project" "Document" .
n
If an object with the same name already exists in the project, then the name of
the new object receives the addition of an underline and a digit ("_1", "_2" ...).
e
"Project" "Project info"
Under this menu item the information about your project can be saved. When
m
the command has been given, then the following dialog box opens:
c u
o
D
ed
iv
ch
A r Image 4.27: Dialog box for entering project information
WAGO-I/O-PRO 32 4-25
Managing Projects
This information is optional. When you press the button Statistics you receive
statistical information about the project.
It contains information such as the number of the POUs, data types, and the
local and global variables as they were traced at the last compilation.
n t
e
u m
o c
D
Image 4.28: Example of project statistics
d
If you choose the option Ask for project info in the category Load & Save in
the Options dialog box, then while saving a new project, or while saving a
e
project under a new name, the project info is called automatically.
v
"Project" "Global
i
Search"
With this command you can search for the location of a text in POUs, data
h
types, or in the objects of the global variables.
c
When the command is entered, a dialog box opens in which you can choose the
r
desired object. The selection is made as in the "Project" "Document"
description.
A
When you have confirmed the selection with OK, then the search dialog box
appears. If a text in an object has been found, then the object is loaded into the
appropriate editor, and its location is shown.
"Project" "Global
replace"
With this command you can search for the location of a text in POUs, data
types, or the objects of the global variables and replace this text by another.
This is executed in the same way as with "Project" "Global Search" or
"Edit" "Replace".
4-26 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
"Project" "Register
changes"
This command is necessary when significant changes have to be made to a
project without interrupting the PLC. (Online Change).
Copy your project, make your changes, and test your changes. Select the
command "Project" "Compare" in order to compare the two projects. With
t
the command "Register changes" all differences between the current project
and the comparison are traced. Then, with the command "Build" the modified
n
POUs can be compiled. When downloading the program only the modified
POUs are sent to the PLC. The rest of the program remains unchanged in the
e
PLC.
User groups
m
In WAGO-I/O-PRO 32 up to eight user groups with different access rights to
u
the POUs, data types, visualizations, and resources can be set up. Access rights
for single objects or all of them can be established. Only a member of a certain
c
user group can open a project. A member of such a user group must identify
himself by means of a password.
o
The user groups are numbered from 0 to 7, whereby the Group 0 has the
administrator rights, i.e. only members of group 0 may determine passwords
D
and access rights for all groups and/or objects.
When a new project is launched, then all passwords are initially empty. Until a
password has been set for the 0 group, one enters the project automatically as a
d
member of the 0 group.
e
If a password for the user group 0 is existing while the project is loaded, then a
password will be demanded for all groups when the project is opened. For this
v
the following dialog box appears:
h i
r c
A
Image 4.29: Dialog box for password entry
In the combobox User group on the left side of the dialog box, enter the group
to which you belong and enter on the right side the relevant password. Press
OK. If the password does not agree with the saved password, then the message
appears:
"The password is not correct."
Only when you have entered the correct password can the project be opened.
WAGO-I/O-PRO 32 4-27
Creating and Deleting Objects, etc.
With the command "Passwords for user group" you can assign the
passwords, and with "Object" "Access rights" you can define the rights for
single objects or for all of them.
"Project""Passwords for
user groups"
t
With this command you open the dialog box for password assignment for user
groups. This command can only be executed by members of group 0. When the
n
command has been given, then the following dialog box appears:
e
u m
c
Image 4.30: Dialog box for password assignment
o
In the left combobox User group you can select the group. Enter the desired
password for the group in the field Password. For each typed character an
D
asterisk (*) appears in the field. You must repeat the same password in the field
Confirm password. Close the dialog box after each password entry with OK.
If you get the message:
d
"The password does not agree with the confirmation",
then you made a typing error during one of the two entries. In this case repeat
e
both entries until the dialog box closes without a message.
v
Then, if necessary, assign a password for the next group by calling the
i
command again.
h
With the command "Object" "Access rights" you can assign the rights for
single objects or all of them.
r c
Creating and Deleting Objects, etc.
A
Now we shall explain how to work with objects and what help is available to
keep track of a project (Folders, Call tree, Cross reference list,..).
Object
POUs, data types, visualizations and the resources (Global variables, the
variable configuration, the Sampling Trace, the PLC Configuration, the Task
Configuration, and the Watch and Receipt Manager are all defined as "objects".
The folders inserted for structuring the project are partially involved. All
objects of a project are in the Object Organizer.
If you hold the mouse pointer for a short time on a POU in the Object
Organizer, then the type of the POU (Program, Function or Function block) is
4-28 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
shown in a Tooltip. For the global variables the tooltip shows the keyword
(VAR_ACCESS, VAR_GLOBAL, VAR_CONFIG).
Folder
In order to keep track of larger projects you should group your POUs, data
types, visualizations, and global variables systematically in folders.
t
You can set up as many levels of folders as you want. If a plus sign is in front
of a closed folder symbol, then this folder contains objects and/or
n
additional folders. With a click on the plus sign the folder is opened and the
subordinated objects appear. With a click on the minus (which has replaced the
e
plus sign) the folder can be closed again. In the context menu you find the
commands "Expand nodes" and "Collapse nodes" with the same functions.
m
With Drag&Drop you can move the objects as well as the folders within their
object type. For this select the object and drag it with pressed left mouse button
u
to the desired position.
c
Note: Folders have no influence on the program, but rather serve only to
o
structure your project clearly.
D
ed
iv Image 4.31: Example of folders in the Object Organizer
h
"New Folder"
r c
With this command a new folder is inserted as a structural object. If a folder has
been selected, then the new one is created underneath it. Otherwise it is created
on the same level.
A
The context menu of the Object Organizer which contains this command
appears when an object or the object type has been selected and you have
pressed the right mouse button or <Shift>+<F10>.
WAGO-I/O-PRO 32 4-29
Creating and Deleting Objects, etc.
The context menu of the Object Organizer which contains this command
appears when an object or the object type has been selected and you have
pressed the right mouse button or <Shift>+<F10>.
t
With this command the currently selected object (a POU, a data type, a
visualization, or global variables), or a folder with the subordinated objects is
n
removed from the Object Organizer and is thus deleted from the project.
For safety you are asked once more for confirmation.
e
If the editor window of the object was open, then it is automatically closed.
If you delete with the command "Edit" "Cut", then the object is parked on the
m
clipboard.
u
"Project" "Object Add"
c
Shortcut: <Insert>
With this command you create a new object. The type of the object (POU, data
o
type, visualization, or global variables) depends upon the selected register card
in the Object Organizer. Enter the name of the new object in the dialog box
D
which appears. Remember that the name of the object may not have already
been used.
If you are dealing with a POU, then you must also choose the type of the POU
d
(Program, Function, or Function block) and the language in which it is to be
programmed.
e
After confirmation of the entry, then the suitable entry window for the object
v
appears.
h i
r c
A Image 4.32: Dialog box for creating a new POU
If, on the other hand, you use the command "Edit" "Paste", then the object is
pasted from the clipboard, and no dialog box appears.
4-30 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
"Project" "Object
Rename"
Shortcut: <Spacebar>
With this command you give a new name to the currently-selected object or
folder. Remember that the name of the object may not have already been used.
t
If the editing window of the object is open, then its title is changed
automatically when the name is changed.
e n
m
Image 4.33: Dialog box for renaming a POU
u
"Project" "Object
c
Convert"
This command can only be used with POUs. You can convert POUs from the
o
languages SFC, ST, FBD, LD, and IL into one of the three languages IL, FBD,
and LD.
D
For this the project must be compiled. Choose the language into which you
want to convert and give the POU a new name. Remember that the name of the
POU may not have already been used. Then press OK, and the new POU is
d
added to your POU list.
v e
h i
r c Image 4.34: Dialog box for converting a POU
A
"Project" "Object Copy"
With this command a selected object is copied and saved under a new name.
Enter the name of the new object in the resulting dialog box. Remember that
the name of the object may not have already been used.
If, on the other hand, you used the command "Edit" "Copy", then the object is
parked on the clipboard, and no dialog box appears.
WAGO-I/O-PRO 32 4-31
Creating and Deleting Objects, etc.
n t
e
Shortcut: <Enter>
With the command you load a selected object within the Object Organizer into
the respective editor. If a window with this object is already open, then it gets a
m
focus, is moved into the foreground and can now be edited.
u
There are two other ways of opening an object:
• Doubleclick with the mouse on the desired object
c
• type in the Object Organizer the first letter of the object name. Then a
dialog box opens in which all objects of the available object types with
o
this initial letter are shown. Select the desired object and click on the
button Open in order to load the object in its edit window. This option is
D
supported with the object type Resources only for global variables.
This last possibility is especially useful in projects with many objects.
ed
iv
ch
A r
Image 4.36: Dialog box for choosing the object to be opened
4-32 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
Image 4.37: Dialog box for assigning access rights
m
Members of the user group 0 can now assign individual access rights for each
user group. There are three possible settings:
u
• No Access: the object may not be opened by a member of the user group.
• Read Access: the object can be opened for reading by a member of the
c
user group but not changed.
• Full Access: the object may be opened and changed by a member of the
o
user group.
The settings refer either to the currently-selected object in the Object Organizer
D
or, if the option Apply to all is chosen, to all POUs, data types, visualizations,
and resources of the project.
The assignment to a user group takes place when opening the project through a
d
password request if a password was assigned to the user group 0.
e
"Project" "Add Action"
v
This command is used to generate an action allocated to a selected block in the
i
Object Organiser. One selects the name of the action in the dialog which
appears and also the language in which the action should be implemented.
h
The new action is placed under your block in the Object Organiser. A plus sign
c
appears in front of the block. A simple mouse click on the plus sign causes the
r
action objects to appear and a minus sign appears in front of the block.
Renewed clicking on the minus sign causes the actions to disappear and the
plus sign appears again. This can also be achieved over the context menu
A
commands "Expand Node" and "Collapse Node".
Note: Instances can be opened only after logging in! (Project was correctly
compiled and sent with "Online" "Login" to the PLC).
WAGO-I/O-PRO 32 4-33
Creating and Deleting Objects, etc.
n t
e
Image 4.38: Dialog box for opening an instance
u m
c
"Project" "Show call tree"
o
With this command you open a window which shows the call tree of the object
chosen in the Object Organizer. For this the project must be compiled (see
"Rebuild all"). The call tree contains both calls for POUs and references to
D
data types.
ed
iv
ch
A r Image 4.39: Example of a call tree
4-34 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
number, it is shown whether this point has read only access or full access,
whether it is a local or global variable and whether the variable is connected to
an address.
When you select a line of the cross reference list and press the button Go To or
doubleclick on the line, then the POU is shown in its editor at the
corresponding point. In this way you can jump to all application points without
t
a time-consuming search.
In order to make processing easier, you can use the Send to message window
n
button to bring the current cross reference list into the message window and
from there change to the respective POU.
e
u m
o c
D
ed
iv
ch
Image 4.40: Dialog box and example of a cross reference list
r
"Project" "Show unused
variables"
A
With this command a list of variables is shown which, to be sure, have been
declared in the project but are not being used anywhere. For this the project
must be compiled (see "Rebuild all").
If there are no unused variables in your project, then that is announced.
Otherwise the following window appears:
WAGO-I/O-PRO 32 4-35
General Editing Functions
n t
e
m
Image 4.41: Unused variables of a project
u
variable, then you change to the respective object in which the variable has
c
been declared.
"Extras"
o
Previous version
With this command you can restore the current object to the last saved state.
D
The restored state is either that of the most recent manual save ("File" "Save")
or that which was kept after the automatic save, depending upon which version
is most recent.
e
General Editing Functions
d
iv
You can use the following commands in all editors and some of them in the
h
Object Organizer. All of the commands are locted under the menu item "Edit".
"Edit" "Undo"
r c
Shortcut: <Ctrl>+<Z>
This command undoes the action which was most recently executed in the
A
currently-open editor window or in the Object Organizer.
By repeatedly selecting this command, all actions can be undone back to the
point at which the window was opened. This applies to all actions in the editors
for POUs, data types, visualizations, and global variables and in the Object
Organizer.
With "Edit" "Redo" you can restore an action which you have undone.
Note: The commands "Undo" and "Redo" apply to the current window.
Each window carries its own action list. If you want to undo actions in several
windows, then you must activate the corresponding window. When undoing or
redoing in the Object Organizer the focus must lie here.
4-36 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
"Edit" "Redo"
Shortcut: <Ctrl>+<Y>
With the command in the currently-open editor window or in the Object
Organizer you can restore an action you have undone ("Edit" "Undo").
As often as you have previously executed the command "Undo" , you can also
t
carry out the command "Redo".
n
Note: The commands "Undo" and "Redo" apply to the current window.
e
Each window carries its own action list. If you want to undo actions in several
windows, then you must activate the corresponding window. When undoing or
redoing in the Object Manager must lie there.
m
"Edit" "Cut"
u
Symbol:
c
Shortcut: <Ctrl>+<X> or <Shift>+<Delete>
This command transfers the current selection from the editor to the clipboard.
o
The selection is removed from the editor.
In the Object Organizer this similarly applies to the selected object, whereby
D
not all objects can be deleted, e.g. the PLC Configuration.
Remember that not all editors support the cut command, and that its use can be
d
limited in some editors.
The form of the selection depends upon the respective editor:
e
In the text editors (IL, ST, and declarations) the selection is a list of characters.
v
In the FBD and LD editors the choice is a number of networks which are
i
indicated by a dotted rectangle in the network number field or a box with all
preceding lines, boxes, and operands.
h
In the SFC editor the selection is a part of a series of steps surrounded by a
c
dotted rectangle.
r
In order to paste the content of the clipboard you use the command "Edit"
"Paste". In the SFC editor you can also use the commands "Extras" "Insert
A
parallel branch (right)" or "Extras" "Paste after".
In order to copy a selection onto the clipboard without deleting it, use the
command "Edit" "Copy".
In order to remove a selected area without changing the clipboard, use the
command "Edit" "Delete".
"Edit" "Copy"
WAGO-I/O-PRO 32 4-37
General Editing Functions
With the Object Organizer this similarly applies to the selected object, whereby
not all objects can be copied, e.g. the PLC Configuration.
Remember that not all editors support copying and that it can be limited with
some editors.
For the type of selection the same rules apply as with "Edit" "Cut".
t
In the text editors (IL, ST, and declarations) the selection is a list of characters.
In the FBD and LD editors the choice is a number of networks which are
n
indicated by a dotted rectangle in the network number field or a box with all
preceding lines, boxes, and operands.
e
In the SFC editor you can also use the commands "Extras" "Insert parallel
branch (right)" or "Extras" "Paste after".
m
"Edit" "Paste"
u
Symbol: Shortcut: <Ctrl>+<V>
c
Pastes the content of the clipboard onto the current position in the editor
window. In the graphic editors the command can only be executed when a
o
correct structure results from the insertion.
With the Object Organizer the object is pasted from the clipboard.
D
Remember that pasting is not supported by all editors and that its use can be
limited in some editors.
d
The current position can be defined differently according to the type of editor:
With the text editors (IL, ST, Declarations) the current position is that of the
e
blinking cursor (a vertical line) which you place by clicking with the mouse).
v
In the FBD and LD editors the current position is the first network with a dotted
i
rectangle in the network number area. The contents of the clipboard are inserted
in front of this network. If a partial structure has been copied, then it is inserted
h
in front of the selected element.
c
In the SFC editor the current position is determined the selection which is
surrounded by a dotted rectangle. Depending upon the selection and the
r
contents of the clipboard, these contents are inserted either in front of the
selection or into a new branch (parallel or alternative) to the left of the
A
selection.
In SFC the commands "Extras" "Insert parallel branch (right)" or
"Extras" "Paste after" can be used in order to insert the contents of the
clipboard.
"Edit" "Delete"
Shortcut: <Delete>
Deletes the selected area from the editor window. This does not change the
contents of the clipboard.
In the Object Organizer this applies likewise to the selected object, whereby not
all objects can be deleted, e.g. the PLC Configuration.
4-38 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
For the type of selection the same rules apply as with "Edit" "Cut".
In the library manager the selection is the currently selected library name.
"Edit" "Find"
Symbol:
t
With this command you search for a certain text passage in the current editor
window. The Find dialog box opens. It remains opens until the button Cancel is
n
pressed.
In the field Find what you can enter the series of characters you are looking
e
for.
In addition, you can decide whether the text you are looking for Match whole
m
word only or not, or also whether Match case is to be considered, and whether
the search should proceed Up or Down starting from the current cursor
u
position.
c
The button Find next starts the search which begins at the selected position and
continues in the chosen search direction. If the text passages is found, then it is
o
highlighted. If the passage is not found, then a message announces this. The
search can be repeated several times in succession until the beginning or the
end of the contents of the editor window has been reached.
D
Remember that the found text can be covered up by the Find dialog box.
ed
iv Image 4.42: Find dialog box
ch
"Edit" "Find next"
r
Symbol: Shortcut: <F3>
With this command you execute a search with the same parameters as with the
A
most recent action "Edit" "Find".
"Edit" "Replace"
With this command you search for a certain passage just as with the command
"Edit" "Find", and replace it with another. After you have chosen the
command the dialog box for find and replace appears. This dialog box remains
open until the button Cancel or Close is pressed.
The button Replace replaces the current selection with the text in the field
Replace with.
WAGO-I/O-PRO 32 4-39
General Editing Functions
The button Replace all replaces every occurrence of the text in the field Find
next after the current position with the text in the field Replace with. At the
end of the procedure a message announces how many replacements were made.
n t
e
m
Image 4.43: Dialog box for find and replace
u
"Edit" "Input Assistant"
c
Shortcut: <F2>
This command provides a dialog box for choosing possible inputs at the current
o
cursor position in the editor window. In the left column choose the desired
input category, select the desired entry in the right column, and confirm your
choice with OK. This inserts your choice at this position.
D
The categories offered depend upon the current cursor position in the editor
window, i.e. upon that which can be entered at this point (e.g. variables,
d
operators, POUs, conversions, ...).
v e
h i
r c
A Image 4.44: Input Assistant Dialog Box
In some positions (e.g. in the watch list) multilevel variable names are
necessary. At first the Input Assistant dialog box contains a list of all POUs
along with a single point for the global variables. After each POU name there is
a point. Doubleclicking with the mouse or pressing <Enter> opens a list of the
variables for a selected POU. Instances and data types can, when appropriate,
be opened again. By pressing OK you accept the selected variable.
4-40 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
m
Image 4.45: Input Assistant dialog box with multilevel variable names
c u
Note: Some entries (e.g. global variables) are only brought up to date in
the Input Assistant after a compilation run.
o
"Edit" "Declare
D
Variable"’
Shortcut: <Shift>+<F2>
d
This command opens the dialog for the declaration of a variable. This dialog
also opens automatically when the option 'Project' 'Options' 'Editor'
e
'Autodeclaration' is switched on and when a new undefined variable is used the
declaration editor.
iv
"Edit" "Next error"
Shortcut: <F4>
h
After the incorrect compilation of a project this command can show the next
c
error. The corresponding editor window is activated and the incorrect place is
r
selected. At the same time in the message window the corresponding error
message is shown.
A
"Edit" "Previous error"
Shortcut: <Shift>+<F4>
After the incorrect compilation of a project this command shows the previous
error. The corresponding editor window is activated and the incorrect place is
selected. At the same time in the message window the corresponding error
message is shown.
WAGO-I/O-PRO 32 4-41
General Online Functions
The available online commands are assembled under the menu item "Online".
The execution of some of the commands depends upon the active editor.
The online commands become available only after logging in.
t
"Online" "Login"
n
Symbol: Shortcut: <Alt>+<F8>
This command combines the programming system with the PLC (or starts the
e
simulation program) and changes into the online mode.
If the current project has not been compiled since opening or since the last
m
modification, then it is compiled now (as with "Project" "Rebuild all"). If
errors occur during compilation, then WAGO-I/O-PRO 32 does not change
u
into Online mode.
After a successful login all online functions are available (if the corresponding
c
settings in "Options" category Build have been entered). The current values are
o
monitored for all visible variable declarations.
Use the "Online" "Logout" command to change from online back to offline
mode.
D
If the system reports
d
Error:
"A connection to the PLC could not be established"
e
Verify whether the parameters selected in the "Online" "Communication
Parameters" agree with those of your PLC.
iv
You should especially verify that the interface number is correct. (If you have
set it to COM1, the cable should also be physically plugged into COM1.)
h
Furthermore, verify that the baud rates in the PLC and the Program System
agree with each other. (Default setting in WAGO-I/O-PRO 32: 9600 Bd).
c
Error:
r
"The program has been modified! Should the new program be loaded?"
The project which is open in the editor is incompatible with the program
A
currently found in the PLC (or with the Simulation Mode program being run).
Monitoring and debugging is therefore not possible. You can either choose
"No," logout, and open the right project, or use "Yes" to load the current project
in the PLC.
"Online" "Logout"
4-42 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
"Online" "Download"
This command loads the compiled project in the PLC.
"Online" "Run"
t
This command starts the program in the PLC or in Simulation Mode.
This command can be executed immediately after the "Online" "Download"
n
command, or after the user program in the PLC has been ended with the
"Online" "Stop" command, or when the user program is at a break point, or
e
when a Single Cycle has been performed.
"Online" "Stop"
m
Symbol: Kurzform <Umschalt>+<F8>
u
Stops the execution of the program in the PLC or in Simulation Mode between
c
two cycles.
Use the "Online" "Run" command to restart the program.
o
"Online" "Reset"
D
If you have initialized the variables with a specific value, then this command
will reset the variables to the initialized value. All other variables are set at a
standard initialization (for example, integers at 0). As a precautionary measure,
d
WAGO-I/O-PRO 32 asks you to confirm your decision before all of the
variables are overwritten.
e
Use the "Online" "Run" command to restart the program.
v
"Online" "Toggle
i
Breakpoint"
h
Symbol: Shortcut: <F9>
c
This command sets a breakpoint in the present position in the active window. If
r
a breakpoint has already been set in the present position, that breakpoint will be
removed.
A
The position at which a breakpoint can be set depends on the language in which
the POU in the active window is written.
In the Text Editors (IL, ST), the breakpoint is set at the line where the cursor is
located, if this line is a breakpoint position (recognizable by the dark-gray color
of the line number field). You can also click on the line number field to set or
remove a breakpoint in the text editors.
In FBD and LD, the breakpoint is set at the currently selected network. In order
to set or remove a breakpoint in the FBD or LD Editor, you can also click on
the network number field.
In SFC, the breakpoint is set at the currently selected step. In SFC you can also
use <Shift> with a doubleclick to set or remove a breakpoint.
WAGO-I/O-PRO 32 4-43
General Online Functions
If a breakpoint has been set, then the line number field or the network number
field or the step will be displayed with a light-blue background color.
If a breakpoint is reached while the program is running, the program will stop,
and the corresponding field will be displayed in a red background color. In
order to continue the program, use the "Online" "Run", "Online" "Step in",
or "Online" "Step Over" commands.
t
Online "Breakpoint
n
Dialog Box"
This command opens a dialog box to edit breakpoints throughout the entire
e
project. The dialog box also displays all breakpoints presently set.
In order to set a breakpoint, choose a POU in the POU combobox and the line
m
or the network in the Location combobox where you would like to set the
breakpoint; then press the Add button. The breakpoint will be added to the list.
u
In order to delete a breakpoint, highlight the breakpoint to be deleted from the
list of the set breakpoints and press the Delete button.
c
The Delete All button can be used to delete all the breakpoints.
o
In order to go to the location in the editor where a certain breakpoint was set,
highlight the respective breakpoint from the list of set breakpoints and press the
D
Go to button.
ed
iv
ch
r
Image 4.46: Breakpoint Editing Dialog Box
A
"Online" "Step over"
4-44 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
t
If the present position is a call-up of a function or of a function block, then the
command will proceed on to the first instruction in the called POU.
n
In all other situations, the command will function exactly as "Online" "Step
e
Over".
m
Shortcut: <Ctrl>+<F5>
This command executes a single PLC Cycle and stops after this cycle.
u
This command can be repeated continuously in order to proceed in single
c
cycles.
The Single Cycle ends when the "Online" "Run" command is executed.
o
"Online" "Write Values"
or "Force Values"
D
Shortcut: <Ctrl>+<F7> (Write values)
Shortcut: <F7> (Force values)
d
In order to change the value of a variable containing a single element, you must
e
first use the mouse to doubleclick on the line in which the variable is declared,
or alternatively you can use <Enter>. Next you can enter the new value of the
v
variable in the dialog box that pops up. In the case of Boolean variables, the
i
value is toggled without the dialog box appearing. The new value is displayed
in red.
ch
A r Image 4.47: Dialog Box for Writing a New Variable Value.
WAGO-I/O-PRO 32 4-45
General Online Functions
t
"Online""Show Call
Stack"
n
You can run this command when the Simulation Mode stops at a breakpoint.
e
You will be given a dialog box with a list of the POUs currently in the Call
Stack.
u m
o c
D
ed
Image 4.48: Example of a Call Stack
iv
The first POU is always PLC_PRG, because this is where the executing begins.
The last POU is always the POU being executed.
h
After you have selected a POU and have pressed the Go to button, the selected
c
POU is loaded in its editor, and it will display the line or network being
r
processed.
A
If you have selected the flow control, then a check(ü) will appear in front of
the menu item. Following this, every line or every network will be marked
which was executed in the last PLC Cycle.
The line number field or the network number field of the lines or networks
which just run will be displayed in green. An additional field is added in the IL-
Editor in which the present contents of the accumulator are displayed. In the
graphic editors for the Function Block Diagram and Ladder Diagram, an
additional field will be inserted in all connecting lines not transporting any
Boolean values. When these Out- and Inputs are verified, then the value that is
transported over the connecting line will be shown in this field. Connecting
4-46 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
lines that transport only Boolean values will be shaded blue when they transport
TRUE. This enables constant monitoring of the information flow.
"Online" "Simulation"
If Simulation Mode is chosen, then a check(ü) will appear in front of the
menu item.
t
In the simulation mode, the user program runs on the same PC under Windows.
This mode is used to test the project. The communication between the PC and
n
Simulation Mode uses the Windows Message mechanism.
If the program is not in simulation mode, then the program will run on the PLC.
e
The communication between the PC and the PLC typically runs over the serial
interface.
m
The status of this flag is stored with the project.
u
"Online"
"Communications
c
Parameters" for the use of
WAGO-I/O-PRO 32
o
Server
You are offered a special dialog for setting communications parameters when
D
the communication between the local PC and the run-time system is running
over the WAGO-I/O-PRO 32 Server (Gateway) in your system.
Let us examine the principle of the gateway system before explaining the
d
operation of the dialog:
e
A gateway server can be used to allow your local PC to communicate with one
or more run-time systems. The setting concerning which run-time systems can
v
be addressed, which is specifically configured for each gateway server, and the
i
connection to the desired gateway server, is made on the local PC. Here it is
possible that both the gateway server and the run-time system(s) can run
h
together on the local PC. If we are dealing with a gateway server which is
running on another PC we must ensure that it has been started there. If you are
c
selecting a locally installed gateway server, it automatically starts when you log
r
onto the target run-time system. You can recognise this through the appearance
of a WAGO-I/O-PRO 32 symbol on the bottom right in the task bar. This
A
symbol lights up as long as you are connected to the run-time system over the
gateway. The menu points Info and Finish are obtained by clicking with the
right mousekey on the symbol. Finish is used to switch off the gateway.
See the following scheme for presenting a gateway system:
WAGO-I/O-PRO 32 4-47
General Online Functions
PC_local is your local PC, PC_x is another PC, which gateway addresses.
PC_gateway is the PC on which the gateway server is installed, PC_PLC1
through to PC_PLC4 are PCs on which the run-time systems are running. The
diagram shows the modules as separated but it is fully possible for the Gateway
server and / or run-time systems to be installed together on the local PC.
n t
e
The connections from gateway to the various run-time computers can, on the
other hand, run over different protocols (TCP/IP, Pipe, etc.).
m
Let us now return to the communications parameters dialog on the local PC: It
u
shows the current situation on the selected gateway server, which can be called
up at any time using the button Update.
c
The dialog will appear as follows if the communications parameters have
o
already been configured according to the example shown above:
D
ed
iv
ch
Ar Image 4.50: Dialog for setting the gateway communications parameters, example
4-48 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
t
below to PC_PLC1 and PC_PLC4. These channel addresses do not necessarily
have to be known yet at the gateway. For PC_PLC4 in the example described
n
above, the configuration parameters are stored locally in the project but they
will first be known to the gateway the next time log-in to the run-time system
e
occurs. This has already occurred for PC_PLC1 since the associated gateway
address has appeared as an additional ”sub-branch” to the ”channel tree”.
In the central part of the dialog one finds the designation, in each case, of the
m
left selected channel and the associated parameter under Name, Value and
Comment.
u
Let us now turn to the way the communications parameters themselves can be
c
set in dialog:
To define the connection to the desired gateway we open the dialog
o
Communication Parameters Gateway by pressing the button Gateway.
D
ed
iv
Image 4.51: Example dialog, definition of the local connection to the gateway
h
Here it is possible to enter or edit the name of the computer on which the
gateway server is running as well as its Dataport and Serviceport. By first
c
activation 'localhost' is offered by default as the name of the computer. You can
r
also enter an IP address instead of the computer name. The name 'localhost' is
usually identical to the local IP address 127.0.0.1 in most cases but you may
A
have to enter this directly into the field Address. Suitable values for the
selected Gateway are usually already present in the fields Dataport and
Serviceport.
By ending the dialog with OK the appropriate input appears in the title
Channels of the dialog Communications Parameters, in the upper position. A
sign in brackets showing ”not connected” appears behind the address when it is
not possible to establish a connection to the selected gateway address, either
because it is not running or because the address is incorrect.
Press the button New if you wish to install a new channel on the gateway
server. You are offered the following dialog.
WAGO-I/O-PRO 32 4-49
General Online Functions
n t
Image 4.52: Example dialog, installing a new channel
e
m
The input field Name always contains the name used for the last inputted
u
channel. The current gateway name e.g. ‘localhost_’ appears if a connection has
not been entered yet. You can edit the channel name at this point. The channel
c
name is purely informative, it does not have to be a unique name but it is
recommended to use one. Select a driver which is offered in the column Name
o
with a mouse click (the offering depends on your individual installation
conditions) and the commentary to it may possibly be shown in the column
D
Info if one exists.
If you now close the dialog with OK, the newly defined channel appears in the
communications parameter dialog as a further entry for Channels at the lowest
d
position under the minus sign. It is only stored locally in the project at first (see
above). It is still possible to edit the column Value while it is in this condition
e
(see tips below); confirm the parameters with OK thereby leaving the dialog.
v
To make the newly established connection known in the gateway, and thus to
i
make it generally available, it necessary for you to log-on into the run-time
system. When you open the communications parameter dialog again the new
h
channel, apart from being in its former position, also appears indented under the
c
address/name of the gateway computer. If a communications error occurs when
logging in, the interface cannot be opened (e.g. COM1 for a serial connection)
r
possibly because it is used by another device.
The parameters for a channel already known by the gateway server can no
A
longer be edited in the configuration dialog. The parameter fields appear grey.
You can, however, delete the connection as long as it is not active.
4-50 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
You can use <Tabulator> or <Shift> + <Tabulator> to jump to the next or the
previous switching or editing possibility.
To edit numerical values it is possible with the arrow keys or the Page
Up/Down keys to change the value by one or ten units respectively. A double
click with the mouse also changes the value by increasing by one unit. A typing
check is installed for numerical values: <Ctrl> + <Home> or <Ctrl> + <End>
t
deliver the lowest or the highest value respectively for the possible input values
for the type of parameter in question.
n
"Online" "Sourcecode
e
download"
This command loads the source code for the project into the controller system.
See also "Project" "Options" "Sourcecode download"
Window set up
u m
c
Under the "Window" menu item you will find all commands for managing the
o
windows. There are commands both for the automatic set up of your window as
well as for opening the library manager and for changing between open
windows. At the end of the menu you will find a list of all open windows in the
D
sequence they were opened. You can switch to the desired window by clicking
the mouse on the relevant entry. A check will appear in front of the active
d
window.
"Window" "Tile
e
Horizontal"
v
With this command you can arrange all the windows horizontally in the work
i
area so that they do not overlap and will fill the entire work area.
h
"Window" "Tile Vertical"
c
With this command you can arrange all the windows vertically in the work area
so that they do not overlap and will fill the entire work area.
r
"Window" "Cascade"
A
With this command you can arrange all the windows in the work area in a
cascading fashion, one behind another.
"Window" "Arrange
Symbols"
With this command you can arrange all of the minimized windows in the work
area in a row at the lower end of the work area.
WAGO-I/O-PRO 32 4-51
Help when you need it
"Window" "Messages"
Shortcut: <Shift>+<Esc>
With this command you can open or close the message window with the
messages from the last compiling, checking, or comparing procedure.
If the messages window is open, then a check (ü) will appear in front of the
t
command.
n
Help when you need it
e
Should you encounter any problems with WAGO-I/O-PRO 32 during your
work, online help is available to help to solve them. There you will find all the
m
information that is also contained in this handbook.
u
"Help" "Contents and
Index"
c
With this command you can open the help topics window.
o
Under the Contents register card you will find the contents. The books can be
opened and closed using a doubleclick or the corresponding button.
D
Doubleclicking or activating the Show button on a highlighted topic will
display the topic in the main window of help or in the index window.
Click on the Index register card to look for a specific word, and click on the
d
Search register card to select a full-text search. Follow the instructions in the
register cards.
v e
h i
r c
A
4-52 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
n t
e
u m
o c
D
Image 4.53: Help Topics Window
d
Main Help Window
e
In the main help window topics are displayed with index entries listed below
them.
iv
The following buttons available:
• Help topics opens the help topics window
h
• Back shows the help entry that was previously displayed
• Print opens the dialog box for printing
c
• << shows the help entry that comes prior in sequence to the present entry
r
• >> shows the help entry that is next in sequence
In addition you can use the following menu commands:
A
• With "File" "'Print Topics" you can print out the present help entry.
• If you use the "Edit" "Copy" command, the selected text will be copied
into the clipboard. From here you can insert the text into other
applications and use it there.
• If you use the "Edit" "Annotate" command, a dialog box will be opened.
There is an editing field on the left side of the dialog box in which you
can enter an annotation to the help page.
On the right side there are buttons for storing the text, for canceling the
program, for deleting the notation, for copying a highlighted text on the
clipboard , and for pasting a text from the clipboard.
If you have made an annotation to a help entry, a small green paper clip
will appear in the upper left-hand corner. By clicking the mouse on the
WAGO-I/O-PRO 32 4-53
Help when you need it
paper clip, you can open the dialog box with the annotation that has been
made.
• If you would like to mark a page from help, then you can set a bookmark.
To do so, choose the "Define" "Bookmark" command. A dialog box
will appear in which you can enter a new name (The name of the page can
serve as a starter) or can delete an old bookmark. If bookmarks were
defined, then these will be displayed in the "Bookmark" menu. By
t
choosing these menu items, you can access the desired page.
•
n
Under "Options", you can define whether the help window always
appears in the foreground or in the background or in the standard setting.
•
e
With "Display previous topics" under "Options", you are furnished
with a selection window with the previously displayed help topics.
Doubleclick the entry you wish to view.
•
m
Under "Options", you can select the desired "Font" in small, normal,
or large.
u
• If "Options" "Use System Color" has been chosen, help will not be
displayed in the colors that were set, but in the system colors instead.
o c
D
ed
iv
ch
r
Image 4.54: Main Help Window
A
Index Window
The index window contains explanations about the menu commands, terms, or
sequences.
The index window will always remain on the surface by default, unless the help
option is placed in the background in the main window of help.
The following buttons are available:
• Help topics opens the help topics window
• Back shows the help entry that was previously displayed
• Print opens the dialog box for printing
4-54 WAGO-I/O-PRO 32
Chapter 4 - The Individual Components
• << shows the help entry directly prior to the present entry
• >> shows the help entry that is next in sequence
n t
e
Image 4.55: Index Window
u m
c
Context Sensitive Help
o
Shortcut: <F1>
You can use the <F1> key in an active window, in a dialog box, or above a
D
menu command. When you perform a command from the menu, the help for
the command called up at that time is displayed.
d
You can also highlight a text (for example, a key word or a standard function)
and have the help displayed for that item.
v e
h i
r c
A
WAGO-I/O-PRO 32 4-55
n t
e
u m
o c
D
ed
iv
ch
Ar
Chapter 5 - Editors in WAGO-I/O-PRO 32
5 Editors in WAGO-I/O-PRO 32
The Declaration Editor
t
Declaration editors are used to declare variables of POUs (Program
Organization Units) and global variables, for data type declarations, and in the
n
Watch and Receipt Manager.
e
The declaration of variables is supported by syntax coloring.
All editors for POUs (Program Organization Units) consist of a declaration part
and a body. These are separated by a screen divider that can be dragged, as
m
required, by clicking it with the mouse and moving it up or down.
The most important commands are found in the context menu (right mouse
u
button or <Ctrl>+<F10>).
c
Declaration Part
o
All variables to be used only in this POU are declared in the declaration part of
the POU. These can include: input variables, output variables, input/output
variables, local variables, retain variables, and constants. The declaration syntax
D
is based on the IEC 61131-3 standard. An example of a correct declaration of
variables in WAGO-I/O-PRO 32 Editor:
ed
iv
ch
A r Image 5.1: Declaration Editor
Input Variable
Between the key words VAR_INPUT and END_VAR, all variables are
declared that serve as input variables for a POU. That means that at the call
position, the value of the variables can be given along with a call.
WAGO-I/O-PRO 32 5-1
The Declaration Editor
Example:
VAR_INPUT
in1:INT (* 1. Inputvariable*)
END_VAR
Output Variable
t
Between the key words VAR_OUTPUT and END_VAR, all variables are
declared that serve as output variables of a POU. That means that these values
n
are carried back to the POU making the call. There they can be answered and
used further.
e
Example:
VAR_OUTPUT
out1:INT; (* 1. Outputvariable*)
m
END_VAR
u
Input and Output
Variables
c
Between the key words VAR_IN_OUT and END_VAR, all variables are
o
declared that serve as input and output variables for a POU.
Attention: With this variable, the value of the transferred variable is changed
("transferred as a pointer"). That means that the input value for such variables
D
cannot be a constant.
Example:
d
VAR_IN_OUT
inout1:INT; (* 1. Inputoutputvariable *)
e
END_VAR
v
Local Variables
i
Between the keywords VAR and END_VAR, all of the local variables of a
h
POU are declared. These have no external connection; in other words, they can
not be manipulated from the outside.
c
Example:
r
VAR
loc1:INT; (* 1. Local Variable*)
A
END_VAR
Retain Variables
Retain variables are identified by the key word RETAIN. These variables
maintain their value, even after a power failure. When the program is run again,
the stored values will be processed further. A practical example would be an
operations timer that recommences timing after a power failure.
All other variables are newly initialized, either with their initialized values or
with the standard initializations.
5-2 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
Example:
VAR RETAIN
rem1:INT; (* 1. Retain variable*)
END_VAR
Constants
t
Constants are identified by the key word CONSTANT. They can be declared
locally or globally.
n
Syntax:
VAR CONSTANT
e
<Identifier>:<Type> := <initialization>;
END_VAR
m
Example:
VAR CONSTANT
u
con1:INT:=12; (* 1. Constant*)
END_VAR
c
You will find a listing of possible constants here in the appendix.
o
Keywords
In all editors, all keywords are written in capital letters. Keywords may not be
D
used as variables.
Variables declaration
d
A variables declaration has the following syntax:
<Identifier> {AT <Address>}:<Type> {:=<initialization>};
e
The parts in the braces {} are optional.
iv
The variable identifier may not contain any blank spaces or special characters,
may not be declared more than once and cannot be the same as any of the
h
keywords. Capitalization is not recognized which means that VAR1, Var1, and
var1 are all the same variable. The underscore character is recognized in
c
identifiers (e.g., "A_BCD" and "AB_CD" are considered two different
r
identifiers). An identifier may not have more than one underscore character in a
row. The first 32 characters are significant.
A
All declarations of variables and data type elements can include initialization.
They are brought about by the ":=" operator. For variables of elementary types,
these initializations are constants. The default-initialization is 0 for all
declarations.
Example:
var1:INT:=12; (* Integer variable with initial value of 12*)
If you wish to link a variable directly to a definite address, then you must
declare the variable with the keyword AT.
For faster input of the declarations, use the shortcut mode.
WAGO-I/O-PRO 32 5-3
The Declaration Editor
In function blocks you can also specify variables with incomplete address
statements. In order for such a variable to be used in a local instance, there must
be an entry for it in the variable configuration.
Pay attention to the possibility of an automatic declaration
AT Declaration
t
If you wish to link a variable directly to a definite address, then you must
declare the variable with the keyword AT. The advantage of such a procedure is
n
that you can assign a meaningful name to an address, and that any necessary
changes of an incoming or outgoing signal will only have to be made in one
e
place (e.g., in the declaration).
Notice that variables requiring an input cannot be accessed by writing. A further
restriction is that AT declarations can only be made for local and global
m
variables, and not for input- and output variables from POUs.
u
Examples:
counter_heat7 AT %QX0.0: BOOL;
c
lightcabinetimpulse AT %IX7.2: BOOL;
download AT %MX2.2: BOOL;
o
"Insert" "Declarations
keywords"
D
You can use this command to open a list of all the keywords that can be used in
the declaration part of a POU. After a keyword has been chosen and the choice
d
has been confirmed, the word will be inserted at the present cursor position.
You also receive the list, when you open the Input Assistant and choose the
e
Declarations category.
v
"Insert" "Type"
i
With this command you will receive a selection of the possible types for a
h
declaration of variables. You also receive the list when you access the Input
Assistant.
c
The types are divided into these categories:
r
• Standard types BOOL, BYTE, etc.
• Defined types Structures, enumeration types, etc.
A
• Standard function blocks for instance declarations
• Defined function blocks for instance declarations
WAGO-I/O-PRO 32 supports all standard types of IEC 61131-3:
Examples for the use of the various types are found in the appendix.
Syntax Coloring
In all editors you receive visual support in the implementation and declaration
of variables. Errors are avoided, or discovered more quickly, because the text is
displayed in color.
A comment left unclosed, thus annotating instructions, will be noticed
immediately; keywords will not be accidentally misspelled, etc.
5-4 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
• Black Variables, constants, assignment operators, ...
n
Shortcut Mode
e
The declaration editor for WAGO-I/O-PRO 32 allows you to use the shortcut
mode. This mode is activated when you end a line with <Ctrl><Enter>
The following shortcuts are supported:
m
• All identifiers up to the last identifier of a line will become declaration
variable identifiers
u
• The type of declaration is determined by the last identifier of the line. In
c
this context, the following will apply:
B or BOOL gives the result BOOL
o
I or INT gives the result INT
R or REAL gives the result REAL
S or string gives the result STRING
D
• If no type has been established through these rules, then the type is BOOL
and the last identifier will not be used as a type (Example 1.).
• Every constant, depending on the type of declaration, will turn into an
d
initialization or a string (Examples 2. and 3.).
• An address (as in %MD12) is extended around the AT...
e
attribute(Example 4.).
• A text after a semicolon (;) becomes a comment (Example 4.).
iv
• All other characters in the line are ignored (e.g., the exclamation point in
Example 5.).
h
Examples:
Shortcut Declaration
c
A A: BOOL;
r
ABI2 A, B: INT := 2;
ST S 2; A string ST:STRING(2); (* A string *)
A
X %MD12 R 5 Real Number X AT %MD12: REAL := 5.0;(* Real
Number *)
B! B: BOOL;
Autodeclaration
If the Autodeclaration of the Options dialog box , then a dialog box will
appear in all editors after the input of a variable that has not yet been declared.
With the help of this dialog box, the variable can now be declared.
WAGO-I/O-PRO 32 5-5
The Declaration Editor
n t
e
With the help of the Class combobox, select whether you are dealing with a
local variable (VAR), input variable( (VAR_INPUT), output variable
(VAR_OUTPUT), input/output variable (VAR_INOUT), or a global variable
m
(VAR_GLOBAL).
With the CONSTANT and RETAIN options, you can define whether you are
u
dealing with a constant or a retain variable
c
The variable name you entered in the editor has been entered in the Name field,
BOOL has been placed in the Type field. The ... button opens the Input
o
Assistent dialog which allows you to select from all possible types.
In the Initial Value field you can assign a value to the variable; otherwise the
D
standard initial value will be used.
In the Address field you can link a variable to the address (AT declaration)
d
If necessary, insert a Comment.
By pressing OK you will enter the variable in the corresponding declaration
e
editor.
iv
Note: The dialog box for variable declaration you also get by the command
"Edit" "Declare Variable" (see Chapter 4.5 General Editing Functions).
h
Line Numbers in the
c
Declaration Editor
r
In offline mode, a simple click on a special line number will mark the entire
text line.
A
In the online mode, a single click on a specific line number will open up or
close the variable in this line, in case a structural variable is involved.
Declarations as tables
If the Declarations as tables option is set in the Options dialog box in the
Editor category, the declaration editor looks like a table. As in a card-index
box, you can select the register cards of the respective variable types and edit
the variables.
For each variable you are given the following entry fields.
Name: Input the identifier of the variable.
Address: If necessary, input the address of the variable (AT
5-6 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
declaration)
Type: Input the type of the variable. (Input the function block
when instantiating a function block)
Initial: Enter a possible initialization of the variable
(corresponding to the ":= " assignment operator).
Comment: Enter a comment here.
t
Both of the display types of the declaration editor can be changed without
causing any problems. In the online mode, there are no differences for the
n
display.
e
u m
Image 5.3: Declaration Editor as a Table
o c
D
"Insert" "New
Declaration"
d
With this command you bring a new variable into the declaration table of the
e
declaration editor. If the present cursor position is located in an field of the
table, then the new variable will be pasted in the preceding line; otherwise, the
v
new variable is pasted at the end of the table. Moreover, you can paste a new
i
declaration at the end of the table by using the right arrow key or the tab key in
the last field of the table.
h
You will receive a variable that has "Name" located in the Name field, and
c
"Bool" located in the Type field, as its default setting. You should change these
values to the desired values. Name and type are all that is necessary for a
r
complete declaration of variables.
A
Declaration Editors in
Online Mode
In online mode , the declaration editor changes into a monitor window. In each
line there is a variable followed by the equal sign (=) and the value of the
variable. If the variable at this point is undefined, three question marks (???)
will appear.
In front of every multi-element variable there is a plus sign. By pressing
<Enter> or after doubleclicking on such a variable, the variable is opened up. In
the example, the traffic signal structure would be opened up.
WAGO-I/O-PRO 32 5-7
The Text Editors
When a variable is open, all of its components are listed after it. A minus sign
t
appears in front of the variable. If you doubleclick again or press <Enter>, the
variable will be closed, and the plus sign will reappear.
n
Pressing <Enter> or doubleclicking on a single-element variable will open the
dialog box to write a variable. Here it is possible to change the present value of
e
the variable. In the case of Boolean variables, no dialog box appears; these
variables are toggled.
m
The new value will turn red and will remain unchanged. If the "Online"
"Write values" command is given, then all variables are placed in the selected
u
list and are once again displayed in black.
c
If the "Online" "Force values" command is given, then all variables will be
set to the selected values, until the "Release force" command is given.
o
Comment
User comments must be enclosed in the special character string "*" and "*".
D
Comments are allowed in all text editors at any preferred location. These
include all declarations, the IL and ST languages, and user-defined data types.
d
In FBD and LD comments can be entered into every network. In order to do so,
select the network that you wish to comment, and enable "Insert"
e
"Comment".
v
In SFC you can enter comments for the step in the dialog box for editing step
i
attributes.
Interlocking comments are not allowed.
h
In Online mode, if you place the mouse pointer briefly above a variable, then
c
the type and, if necessary, address and comments about the variable will be
r
displayed in a Tooltip.
A
The Text Editors
The text editors (the Instruction List editor and the editor for ) of WAGO-I/O-
PRO 32 offer the usual capabilities of Windows text editors.
The implementation in the text editors is supported by syntax coloring.
In Overwrite mode the status bar shows a black OV. You can switch between
Overwrite mode and Insert mode by key <Ins>
5-8 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
n t
e
u m
o c
Image 5.4: Text Editors for the Instruction List and Structured Text
The most important commands are found in the context menu (right mouse
D
button or <Ctrl>+<F10>).
The text editors use the following menu commands in special ways:
d
"Insert" "Operator"
e
With this command all of the operators available in the current language are
displayed in a dialog box.
iv
If one of the operators is selected and the list is closed with OK, then the
highlighted operator will be inserted at the present cursor position.
h
"Insert" "Operand"
c
With this command all variables in a dialog box are displayed. You can select
r
whether you would like to display a list of the global, the local, or the system
variables.
A
If one of the operands is chosen, and the dialog box is closed with OK, then the
highlighted operand will be inserted at the present cursor position.
"Insert" "Function"
With this command all functions will be displayed in a dialog box. You can
choose whether to have a list displaying user-defined or standard functions.
If one of the functions is selected and the dialog box is closed with OK, then
the highlighted function will be inserted at the current cursor position.
If the With arguments option was selected in the dialog box, then the
necessary input and output variables will also be inserted.
WAGO-I/O-PRO 32 5-9
The Text Editors
t
position.
n
If the With arguments option was selected in the dialog box, then the
necessary input variables of the function block will also be inserted.
e
The text editors in Online
mode
m
The online functions in the editors are set breakpoint and single step processing
(steps). Together with the monitoring, the user thus has the debugging
u
capability of a modern Windows standard language debugger.
c
In Online mode, the text editor window is vertically divided in halves. On the
left side of the window you will then find the normal program text; on the right
o
side you will see a display of the variables whose values were changed in the
respective lines.
D
The display is the same as in the declaration part. That means that when the
PLC is running, the present values of the respective variables will be displayed.
If you place the mouse pointer briefly above a variable, then the type, the
d
address and the comment about the variable will be displayed in a Tooltip.
e
"Extras" "Monitoring
Options"
iv
With this command you can configure your monitoring window. In the text
editors, the window is divided into two halves during monitoring. The program
h
is located in the left half. In the right half, all variables that are located in the
corresponding program line are monitored.
c
You can specify the Monitor Window Width and which Distance two variables
r
should have in a line. An distance declaration of 1 corresponds, in this case, to a
line height in the selected font.
5-10 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
here.) At the positions lying inbetween, a breakpoint would not even make
sense, since nothing has been able to change in the data since the preceding
breakpoint position.
This results in the following breakpoint positions in the IL:
• At the start of the POU
• At every LD, LDN (or, in case a LD is located at a label, then at the label)
t
• At every JMP, JMPC, JMPCN
• At every label
n
• At every CAL, CALC, CALCN
• At every RET, RETC, RETCN
e
• At the end of the POU
Structured Text accommodates the following breakpoint positions:
• At every assignment
m
• At every RETURN and EXIT instruction
u
• in lines where conditions are being evaluated (WHILE, IF, REPEAT)
• At the end of the POU
c
Breakpoint positions are marked by the display of the line number field in a
o
darker gray.
D
ed
iv
ch
r
Image 5.6: IL Editor with Possible Breakpoint Positions (darker number fields)
A
breakpoint?
In order to set a breakpoint, click the line number field of the line where you
want to set a breakpoint. If the selected field is a breakpoint position, then the
color of the line numbers field will change from dark gray to light blue, and the
breakpoint will be activated in the PLC.
Deleting Breakpoints
Correspondingly, in order to delete a breakpoint, click on the line number field
of the line with the breakpoint to be deleted.
WAGO-I/O-PRO 32 5-11
The Text Editors
Setting and deleting of breakpoints can also be selected via the menu
("Online" "Toggle Breakpoint"), via the function key <F9>, or via the
symbol in the tool bar.
What happens at a
breakpoint?
t
If a breakpoint is reached in the PLC, then the screen will display the break
with the corresponding line. The line number field of the line where the PLC is
n
positioned will appear in red. The user program is stopped in the PLC.
If the program is at a breakpoint, then the processing can be resumed with
e
"Online" "Run".
In addition, with "Online" "Step over" or "Step in" you can cause the program
m
to run to the next breakpoint position. If the instruction where you are located is
a CAL command, or, if there is a function call in the lines up to the next
u
breakpoint position, then you can use "Step over" to bypass the function call.
With "Step in", you will branch to the open POU.
c
Line Number of the Text
o
Editor
The line numbers of the text editor give the number of each text line of an
implementation of a POU.
D
In Off-line mode, a simple click on a special line number will mark the entire
text line.
d
In Online mode, the background color of the line number indicates the
breakpoint status of every line:
e
• dark gray: This line is a possible position for a breakpoint.
• light blue: a breakpoint has been set in this line.
iv
• red: The program has reached this point.
In Online mode, simply clicking the mouse will change the breakpoint status of
h
this line.
r c
The Instruction List Editor
A
This is how a POU written in the IL looks under the corresponding WAGO-
I/O-PRO 32 editor:
5-12 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
n t
e
u m
Image 5.7: IL Editor
o c
All editors for POUs consist of a declaration part and a body. These are
D
separated by a screen divider.
The Instruction List editor is a text editor with the usual capabilities of
d
Windows text editors. The most important commands are found in the context
menu (right mouse button or <Ctrl>+<F10>).
e
For information about the IL editor in Online mode, see Text Editors in Online
Mode.
iv
For information about the language, see the Instruction Lists.
h
Flow Control
c
With the "Online" "Flow control" command, an additional field in which the
accumulator contents is displayed is inserted in the IL editor on the left side of
r
every line.
A
The Editor for Structured Text
WAGO-I/O-PRO 32 5-13
The Graphic Editors
n t
e
u m
Image 5.8: Editor for Structured Text
o c
All editors for POUs consist of a declaration part and a body. These are
D
separated by a screen divider.
The editor for Structured Text is a text editor with the usual capabilities of
d
Windows text editors. The most important commands are found in the context
menu (right mouse button or <Ctrl>+<F10>).
e
For information about the ST editor in Online mode, read Text Editors in
Online Mode.
iv
For information about the language, read the chapter Structured Text(ST).
ch
The Graphic Editors
r
The editors of both of the graphically oriented languages, LD and FBD, have
many points in common. These points are summarized in the following
A
chapters. The editor of the Sequential Function Chart digresses from this point
and is, consequently, not described until Chapter The Sequential Function Chart
Editor.
The implementation in the graphic editors is supported by syntax coloring.
Label
Each network has a label that can optionally be left empty. This label is edited
by clicking the first line of the network, directly next to the network number.
Now you can enter a label, followed by a colon.
5-14 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
Network Comments
Every network can be supplied with a multi-lined comment. In "Extras"
"Options", you can enter the maximum number of lines to be made available
for a network comment. This entry is made in the maximum comment size
field. (The default value here is 4.) You can also enter the number of lines that
generally should be reserved for comments (minimum comment size). If, for
t
example, the number 2 is entered, then, at the start of each network there will
be two empty lines after the label line. The default value here is 0, which has
n
the advantage of allowing more networks to fit in the screen area.
If the minimal comment size is greater than 0, then in order to enter a comment
e
you simply click in the comment line and then enter the comment. Otherwise
you must next select the network to which a comment is to be entered, and use
"Insert" "Comment" to insert a comment line. In contrast to the program text,
m
comments are displayed in gray.
u
"Insert" "Network (after)"
or "Insert" "Network
c
(before)"
o
Shortcut: <Shift>+<T> (Network after)
In order to insert a new network in the FBD or the LD editor, select the
D
"Insert" "Network (after)" or the “Insert" "Network (before)" command,
depending on whether you want to insert the new network before or after the
present network. The present network can be changed by clicking the network
d
number. You will recognize it in the dotted rectangle under the number. With
the <Shift key> and a mouse click you can select from the entire area of
e
networks, from the present one to the one clicked.
v
The network editors in the
i
online mode
h
In the FBD and the LD editors you can only set breakpoints for networks. The
network number field of a network for which a breakpoint has been set, is
c
displayed in blue. The processing then stops in front of the network, where the
r
breakpoint is located. In this case, the network number field is displayed in red.
With single step processing (steps), you can jump from network to network.
A
All values are monitored upon entering and exiting network POUs (Program
Organization Units).
The flow control is run with the "Online" "Flow control" command. Using
the flow control, you can view the present values that are being carried in the
networks over the connecting lines. If the connecting lines do not carry Boolean
values, then the value will be displayed in a specially inserted field. If the lines
carry Boolean values, then they will be shaded blue, in the event that they carry
TRUE. Therefore, you can accompany the flow of information while the PLC is
running.
If you place the mouse pointer briefly above a variable, then the type, the
address and the comment about the variable will be displayed in a Tooltip.
WAGO-I/O-PRO 32 5-15
The Graphic Editors
This is how a POU written in the FBD under the corresponding WAGO-I/O-
PRO 32 editor looks:
n t
e
u m
o c
D
Image 5.9: Editor for the Function Block Diagram
d
The Function Block Diagram editor is a graphic editor. It works with a list of
e
networks, in which every network contains a structure that displays,
respectively, a logical or an arithmetical expression, the calling up of a function
v
block, a jump, or a return instruction.
i
The most important commands are found in the context menu (right mouse
h
button or <Ctrl>+<F10>).
c
Cursor positions in FBD
r
Every text is a possible cursor position. The selected text is on a blue
background and can now be changed.
A
You can also recognize the present cursor position by a dotted rectangle. The
following is a list of all possible cursor positions with an example:
1) Every text field (possible cursor positions framed in black):
2) Every input:
5-16 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
5)
n
The lined cross above an assignment, a jump, or a return instruction:
t
e
m
6) Behind the outermost object on the right of every network ("last cursor
position," the same cursor position that was used to select a network):
7)
c u
The lined cross directly in front of an assignment:
o
D
How to set the cursor
d
The cursor can be set at a certain position by clicking the mouse, or with the
help of the keyboard.
e
Using the arrow keys, you can jump to the nearest cursor position in the
selected direction at any time. All cursor positions, including the text fields, can
iv
be accessed this way. If the last cursor position is selected, then the <up> or
<down> arrow keys can be used to select the last cursor position of the previous
h
or subsequent network.
An empty network contains only three question marks "???". By clicking
c
behind these, the last cursor position is selected.
r
"Insert" "Assignment"
A
Symbol: Shortcut: <Ctrl>+<A>
This command inserts an assignment.
Depending on the selected position, insertion takes place directly in front of the
selected input (Cursor Position 2), directly after the selected output (Cursor
Position 4), directly before the selected line cross (Cursor Position 5), or at the
end of the network (Cursor Position 6). For an inserted assignment, a selection
can be made accompanying the entered text "???", and the assignment can be
replaced by the variable that is to be assigned. For this you can also use the
Input Assistant.
In order to insert an additional assignment to an existing assignment, use the
"Insert" "Output" command.
WAGO-I/O-PRO 32 5-17
The Graphic Editors
"Insert" "Jump"
t
Position 4), directly before the selected line cross (Cursor Position 5), or at the
end of the network (Cursor Position 6).
n
For an inserted jump, a selection can be made accompanying the entered text
e
"???", and the jump can be replaced by the label to which it is to be assigned.
"Insert" "Return"
m
Symbol: Shortcut: <Ctrl>+<R>
u
This command inserts a RETURN instruction.
Depending on the selected position, insertion takes place directly in front of the
c
selected input (Cursor Position 2),directly after the selected output (Cursor
Position 4), directly before the selected line cross (Cursor Position 5), or at the
o
end of the network (Cursor Position 6)
D
"Insert" "Operator"
d
This command inserts an operator. Insertion takes place according to the
selected position.
e
If an input is selected (Cursor Position 2), then the operator is inserted in front
v
of this input. The first input of this operator is linked to the branch on the left of
i
the selected input. The output of the new operator is linked to the selected
input.
h
If an output is selected (Cursor Position 4), then the operator is inserted after
this output. The first input of the operator is connected with the selected output.
c
The output of the new operator is linked to the branch with which the selected
r
output was linked.
If an operator, a function, or a function block is selected (Cursor Position 3),
A
then the old element will be replaced by the new operator. As far as possible,
the branches will be connected the same way as they were before the
replacement. If the old element had more inputs than the new one, then the
unattachable branches will be deleted. The same holds true for the outputs.
If a jump or a return is selected, then the operator will be inserted before this
jump or return. The first input of the operator is connected with the branch to
the left of the selected element. The output of the operator is linked to the
branch to the right of the selected element.
If the last cursor position of a network is selected (Cursor Position 6), then the
operator will be inserted following the last element. The first input of the
operator is linked to the branch to the left of the selected position.
5-18 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
The inserted operator is always an AND. By selecting and overwriting the text,
you can convert this operator into any other operator. With the Input Assistant,
you can choose the desired operator from the list of the supported operators. If
the new operator has a different lowest number of inputs, then these will be
attached. If the new operator has a lesser highest number of inputs, then the last
inputs, including those on the branches situated in front of them will be deleted.
t
All operator inputs that could not be linked will receive the text "???". This text
must be clicked and changed into the desired constant or variable.
n
"Insert" "Function" or
e
"Insert" "Function Block"
m
Symbol: Shortcut: <Ctrl>+<B> (Function block)
u
This command inserts a function or a function block. Insertion takes place
according to the selected position. First the Input Assistant dialog box, which
c
contains all functions and function blocks, is opened.
o
The insertion then takes place analogous to the "Insert" "Operator"
command. The assignment of inputs and outputs is also analogous. If there is a
branch to the right of an inserted function block, then the branch will be
D
assigned to the first output. Otherwise the outputs will remain unallocated.
"Insert" "Input"
d
Symbol: Shortcut: <Ctrl>+<U>
e
This command inserts an operator input. With many operators, the number of
inputs may vary. (For example, ADD can have 2 or more inputs.)
iv
In order to extend such an operator by an input, you need to select the input in
front of which you wish to insert an additional input (Cursor Position 1); or you
h
must select the operator itself (Cursor Position 3), if a lowest input is to be
inserted.
c
The inserted input is allocated with the text "???". This text must be clicked and
r
changed into the desired constant or variable. For this you can also use the Input
Assistant.
A
"Insert" "Output"
Symbol:
This command inserts an additional assignment into an existing assignment.
This capability serves the placement of so-called assignment combs; i.e., the
assignment of the value presently located at the line to several variables.
If you select the lined cross above an assignment (Cursor Position 5) or the
output directly in front of it (Cursor Position 4), then there will be another
assignment inserted after the ones already there.
WAGO-I/O-PRO 32 5-19
The Graphic Editors
"Extras" "Negation"
t
Symbol: Shortcut: <Ctrl>+<N>
n
With this command you can negate the inputs, outputs, jumps, or RETURN
e
instructions. The symbol for the negation is a small circle at a connection.
If an input is selected (Cursor Position 2), then this input will be negated.
m
If an output is selected (Cursor Position 4), then this output will be negated.
If a jump or a return is marked, then the input of this jump or return will be
u
negated.
c
A negation can be canceled through renewed negation.
o
"Extras" "Set/Reset"
Symbol:
D
With this command you can define outputs as Set or Reset Outputs. A grid with
Set Output is displayed with [S], and a grid with Reset Output is displayed with
[R].
ed
iv
h
Image 5.10: Set/Reset Outputs in FBD
r c
An Output Set is set to TRUE, if the grid belonging to it returns TRUE. The
output now maintains this value, even if the grid jumps back to FALSE.
A
An Output Reset is set to FALSE, if the grid belonging to it returns FALSE.
The output maintains its value, even if the grid jumps back to FALSE.
With multiple executions of the command, the output will alternate between
set, reset, and normal output.
"Extras" "Zoom"
Shortcut: <Alt>+<Enter>
With this command a selected POU is loaded into its editor (Cursor Position 3).
If you are dealing with a POU from a library, then the library manager is called
up, and the corresponding POU is displayed.
5-20 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
If an operator, a function, or a function block is selected (Cursor Position 3),
n
then the selected object itself, will be cut, deleted, or copied, along with all of
the branches dependent on the inputs, with the exception of the first branch.
e
Otherwise, the entire branch located in front of the cursor position will be cut,
deleted, or copied.
m
After copying or cutting, the deleted or copied part is located on the clipboard
and can now be pasted, as desired.
u
In order to do so, you must first select the pasting point. Valid pasting points
include inputs and outputs.
c
If an operator, a function, or a function block has been loaded onto the
o
clipboard (As a reminder: in this case all connected branches except the first are
located together on the clipboard), the first input is connected with the branch
before the pasting point.
D
Otherwise, the entire branch located in front of the pasting point will be
replaced by the contents of the clipboard.
d
In each case, the last element pasted is connected to the branch located in front
of the pasting point.
i
operator is pasted in the middle of a network. The branch located on the right of
the operator is now connected with the first input, but must be connected with
h
the second input. You can now select the first input and perform the command
c
"Edit" "Cut". Following this, you can select the second input and perform the
command "Edit" "Paste". This way, the branch is dependent on the second
r
input.
A
The Function Block
Diagram in the Online
Mode
In the Function Block Diagram, breakpoints can only be set to networks. If a
breakpoint has been set to a network, then the network numbers field will be
displayed in blue. The processing then stops in front of the network where the
breakpoint is located. In this case, the network numbers field will become red.
Using stepping (single step), you can jump from network to network.
The current value is displayed for each variable. Doubleclicking on a variable
opens the dialog box for writing a variable. Here it is possible to change the
present value of the variable. In the case of Boolean variables, no dialog box
appears; these variables are toggled.
WAGO-I/O-PRO 32 5-21
The Graphic Editors
The new value will turn red and will remain unchanged. If the "Online"
"Write values" command is given, then all variables are placed in the selected
list and are once again displayed in black.
The flow control is run with the "Online" "Flow control" command. Using
the flow control, you can view the present values that are being carried in the
networks over the connecting lines. If the connecting lines do not carry Boolean
t
values, then the value will be displayed in a specially inserted field. If the lines
carry Boolean values, then they will be shaded blue in the event that they carry
n
TRUE. By this means, you can accompany the flow of information while the
PLC is running.
e
If you place the mouse pointer briefly above a variable, then the type, the
address and the comment about the variable will be displayed in a Tooltip.
u m
c
This is how a POU written in the LD appears in the WAGO-I/O-PRO 32
editor:
o
D
ed
iv
ch
A r Image 5.11: POU in the Ladder Diagram
All editors for POUs consist of a declaration part and a body. These are
separated by a screen divider.
The LD editor is a graphic editor. The most important commands are found in
the context menu (right mouse button or <Ctrl>+<F10>).
For information about the elements, see Ladder Diagram (LD).
5-22 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
Chapteron the FBD Editor.
1. Every text field (possible cursor positions framed in black)
e n
m
2. Every Contact or Function Block
c u
o
3. Every Coil
D
d
4. The Connecting Line between the Contacts and the Coils.
v e
h i
c
The Ladder Diagram uses the following menu commands in a special way:
r
"Insert" "Contact"
A
Symbol: Shortcut: <Ctrl>+<O>
Use this command in the LD editor in order to insert a contact in front of the
marked location in the network.
If the marked position is a coil (Cursor Position 3) or the connecting line
between the contacts and the coils (Cursor Position 4), then the new contact
will be connected serially to the previous contact connection.
The contact is preset with the text "???". You can click on this text and change
it to the desired variable or the desired constant. For this you can also use the
Input Assistant.
WAGO-I/O-PRO 32 5-23
The Graphic Editors
"Insert" "Parallel
Contact"
t
If the marked position is a coil (Cursor Position 3) or the connection between
the contacts and the coils (Cursor Position 4), then the new contact will be
n
connected in parallel to the entire previous contact connection.
The contact is preset with the text "???". You can click on this text and change
e
it to the desired variable or the desired constant. For this you can also use the
Input Assistant.
m
"Insert" "Function Block"
u
Shortcut: <Ctrl>+<B>
You can use this command to open a dialog box for selecting a function block
c
or a program. You can select between user-defined or standard (default) POUs.
o
The selected POU is inserted, according to the same rules used to insert a
contact. In both cases, the first input of the POU is set on the input connection,
and the first output is set on the output connection. For this reason both of these
D
variables definitely must be of the BOOL type. All other POU inputs and
outputs are occupied with the text "???". These default settings can be changed
to other constants, variables, or addresses. For this you can also use the Input
d
Assistant.
e
"Insert" "Coil"
v
Symbol: Shortcut: <Ctrl>+<L>
i
You can use this command in the LD editor to insert a coil in parallel to the
h
previous coils.
If the marked position is a connection between the contacts and the coils
c
(Cursor Position 4), then the new coil will be inserted as the last. If the marked
r
position is a coil (Cursor Position 3), then the new coil will be inserted directly
above it.
A
The coil is given the text "???" as a default setting. You can click on this text
and change it to the desired variable. For this you can also use the Input
Assistant.
5-24 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
used to create a network. This means that data from usual operators, functions,
and function blocks can flow in an EN POU and an EN POU can carry data to
n
such usual POUs.
If, therefore, you want to program a network in the LD editor, as in FBD, you
e
only need first to insert an EN operator in a new network. Subsequently, from
this POU, you can continue to construct from your network, as in the FBD
editor. A network thus formed will perform like the corresponding network in
m
FBD.
u
"Insert" "Operator with
EN"
c
Use this command to insert an operator with EN input into a LD network.
o
The marked position must be the connection between the contacts and the coils
(Cursor Position 4) or a coil (Cursor Position 3). The new operator is inserted in
D
parallel to the coils and underneath them; it contains initially the designation
AND. If you wish, you can change this designation to another one. For this you
can also use the Input Assistant.
d
"Insert" "Function Block
with EN"
e
With this command you can insert a function block with EN input into a LD
v
network.
i
The marked position must be the connection between the contacts and the coils
h
(Cursor Position 4) or a coil (Cursor Position 3). The new function block is
inserted in parallel to the coils, below them. From the Input Assistant dialog
c
box that appears, you can select whether to insert a user-defined, or a standard
r
(default) function block.
A
EN"
With this command you can insert a function with EN input into an LD
network.
The marked position must be the connection between the contacts and the coils
(Cursor Position 4) or a coil (Cursor Position 3). The new function is inserted in
parallel to the coils, below them. From the Input Assistant dialog box that
appears, you can select whether to insert a user-defined, or a standard function
block.
WAGO-I/O-PRO 32 5-25
The Graphic Editors
t
With Output you can add a new output to the POU.
n
With Operator you can add a new operator to the POU, whose output is
deposited onto the selected input.
e
With Assignment you can add an assignment to the selected input or output.
With Function you can add a function to the selected input.
m
With Function Block you can add a function block to the selected input.
u
"Insert" "Jump"
c
With this command you can insert a parallel jump in the selected LD editor, in
parallel, at the end of the previous coils. If the incoming line delivers the value
o
"On", then the jump will be executed to the indicated label.
The marked position must be the connection between the contacts and the
D
coils(Cursor Position 4) or a coil (Cursor Position 3).
The jump is present with the text "???". You can click on this text and make a
change in the desired label.
d
"Insert" "Return"
e
In the LD editor, you can use this command to insert a Return instruction in
v
parallel at the end of the previous coils. If the incoming line delivers the value
i
"On," then the processing of the POU in this network is broken off.
The marked position must be the connection between the contacts and the
h
coils(Cursor Position 4) or a coil (Cursor Position 3).
c
"Extras" "Paste after"
r
Use this command in the LD editor to insert the contents of the clipboard as a
serial contact after the marked position. This command is only possible if the
A
contents of the clipboard and the marked position are networks comprised of
contacts.
5-26 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
"Extras" "Negate"
n
Symbol: Shortcut: <Ctrl>+<N>
Use this command to negate a contact, a coil, a jump or return instruction, or an
e
input or output of EN POUs at the present cursor position (Cursor Position 2
and 3).
Between the parentheses of the coil or between the straight lines of the contact,
m
a slash will appear ((/) or |/|). If there are jumps, returns, or inputs or outputs of
EN POUs, a small circle will appear at the connection, just as in the FBD
u
editor.
c
The coil now writes the negated value of the input connection in the respective
Boolean variable. Right at this moment, a negated contact switches the status of
o
the input to the output, if the respective Boolean variable carries the value
FALSE.
D
If a jump or a return is marked, then the input of this jump or return will be
negated.
A negation can be canceled through renewed negation.
d
"Extras" "Set/Reset"
e
If you execute this command on a coil, then you will receive a Set Coil. Such a
v
coil never overwrites the value TRUE in the respective Boolean variable. This
i
means that once you have set the value of this variable to TRUE, it will always
remain at TRUE. A Set Coil is designated with an "S" in the coil symbol.
h
If you execute this command once again, then you will be given a Reset Coil.
c
Such a coil never overwrites the value FALSE in the respective Boolean
r
variable. This means that once you have set the value of this variable to
FALSE, it will always remain at FALSE. A Reset Coil is designated with an
"R" in the coil symbol.
A
If you execute this command repeatedly, the coil will alternate between set,
reset and normal coil.
WAGO-I/O-PRO 32 5-27
The Graphic Editors
If you place the mouse pointer briefly above a variable, then the type, the
address and the comment about the variable will be displayed in a Tooltip.
t
editor:
e n
u m
o c
D
ed
iv
Image 5.12: Sequential Function Chart Editor with an opened Action
All editors for POUs consist of a declaration part and a body. These are
h
separated by a screen divider.
c
The Sequential Function Chart editor is a graphic editor. The most important
r
commands are found in the context menu (right mouse button or
<Ctrl>+<F10>).
A
For information about the Sequential Function Chart, see Sequential Function
Chart.
The editor for the Sequential Function Chart must agree with the particulars of
the SFC. In reference to these, the following menu items will be of service.
5-28 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
arrow keys. In order to mark a group of several elements, press <Shift> for a
block already marked, and select the element in the lower left or right corner of
the group. The resulting selection is the smallest cohesive group of elements
that includes both of these elements.
Observe that all commands can only be executed, if they do not contradict the
conventions of the language.
t
"Insert" "Step Transition
n
(before)"
e
Symbol: Shortcut: <Ctrl>+<T>
This command inserts a step in the SFC editor followed by a transition in front
of the marked block.
m
"Insert" "Step Transition
u
(after)"
c
Symbol: Shortcut: <Ctrl>+<E>
This command inserts a step in the SFC editor followed by a transition after the
o
first transition in the marked block.
"Insert" "Alternative
D
Branch (right)"
d
This command inserts an alternative branch in the SFC editor as a right branch
e
of the marked block. For this the marked block must both begin and end with a
transition. The new branch is then made up of one transition.
iv
"Insert" "Alternative
Branch (left)"
h
Symbol:
c
This command inserts an alternative branch in the SFC editor as the left branch
r
of the marked block. For this the marked block must both begin and end with a
transition. The new branch is then made up of one transition.
A
"Insert" "Parallel Branch
(right)"
WAGO-I/O-PRO 32 5-29
The Graphic Editors
Symbol:
This command inserts a parallel branch in the SFC editor as the left branch of
the marked block. For this the marked block must both begin and end with a
t
step. The new branch is then made up of one step.
"Insert" "Jump"
n
Symbol: Shortcut: <Ctrl>+<U>
e
This command inserts a jump in the SFC editor at the end of the branch, to
which the marked block belongs. For this the branch must be an alternative
m
branch.
For a inserted jump then the text field 'Step' can be selected and be replaced by
u
the label of the step which is target of the jump.
c
"Insert" "Transition-
Jump"
o
Symbol:
D
This command inserts a transition in the SFC editor, followed by a jump at the
end of the selected branch. For this the branch must be a parallel branch.
For a inserted jump then the text field 'Step' can be selected and be replaced by
d
the label of the step which is target of the jump.
e
"Insert" "Add Entry-
Action"
iv
With this command you can add an entry-action to a step. An entry-action is
only executed once, right after the step has become active. The entry-action can
h
be implemented in a language of your choice.
c
A step with an entry-action is designated by an "E" in the bottom left corner.
r
"Insert" "Add Exit-Action"
With this command you can add an exit-action to a step. An exit-action is only
A
executed once, before the step is deactivated. The exit-action can be
implemented in a language of your choice.
A step with an exit-action is designated by an "X" in the lower right corner.
5-30 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
"Extras" "Zoom
Action/Transition"
n
Shortcut: <Alt>+<Enter>
e
The action of the first step of the marked block or the transition body of the first
transition of the market block is loaded into the editor in the respective
language, in which it has been written. If the action or the transition body is
m
empty, then the language must be selected, in which it has been written.
"Extras" "Clear
u
Action/Transition"
c
With this command you can delete the actions of the first step of the marked
block or of the transitions body of the first transition.
o
If, during a step, you implement either only the action, the entry-action, or the
exit-action, then the same will be deleted by the command. Otherwise a dialog
D
box appears, and you can select which action or actions are to be deleted.
If the cursor is located in the action of an IEC step, then only this association
will be deleted. If an IEC step with an associated action is selected, then this
d
association will be deleted. During an IEC step with several actions, a selection
dialog box will appear.
e
"Extras" "Step Attributes"
iv
With this command you can open a dialog box in which you can edit the
attributes for the marked step.
ch
A r
WAGO-I/O-PRO 32 5-31
The Graphic Editors
You can take advantage of three different entries in the step attribute dialog
box. Under Minimum Time, you enter the minimum length of time that the
processing of this step should take. Under the Maximum Time, you enter the
maximum length of time that the processing of this step should take. Note that
the entries are of the TIME type, so you use a TIME constant (i.e. T#3s) or a
t
variable of the TIME type.Under Comment you can insert a comment to the
step. With "Extras" "Options" you can then adjust whether, in the SFC
n
editor, the comments or the time setting for the steps should be displayed. On
the right, next to the step, either the comment or the time setting will appear.
e
If the maximum time is exceeded, SFC flags are set for the user to make
inquiries.
u m
c
The example shows a step whose execution should last at least two, and at the
most, ten seconds. In Online mode, there is, in addition to these two times, a
o
display of how long the step has already been active.
"Extras""Time Overview"
D
With this command you can open a window in which you can edit the time
settings of your SFC steps:
ed
iv
ch
A r
Image 5.14: Time Boundaries Overview for a SFC POU
In the time boundaries overview, all steps of your SFC POU are displayed. If
you have entered a time boundary for a step, then the time boundary is
5-32 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
displayed to the right of the step (first, the lower limit, then the upper limit).
You can also edit the time boundaries. To do so, click on the desired step in the
overview. The name of the step is then shown below in the window. Go to the
Minimum Time or Maximum Time field, and enter the desired time boundary
there. If you close the window with OK, then all of the changes will be stored.
In the example, steps 2 and 6 have a time boundary. Shift1 lasts at least two,
t
and at most, ten seconds. Shift2 lasts at least seven, and at most, eight seconds.
n
"Extras" "SFC-Overview"
With this command you are given a reduced display of the active SFC POU. A
e
check appears before the menu item. For better orientation you can display the
names of the steps, transitions, and jumps in tooltips by placing the mouse
pointer on an element.
m
In order to switch back to the normal SFC display, set a marking and then either
u
press <Enter> or select the command once again, and the change will take
place.
o c
D
ed
iv
ch
A r
"Extras" "Options"
Image 5.15: SFC Overview
With this command you open a dialog box in which you can set different
options for your SFC POU.
WAGO-I/O-PRO 32 5-33
The Graphic Editors
n t
e
Image 5.16: Dialog Box for Sequential Function Chart Options
m
In the SFC Options dialog box you can undertake five entries. Under Step
Height, you can enter how many lines high an SFC step can be in your SFC
u
editor. 4 is the standard setting here. Under Step Width, you can enter how
c
many columns wide a step should be. 6 is the standard setting here. You can
also preset the Display at Step. With this, you have three possibilities: You can
o
either have Nothing displayed, or the Comment, or the Time Limits. The last
two are shown the way you entered them in "Extras" "Step Attributes".
D
"Extras" "Associate
Action"
With this command actions and Boolean variables can be associated with IEC
d
steps.
e
To the right of, and next to the IEC step, an additional divided box is attached,
for the association of an action. It is preset in the left field with the qualifier "N"
v
and the name "Action." Both presets can be changed. For this you can use the
i
Input Assistant.
h
New actions for IEC steps are created in the Object Organizer for an SFC POU
with the "Project" "Add Action" command.
c
"Extras" "Use IEC-Steps"
r
Symbol:
A
If this command is activated (denoted by a check in front of the menu item and
a printed symbol in the Tool bar), then IEC steps will be inserted instead of the
simplified steps upon insertion of step transitions and parallel branches.
If this option is switched on, the Init step is set as an IEC step when you create a
new SFC POU.
This settings are saved in the file "WAGO-IO-PRO.ini" and are restored when
WAGO-I/O-PRO 32 gets started again.
5-34 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
t
from which you can read how long the step has already been active.
e n
In the picture above the step depicted has already been active 8 seconds and 410
milliseconds. The step must, however, be active for at least 7 minutes before
m
the step will be left.
With "Online" "Toggle Breakpoint", a breakpoint is set at a step. The
u
processing then stops in front of the execution of this step. The step with the
c
breakpoint is colored light blue.
If several steps are active in a parallel branch, then the active step whose action
o
will be processed next is displayed in red.
If IEC steps have been used, then all active actions in Online mode will be
D
displayed in blue.
SFC also includes support for stepping a step at a time ("Online" "Step Over").
With this stepping, the program will always proceed to the next step whose
d
action is to be executed.
e
With "Online" "Step in" you can step into actions. Within the actions, all
debugging capabilities of the corresponding editor are at the user's disposal.
iv
If you place the mouse pointer briefly above a variable, then the type and the
comment about the variable will be displayed in a Tooltip.
ch
A r
WAGO-I/O-PRO 32 5-35
The Graphic Editors
n t
e
u m
o c
D
ed
iv
Image 5.17: Sequential Function Chart in the Online Mode with an Active Step (Shift1) and a Breakpoint
(Step10)
ch
A r
The Continuous Function Chart Editor (CFC)
It looks like a block which has been produced using the continuous function
chart editor (CFC):
5-36 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
n t
e
u m
Image 5.18: Editor for continuous function charts
o c
No snap grid is used for the continuous function chart editor so the elements
D
can be placed anywhere. Elements of the sequential processing list include
blocks, input, output, jump, label, return and comments. The inputs and outputs
of these elements can be connected by dragging a connection with the mouse.
d
The connecting line will be drawn automatically. The shortest possible
connection line is drawn taking into account existing connections. The
e
connecting lines are automatically adjusted when the elements are moved. If the
v
case arises where a connecting line cannot be drawn simply because of lack of
i
space, a red line will be shown between the input and the associated output
instead. This line will be converted into a connecting line just as soon as space
h
is available.
One advantage of the continuous function chart as opposed to the usual
c
function block diagram editor is the fact that feedback paths can be inserted
r
directly.
The most important commands can be found in the context menu
A
Cursor positions in the
continuous function chart
editor
Each text is a possible cursor position. The selected text is shaded in blue and
can be modified.
In all other cases the current cursor position is shown by a rectangle made up of
points. The following is a list of all possible cursor positions with examples:
WAGO-I/O-PRO 32 5-37
The Graphic Editors
1. Trunks of the elements blocks, input, output, jump, label, return and
comments.
n t
e
2. Text fields for the elements blocks, input, output, jump, label, return and
comments as well as text fields for connection
markers:
u m
o c
D
ed
iv
3. Inputs for the elements block, input, output, jump and
return:
ch
Ar 4. Outputs for the elements block and input:
5-38 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
"Insert" "Block"
Symbol: Shortcut: <Ctrl>+<B>
This command can be used to paste in operators, functions, function blocks and
programs. It is always pasted in as an ”AND” operator. This can be converted
by Selection and Overwrite of the text into every other operator, into every
function, into every function block and every program. The input assistance
t
serves to select the desired block from the list of supported blocks. If the new
block has another minimum number of inputs, these will be attached. If the new
n
block has a smaller highest number of inputs, the last inputs will be deleted.
e
"Insert" "Input"
Symbol: Shortcut: <Ctrl> + <E>
m
This command is used to insert an input. The text offered ”???” can be selected
and replaced by a variable or constant. The input assistance can also be used
u
here.
c
"Insert" "Output"
o
Symbol: Shortcut: <Ctrl>+<A>
This command is used to insert an output. The text offered ”???” can be
D
selected and replaced by a variable. The input assistance can also be used here.
The value which is associated with the input of the output is allocated to this
variable.
d
"Insert" "Jump"
e
Symbol: Shortcut: <Ctrl>+<J>
v
This command is used to insert a jump. The text offered ”???” can be selected
i
and replaced by the jump label to which the program should jump.
h
"Insert" "Label"
c
Symbol: Shortcut: <Ctrl>+<L>
r
This command is used to insert a label. The text offered ”???” can be selected
and replaced by the jump label.
A
"Insert" "Return"
Symbol: Shortcut: <Ctrl> + <R>
This command is used to insert a RETURN command.
"Insert" "Comment"
Symbol: Shortcut: <Ctrl> + <K>
This command is used to insert a comment.
You obtain a new line within the comment with <Ctrl> + <Enter>.
WAGO-I/O-PRO 32 5-39
The Graphic Editors
t
must be selected (Cursor position 1)
"Extras" "Negate"
n
Symbol: Shortcut: <Ctrl> + <N>
e
This command is used to negate inputs, outputs, jumps or RETURN
commands. The symbol for the negation is a small cross on the connection.
m
The input of the element block, output, jump or return is negated when it is
selected (Cursor position 3)
u
The output of the element block or input is negated when it is selected (Cursor
c
position 4).
A negation can be deleted by negating again.
o
"Extras" "Set/Reset"
D
Symbol: Shortcut: <Ctrl> + <T>
This command can only be used for selected inputs of the element output
(Cursor position 3).
d
The symbol for Set is S and for Reset is R.
v e
h i
VarOut1 is set to TRUE, if VarIn1 delivers TRUE. VarOut1 retains this value,
c
even when VarIn1 springs back to FALSE.
r
VarOut2 is set to FALSE, if VarIn2 delivers TRUE. VarOut2 retains this value,
even when VarIn2 springs back to FALSE.
A
Multiple activation of this command causes the output to change between Set,
Reset and the normal condition.
"Extras" "EN/ENO"
Symbol: Shortcut: <Ctrl> + <0>
This command is used to give a selected block (Cursor position 3) an additional
Boolean enable input EN (Enable In) and a Boolean output ENO (Enable Out).
5-40 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
ADD is only executed in this example when the Boolean variable “Bedingung”
(condition) is TRUE. VarOut is also set to TRUE after ADD has been executed.
ADD will not be executed when the variable “Bedingung” (condition) is
FALSE and VarOut retains its value FALSE. The example below shows how
the value ENO can be used for further blocks.
t
x should initialised to 1 and y initialised to 0. The numbers in the right corner
of the block indicate the order in which the commands are executed.
n
x will be increased by one until it reaches the value 10. This causes the output
e
of the block LT(0) to deliver the value FALSE and SUB(3) and ADD(5) will be
executed. x is set back to the value 1 and y is increased by 1. LT(0) is executed
again as long as x is smaller than 10. y thus count the number of times x passes
m
though the value range 1 to 10.
"Extras" "Properties..."
u
Constant input parameters (VAR_INPUT CONSTANT) from functions and
c
function blocks are not shown directly in the continuous function chart editor.
These can be shown and their value can be changed when one selects the trunk
o
of the block in question (Cursor position 1) and then selects the command
‚Extras‘ ‚Properties‘ or simply double clicks on the trunk. The following dialog
D
opens:
ed
iv
ch
A r
Image 5.19: Properties dialog
WAGO-I/O-PRO 32 5-41
The Graphic Editors
pressing <Escape> rejects the changes. The button OK stores all of the changes
which were made.
Selecting elements
One clicks on the trunk of the element (Cursor position 1) to select it.
To mark more elements one presses the <Shift> key and clicks in the elements
t
required, one after the other, or one drags the mouse with the left hand
mousekey depressed over the elements to be marked.
n
The command ‘Extras’ ‘Select all’ marks all elements at once.
e
Moving elements
One or more selected elements can be moved with the arrow keys as one is
m
pressing on the <Shift> key. Another possibility is to move elements using a
depressed left mousekey. These elements are placed by releasing the left
u
mousekey in as far as they do not cover other elements or exceed the foreseen
size of the editor. The marked element jumps back to its initial position in such
c
cases and a warning tone sounds.
o
Copying elements
One or more selected elements can be copied with the command ‘Edit’ ‘Copy’
D
and inserted with the command ‘Edit’ ‘Paste’.
Creating connections
d
An input of an element can be precisely connected to the output of another
element. An output of an element can be connected to the inputs of a number of
e
other elements.
v
There are a number of possibilities to connect the input of an element E2 with
i
the output of an element E1.
ch
r
Place the mouse on the output of element E1 (Cursor position 4), click with the
left mousekey, hold the left mousekey down and drag the mouse cursor onto the
A
input of element E2 (Cursor position 3) and let the left mousekey go. A
connection is made from the output of element E1 to the mouse cursor during
this dragging operation with the mouse.
Place the mouse on the input of element E2, click with the left mousekey, hold
the left mousekey down and drag the mouse cursor onto the output of element
E1 and let the left mousekey go.
Move one of the elements E1 or E2 (Cursor position 1) and place it in such a
way by letting go of the left mousekey that the output of element E2 and the
input of element E1 touch.
Where element E2 is a block with a free input, a connection can also be made
by dragging the mouse from an output from E1 to the trunk of E2. A connection
5-42 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
with the free input at the highest position on E2 will be created when the
mousekey is released. In the case where block E2 does not have a free input but
is an operator which can have an input added to it, a new input will be
automatically generated.
The output and input of a block can be connected together (feedback path) by
using this method.
t
Deleting connections
n
There are a number of possibilities for removing the connection between the
output of an element E1 and the input of an element E2:
e
Select the output of element E1 (Cursor position 4) and press the <Delete> key
or execute the command ‘Edit’ ‘Delete'. Several connections will be removed
at the same if the output of E1 is connected to more than one of inputs.
m
Select the input of element E2 (Cursor position 4) and press the <Delete> key
u
or execute the command ‘Edit’ ‘Delete‘.
c
Select the input of E2 with the mouse, hold the left mousekey depressed and
drag the connection from the input to E2 away. The connection is removed
o
when the left mousekey is released in a free area of the screen.
Changing connections
D
A connection between the output of an element E1 and the input of an element
E2 can easily be changed into a connection between the output of element E1
and the input of element E3. The mouse is clicked on the input of E2 (Cursor
d
position 3), the left mousekey is kept depressed, the mouse cursor is moved to
the input of E3 and then released.
e
"Extras" "Connection
v
marker"
i
Connections can also be represented by a connector (connection marker)
h
instead of a connecting line. Here the output and the associated input have a
connector added to them which is given a unique name.
c
Where a connection already exists between the two elements which should now
r
be represented by connectors, the output of the connecting line is marked
(Cursor position 3) and the menu point ‚Extras‘ ‚Connection marker‘ is
A
selected. The following diagram shows a connection before and after the
selection of this menu point.
A unique name is given as standard by the program which begins with M, but
which can be changed. The connector name can be edited both at the input and
at the output.
It is important to know that the connector name is associated with a property of
the output of a connection and is stored with it.
WAGO-I/O-PRO 32 5-43
The Graphic Editors
t
2. Edit the connector at the input:
If the text in the connector is replaced, the connection to the old connection
n
marker will be deleted and a new connection will be created, or in other words
only the name of another existing connection marker can be given.
e
Connections in connector representations can be converted to normal
connections in that one marks the output of the connections (Cursor position 4)
m
and again selects the menu point ’Extras‘ ‘Connection marker‘.
u
Order of execution
The elements block, output, jump, return and label each possess a number
c
indicating the order in which they are executed. In this sequential order the
individual elements are evaluated at run time.
o
When pasting in an element the number is automatically given according to the
topological sequence (from left to right and from above to below). The new
D
element receives the number of its topological successor if the sequence has
already been changed and all higher numbers are increased by one.
d
The number of an element remains constant when it is moved.
The sequence influences the result and must be changed in certain cases.
e
If the sequence is displayed, the corresponding sequential execution number is
v
shown in the upper right hand corner of the element.
i
"Extras" "Order"
h
"Display"‘
This command switches the display of the order of execution on and off. The
c
default setting is to show it (recognised by a tick (ü) in front of the menu
r
point).
A
"Extras" "Order" "Order
topologically"‘
Elements are ordered in a topological sequence when the execution takes place
from left to right and from above to below, that is the number increases from
left to right and from above to below for topologically arranged elements. The
connections are not relevant, only the location of the elements is important.
All selected elements are topologically arranged when the command ‘Extras‘
‘Order‘ ’Order topologically‘ is executed. All elements in the selection are
taken out of the sequential processing list by this process. The elements are then
entered into the remaining sequential processing list individually from bottom
right through to upper left. Each marked element is entered into the sequential
processing list before its topological successor, i.e. it is inserted before the
5-44 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
element that in a topological sequencing would be executed after it, when all
elements in the editor were sequenced according to a topological sequencing
system. This will be clarified by an example.
n t
e
u m
c
Image 5.20: Sequence before the topological ordering of the three elements
o
The elements with numbers 1, 2 and 3 are selected. If the command ’Order
topologically‘ is selected the elements are first taken out of the sequential
D
processing list. Var3, the jump and the AND-operator are then inserted again
one after the other. Var3 is placed before the label and receives the number 2.
d
The jump is then ordered and receives the number 4 at first but this then
becomes 5 after the AND is inserted. The new order of execution which arises
e
is:
iv
ch
A r
Image 5.21: Sequence after the topological ordering of the three elements
WAGO-I/O-PRO 32 5-45
The Graphic Editors
t
"Extras" "Order" "One
backwards"‘
n
With this command all selected elements with the exception of the element
which is at the end of the sequential processing list are moved one place
e
backwards in the sequential processing list.
m
beginning"‘
With this command all selected elements will be moved to the front of the
u
sequential processing list whereby the order within the group of selected
c
elements is maintained. The order within the group of unselected elements also
remains the same.
o
"Extras" "Order" "To the
end"‘
D
With this command all selected elements will be moved to the end of the
sequential processing list whereby the order within the group of selected
elements is maintained. The order within the group of unselected elements also
d
remains the same.
e
"Extras" "Order" "Order
everything according to
v
data flow"‘
i
This command effects all elements. The order of execution is determined by the
h
data flow of the elements and not by their position.
c
The diagram below shows elements which have been ordered topographically.
A r
5-46 WAGO-I/O-PRO 32
Chapter 5 - Editors in WAGO-I/O-PRO 32
n t
e
u m
c
Image 5.22: Sequence before the ordering according to data flow
o
The following arrangement exists after selecting the command:
D
ed
iv
ch
A r
Image 5.23: Sequence after the ordering according to data flow
When this command is selected the first thing to happen is that the elements are
ordered topographically. A new sequential processing list is then created. Based
on the known values of the inputs, the computer calculates which of the as yet
not numbered elements can be processed next. In the above ”network” the
block AND, for example, could be processed immediately since the values at its
WAGO-I/O-PRO 32 5-47
The Graphic Editors
inputs (1 and 2) are known. Block SUB can only then be processed since the
result from ADD must be known first, etc.
Feedback paths are inserted last.
The advantage of the data flow sequencing is that an output box which is
connected to the output of a block comes immediately after it in the data flow
sequencing system which by topological ordering would not always be the case.
t
The topological ordering can deliver another result in some cases than ordering
by data flow, a point which one can recognise from the above example.
n
Feedback paths
e
Feedback paths can only be displayed directly in the continuous function chart
editor and not in the usual function block diagram editor. Here it should be
observed that the output of a block always carries an internal intermediate
m
variable. The data type of the intermediate variable results, for operators, from
u
the largest data type of the inputs.
The data type of a constant is obtained from the smallest possible data type, that
c
is the constant ‘1’ adopts the data type SINT. If now an addition with feedback
and the constant ‘1’ is executed, the first input gives the data type SINT and the
o
second is undefined because of the feedback. Thus the intermediate variable is
also of the type SINT. The value of the intermediate variable is only then
D
allocated to the output variable.
The diagram below shows an addition with feedback and an addition with a
variable. The variables x and y should be of the type INT here.
ed
iv
There are differences between the two additions:
h
The variable y can be initialised with a value which is not equal to zero but this
c
is not the case for intermediate variable for the left addition.
r
The intermediate variable for the left addition has the data type SINT while that
on the right has the data type INT. The variables x and y have different values
after the 129th call up. The variable x, although it is of the type INT, contains
A
the value -127 because the intermediate variable has gone into overflow. The
variable y contains the value 129, on the other hand.
5-48 WAGO-I/O-PRO 32
Chapter 6 - The Resources
6 The Resources
Overview of the Resources
t
In the Resources register card of the Object Organizer, there are objects for
configuring and organizing your project and for keeping track of the values of
n
the variables:
• Global Variables that can be utilized in the entire project; the global
e
variables of the project as well as the libraries.
• PLC Configuration for configuring your hardware
• Task Configuration for controlling your program control via tasks
m
• Sampling Trace for graphic logging of variable values
• Watch and Receipt Manager for indicating and presetting variable
u
values
o c
D
ed
iv
Image 6.1: Resources
h
Global Variables
r c
Editing Global Variables
A
In the Object Organizer, you will find three objects in the Resources register
card in the Global Variables folder (default names of the objects in
parentheses).
• Global Variables List (Global Variables)
• Variables Configuration (Variable Configuration)
All variables defined in these objects are recognized throughout the project.
If the global variables folder is not opened up (plus sign in front of the folder),
you can open it with a doubleclick <Enter> in the line.
Select the corresponding object. The "Object Open" command opens a
window with the previously defined global variables. The editor for this works
the same way as the declaration editor.
WAGO-I/O-PRO 32 6-1
Global Variables
t
In the Object Organizer, select the Global Variables folder or one of the
n
existing objects with global variables. Then execute the "Project" "Object
Add" command. Give the object that appears in the dialog box a corresponding
e
name. With this name an additional object will be created with the key word
VAR_GLOBAL. If you want to have a variable configuration, change the
corresponding key word to VAR_CONFIG.
Global Variables
u m
c
Normal global variables are defined in an object between the key words
VAR_GLOBAL and END_VAR. In the Object Organizer in the Resources
o
register card, the object Global_Variables will generally be available. The
object can be renamed and further objects for global variables can be created.
D
To create a new global variables list open the dialog New global variable list
by 'Project' 'Object' 'Add'. Here you insert a Name for the new list. If you want
d
to use an export file (*.esp) or a DCF file (*.dcf), which contains the relevant
variable, you can connect it by Link to file. Press Select to get the standard
e
dialog Select text file. DCF files are converted to IEC syntax when called.
If the settings in dialog 'New global variable list' are confirmed by pressing the
v
OK button, the new object is created and the variables' editor opens. The editor
i
for global variables works just the same as the Declaration Editor. Though if an
external variable list is used, it cannot be edited in WAGO-I/O-PRO 32.
h
External variable lists only can be edited external and they will be read each
c
time the project is opened or compiled again.
r
Global variables can be used in the entire project.
Syntax:
A
VAR_GLOBAL
(*Declaration of Variables *)
END_VAR
Global retain variables additionally receive the key word RETAIN.
Syntax:
VAR_GLOBAL RETAIN
(*Declaration of Variables *)
END_VAR
Global constants additionally receive the key word CONSTANT.
Syntax:
6-2 WAGO-I/O-PRO 32
Chapter 6 - The Resources
VAR_GLOBAL CONSTANT
(*Declaration of Variables *)
END_VAR
Variable Configuration
t
In function blocks it is possible to specify addresses for inputs and outputs that
are not completely defined, if you put the variable definitions between the key
n
words VAR and END_VAR. Addresses not completely defined are identified
with an asterisk.
e
Example:
FUNCTION_BLOCK locio
m
VAR
loci AT %I*: BOOL := TRUE;
u
loco AT %Q*: BOOL;
END_VAR
c
Here two local I/O-variables are defined, a local-In (%I*) and a local-Out
(%Q*).
o
If you want to configure local I/Os for variables configuration in the Object
Organizer in the Resources register card, the object Variable_Configuration
D
will generally be available. The object then can be renamed and other objects
can be created for the variables configuration.
d
The editor for variables configuration works like the declaration editor.
Variables for local I/O-configurations must be located between the key words
e
VAR_CONFIG and END_VAR.
v
The name of such a variable consists of a complete instance path through which
i
the individual POUs and instance names are separated from one another by
periods. The declaration must contain an address whose class (input/output)
h
corresponds to that of the incompletely specified address (%I*, %Q*) in the
function block. Also the data type must agree with the declaration in the
c
function block.
r
Configuration variables, whose instance path is invalid because the instance
does not exist, are also denoted as errors. On the other hand, an error is also
A
reported if no configuration exists for an instance variable. In order to receive a
list of all necessary configuration variables, the "All Instance Paths" menu
item in the "Insert" menu can be used.
Example:
Assume that the following definition for a function block is given in a program:
PROGRAM PLC_PRG
VAR
Hugo: locio;
Otto: locio;
END_VAR
Then a corrected variable configuration would look this way:
WAGO-I/O-PRO 32 6-3
Global Variables
VAR_CONFIG
PLC_PRG. Hugo.loci AT %IX1.0 : BOOL;
PLC_PRG. Hugo.loco AT %QX0.0 : BOOL;
PLC_PRG. Otto.loci AT %IX1.0 : BOOL;
PLC_PRG.Otto.loco AT %QX0.3 : BOOL;
END_VAR
t
Note: Be aware not to describe an output, which is used in the variables
n
configuration, additionally within the project or by a variable (AT declaration).
This would not be noticed.
e
"Insert" "All Instance
Paths"
m
With this command a VAR_CONFIG - END_VAR-block is generated that
u
contains all of the instance paths available in the project. Declarations already
on hand do not need to be reinserted in order to contain addresses already in
c
existence. This menu item can be found in the window for configuration of
variables if the project is compiled ("Project" "Rebuild All").
Document Frame
o
Document Frame
D
d
If a project is to receive multiple documentations, perhaps with German and
English comments, or if you want to document several similar projects that use
e
the same variable names, then you can save yourself a lot of work by creating a
docuframe with the "Extras" "Make Docuframe File" command.
iv
The created file can be loaded into a desired text editor and can be edited. The
file begins with the DOCUFILE line. Then a listing of the project variables
h
follows in an arrangement that assigns three lines to each variable: a VAR line
that shows when a new variable comes; next, a line with the name of the
c
variable; and, finally, an empty line. You can now replace this line by using a
r
comment to the variable. You can simply delete any variables that you are
unable to document. If you want, you can create several document frames for
A
your project.
6-4 WAGO-I/O-PRO 32
Chapter 6 - The Resources
n t
e
Image 6.2: Windows Editor with Document Frame
u m
c
In order to use a document frame, give the "Extras" "Link Docu Frame"
command. Now if you document the entire project, or print parts of your
o
project, then in the program text, there will be an insertion of the comment
produced in the docuframe into all of the variables. This comment only appears
D
in the printout!
"Extras" "Make
d
Docuframe File"
Use this command to create a document frame. The command is at your
e
disposal, whenever you select an object from the global variables.
v
A dialog box will open for saving files under a new name. In the field for the
i
name file, the *.txt extension has already been entered. Select a desired name.
Now a text file has been created in which all the variables of your project are
h
listed.
c
"Extras" "Link Docu File"
r
With this command you can select a document frame.
The dialog box for opening files is opened. Choose the desired document frame
A
and press OK. Now if you document the entire project, or print parts of your
project, then in the program text there will be an insertion of the comment
produced in the docuframe into all of the variables. This comment only appears
in the printout!
To create a document frame, use the "Extras" "Make Docuframe File"
command.
WAGO-I/O-PRO 32 6-5
PLC Configuration
PLC Configuration
n t
e
u m
c
Image 6.3: Dialog box "Coupler Selection"
o
D
Task Configuration
d
In addition to declaring the special PLC_PRG program, you can also control the
processing of your project using the task management.
e
The Task Configuration is found as an object in the Resources register card
v
in the Object Organizer. The task editor contains a series of tasks. The task
i
declaration consists of the name of the task, an entry for the priority the task is
to have, and an entry for the condition under which the task is to be executed.
h
This requirement can either be a time interval, according to which the task is to
be executed, or a global variable that, in the event it has a rising edge, brings
c
about an execution.
r
For each task you can now specify a series of programs that will be started by
the task. If the task is executed in the present cycle, then these programs will be
A
processed the length of one cycle.
The Task Configuration is displayed in the following form:
• The Task Configuration is located in the first line.
• Underneath and indented from the Task Configuration, you will find a
sequence of task entries (with name, priority, interval, and occurrence).
• Below each task entry, there is again a series of program call ups.
6-6 WAGO-I/O-PRO 32
Chapter 6 - The Resources
n t
e
In this example of a Task Configuration, Task2 has a lower priority than Task1.
Task1, however, is only executed every two seconds. (The entry under Single is
disregarded.) Thus, in this Task Configuration, Task1 is executed every two
m
seconds, and, in between, Task2 can be executed at any time, provided that the
global variable "Schalten" has a rising edge.
u
Which task is being
c
processed?
For the execution, the following rules apply:
o
• That task is executed, whose condition has been met; i.e., its specified time
has expired, or after its condition variable exhibits a rising edge.
D
• If several tasks have a valid requirement, then the task with the highest
priority will be executed.
d
• If several tasks have valid conditions and equivalent priorities, then the
task that has had the longest waiting time will be executed first.
e
• The most important commands are found in the context menu (right mouse
v
button or <Ctrl>+<F10>).
i
Working in the Task
h
Configuration
• At the heading of the Task Configuration are the words "Task
c
Configuration."If a plus sign is located before the words, then the sequence list
r
is closed. By doubleclicking on the list or pressing <Enter>, you can open the
list. A minus sign now appears.By doubleclicking once more, you can close the
A
list again.
• For every task, there is a list of program call-ups attached. Likewise, you
can open and close this list the same way.
• With the "Insert" "Insert Task" command, you can insert a task.
• With the "Insert" "Insert Program Call", a program call will be
inserted.
• With the "Extras" "Edit Entry" command, you can edit the task
characteristics or the program call-up, depending on the selected element.
WAGO-I/O-PRO 32 6-7
Task Configuration
t
With this command you can insert a new task into the Task Configuration.
If a task is selected, then the "Insert Task" command will be at your disposal.
n
The new task will be inserted in front of the cursor. If the words Task
Configuration are selected, then the "Append Task" is available, and the new
e
task will be appended to the end of the existing list.
The dialog box will open for you to set the task attributes.
u m
o c
D
Image 6.5: Dialog Box for Setting Task Attributes
In the dialog box you can enter the desired attributes: the Name; the Priority
d
(a number between 0 and 31, with the following validities: 0 has the highest,
and, 31, the lowest priority); the Interval after which the task should be started
e
again; or a variable that, following a raising edge, will cause an execution of the
task (in the Single field). With the Select... button, you can open the Input
v
Assistant to select from the declared variables.
i
If an entry is on hand for both the interval and for the variable, then only the
h
interval time will be considered for the execution requirement. If an entry has
not been made in either of the two fields, then only the priority with the counter
c
will be considered. This means that in every cycle the task will be considered to
r
be executable.It will only cease to be executed if another task of higher priority
is likewise executable.
A
"Insert" "Insert Program
Call" or "Insert""Append
Program Call"
With these commands you will open the dialog box for entering a program call
to a task in the Task Configuration.
With Insert Program Call", the new program call is inserted in front of the
cursor, and with "Append Program Call", the program call is appended to the
end of the existing list.
6-8 WAGO-I/O-PRO 32
Chapter 6 - The Resources
t
Image 6.6: Dialog box for Program Call Entry
n
In the field, specify a valid program name for your project, or open the Input
Assistant with the Select button to select a valid program name. If the selected
e
program requires input variables, then enter these in their usual form and of the
declared type (for example, prg(invar:=17)).
m
"Extras" "Edit Entry"
Depending on the element selected, you can use this command in the Task
u
Configuration to open either the dialog box for setting the task attributes (see
"Insert" "Task") or the dialog box for entering the program call (see "Insert"
c
"Program Call").
o
If the cursor is located at the task entry, and there is no list of program calls
appended to the task entry, then you open the dialog for setting the
doubleclicking on the entry or by pressing <Enter>.
D
If the cursor is located on an entry for a program call, then you can also open
the dialog box for editing the program entry by doubleclicking on the entry.
d
By clicking on the task or program name, or by pressing the <Space bar>, you
can set an edit control box around the name. Then, you can change the
e
designation directly in the task editor.
v
"Extras" "Set Debug
i
Task"
h
With this command a debugging task can be set in Online mode in the Task
Configuration. The text [DEBUG] will appear after the set task.
c
The debugging capabilities apply, then, only to this task.In other words, the
r
program only stops at a breakpoint if the program is gone through by the set
task.
A
Sampling Trace
Sample tracing means that the progression of values for variables is traced over
a certain time frame. These values are written in a ring buffer (trace buffer). If
the memory is full, then the "oldest" values from the start of the memory will be
overwritten. As a maximum, 20 variables can be traced at the same time. A
maximum of 500 values can be traced per variable.
WAGO-I/O-PRO 32 6-9
Sampling Trace
Since the size of the trace buffer in the PLC has a fixed value, in the event of
very many or very wide variables (DWORD), fewer than 500 values can be
traced.
Example: if 10 WORD variables are traced and if the memory in the PLC is
5000 bytes long, then, for every variable, 250 values can be traced.
In order to be able to perform a trace, open the object for a Sampling Trace
t
in the Resources register card in the Object Organizer. After this, you must
enter the trace variables to be traced.(See "Extras" "Trace Configuration".)
n
After you have sent the configuration with "Save Trace to the PLC and have
e
started the trace in the PLC ("Start Trace"), then the values of the variables
will be traced. With "Read Trace", the final traced values will be read out and
displayed graphically as curves.
m
"Extras" "Trace
Configuration"
u
With this command you will be given the dialog box for entering the variables
c
to be traced, as well as diverse trace parameters for the Sampling Trace. The
dialog can also be opened by a double click in the grey area of the dialog
o
Sampling Trace.
D
ed
iv
ch
A r
6-10 WAGO-I/O-PRO 32
Chapter 6 - The Resources
t
A variable is deleted from the list when you select the variable and then press
the Delete button.
n
A Boolean or analogue variable can be entered into the field Trigger Variable.
The input assistance can also be used here. The trigger variable describes the
e
termination condition of the trace. In Trigger Level you enter the level of an
analogue trigger variable at which the trigger event occurs. When Trigger edge
positive is selected the trigger event occurs after an ascending edge of the
m
Boolean trigger variable or when an analogue variable has passed through the
trigger level from below to above. Negative causes triggering after a
u
descending edge or when an analogue variable went from above to below. Both
causes triggering for both descending and ascending edges or by a positive or
c
negative pass, whereas none does not initiate a triggering event at all. Trigger
Position is used to set the percentage of the measured value which will be
o
recorded before the trigger event occurs. If, for example, you enter 25 here then
25 % of the measured values are shown before the triggering event and 75%
D
afterwards and then the trace is terminated. The field Sample Rate is used set
the time period between two recordings in milliseconds. The default value ”0”
means one scanning procedure per cycle.
d
Select the mode for recalling the recorded values: With Single the Number of
the defined samples are displayed one time. With Continuous the reading of
e
the recording of the defined number of measured values is initiated anew each
v
time. If, for example, you enter the number ‘35’ the first display contains the
i
first measured values 1 to 35 and the recording of the next 35 measured values
(36-70) will then be automatically read, etc.. Manual selection is used to read
h
the trace recordings specifically with "Extras" "Read trace".
c
The recall mode functions independently of whether a trigger variable is set or
not. If no trigger variable is set the trace buffer will be filled with the defined
r
number of measured values and the buffer contents will be read and displayed
on recall.
A
The button Save is used to store the trace configuration which has been created
in a file. The standard window ”File save as” is opened for this purpose.
Stored trace configurations can be retrieved using the button Load. The
standard window ”File open” is opened for this purpose.
Note: Please note that Save and Load in the configuration dialog only
relates to the configuration, not to the values of a trace recording (in contrast to
the menu commands "Extras" "Save trace" and "Extras" "Load trace").
If the field Trigger Variable is empty, the trace recording will run endlessly
and can be stopped by "Extras" "Stop Trace".
WAGO-I/O-PRO 32 6-11
Sampling Trace
Symbol:
With this command the trace configuration is transferred to the PLC and the
trace sampling is started in the PLC.
t
Symbol:
n
With this command the present trace buffer is read from the PLC, and the
e
values of the selected variables are displayed.
m
With this command the present trace buffer is read automatically from the PLC,
and the values are continuously displayed.
u
If the trace buffer is automatically read, then a check (ü) is located before the
c
menu item.
o
Symbol:
D
This command stops the Sampling Trace in the PLC. .
d
to be Displayed
The comboboxes to the right, next to the window for displaying curves trace
e
variables defined in the trace configuration. If a variable is selected from the
v
list, then after the trace buffer has been read the variable will be displayed in the
i
corresponding color (Var 0 green, etc.). Variables can also be selected if curves
are already displayed.
h
A maximum of up to eight variables can be observed simultaneously in the
c
trace window.
A r
6-12 WAGO-I/O-PRO 32
Chapter 6 - The Resources
n t
e
u m
c
Image 6.8: Sampling Trace of various Variables
o
If a trace buffer is loaded, then the values of all variables to be displayed will be
read out and displayed. If no scan frequency has been set, then the X axis will
D
be inscribed with the continuous number of the traced value. The status
indicator of the trace window (first line) indicates whether the trace buffer is
full and when the trace is completed.
d
If a value for the scan frequency was specified, then the x axis will specify the
time of the traced value. The time is assigned to the "oldest" traced value. In the
e
example, e.g., the values for the last 25 seconds are indicated.
v
The Y axis is inscribed with values in the appropriate data type. The scaling is
i
laid out in a way that allows the lowest and the highest value to fit in the
viewing area. In the example, Var 0 has taken on the lowest value of 6, and the
h
highest value of 100: hence the setting of the scale at the left edge.
c
If the trigger requirement is met, then a vertical dotted line is displayed at the
r
interface between the values before and after the appearance of the trigger
requirement.
A
A memory that has been read will be preserved until you change the project or
leave the system.
WAGO-I/O-PRO 32 6-13
Sampling Trace
t
With this command you can alternate between single-channel and multi-
channel display of the Sampling Trace. In the event of a multi-channel display,
n
there is a check (ü) in front of the menu item.
The multi-channel display has been preset. Here the display window is divided
e
into as many as eight display curves. For each curve the maximum and the
minimum value are displayed at the edge.
m
In a single-channel display, all curves are displayed with the same scaling factor
and are superimposed. This can be useful when displaying curve abnormalities.
u
"Extras" "Show grid"
c
With this command you can switch on and off the grid in the graphic window.
When the grid is switched on, a check (ü) will appear next to the menu item.
o
"Extras" "Y Scaling"
D
With this command you can change the preset Y scaling of a curve in the trace
display.
In the dialog box specify the number of the desired curve (Channel) and the
d
new maximum (maximum y scale) and the new minimum value (minimum y
scale) on the y axis.
e
By doubleclicking on a curve you will also be given the dialog box. The
v
channel and the former value are preset.
h i
r c
A
Image 6.9: Dialog Box for Setting the Y Scale
"Extras" "Stretch"
Symbol:
With this command you can stretch (zoom) the values of the Sampling Trace
that are shown. The beginning position is set with the horizontal picture
adjustment bar. With repeated stretches that follow one-after-another, the trace
section displayed in the window will increasingly shrink in size.
This command is the counterpart to "Extras" "Compress".
6-14 WAGO-I/O-PRO 32
Chapter 6 - The Resources
"Extras" "Compress"
Symbol:
With this command the values shown for the Sampling Trace are compressed;
i.e., after this command you can view the progression of the trace variables
within a larger time frame. A multiple execution of the command is possible.
t
This command is the counterpart to "Extras" "Stretch".
n
"Extras" "Save Trace"
With this command you can save a Sampling Trace (values + configuration
e
data). The dialog box for saving a file is opened. The file name receives the
extension "*.trc".
m
Be aware, that here you save the traced values as well as the trace configuration,
whereas Save trace in the configuration dialog only concerns the configuration
u
data.
c
The saved Sampling Trace can be loaded again with "Extras" "Load Trace".
o
With this command a saved Sampling Trace (traced values + configuration
data)can be reloaded. The dialog box for opening a file is opened. Select the
D
desired file with the "*.trc" extension.
With "Extras" "Save Trace" you can save a Sampling Trace.
d
"Extras" "Trace in ASCII-
file"
e
With this command you can save a Sampling Trace in an ASCII-file. The
v
dialog box is opened for saving a file. The file name receives the extension
i
"*.txt". The values are deposited in the file according to the following scheme:
WAGO-I/O-PRO Trace
h
D:\WAGO-IO-PRO\PROJECTS\TRAFFICSIGNAL.PRO
c
Cycle PLC_PRG.COUNTER PLC_PRG.LIGHT1
021
r
121
221
A
.....
If no frequency scan was set in the trace configuration, then the cycle is located
in the first column; that means one value per cycle has been recorded at any
given time. In the other respects, the entry here is for the point in time in ms at
which the values of the variables have been saved since the Sampling Trace has
been run.
In the subsequent columns, the corresponding values of the trace variables are
saved. At any given time the values are separated from one another by a blank
space.
The appertaining variable names are displayed next to one another in the third
line, according to the sequence (PLC_PRG.COUNTER, PLC_PRG.LIGHT1).
WAGO-I/O-PRO 32 6-15
Watch and Receipt Manager
t
With the help of the Watch and Receipt Manager you can view the values of
selected variables. The Watch and Receipt Manager also makes it possible to
n
preset the variables with definite values and transfer them as a group to the PLC
e
("Write Receipt"). In the same way, current PLC values can be read into and
stored in the Watch and Receipt Manager ("Read Receipt"). These functions
are helpful, for example, for setting and entering of control parameters.
m
All watch lists created ("Insert" "New Watch List") are indicated in the left
column of the Watch and Receipt Manager.These lists can be selected with a
u
mouse click or an arrow key. In the right area of the Watch and Receipt
Manager the variables applicable at any given time are indicated.
c
In order to work with the Watch and Receipt Manager, open the object for the
o
Watch and Receipt Manager in the Resources register card in the Object
Organizer.
D
Watch and Receipt
Manager in the Offline
Mode
d
In Offline Mode, you can create several watch lists in the Watch and Receipt
e
Manager using the "Insert" "New Watch List".
For inputting the variables to be watched, you can call up a list of all variables
v
with the Input Assistant, or you can enter the variables with the keyboard,
i
according to the following notation:
<POUName>.<Variable Name>
h
With global variables, the POU Name is left out. You begin with a point. The
c
variable name can, once again, contain multiple levels. Addresses can be
r
entered directly.
Example of a multiple-level variable:
A
PLC_PRG.Instance1.Instance2.Structure.Componentname
Example of a global variable:
.global1.component1
6-16 WAGO-I/O-PRO 32
Chapter 6 - The Resources
n t
e
Image 6.10: Watch and Receipt Manager in the Offline Mode
m
The variables in the watch list can be preset with constant values. That means
that in Online mode you can use the "Extras" "Write Receipt" command to
u
write these values into the variables. To do to do must use := to assign the
c
constant value of the variable:
Example:
o
PLC_PRG.TIMER:=50
In the example, the PLC_PRG.COUNTER variable is preset with the value 6
D
"Insert" "New Watch List"
With this command a new watch list can be inserted into the Watch and Receipt
d
Manager. Enter the desired name for the watch list in the dialog box that
appears.
e
"Extras" "Rename Watch
v
List"
i
With this command you can change the name of a watch list in the Watch and
h
Receipt Manager.
In the dialog box that appears, enter the new name of the watch list.
r c
"Extras" "Save Watch
List"
A
With this command you can save a watch list. The dialog box for saving a file
is opened. The file name is preset with the name of the watch list and is given
the extension "*.wtc".
The saved watch list can be loaded again with "Extras" "Load Watch List".
WAGO-I/O-PRO 32 6-17
Watch and Receipt Manager
With "Extras" "Save Watch List", you can save a watch list.
t
Structured values (arrays, structures, or instances of function blocks) are
marked by a plus sign in front of the identifier. By clicking the plus sign with
n
the mouse or by pressing <Enter>, the variable is opened up or closed.
In order to input new variables, you can turn off the display by using the
e
"Extra" "Active Monitoring" command. After the variables have been
entered, you can use the same command again to activate the display of the
m
values.
c u
o
D
ed
Image 6.11: Watch- and Receipt Manager in the Online Mode
v
In the Offline Mode you can preset variables with constant values (through
i
inputting := <value> after the variable). In the Online Mode, these values can
now be written into the variables, using the "Extras" "Write Receipt"
h
command.
c
With the "Extras" "Read Receipt" command you can replace the presetting
r
of the variable with the present value of the variable.
A
Note: Only those values the watch list are loaded which was selected in the
Watch and Receipt Manager!
"Extra" "Monitoring
Active"
With this command at the Watch and Receipt Manager in the Online mode, the
display is turned on or off. If the display is active, a check (ü) will appear in
front of the menu item.
In order to enter new variables or to preset a value (see Offline Mode), the
display must be turned off through the command. After the variables have been
entered, you can use the same command again to activate the display of the
values.
6-18 WAGO-I/O-PRO 32
Chapter 6 - The Resources
t
you can replace the presetting of the variables (see Offline Mode) with the
present value of the variables.
n
Example:
e
PLC_PRG.Counter [:= <present value>] = <present value>
Force values
m
In the Watch and Receipt Manager you can also "Force values" and "Write
values". If you click on the respective variable value, then a dialog box opens,
u
in which you can enter the new value of the variable. Changed variables appear
in red in the Watch and Receipt Manager.
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 6-19
Watch and Receipt Manager
n t
e
u m
o c
D
ed
iv
ch
Ar
6-20 WAGO-I/O-PRO 32
Chapter 7 - Library Manager
7 Library Manager
Library Manager
t
The library manager shows all libraries that are connected with the current
project. The POUs, data types, and global variables of the libraries can be used
n
the same way as user-defined POUs, data types, and global variables.
e
The library manager is opened with the "Window" "Library Manager"
command.
u m
o c
D
ed
iv
Image 7.1: Library Manager
h
Using the Library
Manager
r c
The window of the library manager is divided into three or four areas by screen
dividers. The libraries attached to the project are listed in the upper left area.
A
In the area below that, depending on which register card has been selected,
there is a listing of the POUs , Data types, or Global variables of the library
selected in the upper area.
Folders are opened and closed by doubleclicking the line or pressing <Enter>.
There is a plus sign in front of closed folders, and a minus sign in front of
opened folders.
If a POU is selected by clicking the mouse or selecting with the arrow keys then
the declaration of the POU will appear in the upper right area of the library
manager; and in the lower right is the graphic display in the form of a black box
with inputs and outputs.
WAGO-I/O-PRO 32 7-1
Library Manager
With data types and global variables, the declaration is displayed in the right
area of the library manager.
Standard Library
The library with "standard.lib" is always available. It contains all functions and
function blocks that are required by the IEC 61131-3 as standard POUs for an
t
IEC programming system. The difference between a standard function and an
operator is that the operator is implicitly recognized by the programming
n
system, while the standard POUs must be tied to the project (standard.lib).
The code for these POUs exists as a C-library and is a component of WAGO-
e
I/O-PRO 32.
User-defined Libraries
m
If a project is to be compiled in its entity and without errors, then it can be
saved in a library with the "Save as" command in the "File" menu. The
u
project itself will remain unchanged. Subsequently, you can gain access to the
c
project under the entered name, just as with the standard library.
"Insert" "Additional
o
Library"
With this command you can attach an additional library to your project.
D
In the dialog box for opening a file, choose the desired library with the "*.lib"
extension. The library is now listed in the library manager, and you can use the
d
objects in the library as user-defined objects.
Remove Library
e
With the "Edit" "Delete" command you can remove a library from a project
v
and from the library manager.
h i
r c
A
7-2 WAGO-I/O-PRO 32
Chapter 8 - Visualization
8 Visualization
Create Visualization
t
Visualization
n
Visualizations allow you to view your project variables. With the help of the
visualization you can draw geometric elements offline. These can then change
e
their forms or colors, in subjection to certain variable values, in Online mode.
For example, it possible to display the tendency of a variable to increase in a
bar chart. You can also deal with input for the program by way of the mouse
m
and the keyboard.
c u
o
D
ed
iv
ch
A r Image 8.1: Example of a Visualization
Create Visualization
In order to create a visualization, you must select the register card for
Visualization in the Object Organizer.
Using the "Project" "Object Add" command, you can create a new
visualization object. A dialog box opens in which you can enter the name of the
new visualization. If you have entered a valid name, then you can close the
dialog box with OK. A window opens in which you can edit the new
visualization.
WAGO-I/O-PRO 32 8-1
Visualization Elements, Insert
Visualization Elements,
Insert
You can insert four different geometric forms, as well as bitmaps and existing
t
visualizations, into your visualization.
Geometric forms at your disposal include: rectangles, rounded rectangles,
n
ellipses/circles, and polygons.
Go to the "Insert" menu item and select freely from the following commands:
e
'Rectangle', 'Rounded Rectangle', 'Ellipse', 'Polygon',
m
'Line‘, 'Curve‘, 'Bitmap', 'Visualization' . A check appears
in front of the selected command. You can also use the tool bar. The selected
u
element appears pushed down (for example ).
c
If you now go to the editor window with the mouse, you will see that the mouse
pointer is identified with the corresponding symbol (for example ). Click
o
on the desired starting point of your element, and drag the pointer, while
pressing the left mouse button, until the element reaches the desired size.
D
If you want to create a polygon or a line, first click with the mouse on the
position of the first corner of the polygon resp. on the starting point of the line,
and then click on the further desired corner points. By doubleclicking on the
d
last corner point you will close the polygon and it will be completely drawn
respectively the line will be completed
e
If you want to create a curve (Bezier curves) determine the initial and two other
v
points with mouse clicks to define the circumscribing rectangle. An arc is
i
drawn after the third mouse click. You can then change the position of the end
point of the arc by moving the mouse and can then end the process with a
h
double click or add another arc with additional mouse clicks.
c
Furthermore pay attention, to the status bar and the change from select and
insert modes.
r
"Insert" "Rectangle"
A
Symbol:
With the command you can insert a rectangle as an element into your present
visualization. (Use, see Visualization Elements, Insert)
"Insert" "Rounded
Rectangle"
Symbol:
With the command you can insert a rectangle with rounded corners as an
element in your present visualization. (Use, Visualization Elements, Insert)
8-2 WAGO-I/O-PRO 32
Chapter 8 - Visualization
"Insert" "Ellipse"
Symbol:
With the command you can insert a circle or an ellipse as an element in your
present visualization. (Use, see Visualization Elements, Insert)
"Insert" "Polygon"
t
Symbol:
n
With the command you can insert a polygon as an element in your present
e
visualization. (Use, see Visualization Elements, Insert).
"Insert" "Line"
m
Symbol:
u
With the command you can insert a line as an element into your current
visualization. (Use, see Visualization Elements, Insert).
c
"Insert" "Curve"
o
Symbol:
With the command you can insert a Bezier curve as an element into your
D
current visualization. (Use, see Visualization Elements, Insert)..
"Insert" "Bitmap"
d
Symbol:
e
With the command you can insert a bitmap as an element in your present
v
visualization. (Use, see Visualization Elements, Insert)
i
While pressing the left mouse button, bring up an area in the desired size. The
dialog box is opened for opening a file. Once you have selected the desired
h
bitmap, it will be inserted into the area brought up.
c
"Insert" "Visualization"
r
Symbol:
A
With the command you can insert an existing visualization as an element in
your present visualization. (Use, see Visualization Elements, Insert)
While pressing the left mouse button, bring up an area in the desired size. A
selection list of existing visualizations opens. After you have selected the
desired visualization, it will be inserted in the defined area.
WAGO-I/O-PRO 32 8-3
Working with Visualization Elements
Selecting Visualization
Elements
In order to select an element, click with the mouse on the element. You can also
t
select the first element of the elements list by pressing the <Tab> key and jump
to the next by each further keystroke. If you press the <Tab> key while pressing
n
the <Shift> key, you jump backwards in the order of the elements list.In order
to mark multiple elements, press and hold the <Shift> key and click the
e
corresponding elements, one after another; or, while holding down the left
mouse button, pull a window over the elements to be selected.
In order to select all the elements, use the "Extras" "Select All" command.
m
Modifying Visualization
u
Elements
c
You can select an element which has already been inserted by a mouse click on
the element or by pressing the <tab> key. A small black square will appear at
o
each corner of each of the elements, (with ellipses at the corners of the
surrounding rectangle). Except in the case of polygons, lines or curves further
squares appear in the middle of the element edges between the corner points.
D
d
With a selected element, the turning point (balance point) is also displayed at
e
the same time. You can then rotate the element around this point with a set
v
motion/angle. The turning point is displayed as a small black circle with a white
i
cross ( ). You can drag the turning point with a pressed left mouse button.
You can change the size of the element by clicking on one of the black squares
h
and, while keeping the left mouse button pressed, controlling the new outline.
c
With the selection of a polygon, you can drag each individual corner using the
r
same technique. While doing this, if you press the <Ctrl>-key then an
additional corner point will be inserted at the corner point, an additional corner
A
point will be inserted, which can be dragged by moving the mouse. By pressing
the <Shift>+<Ctrl>-key, you can remove a corner point.
Dragging Visualization
Elements
One or more selected elements can be dragged by pressing the left mouse
button or the arrow key.
8-4 WAGO-I/O-PRO 32
Chapter 8 - Visualization
A further possibility is to select the elements and then click the mouse in an
element once again, while pressing the <Ctrl>-key. Now you can remove the
newly copied elements from the original ones while pressing the left mouse
button.
t
After the insertion of a visualization element, there is an automatic change back
n
into the selection mode. If you want to insert an additional element the same
way, you can once again select the corresponding command in the menu or the
e
symbol in the tool bar.
You can also quickly change between the selection mode and the insert mode
m
by pressing the <Ctrl>-key and the right mouse button simultaneously.
In the insert mode, the corresponding symbol will also appear at the mouse
u
pointer, and the name will also be indicated in black in the status bar.
c
Status Bar in the
Visualization
o
In a visualization, the present X and Y position of the mouse pointer is
displayed in the status bar. The position values are always relative to the upper
D
left corner of the picture in the status bar. If the mouse pointer is located on an
Element, or if the element is being processed, then the number of the element
will be displayed. If you have selected an element to insert, then this element
d
will also appear (for example, Rectangle).
v e
Visualization Elements, Configure
h i
"Extras" "Configure"
With this command you can open the dialog box to configure the selected
c
visualization element.
r
You are given the dialog box for configuration when you doubleclick on the
element.
A
Select a category in the left area of the dialog box, and fill out the requested
information in the right area.
Depending on the visualization element selected, various categories can be
selected:
• Shape Rectangle, Rounded Rectangle, Ellipse
• Text All
• Color Rectangle, Rounded Rectangle, Ellipse, Polygon,
Line, Curve
• Motion absolute All
• Motion relative All, except Polygon, Line, Curve
• Variables All
WAGO-I/O-PRO 32 8-5
Visualization Elements, Configure
• Input All
• Tooltip All
• Bitmap Bitmap
• Visualization Visualization
Shape
t
In the visualization element configuration dialog box, you can select in the
Shape category from among Rectangle, Rounded Rectangle, and Ellipse
n
respectively Polygon, Line and Curve. The form will change into the size
already set.
e
u m
o c
D
Image 8.2: Dialog Box for Configuring Visualization Elements (Shape Category)
d
Text
e
In the visualization element configuration dialog box, in the Text category you
v
can set a text for the element.
i
Enter the text in the Content field. By pressilng <Ctrl>+<Enter> you can insert
line breaks.
h
If you enter "%s" into the text, then this location, in Online mode, will be
c
replaced by the value of the variable from the Text Output field of the
r
Variables category.
This text will appear in the element, according to the respective Horizontal
A
Left, Center, or Right positioning, and the respective Top , Center, or Bottom
positioning, that was specified in the element.
If you use the Font button, a dialog box for selection of the font will appear.
Select the desired font and confirm the dialog with OK. With the Standard
Font button you can set the font that is selected below in the "Project"
"Options". If the font is changed there, then this font will be displayed in all
elements except in those elements for which another font has explicitly been
selected by using the Font button.
8-6 WAGO-I/O-PRO 32
Chapter 8 - Visualization
n t
e
Image 8.3: Dialog Box for Configuring Visualization Elements (Text Category)
Colors
u m
In the visualization element configuration dialog box, in the Color category you
c
can select primary colors and alarm colors for the inside area and for the frame
of your element. Chosing the options no color inside and no frame color you
o
can create transparent elements.
D
ed
iv
ch
r
Image 8.4: Dialog Box for Configuring Visualization Elements (Color Category)
If you now enter a Boolean variable in the Variables category in the Change
A
Color field, then the element will be displayed in the Color set, as long as the
variable is FALSE. If the variable is TRUE, then the element will be displayed
in its Alarm Color.
Note: The change color function only becomes active, if the PLC is in
Online Mode!
If you want to change the color of the frame, then press the Frame button,
instead of the Inside button. In either case, the dialog box will open for
selection of the color.
Here can to choose the desired hue from the primary colors and the user-defined
colors. By pressing the Define Colors you can change the user-defined colors.
WAGO-I/O-PRO 32 8-7
Visualization Elements, Configure
Motion absolute
In the visualization element configuration dialog box, in the Motion absolute
category, X- or Y-Offset fields variables can be entered. These variables can
shift the element in the X or the Y direction, depending on the respective
variable value. A variable in the Scale field changes the size of the element
linear to the value of the variable.
t
A variable in the Angle field causes the element to turn on its turning point,
depending on the value of the variable. (Positive Value = Mathematic Positive
n
= Clockwise). The value is evaluated in degrees. With polygons, every point
rotates; in other words, the polygon turns. With all other elements, the element
e
rotates, in such a way, that the upper edge always remains on top.
The turning point appears after a single click on the element, and is displayed as
m
a small black circle with a white cross ( ). You can drag the turning point with
a pressed left mouse button.
c u
o
D
ed
v
Image 8.5: Visualization Element Configuration Dialog Box (Motion absolute Category)
Motion relative
h i
In the dialog for configuring visualization elements in the Motion relative
c
category, you can assign variables to the individual element edges. Depending
r
on the values of the variables, the corresponding element edges are then moved.
The easiest way to enter variables into the fields is the Input Assistant.
A
The four entries indicate the four sides of your element. The base position of
the corners is always at zero.A new value in the variables, in the corresponding
column, shifts the boundary in pixels around this value. Therefore, the variables
that are entered ought to be INT variables.
Note: Positive values shift the horizontal edges downward, or, the vertical
edges, to the right!
8-8 WAGO-I/O-PRO 32
Chapter 8 - Visualization
n t
e
Image 8.6: Dialog Box for Configuration of Visualization Elements (Motion relative Category)
Variables
u m
You can enter the variables that describe the status of the visualization elements
c
in the Variable category within the dialog box for configuring visualization
elements. The simplest way to enter variables in the fields is to use the Input
o
Assistant.
You can enter Boolean variables in the Invisible and Change color fields. The
D
values in the fields determine their actions. If the variable of the Invisible field
contains the value FALSE, the visualization element will be visible. If the
variable contains the value TRUE, the element will be invisible.
d
If the variable at the Change color field contains the value FALSE, the
e
visualization element will be displayed in its default color. If the variable is
TRUE, the element will be displayed in its alarm color.
iv
You can enter a variable in the Textdisplay field whose value is displayed if
you have , in addition to the text, inserted %s in the Content field of the Text
h
category. In Online mode, "%s" is replaced by the value of the variables found
in Textdisplay.
r c
A
Image 8.7: Visualization Element Configuration Dialog Box (Variables Category)
WAGO-I/O-PRO 32 8-9
Visualization Elements, Configure
Input
Selecting the field Toggle variable allows you, in online mode, to toggle the
value of the variables which are located in the input field with every mouse
click on the element. The value of the Boolean variable changes with each
mouse click from TRUE to FALSE and then back to TRUE again at the next
mouse click, etc.
t
The option Keying variable allows you, in online mode, to change the value of
the Boolean variable which is located in the input field, between TRUE and
n
FALSE. Place the mouse cursor on the element, press the mousekey and hold it
depressed (the value will, for example, change from TRUE to FALSE). The
e
variable changes back to its initial value (TRUE) as soon as you release the
mousekey.
m
Selecting the field Zoom to Vis... allows you, in the following field, to enter the
name of a visualization object in the same project. While in online mode use a
u
mouse click to change to the element in the window of the visualization which
has been entered. If a program variable of the type STRING (e.g.
c
PLC_PRG.xxx) has been entered, instead of a visualization object, then this
variable can be used to define the name of the visualization object (e.g. ,visu1’)
o
which the system should change to when a mouse click occurs (e.g. xxx:=
,visu1).
D
The field Zoom to Vis... can be used to configure the return to the calling
visualization by using the command ‚ZOOMTOCALLER‘.
Selecting the option Execute program allows you to enter any executable
d
program in the input field and then to execute it in online mode by clicking on
the element with the mouse.
e
Selecting the option Text input of the variable ‘Text output’ allows you, in
v
online mode, to allocate a value to a variable over this visualization element.
i
The value which is located in the field Text output of the category Variables
will be written in the variable. Clicking in online mode on the element produces
h
an editing frame in which you can enter the new value of the variable over the
c
keyboard. Press the <Enter> key to accept the value.
Ar
Image 8.8: Visualization Element Configuration Dialog Box (Input Category)
8-10 WAGO-I/O-PRO 32
Chapter 8 - Visualization
ToolTip
The dialog Text for Tooltip offers an input field for text which appears in a text
field as soon as the mouse cursor is passed over the object in online mode. The
text can be formatted with line breaks by using the key combination <Ctrl> +
<Enter>.
t
Bitmap
You can enter the options for a bitmap in the Bitmap category within the
n
visualization element configuration dialog box.
e
Enter the bitmap file and its path in the Bitmap field. You can use the ... button
to open the standard Windows Browse dialog box from which you can select
the desired bitmap.
m
All other entries affect the frame of the bitmap.
By selecting Anisotropic, Isotropic or Fixed you specify how the bitmap
u
should react to changes in the size of the frame. Anisotropic means that the
c
bitmap remains the same size as the frame which allows you to change the
height and width of the bitmap independently. Isotropic means that the bitmap
o
retains the same proportions even if the overall size is changed (i.e., the
relationship between height and width is maintained). If Fixed is selected, the
original size of the bitmap will be maintained regardless of the size of the
D
frame.
If the Clip option is selected together with the Fixed setting, only that portion
d
of the bitmap that is contained within the frame will be displayed.
If you select the Draw option, the frame will be displayed in the color selected
e
in the Color and Alarm color buttons in the color dialog boxes. The alarm
color will only be used if the variable in the Change Color field in the
iv
Variable category is TRUE.
ch
A r
Image 8.9: Visualization Element Configuration Dialog Box (Bitmap Category)
Visualization
You can enter the options for a visualization as an element in another
visualization in the Visualization category within the visualization element
WAGO-I/O-PRO 32 8-11
Additional Visualization Element Functions
configuration dialog box. Enter the object name for the visualization in the
Visualization field. Use the ... button to open a dialog box containing the
visualizations available in this project. Any visualization may be used with the
exception of the current one.
All other entries affect the visualization frame.
If you select the Draw option, the frame will be displayed in the color selected
t
in the Color and Alarm color buttons in the color dialog boxes. The alarm
color will only be used if the variable in the Change Color field in the
n
Variables category is TRUE.
e
If Isotropic is selected, the proportions of the visualization will be maintained
even if the size changes (i.e., the relationship between height and width will
remain the same). Otherwise the proportions can be changed.
m
If the Clip option is selected in Online mode, only the original portion of the
visualization will be displayed. For example, if an object extends beyond the
u
original display area, it will be clipped and may disappear from view
completely in the visualization.
o c
D
ed
iv
h
Image 8.10: Visualization Element Configuration Dialog Box (Visualization Category)
r c
Additional Visualization Element Functions
A
"Extras" "Send to Front"
Use this command to bring selected visualization elements to the front.
"Extras" "Send to Back"
Use this command to send selected visualization elements to the back.
"Extras" "Select
Background Bitmap"
Use this command to open the dialog box for selecting files. Select a file with
the extension "*.bmp". The selected bitmap will then appear as the background
in your visualization.
8-12 WAGO-I/O-PRO 32
Chapter 8 - Visualization
The bitmap can be removed with the command "Extras" "Clear Background
Bitmap".
"Extras" "Clear
Background Bitmap"
Use this command to remove the bitmap as the background for the current
visualization.
t
You can use the command "Extras" "Select Background Bitmap" to select a
n
bitmap for the current visualization.
"Extras" "Align"
e
Use this command to align selected visualization elements.
The following alignment options are available:
m
• Left: the left edge of each of the elements will be aligned to the element
that is furthest to the left
u
• the same is true for Right / Top / Bottom
• Horizontal Center: each of the elements will be aligned to the average
c
horizontal center of all elements
• Vertical Center:
o
each of the elements will be aligned to the average
vertical center of all elements
D
"Extras" "Select All"
This command allows you to select all visualization elements within the current
visualization object.
d
‘Extras’ ‘Select Mode’
e
This command is used to switch the selection mode on or off. This can also be
iv
achieved using the symbol or by pressing the right mousekey while
holding down the <Ctrl> key at the same time.
h
"Extras" "Element list"
c
This command opens a dialog box containing a list of all visualization elements
r
including their number, type and position. The position is given according to
the x and y position of the upper left and lower right corner of the element.
A
When one or more items have been selected, the corresponding elements in the
visualization are marked for visual control and if necessary the display will
scroll to that section of the visualization that contains the elements.
Use the To front button to bring selected visualization elements to the front.
Use the To behind button to move them to the back.
Use the Delete button to remove selected visualization elements.
Use the Undo and Redo buttons to undo or restore changes that have been
made just as you would do with the commands "Edit" "Undo" and "Edit"
"Redo" . In the dialog box, you can observe the changes that are being made.
Click on OK to close the dialog box and confirm the changes.
WAGO-I/O-PRO 32 8-13
Additional Visualization Element Functions
n t
e
u m
c
Image 8.11: Element list dialog box
o
"Extras" "Settings"
D
When this command is used, a dialog box will open in which you can make
certain settings that affect the visualization.
d
Note: The categories Display, Frame and Language also can be edited in
e
the online mode.
v
Enter a zoom factor into the field Zoom in the category Presentation of
i
between 10 and 500 % in order to increase or decrease the size of the
visualization display. Selecting Element numbers shows the numbers of the
h
elements in each visualization element when in offline mode.
c
If Auto-scrolling is selected in the Frame category, the visible portion of the
visualization window will move automatically when you reach the edge while
r
drawing or moving a visualization element If Best fit in Online mode is
selected, the entire visualization including all elements will be shown in the
A
window in Online mode regardless of the size of the window. When Include
Background Bitmap is selected, the background bitmap will be fitted into the
window as well, otherwise only the elements will be considered.
The category Grid is used to define whether the grid points are visible in the
offline mode, whereby the spacing between the visible points is at least 10 even
if the entered size is smaller than that. In this case the grid points only appear
with a spacing which is a multiple of the entered size. Selecting Active causes
the elements to be placed on the snap grid points when they are drawn and
moved. The spacing of the grid points is set in the field Size.
8-14 WAGO-I/O-PRO 32
Chapter 8 - Visualization
n t
Image 8.12: Setting dialog for visualizations (Category Display)
e
m
The category Language is used to display the text which has been assigned to
u
the visualization elements using the options Text and Text for Tooltip in a
desired language. You have to prepare a language file as described in the
c
following:
o
Choose option language file. In the associate input field you give in where you
want to store the file. The extension is '.vis'. You also can use the dialog 'Open'
D
by pressing the button . If a language file is available already, it will be
offered here.
In the input field next to Language you fill in a keyword for the language,
d
which is currently used in the visualization, i.e. "german" (or "D"). Then press
the button Save. A file with the extension .vis is created, which now can be
e
edited by a normal text editor. For example you can open the file by notepad:
iv
ch
A r
Bild 8.13: Example of a language file for a visulisation (Category Language)
You get a list of the text variables for the language currently used in the
visualization. It includes a reference to the title of this list, for example
"1=german" as reference to the title [german]. You can extend the list by
copying all lines, then replacing the German by English text and setting a new
WAGO-I/O-PRO 32 8-15
Additional Visualization Element Functions
title [english]. Beyond the line 1=german you accordingly have to add
2=english.
To view the visualization in one of the prepared languages, open the dialog
Language again. In the option field beyond Language now you can choose
between german and english (for the example described above).
t
Note: The text display does not change before switching to Online Mode !
e n
u m
o
Bild 8.14: Selection of a language file for a visualization
c
D
Operation over the
keyboard - in online mode
d
The visualization elements can be manipulated in online mode over the
following key functions:
e
Pressing the <Tabulator> key selects the first element in the element list for
v
which an input is configured. Each subsequent pressing of the key moves one to
i
the next element in the list. Pressing the key while keeping the <Shift> key
depressed selects the previous element.
h
The arrow keys can be used to change from a selected element to a
c
neighbouring one in any direction.
r
The <Space bar> is used to execute an activity on the selected visualization
element. If the element is one which has a text output variable, a text input field
A
will be opened which displays the text contents of the variable. Pressing the
<Enter> key writes in this value.
8-16 WAGO-I/O-PRO 32
Chapter 9 - DDE Interface
9 DDE Interface
DDE Interface
t
DDE Interface
n
WAGO-I/O-PRO 32 has a DDE (dynamic data exchange) interface for reading
data. WAGO-I/O-PRO 32 uses this interface to provide other applications that
e
also use a DDE Interface with the contents of control variables and IEC
addresses.
m
Activating the DDE
Interface
u
The DDE interface becomes active as soon as the PLC (or the simulation) is
logged in.
c
General Approach to
o
Data
A DDE inquiry can be divided into three parts:
D
1. Name of the program (here: WAGO-I/O-PRO 32),
2. File name and
3. Variable name to be read.
d
Name of the program: WAGO-I/O-PRO 32
e
File name: complete project path (c:\example\example.pro).
v
Variable name: The name of a variable as it appears in the Watch and Receipt
i
Manager .
h
Which variables can be
read?
c
All addresses and variables are readable. Variables or addresses should be
r
entered in the format used in the Watch and Receipt Manager.
Examples:
A
%IX1.4.1 (* Reads the input 1.4.1*)
PLC_PRG.TEST (* Reads the variable TEST from the POU PLC_PRG*)
.GlobVar1 (* Reads the global variable GlobVar1 *)
WAGO-I/O-PRO 32 9-1
DDE Interface
t
The following must be entered in Microsoft EXCEL before you can assign a
n
variable to a cell.
=WAGO-IO-PRO 32|'C:\PROGRAMS\WAGO-IO-PRO
e
32\PROJECT\IFMBSP.PRO'!PLC_PRG.TEST'
When you click on "Edit" then "Links", the result for this link will be:
Type: WAGO-IO-PRO 32
m
Source file: C:\PROGRAMS\WAGO-IO-PRO 32\PROJECT\IFMBSP.PRO
Element: PLC_PRG.TEST
u
Accessing variables with
c
Intouch
o
Link with your project a DDE Access Name <AccessName> with the
application name WAGO-IO-PRO 32 and the DDE topic name
C:\PROGRAMS\WAGO-IO-PRO 32\PROJECT\IFMBSP.PRO.
D
Now you can associate DDE type variables with the access name
<AccessName>. Enter the name of the variable as the Item Name (e.g.,
d
PLC_PRG.TEST).
v e
h i
r c
A
9-2 WAGO-I/O-PRO 32
Chapter 10 - Using the Keyboard
t
If you would like to run WAGO-I/O-PRO 32 using only the keyboard, you will
find it necessary to use a few commands that are not found in the menu.
n
• The function key <F6> allows you to toggle back and forth within the
open POU between the Declaration and the Instruction parts.
e
• <Alt>+<F6> allows you to move from an open object to the Object
Organizer and from there to the Message window if it is open. If a Search
box is open, <Alt>+<F6> allows you to switch from Object Organizer to
m
the Search box and from the there back to the object.
• Press <Tab> to move through the input fields and buttons in the dialog
u
boxes.
• The arrow keys allow you to move through the register cards and objects
c
within the Object Organizer and Library Manager.
o
All other actions can be performed using the menu commands or with the
shortcuts listed after the menu commands. <Shift>+<F10> opens the context
D
menu which contains the commands most frequently used for the selected
object or for the active editor.
d
Key Combinations
e
The following is an overview of all key combinations and function keys:
v
General Functions
i
Move between the declaration part and the <F6>
instruction part of a POU
h
Move between the Object Organizer, the object and <Alt>+<F6>
c
the message window
r
Context Menu <Shift>+<F10>
Shortcut mode for declarations <Ctrl>+<Enter>
A
Move from a message in the Message window back <Enter>
to the original position in the editor
Open and close multi-layered variables <Enter>
Open and close folders <Enter>
Switch register cards in the Object Organizer and <Arrow keys>
the Library Manager
Move to the next field within a dialog box <Tab>
Context sensitive Help <F1>
General Commands
WAGO-I/O-PRO 32 10-1
Key Combinations
t
"Project" "Build" <Umschalt>+<F11>
"Project" "Rebuild all" <F11>
n
"Project" "Delete Object" <Del>
e
"Project" "Add Object" <Ins>
"Project" "Rename Object" <Spacebar>
m
"Project" "Open Object" <Enter>
u
"Edit" "Undo" <Ctrl>+<Z>
"Edit" "Redo" <Ctrl>+<Y>
c
"Edit" "Cut" <Ctrl>+<X> or
o
<Shift>+<Del>
"Edit" "Copy" <Ctrl>+<C>
D
"Edit" "Paste" <Ctrl>+<V>
"Edit" "Delete" <Del>
d
"Edit" "Find next" <F3>
e
"Edit" "Input Assistant" <F2>
"Edit" "Next Error" <F4>
iv
"Edit" "Previous Error" <Shift>+<F4>
"Online" "Run" <F5>
h
"Online" "Toggle Breakpoint" <F9>
c
"Online" "Step over" <F10>
r
"Online" "Step in" <F8>
A
"Online" "Single Cycle" <Ctrl>+<F5>
"Online" "Write Values" <Ctrl>+<F7>
"Online" "Force Values" <F7>
"Online" "Release Force" <Shift>+<F7>
"Window" "Messages" <Shift>+<Esc>
10-2 WAGO-I/O-PRO 32
Chapter 10 - Using the Keyboard
t
"Insert" "Function Block" <Ctrl>+<B>
"Insert" "Input" <Ctrl>+<U>
n
"Extras" "Negate" <Ctrl>+<N>
e
"Extras" "Zoom" <Alt>+<Enter>
m
LD Editor Commands
u
"Insert" "Network (after)" <Shift>+<T>
"Insert" "Contact" <Ctrl>+<O>
c
"Insert" "Parallel Contact" <Ctrl>+<R>
o
"Insert" "Function Block" <Ctrl>+<B>
"Insert" "Coil" <Ctrl>+<L>
D
"Extras" Paste below" <Ctrl>+<U>
"Extras" "Negate" <Ctrl>+<N>
ed
SFC Editor Commands
v
"Insert" "Step-Transition (before)" <Ctrl>+<T>
i
"Insert" "Step-Transition (after)" <Ctrl>+<E>
h
"Insert" "Alternative Branch (right)" <Ctrl>+<A>
c
"Insert" "Parallel Branch (right)" <Ctrl>+<L>
r
"Insert" "Jump"(SFC) <Ctrl>+<U>
"Extras" "Zoom Action/Transition" <Alt>+<Enter>
A
Move back to the editor from the SFC Overview <Enter>
WAGO-I/O-PRO 32 10-3
Key Combinations
n t
e
u m
o c
D
ed
iv
ch
Ar
10-4 WAGO-I/O-PRO 32
Chapter 11 - Data types
11 Data types
You can use standard data types and user-defined data types when
programming. Each identifier is assigned to a data type which dictates how
much memory space will be reserved and what type of values it stores.
n t
e
BOOL
m
BOOL type variables may be given the values TRUE and FALSE. 8 bits of
memory space will be reserved.
u
Integer Data Types
c
BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, and UDINT
are all integer data types
o
Each of the different number types covers a different range of values. The
following range limitations apply to the integer data types:
D
Type Lower limit Upper limit Memory space
BYTE 0 255 8 Bit
d
WORD 0 65535 16 Bit
e
DWORD 0 4294967295 32 Bit
v
SINT: -128 127 8 Bit
i
USINT: 0 255 8 Bit
h
INT: -32768 32767 16 Bit
c
UINT: 0 65535 16 Bit
r
DINT: -2147483648 2147483647 32 Bit
UDINT: 0 4294967295 32 Bit
A
As a result when larger types are converted to smaller types, information may
be lost.
REAL / LREAL
REAL and LREAL are so-called floating-point types. They are required to
represent rational numbers. 32 bits of memory space is reserved for REAL and
64 bits for LREAL.
The use of REAL variables doers, of course not rule out exceeding the number
range. With the implemented arithmetic operations the maximum or minimum
value is set if the range is exceeded (where possible). In a program the function
WAGO-I/O-PRO 32 11-1
Standard Data types
t
emmmmmmm seeeeeee mmmmmmmm mmmmmmmm
e.g. 3.141592654
STRING
e n
A STRING type variable can contain any string of characters. The size entry in
m
the declaration determines how much memory space should be reserved for the
variable.It refers to the number of characters in the string and can be placed in
u
parentheses or square brackets. If no size specification is given, the default size
of 80 characters will be used.
c
Example of a String Declaration with 35 characters:
o
str:STRING(35):='This is a String';
D
ed
iv
ch
Ar
11-2 WAGO-I/O-PRO 32
Chapter 11 - Data types
t
DATE The display has been in seconds since D#1-1-1970
n
Example: (low word, high word)
e
D#1970-01-02 16#5180, 16#0001
m
D#2000-01-01 16#4380, 16#386D
u
DATE_AND_TIME The display has been in seconds since
DT#1-1-1970-0:0:0.0
or DT
c
Example: (low word, high word)
o
DT#1970-01-01-00:00:00 16#0000, 16#0000
DT#1970-01-01-00:00:01 16#0001, 16#0000
D
DT#1999-04-29-11:59:00 16#4984, 16#3728
DT#2000-01-01-00:00:01 16#4381, 16#386D
TIME The display is in milliseconds
d
Example: (low word, high word)
e
T#10s0ms 16#2710, 16#0000
T#1440m0s0ms or 16#5C00, 16#0526
iv
T#1d
T#60m0s0ms 16#EE80, 16#0036
h
T#1m0s0ms 16#EA60, 16#0000
c
T#1s0ms 16#03E8, 16#0000
r
T#8052m18s3ms or 16#19D3, 16#1CCC
T5d14h12m18s3ms
TIME_OF_DAY The display is in milliseconds since
A
TOD#0:0:0.0
or TOD
Example: (low word, high word)
WAGO-I/O-PRO 32 11-3
Defined Data Types
ARRAY
One-, two-, and three-dimensional fields (arrays) are supported as elementary
data types. Arrays can be defined both in the declaration part of a POU and in
t
the global variable lists.
Syntax:
n
<Field_Name>:ARRAY [<ll1>..<ul1>,<ll2>..<ul2>] OF <elem. Type>.
ll1, ll2, ll3identify the lower limit of the field range; ul1, ul2 and ul3 identify
e
the upper limit. The range values must be integers.
Example:
m
Card_game: ARRAY [1..13, 1..4] OF INT;
Initializing Arrays:
u
You can initialize either all of the elements in an array or none of them.
c
Example for initializing arrays:
arr1 : ARRAY [1..5] OF INT := 1,2,3,4,5;
o
arr2 : ARRAY [1..2,3..4] OF INT := 1,3(7);
(* short for 1,7,7,7 *)
D
arr3 : ARRAY [1..2,2..3,3..4] OF INT := 2(0),4(4),2,3;
(* short for 0,0,4,4,4,4,2,3 *)
Array components are accessed in a two-dimensional array using the following
d
syntax:
<Field_Name>[Index1,Index2]
e
Example:
v
Card_game [9,2]
h i Note: If you define a function in your project with the name CheckBounds,
you can use it to check for range overflows in your project (see chapter 'What is
c
what in WAGO-I/O-PRO 32', 'Components of a project', 'Function')
r
Pointer
A
Variable or function block addresses are saved in pointers while a program is
running.
Pointer declarations have the following syntax:
<Identifier>: POINTER TO <Datatype/Functionblock>;
A pointer can point to any data type or function block even to user-defined
types.
The function of the Address Operator ADR is to assign the address of a variable
or function block to the pointer.
A pointer can be dereferenced by adding the content operator "^" after the
pointer identifier.
Example:
11-4 WAGO-I/O-PRO 32
Chapter 11 - Data types
pt:POINTER TO INT;
var_int1:INT := 5;
var_int2:INT;
pt := ADR(var_int1);
var_int2:= pt^; (* var_int2 is now 5 *)
Enumeration
t
Enumeration is a user-defined data type that is made up of a number of string
n
constants. These constants are referred to as enumeration values.
Enumeration values are recognized in all areas of the project even if they were
e
locally declared within aPOU. It is best to create your enumerations as
objects in the Object Organizer under the register card Data types. They
begin with the keyword TYPE and end with END_TYPE.
m
Syntax:
u
TYPE <Identifier>:(<Enum_0> ,<Enum_1>, ...,<Enum_n>);
END_TYPE
c
A variable of the type <Identifier> can take on one of the enumeration values
and will be initialized with the first one. These values are compatible with
o
whole numbers which means that you can perform operations with them just as
you would with INT. You can assign a number x to the variable. If the
D
enumeration values are not initialized, counting will begin with 0. When
initializing, make certain the initial values are increasing. The validity of the
number will be reviewed at the time it is run.
d
Example:
TYPE TRAFFIC_SIGNAL: (Red, Yellow, Green:=10); (*The initial value
e
for each of the colors is red 0, yellow 1, green 10 *)
END_TYPE
iv
TRAFFIC_SIGNAL1 : TRAFFIC_SIGNAL;
TRAFFIC_SIGNAL1:=0; (* The value of the traffic signal is red*)
h
FOR i:= Red TO Green DO
i := i + 1;
c
END_FOR;
r
You may not use the same enumeration value more than once.
Example:
A
TRAFFIC_SIGNAL: (red, yellow, green);
COLOR: (blue, white, red);
Error: red may not be used for both TRAFFIC_SIGNAL and COLOR.
Structures
Structures are created as objects in the Object Organizer under the register card
Data types. They begin with the keywords TYPE and STRUCT and end
with END_STRUCT and END_TYPE.
The syntax for structure declarations is as follows:
TYPE <Structurename>:
STRUCT
<Declaration of Variables 1>
WAGO-I/O-PRO 32 11-5
Defined Data Types
.
.
<Declaration of Variables n>
END_STRUCT
END_TYPE
<Structurename> is a type that is recognized throughout the project and can be
t
used like a standard data type.
Interlocking structures are allowed. The only restriction is that variables may
n
not be placed at addresses (the AT declaration is not allowed!).
e
Example for a structure definition named Polygonline:
TYPE Polygonline:
STRUCT
m
Start:ARRAY [1..2] OF INT;
Point1:ARRAY [1..2] OF INT;
u
Point2:ARRAY [1..2] OF INT;
Point3:ARRAY [1..2] OF INT;
c
Point4:ARRAY [1..2] OF INT;
End:ARRAY [1..2] OF INT;
o
END_STRUCT
END_TYPE
D
Example for the initialization of a structure:
Poly_1:polygonline := ( Start:=3,3, Point1 =5,2, Point2:=7,3, Point3:=8,5,
Point4:=5,7, End := 3,5);
d
You can gain access to structure components using the following syntax:
<Structure_Name>.<Componentname>
e
For example, if you have a structure named "Week" that contains a component
v
named "Monday", you can get to it by doing the following:
i
Week.Monday
h
References
c
You can use the user-defined reference data type to create an alternative name
for a variable, constant or function block.
r
Create your references as objects in the Object Organizer under the register card
Data types. They begin with the keyword TYPE and end with END_TYPE.
A
Syntax:
TYPE <Identifier>: <Assignment term>;
END_TYPE
Example:
TYPE message:STRING[50];
END_TYPE;
11-6 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
12 IEC Operators
IEC Operators
t
WAGO-I/O-PRO 32 supports all IEC Operators. In contrast with the standard
functions, these operators are recognized implicitly throughout the project.
n
Operators are used like functions in POU implemArithmetic Operators
e
ADD
Addition of variables of the types: BYTE, WORD, DWORD, SINT, USINT,
INT, UINT, DINT, UDINT, REAL and LREAL.
m
Two TIME variables can also be added together resulting in another time
u
(e.g., t#45s + t#50s = t#1m35s)
Example in IL:
c
LD 7
o
ADD 2,4,7
ST Var 1
Example in ST:
D
var1 := 7+2+4+7;
Example in FBD:
MUL
ed
iv
Multiplication of variables of the types: BYTE, WORD, DWORD, SINT,
USINT, INT, UINT, DINT, UDINT, REAL and LREAL.
h
Example in IL:
c
LD 7
MUL 2,4,7
r
ST Var 1
Example in ST:
A
var1 := 7*2*4*7;
Example in FBD:
SUB
Subtraction of one variable from another of the types: BYTE, WORD,
DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL and LREAL.
A TIME variable may also be subtracted from another TIME variable resulting
in third TIME type variable. Note that negative TIME values are undefined.
WAGO-I/O-PRO 32 12-1
IEC Operators
Example in IL:
LD 7
SUB 8
ST Var 1
Example in ST:
var1 := 7-2;
t
Example in FBD:
DIV
e
Division of one variable by another of the types: BYTE, WORD, DWORD, n
m
SINT, USINT, INT, UINT, DINT, UDINT, REAL and LREAL.
Example in IL:
u
LD 8
c
DIV 2
ST Var 1 (* Result is 4 *)
o
Example in ST:
var1 := 8/2;
D
Example in FBD:
ed
Hinweis: If you define functions in your project with the names
CheckDivByte, CheckDivWord, CheckDivDWord and CheckDivReal, you can
iv
use them to check the value of the divisor if you use the operator DIV, for
example to avoid a division by 0 (see chapter 'What is what in WAGO-I/O-
h
PRO 32', 'Project components' 'Function')
c
MOD
r
Modulo Division of one variable by another of the types: BYTE, WORD,
DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL and LREAL. The
result of this function will be the remainder of the division. This result will be a
A
whole number.
Example in IL:
LD 9
MOD 2
ST Var 1 (* Result is 1 *)
Example in ST:
var1 := 9 MOD 2;
Example in FBD:
12-2 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
INDEXOF
Perform this function to find the internal index for a POU.
Example in ST:
var1 := INDEXOF(POU2);
SIZEOF
t
Perform this function to determine the number of bytes required by the given
data type.
n
Example in IL:
e
arr1:ARRAY[0..4] OF INT;
Var1 INT
LD arr1
m
SIZEOF
ST Var 1 (* Result is 10 *)
u
Example in ST:
c
var1 := SIZEOF(arr1);
o
Bitstring Operators
D
AND
Bitwise AND of bit operands. The operands should be of the type BOOL,
d
BYTE, WORD or DWORD.
e
Example in IL:
Var1 BYTE
v
LD 2#1001_0011
i
AND 2#1000_1010
ST Var 1 (* Result is 2#1000_0010 *)
h
Example in ST:
c
var1 := 2#1001_0011 AND 2#1000_1010
r
Example in FBD:
A Note: If you have a program step in the SFC like the following
and if you use 68xxx- or C-code generators, please note the following: The
allocation of the value of the second input variable at the AND operator module
to variable z will not be executed ! This is due to the optmized processing in the
SFC in case of value FALSE at the input variable.
WAGO-I/O-PRO 32 12-3
Bitstring Operators
OR
Bitwise OR of bit operands. The operands should be of the type BOOL, BYTE,
WORD or DWORD.
Example in IL:
var1 :BYTE;
LD 2#1001_0011
t
OR 2#1000_1010
ST var1 (* Result is 2#1001_1011 *)
n
Example in ST:
e
Var1 := 2#1001_0011 OR 2#1000_1010
Example in FBD:
u m
c
Note: If you have a program step in the SFC like the following
o
D
and if you use 68xxx- or C-code generators, please note the following: The
allocation of the value of the second input variable at the AND operator module
to variable z will not be executed ! This is due to the optmized processing in the
d
SFC in case of value FALSE at the input variable.
e
XOR
Bitwise XOR of bit operands. The operands should be of the type BOOL,
iv
BYTE, WORD or DWORD.
Example in IL:
h
Var1 :BYTE;
LD 2#1001_0011
c
XOR 2#1000_1010
r
ST Var1 (* Result is 2#0001_1001 *)
Example in ST:
A
Var1 := 2#1001_0011 XOR 2#1000_1010
Example in FBD:
NOT
Bitwise NOT of a bit operand. The operand should be of the type BOOL,
BYTE, WORD or DWORD.
Example in IL:
Var1 :BYTE;
LD 2#1001_0011
12-4 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
NOT
ST Var1 (* Result is 2#0110_1100 *)
Example in ST:
Var1 := NOT 2#1001_0011
Example in FBD:
Bit-Shift Operators
n t
SHL
e
m
Bitwise left-shift of an operand : erg:= SHL (in, n)
The input variables erg, in and n should be of the type BYTE, WORD, or
u
DWORD. in will be shifted to the left by n bits and filled with zeros on the
c
right.
o
Note: Please note, that the amount of bits, which is regarded for the
arithmetic operation, is pretended by the data type of the input variable !. If the
D
input variable is a constant the smallest possible data type is regarded. The data
type of the output variable has no effect at all on the arithmetic operation.
See in the following example in hexadecimal notation that you get different
d
results for erg_byte and erg_word depending on the data type of the input
variable (BYTE or WORD), although the values of the input variables in_byte
e
and in_word are the same.
v
Example in ST:
h i
r c
A
Example in FBD:
WAGO-I/O-PRO 32 12-5
Bit-Shift Operators
Example in IL:
LD 16#45
SHL 2
ST erg_byte
SHR
t
Bitwise right-shift of an operand: erg:= SHR (in, n)
erg, in and n should be of the typeBYTE, WORD or DWORD. in will be
n
shifted to the right by n bits and filled with zeros on the left.
See the following example in hexadecimal notation to notice the results of the
e
arithmetic operation depending on the type of the input variable (BYTE or
WORD).
m
Example in ST:
c u
o
D
ed
v
Example in FBD:
h i
c
Example in IL:
r
LD 16#45
SHL 2
ST erg_byte
ROL
Note: Please note, that the amount of bits, which is regarded for the
arithmetic operation, is pretended by the data type of the input variable !. If the
12-6 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
input variable is a constant the smallest possible data type is regarded. The data
type of the output variable has no effect at all on the arithmetic operation.
See in the following example in hexadecimal notation that you get different
results for erg_byte and erg_word depending on the data type of the input
variable (BYTE or WORD), although the values of the input variables in_byte
and in_word are the same.
t
Example in ST:
e n
u m
Example in FBD:
o c
D
d
Example in IL:
e
LD 16#45
SHL 2
v
ST erg_byte
ROR
c
erg, in and n should be of the typeBYTE, WORD or DWORD. in will be
r
shifted one bit position to the right n times while the bit that is furthest to the
left will be reinserted from the left.
A Note: Please note, that the amount of bits, which is regarded for the
arithmetic operation, is pretended by the data type of the input variable !. If the
input variable is a constant the smallest possible data type is regarded. The data
type of the output variable has no effect at all on the arithmetic operation.
See in the following example in hexadecimal notation that you get different
results for erg_byte and erg_word depending on the data type of the input
variable (BYTE or WORD), although the values of the input variables in_byte
and in_word are the same.
WAGO-I/O-PRO 32 12-7
Selection Operators
Example in ST:
n t
e
m
Example in FBD:
Example in IL:
c u
o
LD 16#45
SHL 2
ST erg_byte
Selection Operators
D
ed
All selection operations can also be performed with variables. For purposes of
clarity we will limit our examples to the following which use constants as
v
operators.
i
SEL
h
Binary Selection.
c
OUT := SEL(G, IN0, IN1) means:
OUT := IN0 if G=FALSE;
r
OUT := IN1 if G=TRUE.
IN0, IN1 and OUT can be any type of variable, G must be BOOL. The result of
A
the selection is IN0 if G is FALSE, IN1 if G is TRUE.
Example in IL:
LD FALSE
SEL 3,4
ST Var1 (* Result ist 3 *)
Example in FBD:
12-8 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
MAX
Maximum function. Returns the greater of the two values.
OUT := MAX(IN0, IN1)
IN0, IN1 and OUT can be any type of variable.
Example in IL:
t
LD 90
MAX 30
n
MAX 40
MAX 77
e
ST Var1 (* Result is 90 *)
Example in FBD:
MIN
u m
c
Minimum function. Returns the lesser of the two values.
OUT := MIN(IN0, IN1)
o
IN0, IN1 and OUT can be any type of variable.
Example in IL:
D
LD 90
MIN 30
MIN 40
d
MIN 77
ST Var 1 (* Result is 30 *)
e
Example in FBD:
iv
h
LIMIT
c
Limiting
r
OUT := LIMIT(Min, IN, Max) means:
OUT := MIN (MAX (IN, Min), Max)
A
Max is the upper and Min the lower limit for the result. Should the value IN
exceed the upper limit Max, LIMIT will return Max. Should IN fall below Min,
the result will be Min.
IN and OUT can be any type of variable.
Example in IL:
LD 90
LIMIT 30,80
ST Var 1 (*Result is 80 *)
WAGO-I/O-PRO 32 12-9
Comparison Operators
MUX
Multiplexer
OUT := MUX(K, IN0,...,INn) means:
OUT := INK.
IN0, ...,INn and OUT can be any type of variable. K must be BYTE, WORD,
DWORD, SINT, USINT, INT, UINT, DINT or UDINT. MUX selects the Kth
t
value from among a group of values.
n
Example in IL:
LD 0
e
MUX 30,40,50,60,70,80
ST Var 1 (*Result is 30 *)
m
Comparison Operators
GT
c u
o
Greater than
A Boolean operator which returns the value TRUE when the value of the first
operand is greater than that of the second. The operands can be BOOL, BYTE,
D
WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL,
TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
d
Example in IL:
LD 20
e
GT 30
ST Var 1 (* Result is FALSE *)
iv
Example in ST:
VAR1 := 20 > 30 > 40 > 50 > 60 > 70;
h
Example in FBD:
LT
r c
A
Less than
A Boolean operator that returns the value TRUE when the value of the first
operand is less than that of the second. The operands can be BOOL, BYTE,
WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL,
TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 20
LT 30
ST Var 1 (* Result is TRUE *)
Example in ST:
VAR1 := 20 < 30;
12-10 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
Example in FBD:
LE
Less than or equal to
t
A Boolean operator that returns the value TRUE when the value of the first
operand is less than or equal to that of the second. The operands can be BOOL,
n
BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL,
e
LREAL, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and STRING.
Example in IL:
LD 20
m
LE 30
ST Var 1 (* Result is TRUE *)
u
Example in ST:
c
VAR1 := 20 <= 30;
Example in FBD
o
D
GE
Greater than or equal to
d
A Boolean operator that returns the value TRUE when the value of the first
e
operand is greater than or equal to that of the second. The operands can be
BOOL, BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT,
v
REAL, LREAL, TIME, DATE, TIME_OF_DAY, DATE_AND_TIME and
i
STRING.
h
Example in IL:
LD 60
c
GE 40
r
ST Var 1 (* Result is TRUE *)
Example in ST:
A
VAR1 := 60 >= 40;
Example in FBD:
EQ
Equal to
A Boolean operator that returns the value TRUE when the operands are equal.
The operands can be BOOL, BYTE, WORD, DWORD, SINT, USINT, INT,
UINT, DINT, UDINT, REAL, LREAL, TIME, DATE, TIME_OF_DAY,
DATE_AND_TIME and STRING.
WAGO-I/O-PRO 32 12-11
Address Operators
Example in IL:
LD 40
EQ 40
ST Var 1 (* Result is TRUE *)
Example in ST:
VAR1 := 40 = 40;
t
Example in FBD:
NE
Not equal to
e n
m
A Boolean operator that returns that value TRUE when the operands are not
equal. The operands can be BOOL, BYTE, WORD, DWORD, SINT, USINT,
u
INT, UINT, DINT, UDINT, REAL, LREAL, TIME, DATE, TIME_OF_DAY,
c
DATE_AND_TIME and STRING.
Example in IL:
o
LD 40
NE 40
ST Var 1 (* Result is FALSE *)
D
Example in ST:
VAR1 := 40 <> 40;
d
Example in FBD:
v e
h i
Address Operators
r c
ADR
Address Function
A
ADR returns the address of its argument in a DWORD. This address can be
sent to manufacturing functions to be treated as a pointer or it can be assigned
to a pointer within the project.
Example in IL:
LD Var 1
ADR
ST Var 2
man_fun1
12-12 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
Content Operator
A pointer can be dereferenced by adding the content operator "^" after the
pointer identifier.
Example in ST:
pt:POINTER TO INT;
var_int1:INT;
t
var_int2:INT;
pt := ADR(var_int1);
n
var_int2:=pt^;
e
Calling Operator
m
CAL
u
Calling a function block or a program
c
Use CAL in IL to call up a function block instance. The variables that will serve
as the input variables are placed in parentheses right after the name of the
o
function block instance.
Example: Calling up the instance Inst from a function block where input
D
variables Par1 and Par2 are 0 and TRUE respectively.
CAL INST(PAR1 := 0, PAR2 := TRUE)
ed
Type Conversion Functions
iv
Its is forbidden to implicitly convert from a ”larger” type to a ”smaller” type
(for example from INT to BYTE or from DINT to WORD). Special type
h
conversions are required if one wants to do this. One can basically convert from
any elementary type to any other elementary type.
c
Syntax:
r
<elem.Typ1>_TO_<elem.Typ2>
A
BOOL_TO Conversions
Conversion from type BOOL to any other type:
For number types the result is 1, when the operand is TRUE, and 0, when the
operand is FALSE.
For the STRING type the result is ‚TRUE‘ or ‚FALSE‘.
Examples in AWL:
LD TRUE (*Result is 1 *)
BOOL_TO_INT
ST i
WAGO-I/O-PRO 32 12-13
Type Conversion Functions
t
ST t
n
LD TRUE (*Result is TOD#00:00:00.001 *)
BOOL_TO_TOD
e
ST
m
ST dat
u
LD TRUE (*Result is DT#1970-01-01-00:00:01 *)
c
BOOL_TO_DT
ST dandt
o
Examples in ST:
i:=BOOL_TO_INT(TRUE); (* Result is 1 *)
D
str:=BOOL_TO_STRING(TRUE); (* Result is "TRUE" *)
t:=BOOL_TO_TIME(TRUE); (* Result is T#1ms *)
tof:=BOOL_TO_TOD(TRUE); (* Result is TOD#00:00:00.001 *)
d
dat:=BOOL_TO_DATE(FALSE); (* Result is D#1970 *)
dandt:=BOOL_TO_DT(TRUE); (* Result is DT#1970-01-01-00:00:01 *)
e
Examples in FUP:
v
(*Result is 1 *)
h i (*Result is 'TRUE' *)
r c (*Result is T#1ms *)
A
(*Result is TOD#00:00:00.001 *)
(*Result is D#1970-01-01 *)
(*Result is DT#1970-01-01-00:00:01 *)
12-14 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
TO_BOOL Conversions
Conversion from another variable type to BOOL:
The result is TRUE when the operand is not equal to 0. The result is FALSE
when the operand is equal to 0.
The result is true for STRING type variables when the operand is "TRUE",
t
otherwise the result is FALSE.
Examples in AWL:
n
LD 213 (*Result is TRUE *)
e
BYTE_TO_BOOL
ST b
LD 0 (*Result is FALSE *)
m
INT_TO_BOOL
ST b
c u
LD T#5ms (*Result is TRUE *)
TIME_TO_BOOL
o
ST b
D
STRING_TO_BOOL
ST b
d
Examples in FUP:
(*Result is TRUE *)
v e
i
(*Result is FALSE *)
h
(*Result is TRUE *)
r c (*Result is TRUE *)
A Examples in St:
b := BYTE_TO_BOOL(2#11010101);
b := INT_TO_BOOL(0);
b := TIME_TO_BOOL(T#5ms);
b := STRING_TO_BOOL('TRUE');
(* Result is TRUE *)
(* Result is FALSE *)
(* Result is TRUE *)
(* Result is TRUE *)
WAGO-I/O-PRO 32 12-15
Type Conversion Functions
Conversion between
Integral Number Types
Conversion from an integral number type to another number type:
When you perform a type conversion from a larger to a smaller type, you risk
losing some information. If the number you are converting exceeds the range
t
limit, the first bytes for the number will be ignored.
Example in ST:
n
si := INT_TO_SINT(4223); (* Result is 127 *)
If you save the integer 4223 (16#107f represented hexadecimally) as a
e
SINT variable, it will appear as 127 (16#7f represented hexadecimally).
Example in IL:
m
LD 2
INT_TO_REAL
u
MUL 3.5
c
Example in FBD:
REAL_TO-/ LREAL_TO
o
D
Conversions
Converting from the variable type REAL or LREAL to a different type:
d
The value will be rounded up or down to the nearest whole number and
converted into the new variable type. Exceptions to this are the variable types
e
STRING, BOOL, REAL and LREAL.
v
When you perform a type conversion from a larger to a smaller type, you risk
i
losing some information.
Example in ST:
h
i := REAL_TO_INT(1.5); (* Result is 2 *)
c
j := REAL_TO_INT(1.4); (* Result is 1 *)
r
Example in IL:
LD 2.7
REAL_TO_INT
A
GE %MW8
Example in FBD:
TIME_TO/TIME_OF_DA
Y Conversions
Converting from the variable type TIME or TIME_OF_DAY to a different type:
The time will be stored internally in a DWORD in milliseconds (beginning with
12:00 A.M. for the TIME_OF_DAY variable). This value will then be
converted.
12-16 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
When you perform a type conversion from a larger to a smaller type, you risk
losing some information
For the STRING type variable, the result is a time constant.
Examples in IL:
LD T#12ms (*Result is 'T#12ms' *)
t
TIME_TO_STRING
ST str
n
LD T#300000ms (*Result is 300000 *)
e
TIME_TO_DWORD
ST dw
LD TOD#00:00:00.012 (*Result is 12 *)
m
TOD_TO_SINT
ST si
c u
Examples in St:
str :=TIME_TO_STRING(T#12ms); (* Result is T#12ms *)
o
dw:=TIME_TO_DWORD(T#5m); (* Result is 300000 *)
si:=TOD_TO_SINT(TOD#00:00:00.012); (* Result is 12 *)
Examples in FBD:
D
ed
iv
h
DATE_TO/DT_TO
c
Conversions
r
Converting from the variable type DATE or DATE_AND_TIME to a different
type:
A
The date will be stored internally in a DWORD in seconds since Jan. 1, 1970.
This value will then be converted.
When you perform a type conversion from a larger to a smaller type, you risk
losing some information
For STRING type variables, the result is the date constant.
Examples in St:
b :=DATE_TO_BOOL(D#1970-01-01); (* Result is FALSE *)
i :=DATE_TO_INT(D#1970-01-15); (* Result is 29952 *)
byt :=DT_TO_BYTE(DT#1970-01-15-05:05:05); (* Result is 129 *)
str:=DT_TO_STRING(DT#1998-02-13-14:20); (* Result is
'DT#1998-02-13-14:20' *)
WAGO-I/O-PRO 32 12-17
Numeric Functions
STRING_TO Conversions
Converting from the variable type STRING to a different type:
The operand from the STRING type variable must contain a value that is valid
in the target variable type, otherwise the result will be 0.
Examples in St:
t
b :=STRING_TO_BOOL('TRUE'); (* Result is TRUE *)
w :=STRING_TO_WORD('abc34'); (* Result is 0 *)
n
t :=STRING_TO_TIME('T#127ms'); (* Result is T#127ms *)
TRUNC
e
Converting from REAL to INT. The whole number portion of the value will be
used.
m
When you perform a type conversion from a larger to a smaller type, you risk
losingsome information
u
Examples in ST:
c
i:=TRUNC(1.9); (* Result is 1 *)
i:=TRUNC(-1.4); (* Result is 1 *)
o
Example in IL:
LD 2.7
D
TRUNC
GE %MW8
d
Numeric Functions
v e
ABS
i
Returns the absolute value of a number. ABS(-2) equals 2.
h
The following type combinations for input and output variables are possible:
IN OUT
c
INT INT, REAL, WORD, DWORD, DINT
r
REAL REAL
BYTE INT, REAL, BYTE, WORD, DWORD, DINT
A
WORD INT, REAL, WORD, DWORD, DINT
DWORD REAL, DWORD, DINT
SINT REAL
USINT REAL
UINT INT, REAL, WORD, DWORD, DINT, UDINT, UINT
DINT REAL, DWORD, DINT
UDINT REAL, DWORD, DINT, UDINT
Example in IL:
LD 2
ABS
ST i (*Result is 2 *)
12-18 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
Example in ST:
i:=ABS(-2);
Example in FBD:
t
SQRT
Returns the square root of a number.
n
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
e
UINT, UDINT, OUT must be type REAL.
Example in IL:
LD 16
m
SQRT
ST q (*Result is 4 *)
u
Example in ST:
c
q:=SQRT(16);
Example in FBD:
o
D
LN
Returns the natural logarithm of a number.
d
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
UINT, UDINT, OUT must be type REAL.
e
Example in IL:
v
LD 45
i
LN
ST q (*Result is 3.80666 *)
h
Example in ST:
c
q:=LN(45);
r
Example in FBD:
LOG
WAGO-I/O-PRO 32 12-19
Numeric Functions
Example in ST:
q:=LOG(314.5);
Example in FBD:
t
EXP
Returns the exponential function.
n
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
e
UINT, UDINT, OUT must be type REAL.
Example in IL:
LD 2
m
EXP
ST q (*Result is 9.7448e+009 *)
u
Example in ST:
c
q:=EXP(2);
Example in FBD:
o
D
SIN
Returns the sine of a number.
d
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
UINT, UDINT, OUT must be type REAL.
e
Example in IL:
v
LD 0.5
i
SIN
ST q (*Result is 0.479426 *)
h
Example in ST:
c
q:=SIN(0.5);
r
Example in FBD:
COS
12-20 WAGO-I/O-PRO 32
Chapter 12 - IEC Operators
Example in FBD:
TAN
t
Returns the tangent of a number. The value is calculated in arch minutes. IN
can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
n
UINT, UDINT, OUT must be type REAL.
e
Example in IL:
LD 0.5
TAN
m
ST q (*Result is 0.546302 *)
Example in ST:
u
q:=TAN(0.5);
c
Example in FBD:
ASIN
o
D
Returns the arc sine (inverse function of sine) of a number. .
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
d
UINT, UDINT, OUT must be type REAL.
Example in IL:
e
LD 0.5
ASIN
iv
ST q (*Result is 0.523599 *)
h
Example in ST:
c
q:=ASIN(0.5);
r
Example in FBD:
ACOS
A Returns the arc cosine (inverse function of cosine) of a number. The value is
calculated in arch minutes.
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
UINT, UDINT, OUT must be type REAL.
Example in IL:
LD 0.5
ABS
ST q (*Result is 1.0472 *)
WAGO-I/O-PRO 32 12-21
Numeric Functions
Example in ST:
q:=ACOS(0.5);
Example in FBD:
t
ATAN
n
Returns the arc tangent (inverse function of tangent) of a number. The value is
e
calculated in arch minutes.
IN can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT, USINT,
UINT, UDINT, OUT must be type REAL.
m
Example in IL:
u
LD 0.5
ABS
c
ST q (*Result is 0.463648 *)
Example in ST:
o
q:=ATAN(0.5);
Example in FBD:
D
d
EXPT
e
Exponentiation of a variable with another variable:
OUT = IN1IN2.
v
IN1 and IN2 can be type BYTE, WORD, DWORD, INT, DINT, REAL, SINT,
i
USINT, UINT, UDINT, OUT must be type REAL.
h
Example in IL:
LD 7
c
EXPT 2
r
ST var1 (*Result is 49 *)
Example in ST:
A
var1 := (7,2);
Example in FBD:
12-22 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
t
LEN
n
Returns the length of a string. Input STR is of type STRING, the return value of
the function is type INT.
e
Example in IL:
LD 'SUSI'
LEN
m
ST VarINT1 (* Ergebnis ist 4 *)
u
Example in FBD:
Example in ST:
VarSTRING1 := LEN (‘SUSI’);
o c
D
LEFT
Left returns the left, initial string for a given string. Input STR is type STRING,
d
SIZE is of type INT, the return value of the function is type STRING.
LEFT (STR, SIZE) means: Take the first SIZE character from the right in the
e
string STR.
v
Example in IL:
i
LD 'SUSI'
LEFT 3
h
ST VarSTRING1 (* Ergebnis ist ‘SUS’ *)
Example in FBD:
r c
A
Example in ST:
VarSTRING1 := LEFT (‘SUSI’,3);
RIGHT
Right returns the right, initial string for a given string.
RIGHT (STR, SIZE) means: Take the first SIZE character from the right in the
string STR.
Input STR is of type STRING, SIZE is of type INT, the return value of the
function is of type STRING.
WAGO-I/O-PRO 32 13-1
String Functions
Example in IL:
LD 'SUSI'
RIGHT 3
ST VarSTRING1 (* Ergebnis ist ‘USI’ *)
Example in FBD:
Example in ST:
n t
e
VarSTRING1 := RIGHT (‘SUSI’,3);
MID
u m
c
Mid returns a partial string from within a string.
o
Input STR is type STRING, LEN and POS are type INT, the return value of the
function is type STRING.
D
MID (STR, LEN, POS) means: Retrieve LEN characters from the STR string
beginning with the character at position POS.
Example in IL:
d
LD 'SUSI'
RIGHT 2,2
e
ST VarSTRING1 (* Ergebnis ist ‘US’ *)
v
Example in FBD:
h i
r c
Example in ST:
VarSTRING1 := MID (‘SUSI’,2,2);
A
CONCAT
Concatenation (combination) of two strings.
The input variables STR1 and STR2 as well as the return value of the function
are type STRING.
Example in IL:
LD 'SUSI'
CONCAT ‘WILLI’
ST VarSTRING1 (* Ergebnis ist ‘SUSIWILLI’ *)
13-2 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
Example in FBD:
Example in ST:
VarSTRING1 := CONCAT (‘SUSI’,’WILLI’);
t
INSERT
n
INSERT inserts a string into another string at a defined point.
e
The input variables STR1 and STR2 are type STRING, POS is type INT and
the return value of the function is type STRING.
INSERT(STR1, STR2, POS) means: insert STR2 into STR1 after position
m
POS.
u
Example in IL:
LD 'SUSI'
c
INSERT ‘XY’,2
ST VarSTRING1 (* Ergebnis ist ‘SUXYSI’ *)
o
Example in FBD:
D
d
Example in ST:
e
VarSTRING1 := INSERT (‘SUSI’,’XY’,2);
v
DELETE
i
DELETE removes a partial string from a larger string at a defined position.
h
The input variable STR is type STRING, LEN and POS are type INT, the return
value of the function is type STRING.
c
DELETE(STR, L, P) means: Delete L characters from STR beginning with the
r
character in the P position.
Example in IL:
A
LD 'SUXYSI'
DELETE 2,23
ST Var1 (* Ergebnis ist ‘SUSI’ *)
Example in FBD:
Example in ST:
Var1 := DELETE (‘SUXYSI’,2,3);
WAGO-I/O-PRO 32 13-3
String Functions
REPLACE
REPLACE replaces a partial string from a larger string with a third string.
The input variable STR1 and STR2 are type STRING, LEN and POS are type
INT, the return value of the function is type STRING.
REPLACE(STR1, STR2, L, P) means: Replace L characters from STR1 with
t
STR2 beginning with the character in the P position.
Example in IL:
n
LD 'SUXYSI'
REPLACE 'K', 2,2
e
ST VarSTRING1 (* Ergebnis ist ‘SKYSI’ *)
Example in FBD:
u m
Example in ST:
VarSTRING1 := REPLACE (‘SUXYSI’,’K’,2,2);
o c
D
FIND
FIND searches for a partial string within a string.
d
The input variable STR1 and STR2 are type STRING, the return value of the
function is type STRING.
e
FIND(STR1, STR2) means: Find the position of the first character where STR2
appears in STR1 for the first time. If STR2 is not found in STR1, then OUT:=0.
iv
Example in IL:
LD 'SUXYSI'
h
FIND 'XY'
ST VarINT1 (* Ergebnis ist ‘3’ *)
c
Example in FBD:
A rExample in ST:
VarINT1 := FIND (‘SUXYSI’,’XY’);
13-4 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
SR
Making Bistable Function Blocks dominant:
Q1 = SR (SET1, RESET) means:
t
Q1 = (NOT RESET AND Q1) OR SET1
The input variables SET1 and RESET as well as the output variable Q1 are type
n
BOOL.
e
Declaration example:
SRInst : SR ;
Example in IL:
m
CAL SRInst(SET1 := VarBOOL1, RESET := VarBOOL2)
LD SRInst.Q1
u
ST VarBOOL3
c
Example in FBD:
o
D
Example in ST:
SRInst(SET1:= VarBOOL1 , RESET:=VarBOOL2 );
d
VarBOOL3 := SRInst.Q1 ;
e
RS
Resetting Bistable Function Blocks
iv
Q1 = RS (SET, RESET1) means:
Q1 = NOT RESET1 AND (Q1 OR SET)
h
The input variables SET and RESET1 as well as the output variable Q1 are type
c
BOOL.
r
Declaration example:
RSInst : RS ;
A
Example in IL:
CAL RSInst(SET := VarBOOL1, RESET1 := VarBOOL2)
LD RSInst.Q1
ST VarBOOL3
Example in FBD:
WAGO-I/O-PRO 32 13-5
Trigger
Example in ST:
RSInst(SET:= VarBOOL1 , RESET1:=VarBOOL2 );
VarBOOL3 := RSInst.Q1 ;
SEMA
A Software Semaphore (Interruptible)
t
BUSY = SEMA(CLAIM, RELEASE) means:
BUSY := X;
n
IF CLAIM THEN X:=TRUE;
ELSE IF RELEASE THEN BUSY := FALSE; X:= FALSE;
e
END_IF
X is an internal BOOL variable that is FALSE when it is initialized.
The input variables CLAIM and RELEASE as well as the output variable
m
BUSY are type BOOL.
u
If BUSY is TRUE when SEMA is called up, this means that a value has already
been assigned to SEMA (SEMA was called up with CLAIM = TRUE). If
c
BUSY is FALSE, SEMA has not yet been called up or it has been released
(called up with RELEASE = TRUE).
o
Declaration example:
SEMAInst : SEMA ;
D
Example in IL:
CAL SEMAInst(CLAIM := VarBOOL1, RELEASE := VarBOOL2)
LD SEMAInst.BUSY
d
ST VarBOOL3
e
Example in FBD:
iv
h
Example in ST:
c
SEMAInst(CLAIM:= VarBOOL1 , RELEASE:=VarBOOL2 );
r
VarBOOL3 := SEMAInst.BUSY;
A
Trigger
R_TRIG
The function block R_TRIG detects a rising edge.
FUNCTION_BLOCK R_TRIG
VAR_INPUT
CLK : BOOL;
END_VAR
VAR_OUTPUT
Q : BOOL;
END_VAR
13-6 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
VAR
M : BOOL := FALSE;
END_VAR
Q0 := CLK AND NOT M;
M := CLK;
END_FUNCTION_BLOCK
t
The output Q0 and the help variable M will remain FALSE as long as the input
variable CLK is FALSE. As soon as S1 returns TRUE, Q will first return
n
TRUE, then M will be set to TRUE. This means each time the function is called
up, Q will return FALSE until CLK has falling edge followed by an rising edge.
e
Declaration example:
RTRIGInst : R_TRIG ;
m
Example in IL:
CAL RTRIGInst(CLK := VarBOOL1)
u
LD RTRIGInst.Q
ST VarBOOL2
c
Example in FBD:
o
D
Example in ST:
RTRIGInst(CLK:= VarBOOL1);
d
VarBOOL2 := RTRIGInst.Q;
e
F_TRIG
The function block F_TRIG a falling edge.
iv
FUNCTION_BLOCK F_TRIG
VAR_INPUT
h
CLK: BOOL;
END_VAR
c
VAR_OUTPUT
r
Q: BOOL;
END_VAR
VAR
A
M: BOOL := FALSE;
END_VAR
Q := NOT CLK AND NOT M;
M := NOT CLK;
END_FUNCTION_BLOCK
The output Q and the help variable M will remain FALSE as long as the input
variable CLK returns TRUE. As soon as CLK returns FALSE, Q will first
return TRUE, then M will be set to TRUE. This means each time the function is
called up, Q will return FALSE until CLK has a rising followed by a falling
edge.
WAGO-I/O-PRO 32 13-7
Counter
Declaration example:
FTRIGInst : F_TRIG ;
Example in IL:
CAL FTRIGInst(CLK := VarBOOL1)
LD FTRIGInst.Q
ST VarBOOL2
t
Example in FBD:
Example in ST:
FTRIGInst(CLK:= VarBOOL1);
e n
m
VarBOOL2 := FTRIGInst.Q;
u
Counter
CTU
The function block Incrementer:
o c
D
The input variables CU and RESET as well as the output variable Q are type
BOOL, the input variable PV and the output variable CV are type WORD.
d
The counter variable CV will be initialized with 0 if RESET is TRUE. If CU
has a rising edge from FALSE to TRUE, CV will be raised by 1.Q will return
e
TRUE when CV is greater than or equal to the upper limit PV.
v
Declaration example:
i
CTUInst : CTU ;
Example in IL:
h
CAL CTUInst(CU := VarBOOL1, RESET := VarBOOL2, PV := VarINT1)
LD CTUInst.Q
c
ST VarBOOL3
r
LD CTUInst.CV
ST VarINT2
A
Example in FBD:
Example in ST:
CTUInst(CU:= VarBOOL1, RESET:=VarBOOL2 , PV:= VarINT1);
VarBOOL3 := CTUInst.Q ;
VarINT2 := CTUInst.CV;
13-8 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
CTD
Function Block Decrementer:
The input variables CD and LOAD_ as well as the output variable Q are type
BOOL, the input variable PV and the output variable CV are type INT.
When LOAD_ is TRUE, the counter variable CV will be initialized with the
t
upper limit PV. If CD has a rising edge from FALSE to TRUE, CV will be
lowered by 1 provided CV is greater than 0 (i.e., it doesn't cause the value to
n
fall below 0).
Q returns TRUE when CVis equal 0.
e
Declaration example:
CTDInst : CTD ;
m
Example in IL:
CAL CTDInst(CD := VarBOOL1, LOAD := VarBOOL2, PV := VarINT1)
u
LD CTDInst.Q
ST VarBOOL3
c
LD CTDInst.CV
ST VarINT2
o
Example in FBD:
D
ed
Example in ST:
CTDInst(CD:= VarBOOL1, LOAD:=VarBOOL2 , PV:= VarINT1);
v
VarBOOL3 := CTDInst.Q ;
i
VarINT2 := CTDInst.CV;
h
CTUD
c
Function Block Incrementer/Decrementer
r
The input variables CU, CD, RESET, LOAD_ as well as the output variables
QU and QD are type BOOL, PV and CV are type WORD.
A
If RESET is valid, the counter variable CV will be initialized with 0. If LOAD
is valid, CV will be initialized with PV.
If CU has a rising edge from FALSE to TRUE, CV will be raised by 1. If CD
has a rising edge from FALSE to TRUE, CV will be lowered by 1 provided this
does not cause the value to fall below 0.
QU returns TRUE when CV has become greater than or equal to PV.
QD returns TRUE when CV has become equal to 0.
Declaration example:
CTUDInst : CUTD ;
WAGO-I/O-PRO 32 13-9
Timer
Example in IL:
CAL CTUDInst(CU := VarBOOL2, RESET := VarBOOL3, LOAD :=
VarBOOL4, PV := VarINT1)
LD CTUDInst.QU
ST VarBOOL5
LD CTUDInst.QD
ST VarBOOL6
t
LD CTUDInst.CV
ST VarINT2
n
Example in FBD:
e
u m
c
Example in ST:
o
CTUDInst(CU := VarBOOL1, CU:= VarBOOL2, RESET := VarBOOL3,
LOAD:=VarBOOL4 , PV:= VarINT1);
VarBOOL5 := CTUDInst.QU ;
D
VarBOOL6 := CTUDInst.QD ;
VarINT2 := CTUDInst.CV;
Timer
ed
iv
TP
The function blockTimer is a trigger.
h
TP(IN, PT, Q, ET) means:
c
IN and PT are input variables of the BOOL and TIME types respectively. Q and
r
ET are output variables of the BOOL and TIME types respectively. If IN is
FALSE, Q is FALSE and ET is 0.
A
As soon as IN becomes TRUE, the time will begin to be counted in
milliseconds in ET until its value is equal to PT.It will then remain constant.
Q is TRUE if IN is TRUE and ET is less than or equal to PT. Otherwise it is
FALSE.
Q returns a signal for the time period given in PT.
13-10 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
Declaration example:
TPInst : TP ;
n t
e
Example in IL:
CAL TPInst(IN := VarBOOL1, PT := T#5s)
LD TPInst.Q
m
ST VarBOOL2
u
Example in FBD:
Example in ST:
o c
D
TPInst(IN := VarBOOL1, PT:= T#5s);
VarBOOL2 :=TPInst.Q;
d
TON
The function block Timer On Delay implements a turn-on delay.
e
TON(IN, PT, Q, ET) means:
iv
IN and PT are input variables of the BOOL and TIME types respectively. Q and
ET are output variables of the BOOL and TIME types respectively. If IN is
h
FALSE, Q is FALSE and ET is 0.
As soon as IN becomes TRUE, the time will begin to be counted in
c
milliseconds in ET until its value is equal to PT.It will then remain constant.
r
Q is TRUE when IN is TRUE and ET is equal to PT. Otherwise it is FALSE.
Thus, Q has a rising edge when the time indicated in PT in milliseconds has run
A
out.
Graphic display of TON behavior over time:
Declaration example:
TONInst : TON ;
WAGO-I/O-PRO 32 13-11
Timer
Example in IL:
CAL TONInst(IN := VarBOOL1, PT := T#5s)
LD TONInst.Q
ST VarBOOL2
Example in FBD:
n t
e
Example in ST:
TONInst(IN := VarBOOL1, PT:= T#5s);
m
TOF
u
The function block TOF implements a turn-off delay.
c
TOF(IN, PT, Q, ET) means:
IN and PT are input variables type BOOL respectively TIME. Q and E are
o
output variabls type BOOL respectively TIME. If IN is TRUE, the outputs are
TRU respectively 0.
D
As soon as IN becomes FALSE, in ET the time will begin to be counted in
milliseconds in ET until its value is equal to PT.It will then remain constant.
d
Q is FALSE when IN is FALSE und ET equal PT. Otherwise it is TRUE.
Thus, Q has a falling edge when the time indicated in PT in milliseconds has
e
run out.
v
Graphic display of TOF behavior over time:
h i
r c
A
Declaration example:
TOFInst : TOF ;
Example in IL:
CAL TOFInst(IN := VarBOOL1, PT := T#5s)
LD TOFInst.Q
ST VarBOOL2
Example in FBD:
13-12 WAGO-I/O-PRO 32
Chapter 13 - Standard Library Elements
Example in ST:
TOFInst(IN := VarBOOL1, PT:= T#5s);
VarBOOL2 :=TOFInst.Q;
RTC
t
The function block Runtime Clock returns, starting at a given time, the current
date and time.
e n
m
RTC(EN, PDT, Q, CDT) means:
u
EN and PDT are input variables type TIME. Q and CDT are output variables
c
type BOOL respectively DATE_AND_TIME. When EN is FALSE, the output
variables Q und CDT are FALSE respectively DT#1970-01-01-00-00:00:00.
o
As soon as EN becomes TRUE, the time of PDT is set, is counted up in
seconds and returned in CDT as long as EN is TRUE (see example in the
D
picture above). As soon as EN is reset to FALSE, CDT is reset to the initial
value DT#1970-01-01-00-00:00:00. Please note that the time in PDT is only set
by a rising edge.
ed
iv
ch
A r
WAGO-I/O-PRO 32 13-13
Timer
n t
e
u m
o c
D
ed
iv
ch
Ar
13-14 WAGO-I/O-PRO 32
Chapter 14 - The UTIL.LIB Library
t
processing.
n
BCD conversion
e
A byte in the BCD format contains integers between 0 and 99. Four bits are
used for each decimal place. The ten decimal place is stored in the bits 4-7.
m
Thus the BCD format is similar to the hexadecimal presentation, with the
simple difference that only values between 0 and 99 can be stored in a BCD
u
byte, whereas a hexadecimal byte reaches from 0 to FF.
An example: The integer 51 should be converted to BCD format. 5 in
c
binary is 0101, 1 in binary is 0001, which makes the BCD byte 01010001,
which corresponds to the value $51=81.
o
D
BCD_TO_INT
This function converts a byte in BCD format into an INT value:
d
The input value of the function is type BYTE and the output is type INT.
Where a byte should be converted which is not in the BCD format the output is
e
-1.
v
Examples in ST:
i
i:=BCD_TO_INT(73); (* Result is 49 *)
k:=BCD_TO_INT(151); (* Result is 97 *)
h
l:=BCD_TO_INT(15); (* Output -1, because it is not in BCD format
*)
r
INT_TO_BCD_
c
A
This function converts an INTEGER value into a byte in BCD format:
The input value of the function is type INT, the output is type BYTE.
The number 255 will be outputted where an INTEGER value should be
converted which cannot be converted into a BCD byte.
Examples in ST:
i:=INT_TO_BCD(49); (* Result is 73 *)
k:=BCD_TO_INT(97); (* Result is 151 *)
l:=BCD_TO_INT(100); (* Error! Output: 255 *)
WAGO-I/O-PRO 32 14-1
Bit/byte functions
Bit/byte functions
EXTRACT
Inputs to this function are a DWORD X, as well as a BYTE N. The output is a
BOOL value, which contains the content of the Nth bit of the input X, whereby
t
the function begins to count from the zero bit.
Examples in ST:
n
FLAG:=EXTRACT(X:=81, N:=4); (* Result : TRUE, because 81 is
binary 1010001, so the 4th bit is 1 *)
e
FLAG:=EXTRACT(X:=33, N:=0); (* Result : TRUE, because 33 is
binary 100001, so the bit ‘0’ is 1 *)
m
PACK
This function is capable of delivering back eight input bits B0, B1, ..., B7 from
u
type BOOL as a BYTE.
c
The function block UNPACK is closely related to this function.
o
PUTBIT
The input to this function consists of a DWORD X, a BYTE N and a BOOLean
D
value B.
PUTBIT sets the Nth bit from X on the value B, whereby it starts counting from
the zero bit.
d
Example in ST:
A:=38; (* binary 100110 *)
e
B:=PUTBIT(A,4,TRUE); (* Result : 54 = 2#110110 *)
v
C:=PUTBIT(A,1,FALSE); (* Result : 36 = 2#100100 *)
i
UNPACK
h
UNPACK converts the input B from type BYTE into 8 output variables
B0,...,B7 of the type BOOL, and this is the opposite to PACK.
r c
Example in FBD: Output:
14-2 WAGO-I/O-PRO 32
Chapter 14 - The UTIL.LIB Library
DERIVATIVE
This function block approximately determines the local derivation.
The function value is delivered as a REAL variable by using IN. TM contains
t
the time which has passed in msec in a DWORD and the input of RESET of the
type BOOL allows the function block to start anew through the delivery of the
n
value TRUE.
The output OUT is of the type REAL.
e
In order to obtain the best possible result, DERIVATIVE approximates using
the last four values, in order to hold errors which are produced by inaccuracies
m
in the input parameters as low as possible.
Block in FBD:
c u
o
D
INTEGRAL
d
This function block approximately determines the integral of the function.
In an analogue fashion to DERIVATIVE, the function value is delivered as a
e
REAL variable by using IN. TM contains the time which has passed in msec in
a DWORD and the input of RESET of the type BOOL allows the function
v
block to start anew with the value TRUE.
i
The output OUT is of the type REAL.
h
The integral is approximated by two step functions. The average of these is
c
delivered as the approximated integral.
r
Block in FBD: Example: Integration of a linear function:
A
STATISTICS_INT
This function block calculates some standard statistical values:
The input IN is of the type INT. All values are initialised anew when the
BOOLean input RESET is TRUE.
WAGO-I/O-PRO 32 14-3
Controllers
The output MN contains the minimum, MX of the maximum value from IN.
AVG describes the average, that is the expected value of IN. All three outputs
are of the type INT.
Block in FBD:
n t
e
STATISTICS_REAL
This function block corresponds to STATISTICS_INT, except that the input IN
is of the type REAL like the outputs MN, MX, AVG.
m
VARIANCE
u
VARIANCE calculates the variance of the entered values.
c
The input IN is of the type REAL, RESET is of the type BOOL and the output
OUT is again of the type REAL.
o
This block calculates the variance of the inputted values. VARIANCE can be
reset with RESET=TRUE.
D
The standard deviation can easily be calculated as the square root of the
VARIANCE.
Controllers
ed
iv
P
The P controller function block:
h
ACTUAL (actual value) and DESIRED (desired or nominal value) as well as
c
K, the proportionality coefficient, are all input values of the type REAL.
r
The output, the absolute control output (OUT), is also of the type REAL and
satisfies the equation:
A
OUT = ACTUAL + K⋅∆ , whereby ∆=DESIRED-ACTUAL
Example in FBD:
14-4 WAGO-I/O-PRO 32
Chapter 14 - The UTIL.LIB Library
PD
The PD controller function block:
ACTUAL (actual value) and DESIRED (desired or nominal value) as well as
KP, the proportionality coefficient, are all input values of the type REAL. TV is
of the type DWORD and contains the derivative action time in msec. RESET is
of the type BOOL and serves to reset the controller.
n t
The output, the absolute control output (OUT), is of the type REAL, and is
calculated as follows:
e
δ∆
OUT = ACTUAL + K⋅ (∆ + TV⋅ ) , whereby ∆=DESIRED-ACTUAL
δt
m
Example in FBD:
c u
o
D
PID
The PID controller function block:
d
ACTUAL (actual value) and DESIRED (desired or nominal value) as well as
KP, the proportionality coefficient, are all input values of the type REAL. TN,
e
the integral action time, and TV, the derivative action time, are delivered in
msec by a DWORD. RESET is of the type BOOL and serves to reset the
v
controller.
i
The output, the absolute control output (OUT), is again of the type REAL, and
h
is calculated as follows:
1 δ∆
ó∆(t)dt + TV⋅
c
OUT = ACTUAL + K⋅ (∆ + TN õ )
δt
r
The PID controller can be easily converted to a PI controller by setting TV=0.
Example in FBD:
WAGO-I/O-PRO 32 14-5
Signal generators
Signal generators
BLINK
The function block BLINK generates a pulsating signal. The input consists of
ENABLE of the type BOOL, as well as TIMELOW and TIMEHIGH of the type
t
TIME. The output OUT is of the type BOOL.
If ENABLE is set to TRUE, BLINK begins, to set the output for the time period
n
TIMEHIGH to TRUE, and then afterwards to set it for the time period
TIMELOW to FALSE.
e
Example in FBD:
u m
c
GEN
o
The function generator generates typical periodic functions:
The inputs are a composition consisting of MODE from the pre-defined
D
counting type GEN_MODE, BASE of the type BOOL, of the PERIOD of the
type TIME, of two INT values CYCLES and AMPLITUDE and of the
BOOLean RESET input. An INT is generated with the designation OUT.
d
The MODE describes the function which should be generated, whereby the
enumeration values TRIANGLE and TRIANGLE_POS deliver two triangular
e
functions, SAWTOOTH_RISE an ascending, SAWTOOTH_FALL a
descending sawtooth, RECTANGLE a rectangular signal and SINE and
iv
COSINE the sine and cosine:
h
TRIANGLE: TRIANGLE_POS:
r c
A SAWTOOTH_RISE: SAWTOOTH_FALL:
14-6 WAGO-I/O-PRO 32
Chapter 14 - The UTIL.LIB Library
RECTANGLE: SINUS:
t
COSINUS:
e n
m
BASE defines whether the cycle period is really related to a defined time
u
(BASE=TRUE) or whether it is related to a particular number of cycles, which
means the number of calls of function block (BASE=FALSE).
c
PERIOD or CYCLES defines the corresponding cycle period.
o
AMPLITUDE defines, in a trivial way, the amplitude of the function to be
generated.
D
The function generator is again set to 0 as soon as RESET=TRUE.
Example in FBD:
ed
iv
ch
r
Function manipulators
A
CHARCURVE
This function block serves to represent values, piece by piece, on a linear
function:
IN of the type INT is fed with the value to be manipulated. The BYTE N
designates the number of points which defines the presentation function. This
WAGO-I/O-PRO 32 14-7
Function manipulators
t
P[0].X and P[N-1].X, ERR=2 and OUT contains the corresponding limiting
value P[0].X or P[N-1].X.
n
If N lies outside of the allowed values which are between 2 and 11, then
e
ERR=4.
Example in ST:
m
First of all ARRAY P must be defined in the header:
VAR
u
...
CHARACTERISTIC_LINE:CHARCURVE;
KL:ARRAY[0..10] OF POINT:=(X:=0,Y:=0),(X:=250,Y:=50),
c
(X:=500,Y:=150),(X:=750,Y:=400),7((X:=1000,Y:=1000));
COUNTER:INT;
...
o
END_VAR
D
COUNTER:=COUNTER+10;
CHARACTERISTIC_LINE(IN:=COUNTER,N:=5,P:=KL);
ed
RAMP_INT
iv
h
RAMP_INT serves to limit the ascendance or descendance of the function
c
being fed:
r
The input consists on the one hand out of three INT values: IN, the function
input, and ASCEND and DESCEND, the maximum increase or decrease for a
given time interval, which is defined by TIMEBASE of the type TIME. Setting
A
RESET to TRUE causes RAMP_INT to be initialised anew.
The output OUT of the type INT contains the ascend and descend limited
function value.
When TIMEBASE is set to t#0s, ASCEND and DESCEND are not related to
the time interval, but remain the same.
14-8 WAGO-I/O-PRO 32
Chapter 14 - The UTIL.LIB Library
Example in FBD:
n t
e
RAMP_REAL
RAMP_REAL functions exactly in the same way as RAMP_INT, with the
m
simple difference that the inputs IN, ASCEND, DESCEND and the output
OUT are of the type REAL.
c u
o
HYSTERESIS
D
The input to this function block consists of three INT values IN, HIGH and
LOW. The output OUT is of the type BOOL.
ed
iv
If IN goes below the limiting value LOW, OUT becomes TRUE. If IN goes
over the upper limit HIGH, FALSE is delivered.
h
An illustrative example:
r c
A
WAGO-I/O-PRO 32 14-9
Analogue value processing
LIMITALARM
This function block specifies, whether the input value is within a set range and
which limits it has violated if it has done so.
The input values IN, HIGH and LOW are each of the type INT, while the
outputs O, U and IL are of the type BOOL.
t
If the upper limit HIGH is exceeded by IN, O becomes TRUE, and when IN is
below LOW, U becomes TRUE. IL is TRUE if IN lies between LOW and
n
HIGH.
Example in FBD: Result:
e
u m
o c
D
ed
iv
ch
A r
14-10 WAGO-I/O-PRO 32
Chapter 15 - Operands in WAGO-I/O-PRO 32
15 Operands in WAGO-I/O-PRO 32
Operands
Constants, variables, addresses and possibly function calls can appear as
t
operands.
n
Constants
e
BOOL Constants
BOOL constants are the logical values TRUE and FALSE.
m
TIME Constants
u
TIME constants can be declared in WAGO-I/O-PRO 32. These are generally
c
used to operate the timer in the standard library. A TIME constant is always
made up of an initial "t" or "T" (or "time" or "TIME" spelled out) and a number
o
sign "#".
This is followed by the actual time declaration which can include days
D
(identified by "d"), hours (identified by "h"), minutes (identified by "m"),
seconds (identified by "s") and milliseconds (identified by "ms"). Please note
that the time entries must be given in this order according to length (d before h
d
before m before s before m before ms) but you are not required to include all
time increments.
e
Examples of correct TIME constants in a ST assignment:
TIME1 := T#14ms;
v
TIME1 := T#100S12ms; (*The highest component may be allowed to
i
exceed its limit*)
TIME1 := t#12h34m15s;
h
the following would be incorrect:
c
TIME1 := t#5m68s; (*limit exceeded in a lower component*)
r
TIME1 := 15ms; (*T# is missing*)
TIME1 := t#4ms13d; (*Incorrect order of entries*)
A
DATE Constants
These constants can be used to enter dates. A DATE constant is declared
beginning with a "d", "D", "DATE" or "date" followed by "#". You can then
enter any date with format Year-Month-Day.
Examples:
DATE#1996-05-06
d#1972-03-29
WAGO-I/O-PRO 32 15-1
Constants
TIME_OF_DAY
Constants
Use this type of constant to store times of the day. A TIME_OF_DAY
declaration begins with "tod#", "TOD#", "TIME_OF_DAY#" or
"time_of_day#" followed by a time with the format: Hour:Minute:Second. You
can enter seconds as real numbers or you can enter fractions of a second.
t
Examples:
TIME_OF_DAY#15:36:30.123
n
tod#00:00:00
e
DATE_AND_TIME
Constants
m
Date constants and the time of day can also be combined to form so-called
DATE_AND_TIME constants. DATE_AND_TIME constants begin with "dt#",
u
"DT#", "DATE_AND_TIME#" or "date_and_time#". Place a hyphen after the
date followed by the time.
c
Examples:
DATE_AND_TIME#1996-05-06-15:36:30
o
dt#1972-03-29-00:00:00
Number Constants
D
Number values can appear as binary numbers, octal numbers, decimal numbers
and hexadecimal numbers. If an integer value is not a decimal number, you
d
must write its base followed by the number sign (#) in front of the integer
constant. The values for the numbers 10-15 in hexadecimal numbers will be
e
represented as always by the letters A-F.
v
You may include the underscore character within the number.
i
Examples:
14 (Decimal number)
h
2#1001_0011 (Binary number)
8#67 (Octal number)
c
16#A (Hexadecimal number)
r
These number values can be from the variable types BYTE, WORD, DWORD,
SINT, USINT, INT, UINT, DINT, UDINT, REAL or LREAL.
A
Implicit conversions from "larger" to "smaller" variable types are not permitted.
This means that a DINT variable cannot simply be used as an INT variable.
You must use the type conversion (see the Type Conversions chapter in the
appendix).
REAL/LREAL Constants
REAL and LREAL constants can be given as decimal fractions and represented
exponentially. Use the standard American format with the decimal point to do
this.
Example:
7.4 instead of 7,4
15-2 WAGO-I/O-PRO 32
Chapter 15 - Operands in WAGO-I/O-PRO 32
STRING Constants
A string is a sequence of characters. STRING constants are preceded and
followed by single quotation marks. You may also enter blank spaces and
special characters (umlauts for instance). They will be treated just like all other
t
characters.
In character sequences, the combination of the dollar sign ($) followed by two
n
hexadecimal numbers is interpreted as a hexadecimal representation of the eight
bit character code. In addition, the combination of two characters that begin
e
with the dollar sign are interpreted as shown below when they appear in a
character sequence:
$$ Dollar signs
m
$' Single quotation mark
u
$L or $l Line feed
c
$N or $n New line
$P or $p Page feed
o
$R or $r Line break
D
$T or $t Tab
Examples:
'w1Wüß?'
d
' Abby and Craig '
':-)'
e
Variables
h
global variable list.
c
The variable identifier may not contain any blank spaces or special characters,
may not be declared more than once and cannot be the same as any of the
r
keywords. Capitalization is not recognized which means that VAR1, Var1, and
var1 are all the same variable. The underscore character is recognized in
A
identifiers (e.g., "A_BCD" and "AB_CD" are considered two different
identifiers). An identifier may not have more than one underscore character in a
row. The first 32 characters are significant.
Variables can be used anywhere the declared type allows for them.
You can access available variables through the Input Assistant.
System Flags
System flags are implicitly declared variables that are different on each specific
PLC. To find out which system flags are available in your system, use the
command "Insert" "Operand" An Input Assistant dialog box pops up, select
the category System Variable.
WAGO-I/O-PRO 32 15-3
Addresses
t
Structure variables can be accessed using the following syntax:
<Structurename>.<Variablenname>
n
Function block and program variables can be accessed using the following
e
syntax:
<Functionblockname>.<Variablename>
m
Addresses
u
Address
c
The direct display of individual memory locations is done through the use of
special character sequences. These sequences are a concatenation of the percent
o
sign "%", a range prefix, a prefix for the size and one or more natural numbers
separated by blank spaces.
D
The following range prefixes are supported:
I Input
Q Output
d
M Memory location
The following size prefixes are supported:
e
X Single bit
v
None Single bit
i
B Byte (8 Bits)
W Word (16 Bits)
h
D Double word (32 Bits)
c
Examples:
%QX75 and %Q75 Output bit 75
r
%IW215 Input word 215
%QB7 Output byte 7
A
%MD48 Double word in memory position 48 in the memory
location.
%IW2.5 depending on the PLC Configuration
The current PLC Configuration for the program determines whether or not an
address is valid.
Memory location
You can use any supported size to access the memory location.
For example, the address %MD48 would address bytes numbers 192, 193, 194,
and 195 in the memory location area (48 * 4 = 192). The number of the first
byte is 0.
15-4 WAGO-I/O-PRO 32
Chapter 15 - Operands in WAGO-I/O-PRO 32
You can access words, bytes and even bits in the same way: the address
%MX5.0 allows you to access the first bit in the fifth word (Bits are generally
saved wordwise).
Functions
t
In ST a function call can also appear as an operand.
Example:
n
Result := Fct(7) + 3;
e
u m
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 15-5
Functions
n t
e
u m
o c
D
ed
iv
ch
Ar
15-6 WAGO-I/O-PRO 32
Chapter 16 - Command Line/Command File Commands
t
When WAGO-I/O-PRO 32 is started, you can add commands in the command
line which will be asserted during execution of the program. These commands
n
start with a „/“. Capitalization/Use of small letters is not regarded. The
commands will be executed sequentially from the left to the right.
/debug
e
Additional debug outputs like listings etc. are activated.
m
/online Immediately after start WAGO-I/O-PRO 32 tries to go online with
the current project.
u
/run After login WAGO-I/O-PRO 32 starts the application program.
Only valid in combination with /online.
c
/show ... Settings for the WAGO-I/O-PRO 32 frame window can be made:
o
/show hide The window will not be displayed, it also will not be represented
in the task menu.
D
/show icon The window will be minimized in display.
/show max The window will be maximized in display.
/show normal The window will be displayed in the same status as it was during
d
the last closing.
/out <outfile> All messages are displayed in the message window and
e
additionally are written in the file <outfile>.
/cmd After starting the commands of the <cmdfile> get executed.
v
<cmdfile>
i
Example for a command line:
h
The project ampel.pro gets opened, but no window opens. The commands
included in the command file command.cmd will be executed.
c
C:\ampel.pro /show hide /cmd command.cmd
A r
Command File (cmdfile) Commands
See the following table for a list of commands, which can be used in a
command file (<cmdfile>). You can call the command file by a command line
(see above). Capitalizing/Use of small letters is not regarded. The command
line will be displayed as a message in the message window and can be given
out in a message file (see below). Additionally to the command a „@“ is
prefixed. All signs after a semicolon (;) will be ignored (comment).
WAGO-I/O-PRO 32 16-1
Command File (cmdfile) Commands
t
online sim off Switch off of simulation mode ('Online' 'Simulation')
e
A new project is created ('File' 'New')
n
The project <projectfile> will be loaded ('File' 'Open')
m
file close The current project will be closed ('File' 'Close')
u
file save The current project will be stored ('File' 'Save')
c
file saveas <projectfile> The current project will be saved with the file name
<projectfile> ('File' 'Save as')
o
file quit WAGO-I/O-PRO 32 will be closed ('File' 'Exit')
D
Commands of the project menu:
project compile The current project will be compiled by "Rebuild all"
d
('Project' 'Rebuild all')
e
project check The current project will be checked ('Project' 'Check')
project build The current project will be built ('Projekt' 'Build')
iv
project import <file1> ... The files <file1> ... <fileN> get imported into the
<fileN> current project ('Project' 'Import')
h
project export <expfile> The current project will be exported in the file
c
<expfile> ('Project' 'Export')
r
project expmul Each object of the current project will be exported in
an own file, which gets the name of the object.
out close
The file <msgfile> opens as message file. New
messages will be appended
The currently shown message file will be closed.
out clear All messages of the currently opened message file will
be deleted.
16-2 WAGO-I/O-PRO 32
Chapter 16 - Command Line/Command File Commands
t
Commands for the control of replace of objects respectively for the control of
n
files for import, export, replace:
replace ok Replace
e
replace yes
replace no Do not replace
m
replace yesall Replace all
u
replace noall Replace none
c
Commands for the control of the default parameters of WAGO-I/O-PRO 32
o
dialogs:
query on Dialogs are displayed and need user input
D
query off ok All dialogs respond as if the user had clicked on the
'OK' button
d
query off no All dialogs respond as if the user had clicked on the
'No' button
e
query off cancel All dialogs respond as if the user had clicked on the
'Cancel' button
iv
h
Debug command:
debug corresponds to the command "/debug" in the command
c
line
WAGO-I/O-PRO 32 16-3
Command File (cmdfile) Commands
t
watchlist load <file> The watch list saved in <file> will be loaded
Watchliste and the appropriate window will be opened
n
('Extras' 'Load Watch List')
e
watchlist save <file> Saves the current watch list in <file> ('Extras' 'Save
Watch List')
watchlist set <text> A previous loaded watch list gets the name <text>
m
('Extras' 'Rename Watch List')
u
watchlist read The values of the watch variables are updated ('Extras'
'Read Receipt')
c
watchlist write The values of the watch list are written to the watch
variables ('Extras' 'Write Receipt')
o
D
A command file like shown below will open the project file ampel.pro, will
then load a watch list, which was stored as w.wtc, will then start the application
d
program and write – after 1 second delay - the values of the variables into the
watch list watch.wtc (which will be saved) and will finally close the project.
e
file open C:\work\projects\WAGO-IO-PRO_test\ampel.pro
query off ok
iv
watchlist load c:\work\w.wtc
online login
online run
h
delay 1000
watchlist read
c
watchlist save c:\work\watch.wtc
r
online logout
file close
16-4 WAGO-I/O-PRO 32
Chapter 17 - Error messages
17 Error messages
Error messages
t
Here you will find the error messages that the parser displays (italics) and
possible causes.They are shown in alphabetical order:
n
Replace the term or the constant with a variable.
e
A
m
"A jump must have exactly one label"
u
Change the jump destination to a defined label.
c
"Address expected after 'AT'"
o
Insert a valid address after the AT or change the keyword AT.
D
"ADR does not require an expression or
constant or addressed variable as
operand"
d
Replace the term or the constant with a variable.
e
"At least one statement is required"
iv
Enter an instruction.
h
"At most 4 numerical fields allowed in
c
addresses"
r
Remove the extra address fields.
A
C
WAGO-I/O-PRO 32 17-1
D
t
Write the comments at the end of the line.
n
"<Component> is not a component of
e
<variable>"
If the variable is a structure, change the component into one of the components
m
that are declared in this structure.
u
If the variable is a function block instance, change the <component> into an
input or output parameter that is declared in this function block.
o c
D
The result of the previous instruction is not a BOOL type variable. Insert an
operator or a function whose result is BOOL.
d
D
e
"Duplicate definition of identifier
iv
<name>"
Rename one of the identifiers.
ch
"Duplicate definition of label <names>"
r
Remove one of the defined labels.
A
E
17-2 WAGO-I/O-PRO 32
Chapter 17 - Error messages
t
declaration type.
n
"EXIT outside a loop"
e
Remove EXIT.
m
END_CASE"
u
The end of a CASE statement is incorrect. Add the keyword END_CASE.
c
"Expecting type specification"
o
Write a valid type behind the identification in the declaration
D
"Expression expected"
An expression must be entered at this point.
d
"Expression in FOR statement is not
e
variable with write access"
v
Change the variable to a variable with write permission.
i
"Extra characters following valid watch
h
expression"
c
Remove the extra characters.
A r
"Function block call requires function
block instance"
Insert the name of the desired instance or remove the call for the function block.
WAGO-I/O-PRO 32 17-3
I
t
"Identifier expected"
n
Enter a valid identifier at the beginning of the declaration part.
e
"<Identifier> is not a function"
m
Change <identifier> into one of the functions from the libraries that are linked
to the project or into one of the function declared in the project.
u
"IF and ELSIF require a Boolean
c
expression for the condition"
o
Change the expression to an expression with a BOOL type result.
D
"IL Operator Expected"
Change the first word in the line to a valid operator or a valid function.
d
"Illegal time constants"
e
Check to see if the time constant you wrote is correct and change any mistakes
you find. Possible mistakes are:The t or # is missing at the beginning.A time
iv
entry appears twice (e.g., t#4d2d).
h
Incorrect sequence of times.Incorrect time indicator (the d, h, m, s or ms is
missing).
r c
"Increment value of FOR statement must
be of type INT"
A
Change the variable to an INT type variable.
17-4 WAGO-I/O-PRO 32
Chapter 17 - Error messages
t
"Integer number or symbolic constant
expected"
n
Only integers or symbolic constants can be used as the condition for a CASE
e
instance. Change the incorrect condition.
m
Check in your PLC Configuration to see which addresses are allowed and
u
replace the addresses with permissible addresses or change the PLC
Configuration.
o c
"It is not possible to locate a
D
d
multidimensional array to an address"
e
Clear the address assignment.
iv
"It is not possible to locate an array of
an array to an address"
h
Clear the address assignment.
r c
"It is not possible to locate an array of
strings to an address"
A
Clear the address assignment.
WAGO-I/O-PRO 32 17-5
K
The result of the previous instruction is not a BOOL result. Insert an operator or
a function with a result of the type BOOL.
t
K
e n
m
L
c u
"<Label> label is not defined"
o
D
Define a label with the name <LabelName> or change <LabelName> into a
defined label.
d
"LD expected"
e
The instruction "LD" is the only one allowed in this line.
iv
ch
"Multiple underscore in identifier"
r
Remove one of the underscore characters from the identifier.
A
N
17-6 WAGO-I/O-PRO 32
Chapter 17 - Error messages
t
operand"
n
Remove the N and negate the operand explicitly with the NOT operator.
e
"<Name> must be a declared instance of
the function block <FBName>"
m
Change the text of the function block instance (initialized with "Instance") into
an identifier for a valid function block instance declaration.
c u
"Name used in interface is not identical
with POU name"
o
Rename your POU with the menu command "Project" "Object Rename" or
change the name of the POU in its declaration part. The name must appear
D
directly after the keywords, PROGRAM, FUNCTION or FUNCTIONBLOCK.
d
The identifier to the left of '.' is not a structure variable or instance for a
e
function block. Change the identifier into a structure variable or into a instance
for a function block or remove the period and the identifier to its right.
iv
"No *.obj found"
h
Turn on Simulation Mode.
r c
"No comma allowed after ')'"
Remove the comma.
A
"No instance specied for call of function
block <name>"
Change the text of the instance for function block <name> (initialized with
"Instance") in the identifier of a valid instance declaration.
WAGO-I/O-PRO 32 17-7
O
t
Change the word after + or - into a valid constant.
n
"Number is expected after ','"
e
Remove the comma or insert an additional number.
m
<operator>. At least <number> are
needed"
u
Check to see how many operands the operator <operator> requires and remove
c
those that aren't needed.
o
"<Number> operands is too many for
<operator>. Exactly <number> are
D
needed."
Check to see how many operands the operator <operator> requires and insert
the ones that are missing.
ed
iv
"Only BOOL variables are allowed at a
bit address"
h
Change the type of declaration to BOOL or change the address to a different
c
format.
r
"Only VAR and VAR_GLOBAL can be
A
located to addresses"
Copy the declaration into a VAR or VAR_GLOBAL area.
"Operand expected"
Add an additional operand.
17-8 WAGO-I/O-PRO 32
Chapter 17 - Error messages
"Out of Memory"
t
Leave the system by saving. Close Windows, restart it and then restart the
n
compilation
e
"Overflow of identifier list"
You must learn to restrain yourself, no more than 64000 identifiers are allowed.
u m
c
"POU <Name> is not defined in the
o
project"
Define a POU named <name> using the menu command "Project" "Object
add" or change the name to the name of the POU defined.
D
d
inputs"
Check the number of input variables this POU requires, then add or remove
e
them as needed.
iv
"POU ends incorrectly: add ST or delete
the last expression."
h
The POU ends with an incomplete expression. Add the correct ending or delete
c
it.
A r
"Start value of FOR statement must be of
type INT"
Change the variable to an INT type variable.
WAGO-I/O-PRO 32 17-9
T
t
T
n
"Too few indices for array"
e
Check how many indices are declared for the array (1, 2, or 3) and add those
that are needed.
m
"Too many indices for array"
u
Check how many indices are declared for the array(1, 2, or 3) and remove the
extra ones.
o c
D
Delete the extra parameters.
d
"Type mismatch in parameter <name>
of <name>: Cannot convert <Type1>
e
into <Type2>."
Use a <Type2> type variable for the assignment to the <name> parameter or
v
change the type of assigned variable to <Type1>.
h i
"Type mismatch in parameter
<number>: Cannot convert <type> to
c
<type>."
r
Check the type of the operand with the number <number> of this operator,
function or function block. Change the type of the variable that caused the error
A
to a type that is allowed or select a new variable of an allowed type.
17-10 WAGO-I/O-PRO 32
Chapter 17 - Error messages
t
"Type mismatch: Cannot convert
n
<Type1> into <Type2>."
e
Check the required types of operators (search for Operator in your help file) and
change the variable type that produced the error into a type that is allowed or
select another variable.
u m
c
"Unexpected end of text in brackets"
o
Insert an end bracket.
D
"Unexpected End"
In the declaration part: Add the keyword END_VAR to the end of the
declaration part.
ed
In the text editor: Insert instructions that end the last instruction sequence (e.g.,
ST).
iv
ch
A r
WAGO-I/O-PRO 32 17-11
V
t
This watch variable is not declared in the project. Press <F2> to access help
with declared variables.
e n
m
Change the expression to an expression with a BOOL type result.
u
V
c
"VAR, VAR_INPUT, VAR_OUTPUT or
o
VAR_INOUT expected"
The first line after the name of the POU must contain one of these keywords.
D
d
type INT. "
Change the variable to an INT type variable.
v e
"Variable with write access or direct
i
address required for ST, STN, S, R"
h
Replace the first operand with a variable that has write permission.
c
W
A r
"WHILE requires a Boolean expression
as its condition"
Change the expression to an expression with a BOOL type result.
Rename your POU with the menu command "Project" "Object Rename" or
change the name of the POU in its declaration part. The name must appear
directly after the keywords, PROGRAM, FUNCTION or FUNCTIONBLOCK.
17-12 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
18 Quick Start
Task
t
To assist you to quickly start programming with WAGO-I/O-PRO 32 the
following will show you how to create, test and print out a small program.
n
Following this you can change and extend this program in accordance with your
own ideas.
e
The following links are to be made:
Output Q0.1 is TRUE, when the inputs I0.1 and I0.2 are TRUE or if input I0.3
is TRUE. These relationships are represented in the following table, whereby
m
the inputs and outputs are assigned to variables.
u
IN1 AT %IX0.1 IN2 AT %IX0.2 IN3 AT %IX0.3 OUT1 AT %QX0.1
c
FALSE FALSE FALSE FALSE
o
TRUE FALSE FALSE FALSE
FALSE TRUE FALSE FALSE
D
TRUE TRUE FALSE TRUE
FALSE/TRUE FALSE/TRUE TRUE TRUE
d
In addition a small visualisation will be created, where the variables are to be
symbolised by various geometric elements.
v e
Start
i
This is how WAGO-I/O-PRO 32 is started:
h
& Click on "Start" in the Windows task bar to open the "Start" menu.
& In the "Start" menu select the "Program" option, to open the
c
"Program" folder.
r
& To open the "WAGO-I/O-PRO 32*" folder select "WAGO-I/O-PRO
32*".
A
& Click on the link "WAGO-I/O-PRO 32 V2.1 English", to open the
"WAGO-I/O-PRO 32" program.
* or the name you have selected
WAGO-I/O-PRO 32 18-1
Start
After the first start of WAGO-I/O-PRO 32 the following dialog appears on the
monitor for controller selection:
n t
Image 18.1: Dialog box "Controller Selection"
e
m
& Mark the coupler to be used in test with the mouse.
u
(In this example the MODBUS-Controller 750-815 is used.)
& Conclude the entry with "OK".
c
If a controller has already been selected and you want to change the setting, the
o
above dialog can be reached via the "Object Organizer". For this click on the
"PLC Configuration" in the "Resources" register card.
D
ed
iv
ch
Ar
Image 18.2: Object Organizer, register "Resources"
18-2 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
PLC_PRG
& Open a new project by clicking the menu point "New" under "File".
The following dialog now appears for selecting the type and programming
language of the POU PLC_PRG:
n t
e
m
Image 18.3: Dialog box "New POU"
u
This POU is already pre-defined and must not be renamed. This is the main
c
program and must be present in every project, in which no task configuration is
used. The POU is called up precisely once per control cycle.
o
& Select the programming language "Ladder Diagram" (LD).
The editing window for this POU appears after acknowledging with "OK".
D
ed
iv
h
Image 18.4: PLC_PRG, not yet programmed
c
The above window section includes the declaration section. Here the variable
r
declaration is automatically entered when programming. The declaration
section is shown in the example as a list. A possible alternative is a table
A
display.
The variables links are created in the lower half of the window (body). The
following buttons are required for editing the links:
WAGO-I/O-PRO 32 18-3
PLC_PRG
& Using the left hand mouse key press on the "Contact" button to create
the first link.
The first contact is shown in the network.
& Replace the question marks above the contact by IN1 (1st variable).
Mark the network by actuating the left hand mouse key.
& Repeat this procedure accordingly to link the second variable IN2
t
& Click the "Parallel Contact" button to link the third variable (IN3) and
n
enter the variables designation.
& Click on the "Coil" button and write OUT1 to replace the question
e
mark.
Following each entry of a not yet declared variable a dialog is displayed asking
m
for its declaration:
c u
o
Image 18.6: Dialog box "Variables declaration"
D
The variables are already declared as local variables (VAR) with the data type
BOOL.
d
& Enter the attendant addresses with a preceding percent symbol. These
addresses can be obtained from the task table.
v e
h i
r c
A Image 18.7: PLC_PRG with variables declaration and rump
& Click on the "Project" "Check" menu point to check the program.
This activates the program check. Formal errors are displayed in a message
window.
& Save the program created to date under "File" "Save", in the same
manner as familiar under other WINDOWS applications.
18-4 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
Visualization
n t
e
u m
o c
Image 18.8: Object Organizer, register "Visualization"
D
Following this a dialog appears for a new visualization.
ed
Image 18.9: Dialog box "New Visualization"
iv
& Enter a name, e.g. "Graphic" and close the entry with "OK".
h
Following this open an editing window in which the visualization can be
created. Here various geometric elements are available, e.g. rectangle and
c
ellipse.
r
& Click on the "Insert" menu point and select "Ellipse". If you now click
in the editing window and move the mouse pointer with the left hand
A
mouse key pressed, a circle can be generated at the desired size. This
element will later be allocated the variable IN1.
WAGO-I/O-PRO 32 18-5
Visualization
n t
e
Image 18.10: Editing window for visualization
m
Configuration".
In this dialog the element can be allocated various functions.
u
& Select the menu point "Text" under "Category".
c
& Enter IN1 under "Content".
This text appears later in the circle created.
o
D
ed
iv
Image 18.11: Dialog box editing visualization, categorie "Text"
h
& Select the element fill colour for the condition display of the variable
IN1 under "Color".
c
IN1 = FALSE => "Color" => white
r
IN1 = TRUE => "Alarm color" => blue
A
Image 18.12: Dialog box editing visualization, categorie "Color"
18-6 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
n t
e
m
Image 18.13: Dialog box "Color"
u
& Enter the variable PLC_PRG.IN1 under the menu point "Variables"
c
"Change color".
o
In the case of a condition change of the variable IN1 from FALSE to TRUE and
vice versa the element colour change is made in run mode.
D
ed
ivImage 18.14: Dialog box editing visualization, categorie "Variables"
h
& Enter the variable PLC_PRG.IN1 under the menu point "Input"
c
"Toggle variable".
r
Each time the circle is clicked the status of the variable IN1 changes from
FALSE to TRUE and vice versa.
A
Image 18.15: Dialog box editing visualization, categorie "Input"
WAGO-I/O-PRO 32 18-7
Visualization
& Copy the configured element three times and distribute the generated
elements in the editing window. Then double click on the first copy and
change all entries of configuration IN1 to IN2. Proceed accordingly for
the second and third copy.
& Arrange the variables IN3 and IN4 in a different form.
& Using the "Shape" menu point assign the variable IN3 a rounded off
t
rectangle and the variable Out1 a rectangle.
e n
u m
c
Image 18.16: Dialog box editing visualization, categorie "Shape"
o
D
ed
iv
Image 18.17: Editing window for visualization object
h
& Activate a program check and save the project.
r c
A
18-8 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
Simulation mode
Make the program test in simulation mode first. Here a fieldbus node with
programmable fieldbus controller and bus modules is not necessary.
& Click in "Object Organizer" in the register card "POU" on the POU
"PLC_PRG" as well as in the register card "Visualization" "Graphic"
and display the corresponding editing windows.
t
The online commands available are combined in the menu bar under "Online".
n
& Select the "Simulation Mode" in this menu point and then "Login"
under this menu point.
e
& To start the program processing click on "Run".
A corresponding message ("ONLINE, SIM, RUN") appears in the bottom line
m
of the picture.
c u
o
D
ed
iv
ch
A r Image 18.18: Simulation PLC_PRG and Graphic
WAGO-I/O-PRO 32 18-9
Control mode
Control mode
Following the test in simulation mode the program created should first be tested
on a programmable fieldbus controller.
The fieldbus nodes in the example comprise of the following units:
• 1 off programmable fieldbus contoller (MODBUS) 750-815
t
• 1 off digital input module 750-402
n
• 1 off digital output module 750-504
• 1 off end module 750-600
e
• 1 off communication cable 750-920
m
(The communication cable is a component part of the WAGO programming
tools IEC 1131-3)
c u
o
D
ed
iv
ch
A r Image 18.19: MODBUS Controller with digital inputs and outputs
& Supply the fieldbus node with 24V DC (see MODBUS manual).
& Connect the COMX interface of your PC to the communication interface
of the controller. Use the WAGO communication cable for this purpose.
& Click the "Simulation" menu point under "online".
The previously displayed check mark is hidden.
18-10 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
t
In its basic setting there are no entries in this dialog.
e n
u m
o c
D
Image 18.20: Dialog box "Communikation parameters" without drivers
d
The "Communication Parameters: New Channels" dialog appears:
v e
h i
r c Image 18.21: Dialog box for driver selection
A
& Mark the "Serial (RS232)" driver in the selection window to configure
the serial connection between PC and controller.
& Enter the driver name above the selection window and click on "OK" to
conclude the selection.
The "Communication Parameters" dialog appears again.
WAGO-I/O-PRO 32 18-11
Control mode
n t
e
m
Image 18.22: Dialog box "Communikation Parametesr", with drivers and parameters
u
The serial driver (RS232) is now entered below the minus character in the
"Channels" field. In the field to the right the values of the communication
c
parameter for the selected driver are displayed. These values correspond to the
default setting of the MODBUS controller. For these reason they need not be
o
changed.
& Click on "OK" to take over the driver and its parameter values.
D
The controller test can now start. (For this the operating mode switch of the
controllers must be in the middle or upper setting. The address switch is on
"00".)
d
& Click the "Loggin" menu point under "Online" to log into the
controller.
e
(The WAGO-I/O-PRO 32 Server is active during on-line operation. The
v
communication parameters cannot be polled.)
i
As there is still no program in the controller, you will be asked whether the
program should be loaded.
h
& Acknowledge with "Yes".
c
Following this the current program will be loaded.
r
& Once the program is loaded, start the program processing with
"Online" "Run".
A
"ONLINE RUN" is signalled on the right end of the status bar.
Once voltage (+24V) is applied to the inputs this can be seen in the PLC_PRG
window or the graphic by the blue coloured contacts or geometrical elements.
Clicking the geometrical element, however, no longer leads to a status change
of the variables.
& End the online operation with the "Online" "Logout" menu point.
18-12 WAGO-I/O-PRO 32
Chapter 18 – Quick Start
Documentation
t
the pages to be printed can be defined.
e n
u m
c
Image 18.23: Dialog box "Documentation Setup"
o
& Enter the following path with the name of the print file in the File field:
C:/Programs/WAGO-IO-PRO 32/WORK/QUICK_START.DFR
D
(As standard the documentation is saved in the DEFAULT.DFR file.)
& Click on "Edit", to open the documentation page layout.
d
Here you can enter the number of pages, date, file and POU name, as well as
position graphics on the pages and lay down the text area in which the
e
documentation is to be printed.
& Select the "Placeholder" menu under "Insert".
iv
You then receive a selection of the following placeholders:
• Page actual number of pages
h
• POUName current POU
c
• FileName project name
r
• Date current date
A
• Content content of current POU
& Click on a placeholder, e.g. Page.
& Pull a rectangle in the editing window with the left hand mouse key
pressed and position at the required position.
In addition you can create text fields for free text input, e.g. for company names
and addresses.
& For this click on the "Insert""Rectangle" menu point. Pull a
correspondingly large field and select a dialog for text entry by double
clicking.
In addition a Bitmap graphic can be inserted in the page using the "Insert" "
Bitmap" menu point, e.g. a company logo.
WAGO-I/O-PRO 32 18-13
Documentation
n t
e
You are asked in a dialog whether you want to save the entries.
& Click on "Yes".
m
& To print out the project click on "Project" "Document..."
u
The following dialog appears:
o c
D
ed
iv
ch
r
Image 18.25: Dialog box "Document Project"
A
& Select the POU to be printed with the mouse.
The dialog to be printed is shown after acknowledging with "OK".
& Continue with printing in the familiar manner for WINDOWS.
18-14 WAGO-I/O-PRO 32
Chapter 19 – Compliance List
19 Compliance List
Tables
t
Conformance of WAGO-I/O-PRO 32 Version 2.1 with IEC 61131-3.
n
The following tables show the current status of WAGO-I/O-PRO 32 Version 2.1. Missing
features will be added during to the further development of WAGO-I/O-PRO 32. The numbers
e
in the first column of the table refer to the first edition of the standard released in March 1993.
The description in the first line of a table section refers to the whole section in most cases.
m
Table – No. Description WAGO-I/O-PRO 32 Remarks
1-1 character set yes
u
1-2 lower case letters yes
1-3a yes in binary, octal- and
c
hexadecimal constants
1-3b - except in comments and
o
strings
1-4a yes as quote in strings
1-4b - except in comments and
D
strings
1-5a - except in comments and
strings, because the graphic
editors are not character
d
based
1-5b - except in comments and
e
strings
1-6a yes
v
1-6b -
i
2-1 identifier yes
2-2 yes
h
2-3 yes
3-1 comments yes
c
4-1 numeric constants yes
4-2 yes
r
4-3 yes
4-4 yes
A
4-5 yes
4-6 yes
4-7 yes
4-8 yes
5-1 string constants yes
6-2 non printable characters yes
6-3 yes
6-4 yes
6-5 yes becomes "\n"
6-6 yes
6-7 yes
6-8 yes
7-1a duration constants yes
7-1b yes
WAGO-I/O-PRO 32 19-1
7-2a yes
7-2b yes
8-1 date and time yes
8-2 yes
8-3 yes
8-4 yes
8-5 yes
8-6 yes
t
10-1 BOOL yes
10-2 SINT yes
n
10-3 INT yes
10-4 DINT yes
e
10-5 LINT no
10-6 USINT yes
10-7 UINT yes
10-8 UDINT yes
m
10-9 ULINT no
10-10 REAL yes
u
10-11 LREAL yes
10-12 TIME yes
c
10-13 DATE yes
10-14 TIME_OF_DAY yes
o
10-15 DATE_AND_TIME yes
10-16 STRING yes
10-17 BYTE yes
D
10-18 WORD yes
10-19 DWORD yes
10-20 LWORD no
d
12-1 derived data types yes
12-2 yes
12-3 no
e
12-4 yes
12-5 yes
v
14-1 initialising of derived data types yes
i
14-2 yes
14-3 no
h
14-4 no
14-5 yes
c
14-6 no
r
15-1 direct addresses yes
15-2 yes
15-3 yes
A
15-4 yes
15-5 yes
15-6 yes
15-7 yes
15-8 yes
15-9 no
16-1 VAR yes
16-2 VAR_INPUT yes
16-3 VAR_OUTPUT yes
16-4 VAR_IN_OUT yes
16-5 VAR_EXTERNAL - not necessary because all
global variables are
accessible in every POU,
without further declaration
19-2 WAGO-I/O-PRO 32
Chapter 19 – Compliance List
t
17-4 yes array of Bool are not packed!
17-5 yes
n
17-6 yes
17-7 yes
e
17-8 yes
18-1 initial value assignment no
18-2 no
18-3 yes
m
18-4 yes array of BOOL is not packed!
18-5 yes
u
18-6 yes
18-7 yes
c
18-8 yes
18-9 yes
o
19-1 negation of inputs yes
19-2 negation of outputs yes
20-1 EN/ENO no
D
20-2 yes in free FBD/ not in structure
based FBD
20-3 yes
d
21-1 overloading yes Operators (+, - , AND, OR
etc.) are overloaded.
21-2 no There are no typed version of
e
operators. All standard- and
user functions are typed.
v
22-1 type conversation yes REAL_TO_INT rounds to the
i
nearest integer, whereas
REAL_TO_INT(x.5) is
h
equivalent to x+1
22-2 TRUNC() yes
c
22-3 BCD_TO_INT no
r
22-4 INT_TO_BCD no
23-1 ABS yes
23-2 SQRT yes
A
23-3 LN yes
23-4 LOG yes
23-5 EXP yes
23-6 SIN yes
23-7 COS yes
23-8 TAN yes
23-9 ASIN yes
23-10 ACOS yes
23-11 ATAN yes
24-12 ADD yes
24-13 MUL yes
24-14 SUB yes
24-15 DIV yes
24-16 MOD yes
WAGO-I/O-PRO 32 19-3
24-17 EXPT yes the usage of "**" as operator
is not supported
24-18 MOVE yes
25-1 SHL yes
25-2 SHR yes
25-3 ROR yes
25-4 ROL yes
26-5 AND yes
t
26-6 OR yes
26-7 XOR yes
n
26-8 NEINT yes
27-1 SEL yes
e
27-2a MAX yes as operator (only two
parameters)
27-2b MIN yes as operator (only two
parameters)
m
27-3 LIMIT yes
27-4 MUX yes
u
28-5 GT yes only two operands
28-6 GE yes only two operands
c
28-7 EQ yes only two operands
28-8 LE yes only two operands
o
28-9 LT yes only two operands
28-10 NE yes only two operands
29-1 LEN yes
D
29-2 LEFT yes
29-3 RIGHT yes
29-4 MID yes
d
29-5 CONCAT yes
29-6 INSERT yes
29-7 DELETE yes
e
29-8 REPLACE yes
29-9 FIND yes
v
30-1 date and time functions yes
i
30-2 no
30-3 no
h
30-4 yes
30-5 no
c
30-6 no
r
30-7 no
30-8 no
30-9 no
A
30-10 no
30-11 no
30-12 no
30-13 no
30-14 no
31-1 Functions of enumeration types yes
31-2 yes
31-3 yes
31-4 yes
33-1 function blocks yes
33-2 yes
33-3 yes
33-4a yes
33-4b yes
19-4 WAGO-I/O-PRO 32
Chapter 19 – Compliance List
33-5a yes
33-5b yes
33-6a yes
33-6b yes
33-7a yes
33-7b yes
33-8a no
33-8b no
t
33-9a no
33-9b no
n
34-1 SR yes
34-2 RS yes
e
34-3 SEMA yes
35-1 R_TRIG yes
35-2 F_TRIG yes
m
36-1 CTU yes
36-2 CTD yes
36-3 CTUD yes
u
37-1 TP yes
37-2a TON yes
c
37-2b T---0 no
37-3a TOF yes
o
37-3b 0---T no
37-4 RTC yes
39-1..9b program declaration - like 33-1..9b
D
39-10 no
39-11..14 - see 17-1..4
39-15-18 - see 18-1..4
d
39-19 yes
39-20 no
e
39-21 no
40-1 SFC steps yes
v
40-2 yes via import, not in editor.
i
40-3a - in non-IEC-Steps access to
step flag by step name
40-3b yes not in simple steps
h
40-4 yes not in simple steps
41-1 transitions yes in separate window
c
41-2 yes in separate window
r
41-3 yes in separate window
41-4a no
41-4b no
A
41-5 yes in separate window or via
import
41-6 yes in separate window or via
import
41-7a yes
41-7b yes
41-7c yes
41-7d yes
42-1 actions yes
42-2l yes
42-2s yes
42-2f yes
42-3s yes
42-3i yes
WAGO-I/O-PRO 32 19-5
43-1 step-action association yes
43-2 yes
43-3 yes via import, not in editor
43-4 yes in separete window, N
modifier is implicitly used,
name of action is the same as
name of step
44-1 action blocks yes
t
44-2 yes
44-3 no
n
44-4 actions programmed in IL yes in separate window
44-5 actions programmed in ST yes in separate window
44-6 actions programmed in LD yes in separate window
e
44-7 actions programmed in FBD yes in separate window
44-8 usage of actions in LD no
44-9 usage of actions in FBD no
m
45-1 action qualifier yes
45-2 yes
u
45-3 yes
45-4 yes
c
45-5 yes
45-6 yes
o
45-7 yes
45-8 yes
45-9 yes
D
45-10 yes
46-1 sequence evolution yes
46-2a yes
46-2b no
d
46-2c yes
46-3 yes
e
46-4 yes
46-5a yes
v
46-5b no
i
46-5c yes
46-6a yes using jump
h
46-6b no
46-6c yes using jump
c
46-7 no
r
49-1 configuration and resources no
49-2 no
49-3 no
A
49-4 no
49-5a no
49-5b no
49-6a no
49-6b no
49-6c no
49-7 no
49-8a no
49-8b no
49-9a no
49-9b no
49-10a no
49-10b no
49-10c no
19-6 WAGO-I/O-PRO 32
Chapter 19 – Compliance List
49-10d no
49-10e no
49-10f no
50-1a tasks yes
50-1b yes
50-2a no
50-2b no
50-3a yes
t
50-3b yes
50-4a no
n
50-4b no
50-5a yes
e
51 instruction list fields yes
52-1 instruction list operators yes
52-2 yes
m
52-3 yes
52-4 yes
52-5 no
u
52-6 yes
52-7 yes
c
52-8 yes
52-9 yes
o
52-10 yes
52-11 yes
52-12 yes
D
52-13 yes
52-14 yes
52-15 yes
d
52-16 yes
52-17 yes
52-18 yes
e
52-19 yes
52-20 yes
v
52-21 yes
i
53-1 function block invocation in IL yes
53-2 yes
h
53-3 no
54-4 function block input operators no
c
54-5 no
r
54-6 no
54-7 no
54-8 no
A
54-9 no
54-10 no
54-11 no
54-12 no
54-13 no
55-1 operators in ST yes
55-2 yes
55-3 no
55-4 yes
55-5 yes
55-6 yes
55-7 yes
55-8 yes
55-9 yes
WAGO-I/O-PRO 32 19-7
55-10 yes
55-11 yes
55-12 yes
55-13 yes
55-14 no
55-15 yes
55-16 yes
55-17 yes
t
56-1 statements in ST yes
56-2 yes
n
56-3 yes
56-4 yes
e
56-5 yes
56-6 yes
56-7 yes
56-8 yes
m
56-9 yes
56-10 yes
u
57-1 graphical languages no
57-2 yes
c
57-3 no
57-4 yes
o
57-5 no
57-6 yes in free FBD
57-7 no
D
57-8 yes in free FBD
57-9 no
57-10 yes
57-11 no
d
57-12 yes
57-13 no
e
57-14 yes in free FBD
58-1 graphic execution control (Jump yes
v
and Return)
i
58-2 yes
58-3 yes
h
58-4 yes
58-5 yes
c
58-6 yes
r
58-7 yes
58-8 yes
59-1 powerrail yes
A
59-2 yes
60-1 LD link elements yes
60-2 yes
61-1 contacts yes
61-2 yes
61-3 yes
61-4 yes
61-5 no
61-6 no
61-7 no
61-8 no
62-1 coils yes
62-2 yes
62-3 yes
19-8 WAGO-I/O-PRO 32
Chapter 19 – Compliance List
62-4 yes
62-5 no
62-6 no
62-7 no
62-8 no
62-9 no
n t
e
u m
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 19-9
n t
e
u m
o c
D
ed
iv
ch
Ar
19-10 WAGO-I/O-PRO 32
Chapter 19 – Compliance List
t
2.1.5 Maximum length of comments no limitation
2.2.3.1 Range of duration 2^32 ms = 49,71 days
n
2.3.1 Range of TIME variables 2^32 ms = 49,71 days
e
Range of TIME_OF_DAY variables 1970-01-01-00:00 – 2106-02-06-06:28:15
Range of DATE_AND_TIME variables 1970-01-01 – 2106-02-06
m
Maximum number of structure elements no limitation
u
Maximum numbers of variables per no limitation
declaration
c
2.3.3.1 Maximum number of enumerated values not supported
2.3.3.2 Default maximum length of string variables 80 characters
o
Maximum allowed length of String variables 255 characters
D
2.4.1.1 Maximaum numbers of hierachial levels 4
Logical or physical mapping physical mapping
d
2.4.1.2 Maximum number of subscripts 3
e
Maximum range of subscripts 64 KB
Maximum number of levels of structures no limitation
iv
2.4.3 Maximum number of variables per no limitation
declaration
h
2.5 Information about execution time of POUs not supported
2.5.1.1 Method of function represenation Name
c
2.5.1.5 Maximum number of inputs of extensible no limitation
r
functions
2.5.2.3.3 Pvmin of counters -32 768
A
Pvmax of counters +32 767
2.5.3 Program size limitations 32 KB
2.6.2 Precision of step elapsed time 1 ms
Maximum number of Steps per SFC no limitation
2.6.3 Maximum number of transitions per Step no limitation
and per SFC
2.6.4 Action control mechanism In simple Steps an action is executed every
cycle, when its step is active
In IEC-Steps, the execution of an action
depends on the result of the call of its action
control block
WAGO-I/O-PRO 32 19-11
2.6.4.2 Maximum number of action blocks per 1
simple step
Maximum number of action blocks per 10
IEC_Step
2.6.5 Graphic indication of step state Step becomes blue
Transition clearing time Within on controller cycle
t
Maximum width of convergence/divergence no limitation
construts
n
2.7.1 Contens of RESOURCE libraries Not supported
2.7.2 Tasks Tasks are supported with premptive or non-
e
premptive scheduling, depending on the
target.
Tasks are enabled by an event or by a timer
and can be ordered by priority (0-31).
m
3.3.2.3 Maximum number of CASE selections no limitation
u
3.3.2.4 Value of control variable upon termination of One step behind the upper limit.
FOR loop
c
4.1.1 Graphic representation Full graphics
o
Restrictions of network topology in structure Only Expression "Trees" allowed with
based FBD multiple intermediate results. That means no
splitting of output lines, except for assigning
it to a result.
D
No restrictions on network topology in free
FBD.
4.1.3 Evaluation order of feedback loops In structure based FBD, explicit loops are
d
not supported by topology. In implicit loops
the evaluation order is defined by the user.
e
In free FBD, explicit loops are supported.
v
The evaluation order is defined by the user,
i
whereas the user can define topological
evaluation order (from left to right, from top
to bottom) or data flow evaluation order
h
(from inputs to outputs).
r c
A
19-12 WAGO-I/O-PRO 32
Appendix A – Additional Libraries
t
The additional libraries are on the WAGO-I/O-PRO 32 CD.
n
The installation program is started from the D drive in the following
instructions. In case you would like to use another drive, please enter the
e
corresponding letter.
m
1. Put the WAGO-I/O-PRO 32-CD in the D drive.
u
2. In case "Autoplay" is selected in your system the set-up will be started
c
automatically. Proceed with step 6.
If the set-up is not starting automatically please proceed with step 3.
o
3. Select "Execute" in the Windows "Start" menu
4. Start the WAGO-I/O-PRO 32 set-up.
D
5. Enter "D:\setup.exe" (D is the drive with the WAGO-I/O-PRO-32-
CD) and start the set-up by clicking on "OK".
d
6. Select the set-up language.
e
The rest of the set-up is taking place via menus. Please follow the instructions
to complete the set-up. If possible the proposed settings should be adopted.
v
You will be asked for the set-up type during the installation.
i
& Click on "Additional libraries installation" and confirm with "Next".
h
A dialog appears to select the libraries.
c
& Select the components you would like to install and delete the ones you
r
wouldn’t like to install.
WAGO-I/O-PRO 32 A-1
n t
e
u m
o c
D
ed
iv
ch
Ar
A-2 WAGO-I/O-PRO 32
Appendix A – Additional Libraries
Contens
Fbusconf.lib*
InterBusS.lib*
Mod_com.lib*
Standard.lib*
System.lib*
n t
e
*These libraries are ready installed in WAGO-I/O-PRO 32.
u m
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 A-3
n t
e
u m
o c
D
ed
iv
ch
Ar
A-4 WAGO-I/O-PRO 32
Appendix A – Additional Libraries
WAGO-I/O-PRO 32 Library
Fbusconf.lib
n t
e
m
Contens
u
FbusConf_Version........................................................................................3
c
FieldbusConfiguration ..................................................................................5
ReadFieldbusConfiguration..........................................................................9
o
D
ed
iv
ch
A r
FbusConf_Version
t
Name: FbusConf_Version
Type: Function x Function block Program
n
Library name: Fbusconf.lib
Applicable to: 750-812, 750-814, 750-815 and 750-816
(all MODBUS Controllers)
e
Input parameter: Data type: Comments:
m
EN BOOL A TRUE at this input activates this
function.
u
Feedback value: Data type: Comments:
c
VERSION WORD Library version
o
Graphic display:
D
ed
Time behaviour:
iv
EN
FbusConf_Version
ch
r
Function description:
The FbusConf_Version function feeds back the current version number of the library.
A
This function can be used during program development for information purposes. In
addition, version related conflicts can be avoided during the running time.
n t
e
u m
o c
D
ed
iv
ch
A r
FieldbusConfiguration
t
Library name: Fbusconf.lib
Applicable to: 750-812, 750-814, 750-815 und 750-816
n
(all MODBUS controllers)
e
Input parameter: Data type: Comments:
STARTWORKING BOOL A TRUE at this input activates the
function block. It is only performed
m
once. If parameters are to be changed
several times, the FB can be set
u
several times from FALSE to TRUE.
BAUD RATE WORD Table index for the Baud rate. [0..7]
c
BYTEFRAME WORD Table index for parity and number of
stop bits. [0..3]
o
DATALENGTH BOOL TRUE = 7 Bit, FALSE = 8 Bit
D
telegram (END of Frame). [0..7]
ASCIIRTUMODE BOOL TRUE = RTU Mode,
FALSE = ASCII Mode
d
ERRORCHECKING BOOL TRUE = Protocol check activated,
FALSE = protocol check is not required
(Error Check) Note: the check sum
e
must be transmitted, even with false
values.
v
EXTENDEDFUNCTIONS BOOL TRUE = Access to the extended
i
parameter is possible,
FALSE = access is protected.
h
NOWATCHDOG BOOL TRUE = Watchdog cannot be activated,
FALSE = Watchdog can be activated.
r c
Output parameter: Data type: Comments:
RESULT BOOL TRUE as soon as the function block is
started. Becomes FALSE if the
A
parameters were already set.
Graphical display:
n t
e
Time behaviour:
u m
c
STARTWORKING
o
RESULT
Parameter
Function description:
D
d
This function block allows the programmer to configure the modbus interface. As
e
opposed to the 750-3xx Modbus coupler the parameters are set here by means of
function blocks. The parameters correspond to the setting of the Dil switches.
v
Special SW Tools are no longer necessary. If the function block is also recorded in
i
the user program, the automatic configuration is performed even following a
controller change over. The settings are taken over in the controller parameter block.
If the required parameters are not already set, a software reset is automatically
h
made in Bus operation and the controller restarts with the selected parameters. The
function can be appended to the PLC cycle and is performed only once with a
c
constantly applied TRUE at the INPUT STARTWORKING.
r
If the controller is only to be configured once independent of the machine
configuration, a program comprising of only one POU can be downloaded from the
A
programming system and started. A software reset is not performed when operating
on the programming system.
150 Bd 38400 Bd 0
300 Bd 57600 Bd 1
t
600 Bd 115200 Bd 2
1200 Bd 1200 Bd 3
n
2400 Bd 2400 Bd 4
4800 Bd 4800 Bd 5
e
9600 Bd 9600 Bd 6
19200 Bd 19200 Bd 7
m
Byte Frame Data Stop DATA BYTEFRAME
length bits LENGTH value
u
value
c
no Parity 8 bit 1 FALSE 0
even Parity 8 bit 1 FALSE 1
o
odd Parity 8 bit 1 FALSE 2
no Parity 8 bit 2 FALSE 3
no Parity 7 bit 2 TRUE 0
D
even Parity 7 bit 1 TRUE 1
odd Parity 7 bit 1 TRUE 2
no Parity 7 bit 3 TRUE 3
d
End of Frame ENDOFFRAMETIME
e
Value
v
3 x Byteframe
i
0
Time
100 ms 1
h
200 ms 2
c
500 ms 3
1s 4
r
1 ms 5
10 ms 6
A
50 ms 7
n t
e
u m
o c
D
ed
iv
ch
A r
ReadFieldbusConfiguration
t
Library name: Fbusconf.lib
Applicable to: 750-812, 750-814, 750-815 und 750-816
n
(all MODBUS controllers)
e
Input parameter: Data type: Comments:
EN BOOL A TRUE at this input activates the
function block.
m
Output parameters: Data type: Comments:
u
BAUDRATE WORD Table index for the Baud rate. [0..7]
BYTEFRAME WORD Table index for parity and number of
c
stop bits. [0..3]
DATALENGTH BOOL TRUE = 7 Bit, FALSE = 8 Bit
o
ENDOFFRAMETIME WORD Table index for end recognition of a
telegram (END of Frame). [0..7]
ASCIIRTUMODE BOOL TRUE = RTU Mode,
D
FALSE = ASCII Mode
ERRORCHECKING BOOL TRUE = Protocol check activated,
FALSE = a protocol check is not made
d
(Error Check) Note: the check sum
must in all cases be transmitted, even
e
with false values.
EXTENDEDFUNCTIONS BOOL TRUE = access is possible to the
v
extended parameters,
i
FALSE = access is prohibited.
NOWATCHDOG BOOL TRUE = Watchdog cannot be activated,
h
FALSE = Watchdog can be activated.
r c
A
Graphic display:
n t
e
m
Time behaviour:
u
EN
Result
Function description:
o c
D
This function block reads the current configuration of the MODBUS interface.
d
750-812, 750-815, Value
750-814 750-816
e
150 Bd 38400 Bd 0
v
300 Bd 57600 Bd 1
i
600 Bd 115200 Bd 2
1200 Bd 1200 Bd 3
h
2400 Bd 2400 Bd 4
4800 Bd 4800 Bd 5
c
9600 Bd 9600 Bd 6
r
19200 Bd 19200 Bd 7
t
Parity
odd 8 bit 1 FALSE 2
n
Parity
no Parity 8 bit 2 FALSE 3
e
no Parity 7 bit 2 TRUE 0
even 7 bit 1 TRUE 1
Parity
m
odd 7 bit 1 TRUE 2
Parity
no Parity 7 bit 3 TRUE 3
c u
End of ENDOFFRAMETIME
Frame Value
o
3 x Byteframe 0
Time
D
100 ms 1
200 ms 2
500 ms 3
d
1s 4
1 ms 5
e
10 ms 6
50 ms 7
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 Library
InterBusS.lib
n t
e
m
Contens
u
IBS_READ_CONFIGURATION ................................................................3
c
IBS_READ_PI_CONFIGURATION...........................................................5
IBS_SET_PI_CONFIGURATION ............................................................11
o
INTERBUS_VERSION .............................................................................17
Appendix ....................................................................................................19
ID codes for InterBus-S controller 750-804 ...................................19
D
Data width for InterBus-S controller 750-804................................20
Table to determine the data width for InterBus-S controller 750-
804 ..................................................................................................21
ed
iv
ch
A r
IBS_READ_CONFIGURATION
t
Name: IBS_READ_CONFIGURATION
Type: Function Function block x Program
n
Library name: INTERBUSS.LIB
Applicable to: InterBus-S controller 750-804
e
Input parameters: Data type: Comments:
EN BOOL FB execution control. The function is
m
executed on a rising edge at EN.
u
Return value: Data type: Comments:
ENO BOOL FB execution result. ENO is TRUE as
c
long as EN is TRUE.
LEN BYTE Length of fieldbus data. It may be
different to the size of the PI transferred
o
via the fieldbus because InterBus-S
does not support all possible data
length.
D
ID BYTE Currently used module ID Code
1: Digital Output
2: Digital Input
d
3: Mixed Digital
49: Analog Output
51: Analog Input
e
52: Mixed Analog
v
ERROR WORD Error argument.
i
0: no error
1: function not supported
ch
A r
t
VAR_OUTPUT
ENO: BOOL;
LEN:BYTE;
n
ID:BYTE;
ERROR:WORD;
END_VAR
Graphic display:
e
u m
o c
D
Time behaviour:
d
EN
ENO
e
LEN, ID, ERROR
iv
Function description:
h
This function block reads the length of the fieldbus data set by the configuration of
c
the IBS_SET_PI_CONFIGURATION function block.
r
See also: IBS_SET_PI_CONFIGURATION, IBS_READ_PI_CONFIGURATION,
IBS_READ_PI_CONFIGURATION
t
Library name: INTERBUSS.LIB
Applicable to: InterBus-S controller 750-804
n
Input parameter: Data type: Comments:
e
EN BOOL FB execution control. The function is
executed on a rising edge at EN.
m
Output parameter: Data type: Comments:
ENO BOOL FB execution result. ENO is TRUE as long
u
as EN is TRUE.
SP1TO8 BYTE Bit field to configure the special purpose
c
process image data. This data is mapped
to the first position of the PI transferred via
o
the fieldbus.
SP1TO8.0 0 = PI communication
interface is disabled.
D
1 = PI communication
interface is enabled.
Communication data transfer
uses the first word of the PI.
d
SP1TO8.1 0 = extended terminal
diagnostics disabled.
e
1 = extended terminal
diagnostics enabled.
v
Diagnostic data transfer uses
i
the first word of the PI if
SP1TO8.0 = 0. If the
h
communication interface is
enabled (SP1TO8.0 = 1), then
diagnostics data uses the
c
second word of the PI.
r
SP1TO8.2 0 = initialise fieldbus controller
after power on.
1 = initialise fieldbus
A
controller after execution of
SET_PI_CONFIGURATION.
SP1TO8.3 0 = set PI length according to
modules configuration
1 = set PI to maximum data
length ( 64 bytes)
SP1TO8.4 0 = PLC access to fieldbus
terminals is enabled
1= PLC access to fieldbus
terminals is disabled
t
M09TO16 BYTE Bit field to configure the process image
data transferred via the fieldbus. The data
n
of each module can be mapped into the PI.
th
xxxxxxx1: 9 modules data mapped to PI
e
th
xxxxxx1x: 10 modules data mapped to PI
…
th
1xxxxxxx: 16 modules data mapped to PI
M17TO24 BYTE Bit field to configure the process image
m
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
u
th
xxxxxxx1: 17 modules data mapped to PI
th
xxxxxx1x: 18 modules data mapped to PI
c
…
th
1xxxxxxx: 24 modules data mapped to PI
o
M25TO32 BYTE Bit field to configure the process image
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
th
xxxxxxx1: 25 modules data mapped to PI
D
th
xxxxxx1x: 26 modules data mapped to PI
…
th
1xxxxxxx: 32 modules data mapped to PI
d
M33TO40 BYTE Bit field to configure the process image
data transferred via the fieldbus. The data
e
of each module can be mapped into the PI.
th
xxxxxxx1: 33 module data mapped to PI
th
v
xxxxxx1x: 34 module data mapped to PI
i
…
th
1xxxxxxx: 40 module data mapped to PI
M41TO48 BYTE Bit field to configure the process image
h
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
c
th
xxxxxxx1: 41 module data mapped to PI
r
th
xxxxxx1x: 42 module data mapped to PI
…
th
1xxxxxxx: 48 module data mapped to PI
A
M49TO56 BYTE Bit field to configure the process image
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
th
xxxxxxx1: 49 module data mapped to PI
th
xxxxxx1x: 50 module data mapped to PI
…
th
1xxxxxxx: 56 module data mapped to PI
t
PLC_IN_LEN BYTE Number of bytes of the PLC input process
image appended to the PI transferred via
n
the fieldbus. These bytes are added to the
end (behind modules data) starting at a
e
word address. If the number of IO Bytes is
odd a spare byte is added.
PLC_OUT_LEN BYTE Number of bytes of the PLC process
output image appended to the PI
m
transferred via the fieldbus. These bytes
are added to the end (behind modules
u
data) starting at a word address. If the
number of IO Bytes is odd a spare byte is
c
added.
ID_CODE BYTE Currently configured module ID Code
0: Auto Id code based on module
o
configuration.
1: digital outputs
2: digital inputs
D
3: digital inputs and outputs
49: analog outputs
51: analog inputs
d
52: analog inputs and outputs
ERROR WORD Error argument.
0x0000: no error
e
0x0001: function not supported
0x8001: ID_CODE invalid
v
0x8003: PLC_IN_LEN invalid
i
0x8004: PLC_OUT_LEN invalid
ch
A r
Header:
FUNCTIONBLOCK IBS_READ_PI_CONFIGURATION
VAR_INPUT
EN: BOOL;
END_VAR
VAR_OUTPUT
ENO: BOOL;
t
SP1TO8:BYTE;
M01TO08:BYTE;
M09TO16:BYTE;
n
M17TO24:BYTE;
M25TO32:BYTE;
M33TO40:BYTE;
e
M41TO48:BYTE;
M49TO56:BYTE;
M57TO64:BYTE;
PLC_IN_LEN:BYTE;
PLC_OUT_LEN:BYTE;
m
ID_CODE:BYTE;
ERROR:WORD;
END_VAR
Graphic display:
c u
o
D
ed
iv
ch
A r Timing diagram:
EN
ENO
SP1TO8, MxxTOxx,PLC_IN_LEN,
PLC_OUT_LEN,ID_CODE, ERROR
Functional description:
The output SP1TO8 indicates which special controller data is mapped, e.g. the
t
process image communication of the data word in the fieldbus data. It indicates in
addition whether the PLC access to the module data is released or locked.
n
The outputs MxxTOxx indicate which module data is mapped in the process image.
e
In addition the number of PLC fieldbus data which can be processed by the PLC.
u m
o c
D
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
IBS_SET_PI_CONFIGURATION
t
Category: InterBus S Fieldbus Communication
Name: IBS_SET_PI_CONFIGURATION
n
Type: Function Function block X Program
Library name: INTERBUSS.LIB
e
Applicable to: InterBus-S controller 750-804
m
EN BOOL FB execution control. The function block is
executed on a rising edge at EN.
u
SP1TO8 BYTE Bit field to configure the special purpose
process image data. This data is mapped
to the first position of the PI transferred via
c
the fieldbus.
SP1TO8.0 0 = PI communication
o
interface is disabled.
1 = PI communication
interface is enabled.
D
Communication data transfer
uses the first word of the PI.
SP1TO8.1 0 = extended terminal
d
diagnostics disabled.
1 = extended terminal
diagnostics enabled.
e
Diagnostic data transfer uses
the first word of the PI if
v
SP1TO8.0 = 0. If the
i
communication interface is
enabled (SP1TO8.0 = 1), then
h
diagnostics data uses the
second word of the PI.
c
SP1TO8.2 0 = initialise fieldbus controller
after power on.
r
1 = initialise fieldbus
controller after execution of
SET_PI_CONFIGURATION.
A
SP1TO8.3 0 = set PI length according to
modules configuration
1 = set PI to maximum data
length ( 64 bytes)
SP1TO8.4 0 = PLC access to fieldbus
terminals is enabled
1= PLC access to fieldbus
terminals is disabled
t
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
n
th
xxxxxxx1: 9 modules data mapped to PI
th
xxxxxx1x: 10 modules data mapped to PI
…
e
th
1xxxxxxx: 16 modules data mapped to PI
M17TO24 BYTE Bit field to configure the process image
data transferred via the fieldbus. The data
m
of each module can be mapped into the PI.
th
xxxxxxx1: 17 modules data mapped to PI
u
th
xxxxxx1x: 18 modules data mapped to PI
…
c
th
1xxxxxxx: 24 modules data mapped to PI
M25TO32 BYTE Bit field to configure the process image
o
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
th
xxxxxxx1: 25 modules data mapped to PI
D
th
xxxxxx1x: 26 modules data mapped to PI
…
th
1xxxxxxx: 32 modules data mapped to PI
M33TO40 BYTE Bit field to configure the process image
d
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
e
th
xxxxxxx1: 33 module data mapped to PI
th
xxxxxx1x: 34 module data mapped to PI
v
…
i
th
1xxxxxxx: 40 module data mapped to PI
M41TO48 BYTE Bit field to configure the process image
h
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
c
th
xxxxxxx1: 41 module data mapped to PI
th
r
xxxxxx1x: 42 module data mapped to PI
…
th
1xxxxxxx: 48 module data mapped to PI
A
M49TO56 BYTE Bit field to configure the process image
data transferred via the fieldbus. The data
of each module can be mapped into the PI.
th
xxxxxxx1: 49 module data mapped to PI
th
xxxxxx1x: 50 module data mapped to PI
…
th
1xxxxxxx: 56 module data mapped to PI
t
PLC_IN_LEN BYTE Number of bytes of the PLC input process
n
image appended to the PI transferred via
the fieldbus. These bytes are added to the
e
PI behind the modules data starting at a
word address. If the number of IO Bytes is
odd a spare byte is added.
PLC_OUT_LEN BYTE Number of bytes of the PLC process
m
output image appended to the PI
transferred via the fieldbus. These bytes
u
are added to the PI behind the modules
data starting at a word address. If the
c
number of IO Bytes is odd a spare byte is
added.
ID_CODE BYTE Module ID Code
o
0: Automatic ID code, based on module
configuration.
1: Digital output
D
2: Digital input
3: Mixed digital inputs and outputs
49: Analog output
d
51: Analog input
52: Mixed analog inputs and outputs
Output parameter: Data type: Comments:
e
ENO BOOL FB execution result. ENO is TRUE as long
v
as EN is TRUE.
i
LEN BYTE Length of fieldbus data. It may be different
to the set value because InterBus-S does
not support all possible data length.
h
ID BYTE Node ID code. If the ID_CODE was set to
0 the return value for ID depends on
c
module configuration. In other cases it
r
returns ID_CODE.
ERROR WORD Error argument.
0x0000: no error
A
0x0001 : function not supported
0x8000 : unknown error
0x8001 : invalid ID_CODE specified
0x8002 : invalid length detected
0x8003 : PLC_IN_LEN > 64 bytes
0x8004 : PLC_OUT_LEN > 64 bytes
0x8005 : total input data length > 64 bytes
0x8006 : total output data length > 64
bytes
Header:
FUNCTIONBLOCK IBS_SET_PI_CONFIGURATION
VAR_INPUT
EN: BOOL;
SP1TO8:BYTE;
M01TO08:BYTE;
M09TO16:BYTE;
t
M17TO24:BYTE;
M25TO32:BYTE;
M33TO40:BYTE;
n
M41TO48:BYTE;
M49TO56:BYTE;
M57TO64:BYTE;
e
PLC_IN_LEN:BYTE;
PLC_OUT_LEN:BYTE;
ID_CODE:BYTE;
END_VAR
VAR_OUTPUT
m
ENO: BOOL;
LEN:BYTE;
ID:BYTE;
u
ERROR:WORD;
END_VAR
c
Graphic display:
o
D
ed
iv
ch
A r Timing diagram:
EN
Functional description:
This function sets the configuration of the process image. Since the process image
transferred via the fieldbus is limited to 32 words, it may be helpful to configure the
portion of data transferred to the master.
t
The inputs MxxTOxx specify which modules data is mapped into the PI.
n
SP1TO8 let users map special controller data e.g. the PI communication data word
into the fieldbus data.
e
It is also possible to set the number of PLC fieldbus data that can be accessed by
the PLC via IO addresses %IX256.0 %IB512 %IW256 or %ID128 and %QX256.0
%QB512 %QW256 or %QD128.
m
PLC fieldbus data
u
---Special data----------Module data----------Inputs / Outputs---
Process image
c
See also: IBS_READ_PI_CONFIGURATION, IBS_READ_CONFIGURATION,
o
D
ed
iv
ch
A r
INTERBUS_VERSION
t
Library name: INTERBUSS.LIB
Applicable to:
n
Input parameter: Data type: Comments:
e
EN BOOL FB execution control. The function is
executed if EN is TRUE.
m
Return value: Data type: Comments:
INTERBUS_VERSION WORD Version number for this library.
u
Counting starts at 1.
c
Header:
o
FUNCTION INTERBUS_VERSION : WORD
VAR_INPUT
EN: BOOL;
END_VAR
Graphic display:
D
ed
iv Timing diagram:
ch
EN
r
INTERBUS_VERSION
A
Function description:
The function INTERBUS_VERSION returns the current version number of the library
„InterBusS.lib“. It is for information purposes only during PLC application
development time. During runtime it is possible to detect version conflicts.
Version: Description:
1.0 Start-up version
n t
e
u m
o c
D
ed
iv
ch
A r
Appendix
ID code
dez, hex
1, 0x1
Binary
output
x
Binary
input
Digital
output
Digital
output
n t
e
2, 0x2 x
3, 0x3 x x
49, 0x31 - x
m
50, 0x32 - x
51, 0x33 - - x x
u
[x]: available
[ ]: is not available
c
[-]: could also be available
o
The InterBus-S controller 750-804 is a remote bus slave
D
ed
iv
ch
A r
t
Possible values for the data width are :
n
Data width Fieldbus Remarks
controller
e
0 word x
1 nibble bus master support only with Generation 4 devices
1 byte from SPS firmware 3.20 or PC driver 2.0
m
3 nibbles bus master support only with Generation 4 devices
1 word x
3 nibbles bus master support only with Generation 4 devices
u
3 bytes from SPS firmware 3.20 or PC driver 2.0
2 words x
c
5 nibbles bus master support only with Generation 4 devices
5 bytes from SPS firmware 3.20 or PC driver 2.0
o
3 words x
4 words x
5 words x
D
6 words x, from WF from SPS firmware 3.20 or PC driver 2.0
7 words x, from WF from SPS firmware 3.20 or PC driver 2.0
8 words x
d
9 words x
10 words xx from SPS firmware 3.20 or PC driver 2.0
12 words xx from SPS firmware 3.20 or PC driver 2.0
e
14 words xx from SPS firmware 3.20 or PC driver 2.0
16 words xx from SPS firmware 3.20 or PC driver 2.0
v
24 words xx from SPS firmware 3.20 or PC driver 2.0
i
32 words xx from SPS firmware 3.20 or PC driver 2.0
h
[x]: used, [x, from WF]: used with couplers from firmware WF,
c
[xx]: used, and requires firmware 3.20 or PC driver 2.0.
A r
t
0 0 1 2 3 4 5 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
1 1 1 2 3 4 5 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
2 2 2 2 3 4 5 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
n
3 3 3 3 3 4 5 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
4 4 4 4 4 4 5 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
5 5 5 5 5 5 5 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
e
6 6 6 6 6 6 6 6 7 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
7 7 7 7 7 7 7 7 8 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
8 8 8 8 8 8 8 8 8 8 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
9 9 9 9 9 9 9 9 9 9 9 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
10 10 10 10 10 10 10 10 10 10 10 10 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
m
11 12 12 12 12 12 12 12 12 12 12 12 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
12 12 12 12 12 12 12 12 12 12 12 12 12 12 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
13 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
u
15 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
17 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
c
18 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
19 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
20 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
o
21 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
22 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
23 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 32 32 32 32 32 32 32 32
25 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
D
26 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
27 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
28 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
30 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
d
31 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
v e
h i
r c
A
n t
e
u m
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 Library
Mod_com.lib
n t
e
m
Contens
u
CRC16 ..........................................................................................................3
c
FBUS_ERROR_INFORMATION...............................................................4
GET_DIGITAL_INPUT_OFFSET ..............................................................5
o
GET_DIGITAL_OUTPUT_OFFSET ..........................................................7
KBUS_ERROR_INFORMATION ..............................................................9
MOD_COM_VERSION ............................................................................10
D
PI_INFORMATION...................................................................................12
READ_INPUT_BIT ...................................................................................13
READ_INPUT_WORD .............................................................................14
d
READ_OUTPUT_BIT ...............................................................................15
READ_OUTPUT_WORD .........................................................................16
e
SET_DIGITAL_INPUT_OFFSET.............................................................17
v
SET_DIGITAL_OUTPUT_OFFSET.........................................................19
i
SLAVE_ADDRESS ...................................................................................21
WRITE_OUTPUT_BIT .............................................................................22
h
WRITE_OUTPUT_WORD........................................................................23
r c
A
CRC16
t
Name: CRC16
Type: Function Function block X Program
n
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
e
Input parameters: Data type: Comments:
INPUT BYTE Further input byte for which a CRC is to
m
be calculated.
EN BOOL A rising edge at this input signals the
initialisation of the function block and
u
calculates the CRC for the first byte.
With TRUE the CRC is calculated on
c
each of the following bytes. With
FALSE no calculation is performed.
o
Output parameters: Data type: Comments:
CRC WORD The calculated value for the CRC. The
D
CRC value is present at this output
following each invocation.
d
Graphic display:
v e
h i
c
Time behaviour:
r
INPUT
EN
A
CRC
Function description:
The CTC 16 function block calculates the CRC16 value for a number of input bytes.
FBUS_ERROR_INFORMATION
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
m
FBUS_ERROR BOOL A TRUE at this output indicates a
fieldbus error.
u
ERROR WORD Error occurred. The error messages are
fieldbus specific (see individual
c
controller description).
o
Graphic display:
D
ed
Time behaviour:
iv
h
Function description:
c
This function block offers the programmer the possibility to obtain information on the
r
status of the fieldbus communication. The values of the ERROR output are fieldbus
specific.
A
With MODBUS for instance, the current status of the communication monitoring
(Watchdog) is indicated. (0: no error, 1: Watchdog has detected „time exceeded".)
GET_DIGITAL_INPUT_OFFSET
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
m
DIG_IN_OFFSET WORD Pre-assigned value for the byte address
from which the bits of the digital input
u
modules are to be filed. The
permissible value range is 0..511.
c
ERROR WORD Fault encountered.
0: No fault
o
0x8001: The given value is too small
and will collide with the analog data.
0x8003: The given value is too large
D
and will collide with the variable ranges.
0x8005: The given value is larger than
the maximum permissible value.
d
Header:
e
FUNCTION_BLOCK GET_DIGITAL_INPUT_OFFSET
v
VAR_OUTPUT
i
DIG_IN_OFFSET: WORD;
ERROR: WORD;
END_VAR
ch
r
Graphic display:
Time behaviour:
Function description:
t
This function reads the current value of the saved address offset for the digital
inputs. The value is pre-assigned with the function block
n
SET_DIGITAL_INPUT_OFFSET and permanently saved in the controller. The read
value is identical with the pre-assigned value. In case of a fault the output ERROR of
e
the FB is set to a value not equal to 0. No communication takes place between the
controller and the modules. This status is displayed via the blink code 10 by the blink
argument 1 on the IO LED of the controller.
m
The default value when supplying the controllers is 0. As the value is saved
permanently, for safety reasons the value should be set once again in the user
u
program.
c
The current start address for the bits of the digital inputs can be interrogated with the
FB PI_INFORMATION. The output INPUTBITS_OFFSET emits the value.
o
D
ed
iv
ch
A r
GET_DIGITAL_OUTPUT_OFFSET
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
m
DIG_OUT_OFFSET WORD Pre-assigned value for the byte address
from which the bits of the digital output
u
modules are to be filed. The
permissible value range is 0..511.
c
ERROR WORD Fault encountered.
0: No fault
o
0x8002: The given value is too small
and will collide with the analogue data.
0x8004: The given value is too large
D
and will collide with the variable ranges.
0x8006: The given value is larger than
the maximum permissible value.
d
Header:
e
FUNCTION_BLOCK GET_DIGITAL_OUTPUT_OFFSET
v
VAR_OUTPUT
i
DIG_OUT_OFFSET: WORD;
ERROR: WORD;
END_VAR
ch
r
Graphic display:
Time behaviour:
Function description:
t
This function reads the current value of the saved address offset for the digital
outputs. The value is pre-assigned with the function block
n
SET_DIGITAL_OUTPUT_OFFSET and permanently saved in the controller. The
read value is identical with the pre-assigned value. In case of a fault the output
e
ERROR of the FB is set to a value not equal to 0. No communication takes place
between the controller and the modules. This status is displayed via the blink code
10 by the blink argument 1 on the IO LED of the controller.
m
The default value when supplying the controllers is 0. As the value is saved
permanently, for safety reasons the value should be set once again in the user
u
program.
c
The current start address for the bits of the digital outputs can be interrogated with
the FB PI_INFORMATION. The output OUTPUTBITS_OFFSET emits the value.
o
D
ed
iv
ch
A r
KBUS_ERROR_INFORMATION
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
m
KBUS_ERROR BOOL A TRUE at this output indicates a
terminal bus error.
u
BITLEN WORD Terminal bus bit length
c
TERMINALS WORD Number of existing terminals blocks
ERROR WORD
o
ERROR_ARG WORD
FAIL_ADDRESS WORD In the event of a terminal bus error
indicates the terminal number where
D
the error has occurred.
Graphic display:
ed
iv
ch
A r Time behaviour:
Function description:
This function block offers the programmer the possibility of receiving information
about the condition and configuration of the internal bus.
MOD_COM_VERSION
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
EN BOOL A TRUE at this input actives this
function.
m
Return value: Data type: Comments:
MOD_COM_VERSION WORD Library version
c u
Graphic display:
o
D
d
Time behaviour:
e
EN
v
MOD_COM_VERSION
h i
Function description:
c
The function of the MOD_COM_VERSION returns the current version number of the
r
library. This function can be used during the program development for information. In
addition version conflicts during the running time can be avoided.
Version: Description:
1.0 First version
1.1 The function blocks READ_OUTPUT_WORD and
READ_OUTPUT_BIT were supplemented.
2.0 The function blocks GET_DIGITAL_INPUT_OFFSET,
GET_DIGITAL_OUTPUT_OFFSET,
t
SET_DIGITAL_INPUT_OFFSET and
SET_DIGITAL_OUTPUT_OFFSET were supplemented.
e n
u m
o c
D
ed
iv
ch
A r
PI_INFORMATION
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
m
ANALOG_OUTLENGTH WORD Number of analog output bits
u
ANALOG_INLENGTH WORD Number of analog input bits
DIGITAL_OUTLENGTH WORD Number of digital output bits
c
DIGITAL_INLENGTH WORD Number of digital input bits
OUTPUTBITS_OFFSET WORD Number of bytes
o
INPUTBITS_OFFSET WORD Number of bytes
Graphic display:
D
ed
iv
ch
r
Time behaviour:
A Function description:
This function block offers the programmer the possibility to obtain information about
the structure of the process image.
READ_INPUT_BIT
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
WORD_ADDRESS WORD Here the word address of the bit in the
process image is transferred.
BIT_ADDRESS WORD Here the bit position in the word is
m
transferred.
u
Output parameters: Data type: Comments:
VALUE BOOL Current value of the read bit
c
ERROR BOOL TRUE in case an error has occurred.
Possible errors are an inadmissible
o
address. Otherwise FALSE
Graphic display:
D
ed
iv
h
Time behaviour:
r c
WORD_ADDRESS
BIT_ADDRESS
VALUE
A
ERROR
Function description:
This function block offers the programmer the possibility of indirect access to the
process image. The current value of the input bit is made available immediately after
invoking the FB at the outputs. The function block must be used with particular care
as here the guidelines of IEC 61131-3 „all addresses are assigned at the time of
programming and during the running time“ are not adhered to.
READ_INPUT_WORD
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
WORD_ADDRESS WORD Here the word address of the word is
transferred to the process image.
m
Output parameters: Data type: Comments:
VALUE WORD Current value of the read word
u
ERROR BOOL TRUE if an error has occurred. Possible
errors are an inadmissible address,
c
otherwise FALSE
o
Graphic display:
D
ed
iv
Time behaviour:
h
WORD_ADDRESS
c
VALUE
r
ERROR
A
Function description:
This function block offers the programmer the possibility of indirect access to the
process image. The current value of the input word is made available immediately
after invoking the FB at the outputs. The function block must be used with particular
care as here the guidelines of IEC 61131-3 „all addresses are assigned at the time
of programming and during the running time“ are not adhered to.
READ_OUTPUT_BIT
t
Library name: Mod_com.lib (from Version 1.1)
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
WORD_ADDRESS WORD Here the word address of the bit are
transferred to the process image.
BIT_ADDRESS WORD Here the bit position in the word is
m
transferred.
u
Output parameters: Data type: Comments:
VALUE BOOL Current value of the read bit
c
ERROR BOOL TRUE if an error has occurred. Possible
errors are an inadmissible address,
o
otherwise FALSE
Graphic display:
D
ed
iv
Time behaviour:
h
WORD_ADDRESS
c
BIT_ADDRESS
r
VALUE
ERROR
A Function description:
This function block offers the programmer the possibility of indirect access to the
process image. The current value of the output bit is made available immediately
after invoking the FB at the outputs. The function block must be used with particular
care as here the guidelines of IEC 61131-3 „all addresses are assigned at the time
of programming and during the running time“ are not adhered to.
READ_OUTPUT_WORD
t
Library name: Mod_com.lib (from Version 1.1)
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
WORD_ADDRESS WORD Here the word address of the bits are
transferred to the process image.
m
Output parameters: Data type: Comments:
VALUE WORD Current value of the read bit
u
ERROR BOOL TRUE if an error has occurred. Possible
errors are an inadmissible address,
c
otherwise FALSE
o
Graphic display:
D
ed
Time behaviour:
iv
WORD_ADDRESS
h
VALUE
ERROR
r c
Function description:
A
This function block offers the programmer the possibility of indirect access to the
process image. The current value of the output word is made available immediately
after invoking the FB at the outputs. The function block must be used with particular
care as here the guidelines of IEC 61131-3 „all addresses are assigned at the time
of programming and during the running time“ are not adhered to.
SET_DIGITAL_INPUT_OFFSET
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
EN BOOL FB execution control. The function
block is executed on a rising edge at
EN.
m
DIG_IN_OFFSET WORD Byte address, from where the bits of the
digital input modules are to be filed.
u
The permissible value range is 0..511.
With the assignment of 0 the digital
c
inputs are saved directly behind the
bytes of the analogue modules, if
analogue modules are present.
o
Output parameters: Data type: Comments:
D
ENO BOOL FB execution result. ENO is TRUE as
long as EN is TRUE.
ERROR WORD Fault encountered.
d
0: No fault
0x8001: The given value is too small
and will collide with the analogue data.
e
0x8003: The given value is too large
and will collide with the variable ranges.
iv
0x8005: The given value is larger than
the maximum permissible value.
h
Header:
c
FUNCTION_BLOCK SET_DIGITAL_INPUT_OFFSET
r
VAR_INPUT
EN: BOOL;
DIG_IN_OFFSET: WORD;
A
END_VAR
VAR_OUTPUT
ENO: BOOL;
ERROR: WORD;
END_VAR
Graphic display:
Time behaviour:
n t
e
EN
DIG_IN_OFFSET
m
ENO
ERROR
Function description:
c u
o
This function sets the address offsets current value for the digital inputs. The
changed configuration is used when reading the input PA during the next PLC cycle.
D
The value is permanently saved in the controller.
When entering an invalid offset value the controller transmits the blink code 10 with
d
the blink argument 1. The data exchange between the controller and the modules is
stopped.
e
The default value when supplying the controllers is 0. As the value is saved
v
permanently, for safety reasons the value should be set once again in the user
i
program.
h
The saved value can be read with the FB GET_DIGITAL_INPUT_OFFSET.
The current start address for the bits of the digital outputs can be interrogated with
c
the FB PI_INFORMATION. The output INPUTBITS_OFFSET emits the value.
A r
SET_DIGITAL_OUTPUT_OFFSET
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
EN BOOL FB execution control. The function
block is executed on a rising edge at
EN.
m
DIG_OUT_OFFSET WORD Byte address, from where the bits of the
digital output modules are to be filed.
u
The permissible value range is 0..511.
With the assignment of 0 the digital
c
outputs are saved directly behind the
bytes of the analogue modules, if
analogue modules are present.
o
Output parameters: Data type: Comments:
D
ENO BOOL FB execution result. ENO is TRUE as
long as EN is TRUE.
ERROR WORD Fault encountered.
d
0: No fault
0x8002: The given value is too small
and will collide with the analogue data.
e
0x8004: The given value is too large
and will collide with the variable ranges.
iv
0x8006: The given value is larger than
the maximum permissible value.
h
Header:
c
FUNCTION_BLOCK SET_DIGITAL_OUTPUT_OFFSET
r
VAR_INPUT
EN: BOOL;
DIG_OUT_OFFSET: WORD;
A
END_VAR
VAR_OUTPUT
ENO: BOOL;
ERROR: WORD;
END_VAR
Graphic display:
Time behaviour:
n t
e
EN
DIG_OUT_OFFSET
m
ENO
u
ERROR
Function description:
o c
This function sets the address offsets current value for the digital outputs. The
D
changed configuration is used when writing the output PA during the next PLC cycle.
The value is permanently saved in the controller.
d
When entering an invalid offset value the controller transmits the blink code 10 with
the blink argument 2. The data exchange between the controller and the modules is
e
stopped.
The default value when supplying the controllers is 0. As the value is saved
v
permanently, for safety reasons the value should be set once again in the user
i
program.
h
The saved value can be read with the FB GET_DIGITAL_OUTPUT_OFFSET.
The current start address for the bits of the digital outputs can be interrogated with
c
the FB PI_INFORMATION. The output OUTPUTBITS_OFFSET emits the value.
A r
SLAVE_ADDRESS
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
m
SLAVE_ADDRESS BYTE The current node address.
u
Graphic display:
o c
D
d
Time behaviour:
v e
i
Function description:
h
This function block allows the programmer access to the address set on the
programmable fieldbus controller. The address is made available when invoking the
c
FB.
A r
WRITE_OUTPUT_BIT
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
WORD_ADDRESS WORD Here the word address of the word is
transferred to the process image.
BIT_ADDRESS WORD Here the bit position in the word is
m
transferred.
VALUE BIT Value to be written
u
Output parameters: Data type: Comments:
c
ERROR BOOL TRUE if an error has occurred. Possible
errors are an inadmissible address,
o
otherwise FALSE
Graphic display:
D
ed
iv
Time behaviour:
ch
WORD_ADDRESS
r
BIT_ADDRESS
VALUE
A
ERROR
Function description:
This function block offers the programmer the possibility of indirect access to the
process image. The current value of the output bit is made available immediately
after invoking the FB. The function block must be used with particular care as here
the guidelines of IEC 61131-3 „all addresses are assigned at the time of
programming and during the running time“ are not adhered to.
WRITE_OUTPUT_WORD
t
Library name: Mod_com.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
WORD_ADDRESS WORD Here the word address of the word is
transferred to the process image.
VALUE WORD Value to be written
m
Output parameters: Data type: Comments:
u
ERROR BOOL TRUE if an error has occurred. Possible
errors are an inadmissible address,
c
otherwise FALSE
o
Graphic display:
D
ed
v
Time behaviour:
i
WORD_ADDRESS
h
VALUE
ERROR
r c Function description:
A
This function block offers the programmer the possibility of indirect access to the
process image. The current value of the output word is made available immediately
after invoking the FB. The function block must be used with particular care as here
the guidelines of IEC 61131-3 „all addresses are assigned at the time of
programming and during the running time“ are not adhered to.
n t
e
u m
o c
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 Library
Standard.lib
n t
e
m
Contens
u
ASCIIBYTE_TO_STRING..........................................................................3
c
REAL_STATE .............................................................................................4
STANDARD_VERSION .............................................................................6
o
STRING_COMPARE ..................................................................................7
STRING_TO_ASCIIBYTE..........................................................................8
D
ed
iv
ch
A r
ASCIIBYTE_TO_STRING
t
Name: ASCIIBYTE_TO_STRING
Type: Function X Function block Program
n
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers
e
Input parameters: Data type: Comments:
byt BYTE The input value is a number of data
m
type BYTE.
u
Output parameters: Data type: Comments:
ASCIIBYTE_TO_STRING STRING The feedback value of the function is a
c
character of data type STRING.
o
Graphic display:
D
d
Time behaviour:
v e
i
Function description:
h
This function convents a number from data type BYTE to a character of data type
c
STRING.
A r
REAL_STATE
t
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL A True initialises the variable error
again to zero.
m
Output parameters: Data type: Comments:
ERROR BYTE A value unequal to zero indicates an
u
error with a real operation.
c
Graphic display:
o
D
d
Time behaviour:
v e
i
PLC Cycle
RESET
h
ERROR
r c
Function description:
A
This function block offers the programmer the possibility to react to errors occurring
during computation with floating point numbers. In a program the function block
REAL_STATE can be invoked after each operation in order to recognise a number
overflow. In the event of an error, the ERROR output adopts a value unequal zero.
t
ERROR = 9 -> Undefined float
ERROR = 10 -> Conversion error
n
ERROR = 11 -> Floating point stack underflow
ERROR = 12 -> Floating point stack overflow
e
u m
o c
D
ed
iv
ch
A r
STANDARD_VERSION
t
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
EN BOOL A TRUE at this input activates this
function.
m
Output parameters: Data type: Comments:
STANDARD_VERSION WORD Library version.
c u
Graphic display:
o
D
d
Time behaviour:
e
EN
iv
STANDARD_VERSION
ch
Function description:
r
The STANDARD_VERSION function returns the current library version number. This
function can be used for information purposes during program development.
Furthermore it can serve to avoid version conflicts with the running time.
A Version:
1.0
Description:
STRING_COMPARE
t
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
STR1 STRING A character string with max. 255
characters.
STR2 STRING A character string with max. 255
m
characters.
u
Output parameters: Data type: Comments:
BOOL Returns the results of the comparison.
c
Graphic display:
o
D
ed
Time behaviour:
iv
ch Function description:
r
Using this function the programmer can compare two character strings each with
max. 255 characters. If they coincide function feeds back TRUE. If the character
A
chains are, however, not identical FALSE is fed back.
STRING_TO_ASCIIBYTE
t
Library name: Standard.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
str STRING A character string with max. 255
characters.
m
Output parameters: Data type: Comments:
STRING_TO_ASCIIBYTE BYTE The feedback value of the function is a
u
number of data type BYTE.
c
Graphic display:
o
D
d
Time behaviour:
v e
i
Function description:
h
This function converts a character, from data type STRING to a character of data
c
type BYTE.
A r
WAGO-I/O-PRO 32 Library
System.lib
n t
e
m
Contens
u
GET_ACT_CYCLE .....................................................................................3
c
GET_MAX_CYCLE ....................................................................................4
GET_MIN_CYCLE......................................................................................5
o
GET_PLC_ACT_CYCLE ............................................................................6
GET_PLC_MAX_CYCLE...........................................................................7
GET_PLC_MIN_CYCLE ............................................................................8
D
GET_RUN_VALUE ....................................................................................9
GET_STOP_VALUE .................................................................................10
SYSTEM_VERSION .................................................................................11
ed
iv
ch
A r
GET_ACT_CYCLE
t
Name: GET_ACT_CYCLE
Type: Function x Function block Program
n
Library name: System.lib
Applicable to: All programmable fieldbus controllers
e
Input parameters: Data type: Comments:
RESET BOOL A TRUE at this input resets the output
m
value (only for compatibility reasons
with other xxx_CYCLE functions).
u
Return value: Data type: Comments:
c
GET_ACT_CYCLE TIME Current cycle time for a complete
program cycle, consisting of a I/0
processing, user program and
o
operating system functions.
D
Graphic display:
ed
iv
Time behaviour:
h
RESET
GET_ACT_CYCLE 0 0
r c Function description:
A
The GET_ACT_CYCLE function returns the current time for the execution of a
program cycle including I/0 processing and operating system functions with a 1 ms
resolution.
GET_MAX_CYCLE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL A TRUE at this input resets the output
value. (only for compatibility reasons
with other xxx_CYCLE functions)
m
Return value: Data type: Comments:
u
GET_MAX_CYCLE TIME Maximum cycle time for a complete
program cycles consisting of I/0
c
processing, user program and
operation system functions since the
o
last reset (or program start).
Graphic display:
D
ed
v
Time behaviour:
i
RESET
h
GET_MAX_CYCLE 0 0
r c
Function description:
A
The GET_MAX_CYCLE function returns the maximum time for the execution of a
program cycle including I/0 processing and operating system functions with a 1 ms
resolution. the output value is set to 0 following a program start.
GET_MIN_CYCLE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL A TRUE at this input resets the output
value. (only for compatibility reasons
with other xxx_CYCLE functions).
m
Return value: Data type: Comments:
u
GET_MIN_CYCLE TIME Minimum cycle time for a complete
program cycles consisting of I/0
c
processing, user program and
operation system functions since the
o
last reset (or program start).
Graphic display:
D
ed
v
Time behaviour:
i
RESET
h
GET_MIN_CYCLE max max
r c Function description:
A
The GET_MIN_CYCLE function returns the minimum time for the execution of a
program cycle including I/0 processing and operating system function with a 1 ms
resolution. Following a program start, the output value is set to the numerical
maximum value (T#1m5s535ms).
GET_PLC_ACT_CYCLE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL A TRUE at this input restes the output
value. (only for compatibility reasons
with other xxx_CYCLE functions).
m
Return value: Data type: Comments:
u
GET_PLC_ACT_CYCLE TIME Current cycle time for a complete
program cycle of the user program.
c
Graphic display:
o
D
d
Time behaviour:
v e
RESET
i
GET_PLC_ACT_CYCLE 0 0
ch
Function description:
r
The GET_PLC_ACT_CYCLE function returns the current time for the execution of a
program cycle at a 1 ms resolution.
GET_PLC_MAX_CYCLE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL A TRUE at this input rests the output
value. (only for compatibility reasons
with other xxx_CYCLE functions).
m
Return value: Data type: Comments:
u
GET_PLC_MAX_CYCLE TIME Maximum cycle time for a complete
program cycle of the user program
c
since the last reset (or program start).
o
Graphic display:
D
ed
Time behaviour:
iv
RESET
GET_PLC_MAX_CYCLE 0 0
ch Function description:
r
The GET_PLC_MAX_CYCLE function returns the maximum time for the execution of
A
a program cycle at a 1 ms resolution. Following a program start, the output value is
set to 0.
GET_PLC_MIN_CYCLE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL A TRUE at this input resets the output
value. (only for compatibility reasons
with other xxx_CYCLE functions).
m
Return value: Data type: Comments:
u
GET_PLC_MIN_CYCLE TIME Minimum cycle time for a complete
program cycle of the user program
c
since the last reset (or program start).
o
Graphic display:
D
ed
Time behaviour:
iv
RESET
ch
Function description:
r
The GET_PLC_MIN_CYCLE function returns the minimum time for the execution of
A
a program cycle with a 1 ms resolution. Following a program start, the output value is
set to the numerical maximum value (T#1m5s535ms).
GET_RUN_VALUE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL The value at this input is not taken into
account (the input has only been
inserted because functions must have
m
an input).
u
Return value: Data type: Comments:
GET_RUN_VALUE BOOL The output is TRUE for one cycle after
c
a PLC start.
o
Graphic display:
D
ed
Time behaviour:
iv
RESET
GET_RUN_VALUE
h
Start
r c Function description:
A
The GET_RUN_VALUE function helps to recognise the first PLC cycle after the
program start. The user can then program the PLC starting behaviour. The output is
TRUE only for one cycle. See also GET_STOP_VALUE to recognise a program
stop.
GET_STOP_VALUE
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
RESET BOOL The value at this input is not taken into
account (the input has only been
inserted because functions must have
m
an input).
u
Return value: Data type: Comments:
GET_STOP_VALUE BOOL The output is TRUE in the last cycle
c
before a PLC stop.
o
Graphic display:
D
ed
Time behaviour:
iv
RESET
GET_STOP_VALUE
h
Stop
r c
Function description:
A
The GET_STOP_VALUE function helps to recognise the last PLC cycle before a
program stop. The user can then program the PLC behaviour when stopped. The
output is TRUE only for one cycle. See also GET_ RUN _VALUE to recognise a
program start.
The PLC outputs can be switched in a safe state with this function.
SYSTEM_VERSION
t
Library name: System.lib
Applicable to: All programmable fieldbus controllers
n
Input parameters: Data type: Comments:
e
EN BOOL A TRUE at this input activates this
function.
m
Return value: Data type: Comments:
SYSTEM_VERSION WORD Library version.
c u
Graphic display:
o
D
d
Time behaviour:
e
EN
SYSTEM_VERSION
iv
h
Function description:
c
The SYSTEM_VERSION function returns the current library version number. This
r
function can be used for information purposes during program development.
Furthermore it can serve to avoid version conflicts with the running time.
A Version:
1.0
2.0
Description:
n t
e
u m
o c
D
ed
iv
ch
A r
t
The communication drivers are on the WAGO-I/O-PRO 32 CD.
n
The installation program is started from the D drive in the following
instructions. In case you would like to use another drive, please enter the
e
corresponding letter.
m
1. Put the WAGO-I/O-PRO 32-CD in the D drive.
u
2. In case "Autoplay" is selected in your system the set-up will be started
c
automatically. Proceed with step 6.
If the set-up is not starting automatically please proceed with step 3.
o
3. Select "Execute" in the Windows "Start" menu
4. Start the WAGO-I/O-PRO 32 set-up.
D
5. Enter "D:\setup.exe" (D is the drive with the WAGO-I/O-PRO-32-
CD) and start the set-up by clicking on "OK".
d
6. Select the set-up language.
e
The rest of the set-up is taking place via menus. Please follow the instructions
to complete the set-up. If possible the proposed settings should be adopted.
v
You will be asked for the set-up type during the installation.
i
& Click on "Communication driver installation" and confirm with
h
"Next".
c
A dialog appears to select the libraries.
r
& Select the components you would like to install and delete the ones you
wouldn’t like to install.
WAGO-I/O-PRO 32 B-1
Appendix B – Communication Drivers
n t
e
u m
o c
D
ed
iv
ch
Ar
B-2 WAGO-I/O-PRO 32
Appendix B – Communication Drivers
Contens
CANopen DSP302
CANopen Hilscher
Modbus
OPC Client
OPC Client 2 Tags
t
PI Applicom Driver
PI Hilscher Driver
n
Pipe*
Serial (Modem)*
e
Serial (RS232)*
TCP/IP*
TCP/IP (Level 2)*
u m
c
*These communication drivers are ready installed in WAGO-I/O-PRO 32.
o
D
ed
iv
ch
A r
WAGO-I/O-PRO 32 B-3
Appendix B – Communication Drivers
n t
e
u m
o c
D
ed
iv
ch
Ar
B-4 WAGO-I/O-PRO 32
Appendix B – Communication Drivers
CANopen DSP302
t
Name: GDrvStd.dll, CAN_AC2_3S.dll, CAN_VCI.dll
Hardware: STZP CAN card with VCI Interface or Softing AC2
n
Software: -
Operating system: Windows 95, Windows 98, Windows NT 4.0
e
Applicable to: Currently not in use
(In the future all CANopen programmable fieldbus controllers)
m
Communication Range of value: Comments:
parameters:
Node number 1 ... 127 Enter the module ID of the controller
u
with which a connection is to be made.
The connection is made via the default
c
SDOs.
Baud rate 10 kBd, The required baud rate is selected
o
20 kBd, here. Only set a baud rate which is
50 kBd, used in the entire network.
125 kBd,
D
250 kBd,
500 kBd,
800 kBd,
1 MBd
d
CAN card driver [Name of the CAN Enter the name of the DLL which
card interface DLL] creates the link to the CAN card driver.
e
currently Undertake the configuration of the CAN
CAN_AC2_3S and card must using the card
v
CAN_VCI manufacturer’s tools.
h i
r c
A
Graphic display:
n t
e
Image B.3: Graphic display CANopen DSP302
u m
Function description:
o c
D
Two objects are defined in the CIA DS 302, permitting a program download and a
connection to the programming system.
The objects „Download Program Data“ (0x1F50) and „OS Command“ (0x1023) are
d
used.
e
During program download all programs are written to the index 1 ( program number
1) of the „Download Program Data“ object.
iv
In addition the indexes 1 (Command), 2 (Status) and 3 (Reply) of the object „O OS
Command“ (0x1023) are used.
ch
System configuration:
A r CANopen
MODBUS MODBUS
master
ON
TxD
RxD 24V 0V
CANopen ON
TxD
RxD 24V 0V
C RC
slave CRC
I/ORUN + + + + I/ORUN + + + +
I/OERR I/OERR
à SYS TE M
à SYS TE M
- - - - - - - -
à
à
à I/O à
à
à I/O à
à
01 01
78 9
78 9
23
23
à
456 456
WAG O à à
WAG O à à
75 0-3 12
75 0-3 12
S S S S
01 01
789
789
23
23
456 456
WAGO WAGO WAGO WAGO
750-554 750-600 750-554 750-600
CANopen Hilscher
t
Hardware: Hilscher fieldbus interface cards for PCs
e. g. CIF 30-xxx
n
Software: -
Operating system: Windows 95, Windows 98, Windows NT 4.0
e
Applicable to: All CANopen programmable fieldbus controllers
m
parameters:
Interface Board 0, Select the interface board. Up to 4
u
Board 1 Hilscher fieldbus boards can be
Board 2, installed in a PC. This parameter
c
Board 3 specifies the board to be used.
Baudrate 10 kBd, The required baudrate is selected here.
o
20 kBd, Only set a baud rate which is used in
50 kBd, the entire network.
100 kBd,
D
125 kBd,
250 kBd,
500 kBd,
800 kBd,
d
1 MBd
Node ID 1 ... 126 Enter the module ID of the controller
e
with which the connection is to be
made.
v
The connection is made via the default-
i
SDOs.
Database RETAIN; Do not configure the Hilscher board as
h
CLEAR CANopen master. To ensure this the
database can be cleared by selecting
„CLEAR" on the board.
c
Debug level 16#0000 ... Set this parameter to 0. The parameter
r
16#FFFF is only used for debugging.
Graphic display:
n t
e
Image B.5: Graphic display CANopen Hilscher
u m
Function description:
o c
D
All CANopen controllers offer the possibility of making a communication connection
via the CAN interface. For this the manufacturer specific object „ComWagoPro“
(Index 4A00) was introduced. Data to be sent to the controller are written on index 1.
The feedback values are read by index 2.
d
The driver CANopenHilscher makes a communication connection between the PC
e
and controller via SDOs. Prerequisite being a Hilscher CANopen interface board.
This board must not be configured with the system configurator. If the master was
v
already configured then clear the database on the interface board. The interface
i
board will otherwise attempt to configure the assigned nodes.
Each board can only establish a connection to one node simultaneously.
ch
System configuration:
A r
CANopen
MODBUS MODBUS
master
ON
TxD
RxD 24V 0V
CANopen ON
TxD
RxD 24V 0V
CRC
slave CRC
I/ORUN + + + + I/ORUN + + + +
I/OERR I/OERR
à SYS TE M
à SYS TE M
- - - - - - - -
à
à
à I/O à
à
à I/O à
à
01 01
78 9
78 9
23
23
à
4 56 456
WAG O à à
WAG O à à
75 0-3 12
75 0-3 12
S S S S
01 01
789
789
23
23
456 456
WAGO WAGO WAGO WAGO
750-554 75 0-60 0 75 0-554 750-600
MODBUS
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: MODBUS communication
Name: ModbusDriver.dll
e
Hardware: -
Software: -
Operating system: Windows 95, Windows 98, Windows NT 4.0
m
Applicable to: All MODBUS programmable fieldbus controllers
u
Communication Range of value: Comments:
c
parameters:
MODBUS 1 ... 99 MODBUS slave addresses.
node adress
o
Mode RTU MODBUS transmission mode.
With MODBUS the ASCII or RTU mode
can be selected for coding the
D
transmitted characters. The
transmission mode used must coincide
with the controller settings.
d
Interface COM1; COM2; This parameter selects the Windows
COM3, COM4, driver for the PC serial interface.
e
COM5, COM6,
COM7, COM8;
COM9
iv
Baudrate 110 Bd, 300 Bd, Transmission rate for the serial
600 Bd, 1200 Bd; communication.
2400 Bd, 4800 Bd, The value must coincide with the value
h
9600 Bd, 19200 Bd, set in the controller.
38400 Bd;
c
56000 Bd,
r
57600 Bd,
115200 Bd,
128000 Bd,
A
256000 Bd
String lenght 8 Bit, Length of the data in a byte frame.
7 Bit Always use 8 bits for the RTU mode.
This value must coincide with the
controller settings.
t
2 value must coincide with the controller
settings.
n
RTS Control disabled, Conversion from RS232 to RS485 is
enabled, generally performed with the control
e
handshake, signal RTS. The RTS signal then
toggle controls the bus drivers (transmit or
receive). The selected value must
harmonise with the converter settings.
m
The settings have no meaning for the
RS232 controller. The „Toggle“ setting
u
is only converted by the operating
system NT4.0.
c
Debug level 16#0000 ... This parameter must be set to 0. This
16#FFFF parameter is only used for debugging.
o
Graphic display:
D
ed
iv
ch
A r
Image B.9: Graphic display MODBUS Driver
Function description:
MODBUS controllers can be programmed directly from a PC via MODBUS. For this
the „ModbusDriver" is used. MODBUS being a Single-Master-Bus system, ensure
that no second master is active during programming.
The driver communicates via the function code 13. The communication data is
t
packed in a MODBUS frame.
System configuration:
e n
u m
o c
D
Image B.10: System configuration MODBUS Driver
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
OPC Client
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Process image communication
Name: OPCclientDriver.dll
e
Hardware: -
Software: Optional OPC server with access to the controller I/O data
Operating system: Windows 95, Windows 98, Windows NT 4.0
m
Applicable to: All programmable fieldbus controllers
u
Communication Range of value: Comments:
c
parameters:
OPC server ID [Identification of all Selection of all of the OPC server
OPC servers available on the computer. When
o
available on the starting the WAGO-I/O-PRO 32 server
computer] this information is read out of the
registry. The OPC server which
D
supplies the tags for PA communication
is selected here. The server must be
correspondingly configured in advance.
d
The selected OPC server in the
communication driver must be checked
after a new OPC server is installed on
e
the computer.
OPC tag ID [Tag name] The tag via which the PA
v
communication is to be performed is
i
entered here. The tag must be of a read
and write type.
h
OPC tag data type 2-Byte signed OPC tag data type.
integer, VT_I2 Currently only 2 byte signed integer can
c
be selected.
r
Debug level 16#0000 .... This parameter must be set to 0. This
16#FFFF parameter is only used for debugging
purposes.
Graphic display:
n t
e
u m
c
Image B.11: Graphic display OPC Client
Function description:
o
D
All controllers offer the possibility of establishing a communication connection via the
data in the process image. For this an additional word is introduced into the input
d
and output image. The configuration is described in the manual for the individual
controller under „PA communication".
e
The „OPCclient" driver establishes a communication connection between PC and
controller via this data with the aid of an OPC server. Prerequisite being an OPC
v
server, which permits access to the controller I/O data. The server must be on the
i
computer, on which the WAGO I/O PRO 32 Server is running. On the server the
communication words in the I/O image of the controller must be configured as a write
h
and read tag.
The communication can be tested by the output of the values 16#0000 and
c
16#0007. The communication channel is reset with the output of the value 16#0000.
r
Following this 16#0000 appears in the read tag. The channel function is tested with
the value 16#0007. If the channel is correctly configured the input word will be
16#0004. This same method can be used to check the configuration of the OPC
A
tags.
The „OPC Browser" tool can be used to simplify handling of the sometimes very long
tag names. The tool shows all tags on a server. The marked tag can be copied into
the Windows clipboard and pasted into WAGO-I/O-Pro 32.
System configuration:
WAGO-I/O-PRO 32
MODBUS
ON
TxD
OPC Server RxD
CRC
24V 0V
I/ORUN + + + +
t
I/OERR
à SYSTEM
- - - -
à I/O à
01
78 9
23
WAG O à
456
750-312
S S
01
78 9
n
23
4 56
WAGO WAGO
750-554 750-600
e
Image B.12: System Configuration OPC Client
u m
o c
D
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Process image communication
Name: OPCclientDriver2Tags.dll
e
Hardware: -
Software: Optional OPC server with access to the I/O data of the
controllers
m
Operating system: Windows 95, Windows 98, Windows NT 4.0
Applicable to: All programmable fieldbus controllers
c u
Communication Range of value: Comments:
parameters:
OPC server ID [Designation of all Selection of all OPC servers available
o
available OPC on the computer.
servers on the This information is read out of the
computer] registry when starting the WAGO-I/O-
D
PRO 32 server. The OPC server is
selected here which supplies the tags
to the PA communication. The server
d
must be correspondingly configured in
advance.
After installing a new OPC server on
e
the computer, the selected OPC server
must be checked in the communication
v
driver.
i
OPC read tag ID [Read Tag The tag is entered here via which the
name] input word of the PA communication is
h
read.
OPC read tag data 2-byte signed Data type of the OPC tags.
c
type integer, VT_I2 Currently only 2 byte signed integer can
be selected.
r
OPC write tag ID [Write Tag The tag is entered which permits to
name] write in the output word of the PA
A
communication.
OPC write tag data 2-byte signed Data type of the OPC tag.
type integer, VT_I2 Currently only 2 byte signed integer can
be selected.
Debug level 16#0000 .... This parameter must be set to 0. This
16#FFFF parameter is only used for debugging
purposes.
Graphic display:
n t
e
u m
c
Image B.13: Graphic display OPC Client 2 Tags
Function description:
o
D
All controllers offer the possibility of opening up a communication connection via the
data in the process image. For this an additional word is introduced into the input
d
and output image. The configuration is described in the manual for the individual
controller under „PA communication".
e
The „OPCclientDriver2Tags" driver establishes a communication connection
between PC and controller via this data with the aid of an OPC server. Prerequisite
v
being an OPC server, which permits access to the controller I/O data. The server
i
must be on the computer, on which the WAGO I/O PRO 32 Server is running. On the
server the communication words in the I/O image of the controller must be
h
configured as a write and read tag.
The communication channel can be tested by the output of values 16#0000 and
c
16#0007. The communication channel is reset with the output of the value 16#0000.
r
Following this 16#0000 appears in the read tag. The channel function is tested with
the value 16#0007. If the channel is correctly configured the input word will be
16#0004. This same method can be used to check the configuration of the OPC
A
tags.
The „OPC Browser" tool can be used to simplify handling of the sometimes very long
tag names. The tool shows all tags on a server. The marked tag can be copied into
the Windows clipboard and pasted into WAGO-I/O-Pro 32.
System configuration:
WAGO-I/O-PRO 32
MODBUS
ON
TxD
OPC Server RxD
CRC
24V 0V
I/ORUN + + + +
t
I/OERR
à SYSTEM
- - - -
à I/O à
01
78 9
23
WAG O à
456
750-312
S S
01
78 9
n
23
4 56
WAGO WAGO
750-554 750-600
e
Image B.14: System configuration OPC Client 2 Tags
u m
o c
D
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
PI Applicom Driver
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Process image communication
Name: PIApplicomDriver.DLL
e
Hardware: Applicom® Feldbus Interface cards for PCs
e.g. PCI2000PFB
Software: -
m
Operating system: Windows 95, Windows 98, Windows NT 4.0
Applicable to: All controllers
c u
Communication Range of value: Comments:
parameters:
o
Interface Board1 ... Board8 Interface card selection. Up to 8
Applicom® fieldbus cards can be
installed in a PC. This parameter shows
the card to be used. It is currently not
D
evaluated.
Interface channel 0 ... 31 Channel number selection. The channel
number is established during project
d
planning with the PCCONF program.
Equipment number 0 ... 255 Equipment number selection. The
e
equipment number is established
during project planning with the
v
PCCONF program.
i
Input address 0 ... 2047 The address for the communication
word is given in the saving image of the
IO data, which is read by the controller.
h
The offset is shown in number of bytes.
The address for the communication
c
Output address 0 ... 2047
word is given in the saving image of the
r
IO data, which is written in the
controller. The offset is displayed in
number of bytes.
A
Data encoding Intel format or Here the byte sequence within a word
Motorola format is set. Generally the Intel format should
be set. The Motorola format is used
with some FB (e.g. InterBus-S). In this
case it may be necessary to change
over to Motorola format.
Debug level 16#0000 ... This parameter must be set to 0. The
16#FFFF parameter is only used for debugging
purposes.
Graphic display:
n t
e
u m
c
Image B.1: Graphic Applicom PI Driver
o
D
Function description:
All controllers offer the possibility of a communication connection via the data in the
process image. For this an additional word is inserted in the input and output image.
d
The configuration is described in the manual for the individual controller under the
heading PA communication.
e
The Applicom PI Driver establishes a communication between the PC and controller
v
using this data. Prerequisite being an Applicom® interface card. This card is
i
configured with the PCCONF configuration tool so that the PA communications word
appears in the IO mask.
h
A test of the communication channel can be made by the output of values 16#0000
and 16#0007. The communication channel is reset with the output of value 16#0000.
c
Following this 16#0000 appears in the input word. The channel function is tested
r
with value 16#0007. If the channel configuration is correct the input word will be
16#0004. This method can also be used to check the position of the data in the card
saving image.
A
The data words for PA communication should not be transmitted by the application. If an
output must be made select value 16#0000 .
System configuration:
n t
Image B.2: System configuration Applicom PI Driver
e
u m
o c
D
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
PI Hilscher Driver
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Process image communication
Name: PIHilscherDriver.DLL
e
Hardware: Hilscher fieldbus interface cards for PC's
e. g. CIF 30-xxx
Software: -
m
Operating system: Windows 95, Windows 98, Windows NT 4.0
Applicable to: All programmable fieldbus controllers
c u
Communication Range of value: Comments:
parameters:
Interface Board 0, Selection of the interface board. Up to 4
o
Board 1, 4 Hilscher fieldbus boards can be
Board 2, installed in a PC. This parameter
Board 3 specifies the board to be used.
D
Input address 0 ... 2047 The address for the communication
word in the process image of the I/O
data read by the controller is given
d
here. The offset is specified in number
of bytes.
e
Output address 0 ... 2047 The address for the communication
word in the process image of the I/O
data written into the controller is given
v
here. The offset is specified in number
i
of bytes.
Data encoding Intel format or The byte sequence within a word is set
h
Motorola format here. Generally the Intel format should
be set. Some fieldbuses (e.g. IntelBus-
c
S) use the Motorola format. Here it may
r
be necessary to change over to
Motorola format.
Debug level 16#0000 ... This parameter must be set to 0. The
A
16#FFFF parameter is only used for debugging
purposes.
Graphic display:
n t
e
u m
c
Image B.7: Graphic display PI Hilscher Driver
o
Function description:
D
All controllers offer the possibility of establishing a communication connection via the
data in the process image. For this an additional word is introduced into the input
and output image. The configuration is described in the manual for the individual
d
controller under „PA communication".
e
PC and controller via this data. Prerequisite is a Hilscher interface board. This board
is configured with the system configurator so that the PA communication words
v
appear in the I/O image. The communication channel can be tested by the output of
i
the values 16#0000 and 16#0007. The communication channel is reset with the
output of the value 16#0000. Following this 16#0000 appears in the input word. The
h
channel function is tested with the value 16#0007. If the channel is correctly
configured, the input word assumes 16#0004. This method allows checking the data
position in the process image.
r c
The data words for PA communication should not be put out by the application. If an
output is necessary select the value 16#0000.
A
(PA = Process image
I/O = Inputs/Outputs)
System configuration:
n t
Image B.8: System configuration PI Hilscher Driver
e
u m
o c
D
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
Pipe
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Standard communication
Name: GDrvStd.dll
e
Hardware: -
Software: -
Operating system: Windows 95, Windows 98, Windows NT 4.0
m
Applicable to: Currently cannot be used.
u
Communication Range of value: Comments:
c
parameters:
Pipe [Name of the named Enter here the named pipe which is to
pipe] be used for communication.
o
Timeout 0 ... 255 The timeout time is entered here in
seconds.
D
Graphic display:
ed
iv
ch
A r Image B.15: Graphic display Pipe
Function description:
t
System configuration:
e n
u m
o c
D
ed
iv
ch
Ar
Serial (Modem)
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Standard communication
Name: GDrvStd.dll
e
Hardware: Modem, Configuration cable Item no. 750-920
Software: -
Operating system: Windows 95, Windows 98, Windows NT 4.0
m
Applicable to: All programmable fieldbus controllers
u
Communication Range of value: Comments:
c
parameters:
Init [Character string for This character string is transmitted to
initialising] initialise the modem. The content is
o
modem specific and should be checked
in the modem manual.
Dial [Character string for This character string is transmitted for
D
selecting the dialling the number. The character to be
telephone number] transmitted is dependent upon the
telephone system used. Check this in
d
the modem manual.
Hangup [Character string for This character string is transmitted for
e
terminating terminating the modem connection. The
communication] content is modem specific and should
be checked in your modem manual
iv
Break [Character string for This character string is used to switch
switching over over between data transfer and modem
between data configuration. Modems generally use
h
transfer and modem the character string „+++“.
configuration]
c
Timeout 0 ... 255 The timeout for recognising a break is
r
entered here. Refer to your modem
manual for more precise details.
Port COM1, This parameter selects the Windows
A
COM2, driver for the PC serial interface.
[available interfaces]
t
even, additional bits. This parameter selects
odd the parity type. "Even" must be
n
selected.
Stop bits 1, The length of the stop bit can be
e
1.5, entered to extend the byte frame.
2
Motorola byteorder No, Select the value "No".
Yes
u m
Graphic display:
o c
D
ed
iv
Image B.17: Graphic display Serial (Modem)
ch
r
Function description:
A
All controllers can be linked to the configuration interface via a modem connection.
Two modems are required for this. The modem on the controller side is configured to
„auto answer“ and the fixed baud rate 19200 with „even Parity" and „8 Bit data
width". The second modem is linked to the PC. A transparent connection is created
via the telephone line between the PC and configuration interface after selecting the
modem on the controller side.
System configuration:
MODBUS
ON
TxD
RxD 24V 0V
n t
e
CRC
I/ORUN + + + +
I/OERR
à SYSTEM
- - - -
à I/O à
01
78 9
23
4 56
WAGO à
750-312
S S
01
789
23
4 56
WAGO WAGO
750-554 750-600
u m
o c
D
ed
iv
ch
A r
n t
e
u m
o c
D
ed
iv
ch
A r
Serial (RS232)
t
WAGO-I/O-PRO 32 Communication drivers
n
Category: Standard communication
Name: GDrvStd.dll
e
Hardware: Configuration cable Item no. 750-920
Software: -
Operating system: Windows 95, Windows 98, Windows NT 4.0
m
Applicable to: All programmable fieldbus controllers
u
Communication Range of value: Comments:
c
parameters:
Port COM1, This parameter selects the Windows
COM2 driver for the PC serial interface.
o
[available interfaces]
Baudrate 4800 Bd, 9600 Bd, Transmission rate for serial
19200 Bd, communication. Set this value to
D
38400 Bd, 19200 Bd.
57600 Bd,
115200 Bd
d
Parity no, The byte frame can be protected with
even, additional bits. This parameter selects
e
odd the parity type. "Even" must be
selected.
v
Stop bits 1, The length of the stop bit can be
i
1.5, entered to extend the byte frame.
2
h
Motorola byteorder No, Select the value "No".
Yes
r c
A
Graphic display:
n t
e
Image B.19: Graphic display Serial (RS232)
u m
Function description:
o c
D
All controllers can be directly programmed from a PC via the configuration interface.
d
System configuration:
v e
i
MODBUS
ON
TxD
RxD 24V 0V
CRC
h
I/ORUN + + + +
I/OERR
à SYSTEM
- - - -
à
à I /O à
à
01
789
23
4 56
WAG Oà à
7 50-312
S S
COMx 01
78 9
23
4 56
WAGO WAGO
750-554 75 0-60 0
r c
CANopen
750-920 master
A
Image B.20: System configuration Serial (RS232)
TCP/IP
t
WAGO-I/O-PRO 32 Communication driver
n
Category: Standard communication
Name: GDrvStd.dll
e
Hardware: Network card for Ethernet (Terminal server)
Software: TCP/IP Network protocol (component part of Windows)
Operating system: Windows 95, Windows 98, Windows NT 4.0
m
Applicable to: Currently cannot be used
u
Communication Range of value: Comments:
c
parameters:
Address [IP address], The IP address or the host name is
[Host-Name] entered here. „Localhost" can be used
o
for the own computer.
The syntax for an IP address is :
xxx.xxx.xxx.xxx. (e.g. 134.28.42.13).
D
Port 0 ... 65535, Port number to be used for the
preferentially 2455 connection.
Generally the port number for the
d
WAGO-I/O system (2455) should be
used. If 2455 is not used then the port
number for a dynamic connection in the
e
range 49152 ... 65535 should be used.
The range 0 ... 1023 is reserved for the
v
„well known" ports. The range 1024 ...
i
49151 is assigned manufacturer
specific.
h
Motorola byteorder No, Select the value „No"
Yes
r c
A
Graphic display:
n t
e
Image B.21: Graphic display TCP/IP
u m
Function description:
o c
D
d
System configuration:
v e
h i
r c
A
TCP/IP (Level 2)
t
Name: GDrvStd.dll
Hardware: Network card for Ethernet (Terminal server)
n
Software: TCP/IP Network protocol (component part of Windows)
Operating system: Windows 95, Windows 98, Windows NT 4.0
e
Applicable to: Ethernet controller
(with terminal server for all programmable fieldbus controller)
m
Communication Range of value: Comments:
parameters:
Address [IP address], The IP address of the host name is
u
[Host-Name] entered here. „Localhost" can be used
for the own computer.
c
The syntax for an IP address is :
xxx.xxx.xxx.xxx. (e.g. 134.28.42.13).
o
Port 0 ... 65535, Port number to be used for the
preferentially 2455 connection.
Generally the port number for the
D
WAGO-I/O system (2455) should be
used. If 2455 is not used then the port
number for dynamic connections in the
range 49152 ... 65535 should be used.
d
The range 0 ... 1023 is reserved for the
„well known" ports. The range 1024 ...
e
49151 is assigned manufacturer
specific.
v
Motorola byteorder No, Select the value „No"
i
Yes
ch
A r
Graphic display:
n t
e
Image B.23: Graphic display TCP/IP (Level 2)
u m
Function description:
o c
D
All Ethernet controllers can be directly programmed from a PC via a network card.
d
programmed via the network.
v e
h i
r c
A
System configuration:
n t
e
u m
o c
D
d
Image B.24: System configuration TCP/IP (Level 2)
v e
h i
r c
A
n t
e
u m
o c
D
ed
iv
ch
A r
20 Bibliography
English
R. W. Lewis
t
„Programming industrial control systems using IEC 1131-3“
The institution of Electrical Engineers, London
n
ISBN 0-8529695-0-3; Please note UPDATED IN 1997
e
m
„IEC 1131-3 Programming Methodology“
Software engineering methods for industrial automated systems
u
ISBN 2-9511585-0-5
c
German
Hans-Joachim Adam, Mathias Adam
o
"SPS"
Programmieren in Anweisungsliste nach IEC 1131-3
Elektor Verlag, Aachen
D
ISBN 3-89576-048-X
d
Karl-Heinz John, Michael Tiegelkamp
e
„SPS-Programmierung mit IEC 1131-3“
Konzepte und Programmiersprachen, Anforderungen an Programmiersysteme,
v
Entscheidungshilfen
i
Springer Verlag Berlin Heidelberg1997
ISBN 3-540-62639-5
ch
r
Peter Neumann, Eberhard E. Grötsch, Christoph Lubkoll, René Simon
„SPS Standard: IEC 61131“
Programmierung in verteilten Automatisierungssystemen
A
R. Oldenbourg Verlag München Wien 1998,
ISBN 3-486-27005-2
WAGO-I/O-PRO 32 20-1
Bibliography
t
Peter Wratil
n
„Moderne Programmiertechnik für Automatisierungssysteme“
EN 61131 (IEC 1131) verstehen und anwenden
e
Vogel Verlag Würzburg 1996
ISBN 3-8023-1575-8
m
Web addresses
u
http://www.wago.com
http://www.plcopen.org
o c
D
ed
iv
ch
A r
20-2 WAGO-I/O-PRO 32
Chapter 21 - Glossary
21 Glossary
Absolute Address
Representation of individual memory cells using special character strings:
t
1st character: Recent symbol (%)
n
2nd character: Category (I = Input location, Q = Output location,
M = Memory location)
e
3rd character: Memory size (X = Single bit, B = Byte, W = Word,
D = Double Word)
m
4th character: Address
Example: %IX4.15
u
Configuration
c
The highest level of a PLC system, wich contains one or more resources
o
Data type
D
Defines the properties of a variable, such as value range and bit length
Declaration block
d
A list of declarations of identical types of variables in the first section of a POU
e
Derived data types
v
Self defined data type, based on a elementary data type
i
Elementary data type
h
Standard data type predefined by IEC 61131-3
c
EN Input
r
(Enable In) Enable input for a POU in Ladder logic or Function block diagram.
A
The POU with EN input is only processed if the EN input value is TRUE.
FB
Abbr. for Function block
FBD
Abbr. for Function block diagram
FB instance
Copy of the structured data block of a Function block, permitting the multiple
use of a created structures with varying parameters (e.g. Standard Funktion
WAGO-I/O-PRO 32 21-1
Glossary
blocks). The data block saves internal values and statuses of the function blocks
for longer than one cycle.
Field
A series of elements of the same date type
t
Flag
Memory for physical addressing
n
FUN
e
Abbr. for Function
Function
m
POU, wich always the same result (as function value) with the same input
u
value; it has no local variable wich can save values beyond one invocation.
c
Function block
o
POU, wich provides one or more values when executed. This can be saved as a
local variable ("Memory").
D
Function block diagram
(Abbr.: FBD) graphically oriented programming language with networks with
d
contain Functions and Function blocks. The logic and arithmetic behaviour of
these POU's is represented as a block.
e
IEC 61131-3
v
International standard from the year 1993 for modern systems with PLC
i
functionality. Based on a structured software model it defines a series of high
capacity programming languages, wich can be used for varying automation
h
tasks.
c
IL
r
Abbr. for Instruction list
A
Instruction list
(Abbr.: IL) is a widely used text language close to that used for assemblers for
PLC's (similar to Step5/Step7)
I/O periphery
The Input and output modules belonging to a node together with their physical
process addresses
21-2 WAGO-I/O-PRO 32
Chapter 21 - Glossary
Ladder diagram
(Abbr.: LD) graphically orientated programming language wich uses the
principle of an electric circuit with contacts and coils for the representation of
links.
LD
t
Abbr. for Ladder diagram
n
PLC
e
Abbr. for Programmable Logic Controls
POU library
m
A collection of POU's avaible to the programmer for the creation of control
programs
u
PROG
c
Abb. for Program
o
Program
D
Element of a resource. The program is the highest level of the POU, i.e.
Functions and Function blocks are invoked by a program. The time behaviour
of the program is established by the attendant Tasks.
d
Programmable Fieldbus Controller
e
WAGO bus coupler with PLC functionality for
v
- Signal pre-processing
i
- Defined reaction in case of a fieldbus failure
h
- Decentral intelligence
c
Programmable Logic Controls
r
(Abbr.: PLC) Component of industrial automation systems for the control,
regulation, monitoring, visualisation as well as data collection and processing
A
or processes
Project
Includes all objects of a control program (POU, data types, visualisations,
resources and libraries)
Resource
Language element of a Configuration. A resource is task and program allotted.
WAGO-I/O-PRO 32 21-3
Glossary
SFC
t
Abbr. for Sequential flow diagram
n
ST
e
Abbr. for Structured Text
m
Function blocks defined by IEC 1131-3 wich meet the main requirements of
control systems
u
Step
c
In an SFC program this stands for an area in wich instructions are processed for
o
as long as it is active
Structured Text
D
(Abbr.: ST) comprises of a series of instructions wich can be performed as in
standard languages (e.g. Pascal) either conditionally ("IF...THEN...ELSE") or in
d
loops ("WHILE...DO")
e
Task
Defines the running behaviour of Programs and Function blocks
iv
Transition
h
Transitions from one SFC step to the next, dependent upon the Transition status
c
Transition conditions
r
Condition (Boolean value) for the activation of the next step in a SFC program
A
Variable
Data memory with a value defined by data type and information defining
concerning the variable declaration. Variables can be assigned physical
addresses (inputs, outputs, flags).
Variables declaration
Defining variables in a declaration block together with the variable name, the
data type and, if necessary, the initial value, area details and field properties
21-4 WAGO-I/O-PRO 32
Chapter 22 - Index
C
22 Index CAL 12-13
Call tree 4-22, 4-34
Calling a function 2-3
Calling a function block 2-7, 2-14
A Calling function blocks in ST 2-16
CASE 2-15
t
ABS 12-18
CASE instruction 2-17
Absolute Value 12-18
Changing connections in CFC 5-43
Access rights 4-32
n
CHARCURVE 14-7
ACOS 12-21
CheckBounds 2-4, 11-4
Action 2-10, 2-20, 2-21, 3-8, 4-33
CheckDivByte 2-5
e
Action Init 3-7
CheckDivDWord 2-5
Active step 2-22
CheckDivWord 2-5
ADD 12-1
Coil 2-27, 5-24
Address Function 12-12
m
Collapse Node 4-29
Addresses 15-4
Colors 4-9, 8-7
ADR 12-12
Comment 5-7, 5-8, 5-15
u
ALLIAS 11-6
Communications Parameters Gateway 4-47
Alternative Branch in SFC 2-25, 5-29
Comparing projects 4-24
c
AND 12-3
Compress 6-15
Arc cosine 12-21
CONCAT 13-2
Arc sine 10-26 12-21
o
Concatenation 13-2
Arc tangent 12-22
Connection marker in CFC 5-43
Argument 2-3, 2-7
CONSTANT 5-3, 6-3
ARRAY 11-4
D
Constants 5-3
ASIN 12-21
Contact 2-27, 5-23
Assignment 2-14, 5-17
Content Operator 11-4, 12-13
Assignment Combs 5-19
Context menu 4-4
d
Assignment operator 2-16
Context Sensitive Help 4-55
AT Declaration 5-4
Conversion of Integral Number Types 12-16
ATAN 12-22
e
Conversions of types 12-13
Auto Load 4-5
Convert object 4-31
Auto Save 4-5
v
Copy 4-37
Autodeclaration 4-7, 5-5
i
Copy in Help 4-53
Autoformat 4-7
Copying in CFC 5-42
Copying in FBD 5-21
h
B COS 12-20
Cosine 12-20
c
Backup, automatic 4-5 Create Backup 4-5
r
BCD conversion 14-1 Creating connections in CFC 5-42
BCD_TO_INT 14-1 Cross reference list 4-22, 4-34
Binding of ST operators 2-14 CTD 13-9
A
Bitmap 8-3, 8-11 CTU 13-8
Bitvalues 4-8 CTUD 13-9
BLINK 14-6 Cut 4-37
Body 5-1, 5-13, 5-14, 5-22, 5-28 Cutting in FBD 5-21
Bookmark in Help 4-54
BOOL 11-1
BOOL Constants 15-1 D
BOOL_TO Conversions 12-13
Data types 2-11, 4-2, 11-1
Breakpoint 2-2, 2-29, 4-43, 5-10, 5-11, 5-35
DATE 11-3
Breakpoint Dialog Box 4-44
DATE Constants 15-1
Breakpoint position 4-43
DATE_AND_TIME 11-3
Build 4-11, 4-21
DATE_AND_TIME Constants 15-2
BYTE 11-1
DATE_TO Conversions 12-17
BYTE Constants 15-2
DCF file 6-2
WAGO-I/O-PRO 32 22-1
Index
t
Declare, automatic 4-7, 5-5 Exit action 5-30
Defined Data Types 11-4 Exit action 2-22
n
Delete 4-38 EXP 12-20
DELETE 13-3 Expand Node 4-29
Deleting a Transition 5-31 Exponential Function 12-20
e
Deleting an Action 5-31 Exponentiation 12-22
Deleting connections in CFC 5-43 Export 4-23
Deleting in FBD 5-21 export file 6-2
m
Dereferencing 11-4, 12-13 Expression 2-14
DERIVATIVE 14-3 EXPT 12-22
Desktop 4-8 External library 4-18
u
DINT 11-1 EXTRACT 14-2
DINT Constants 15-2 Extras Menu
c
Directory 4-10 Align 8-13
DIV 12-2 Associate Action 5-34
o
CheckDivByte 2-5 Auto Read 6-12
CheckDivDWord 2-5 Clear Action/Transition 5-31
CheckDivWord 2-5 Clear Background Bitmap 8-12 8-13
D
Division durch 0 2-5 Compress 6-15
Document 4-19, 4-22 Configure 8-5
Document Frame 6-4 Cursor Mode 6-13
Download 4-13, 4-43, 4-51 Edit Entry 6-9
d
Drag&Drop 4-29 Element list 8-13
DT 11-3 Link Docuframe File 6-5
e
DT_TO Conversions 12-17 Load Trace 6-15
DWORD 11-1 Load Watch List 6-17
v
DWORD Constants 15-2 Make Docuframe File 6-5
i
Monitoring Active 6-18
Monitoring Options 5-10
E Multi Channel 6-14
h
Edit Menu Negate 5-20, 5-27
Options 5-15, 5-33
c
Copy 4-37
Cut 4-37, 5-21 Paste above 5-27
r
Delete 4-38 Paste after 5-26, 5-31
Find 4-39 Paste below 5-26
Find next 4-39 Paste Parallel Branch (right) 5-30
A
Input Assistant 4-40 Previous version 4-36
Next error 4-41 Read Receipt 6-19
Paste 4-38, 5-21 Read Trace 6-12
Previous error 4-41 Rename Watch List 6-17
Redo 4-37 Save Trace 6-15
Replace 4-39 Save Watch List 6-17
Undo 4-36 Select All 8-13
Editing functions 4-36 Select Background Bitmap 8-12
Editor options 4-6 Send to Back 8-12
Editors 5-1, 5-13, 5-14, 5-22, 5-28 Send to Front 8-12
EN Input 2-28, 5-24 Set Debug Task 6-9
EN POU 2-28 Set/Reset 5-20, 5-27
END_FUNCTION_BLOCK 2-5 Settings 8-14
END_PROGRAM 2-9 SFC Overview 5-33
END_TYPE 11-5, 11-6 Show grid 6-14
22-2 WAGO-I/O-PRO 32
Chapter 22 - Index
t
Write Receipt 6-19
Y Scaling 6-14 H
n
Zoom 5-20 Help 4-52
Zoom Action/Transition 5-31 Help Menu
e
Contents and Index 4-52
Help Topics Window 4-52
F HYSTERESIS 14-9
F_TRIG 13-7
m
falling edge 13-7
FBD 2-4, 2-8, 2-26, 4-43, 5-16 I
u
FBD Editor 5-16 Identifier 5-3, 15-3
Feedback paths in CFC 5-48 IEC 61131-3 2-30
c
Fields 2-3, 11-4 IEC Step 2-22, 5-34
File 4-16 IEC steps 2-23
File Menu
o
Iecsfc.lib 2-23
Close 4-17 IF instruction 2-15, 2-17
Exit 4-21 IL 2-3, 2-6, 2-7, 2-12, 4-43, 5-12
New 4-16 IL Editor 5-12
D
Open 4-16 IL operator 2-12
Print 4-18 Implicit at load 4-13
Printer Setup 4-19 Implicit variables in SFC 2-24
d
Save 4-17 Import 4-24
Save as 4-17 Index Window 4-54
Find 4-39
e
INDEXOF 12-3
FIND 13-4 Initialization 5-3
Flow Control 4-46, 5-13 Input and Output Variable 5-2
v
Folder 4-29 Input Assistant 4-40
i
Font 4-7 Input in FBD 5-19
FOR 2-18 Input Variable 5-1
h
FOR loop 2-15, 2-18 INSERT 13-3
Forcing 4-45, 5-8, 6-19 Insert in LD 5-26
c
Formatting, automatic 4-7 Insert in SFC 5-29
Function 2-3, 15-5
r
Insert Menu
FUNCTION 2-3 Add Entry-Action 5-30
Function Block 2-5 Add Exit-Action 5-30
Function block call 2-7
A
Additional Library 7-2
Function Block Diagram 2-4, 2-8, 4-43, 5-16 All Instance Paths 6-4
Function Block in FBD 5-19 Alternative Branch (left) 5-29
Function block in LD 2-27 Alternative Branch (right) 5-29
Function block, instance 2-6 Append Program Call 6-8
Function call 2-3 Append Task 6-8
Function declaration 2-3 Assignment 5-17
Function in FBD 5-19 Bitmap 8-2, 8-3
FUNCTION_BLOCK 2-5 Coil 5-24
Comment 5-15
Contact 5-23
G Declarations Keywords 5-4
Gateway 4-47 Ellipse 8-2, 8-3
Gateway Server 4-47 Function 5-9, 5-19
GE 12-11 Function Block 5-10, 5-19, 5-24
WAGO-I/O-PRO 32 22-3
Index
t
Network (before) 5-15 Line Number of the Text Editor 5-12
New Declaration 5-7 Line numbers 5-6
n
New Watch List 6-17 LN 12-19
Operand 5-9 Load & Save 4-4
Operator 5-9, 5-18 Load Trace 6-15
e
Operator with EN 5-25 Load trace configuration 6-11
Output 5-19 Load Watch List 6-17
Parallel Branch (left) 5-30 Local Variable 5-2
m
Parallel Branch (right) 5-29 LOG 12-19
Parallel Contact 5-24 Log in 4-42
Placeholder 4-20 Logarithm 12-19
u
Polygon 8-2, 8-3 Logout 4-42
Rectangle 8-2 Loop 2-13, 2-15
c
RETURN 5-18, 5-26 LREAL 11-1
Rounded Rectangle 8-2 LREAL Constants 15-2
o
Step Transition (after) 5-29 LREAL_TO Conversions 12-16
Step Transition (before) 5-29 5-29 LT 12-10
Transition-Jump 5-30
D
Types 5-4
Visualization 8-2, 8-3 M
Insert mode 5-8 Main Help Window 4-53
Insert Network 5-15
d
Main program 2-9
Instance 2-6 Mark 4-8
Instance name 2-6, 2-7 Marking in SFC 5-28
e
Instruction 2-12, 2-14, 2-15 MAX 12-9
Instruction List 2-3, 2-6, 2-7, 2-12, 4-43, 5-12 Memory location 15-4
v
INT 11-1 Menu Bar 4-1
i
INT Constants 15-2 Menü Edit
INT_TO_BCD 14-1 Declare Variable 4-41
INTEGRAL 14-3
h
Menu Extras
Internal library 4-18 Connection marker 5-43
c
Display order 5-44
EN/ENO 5-40
J
r
Negate 5-40
Jump 2-25, 5-18 Order - One backwards 5-46
Jump in SFC 5-28, 5-30 Order - One forwards 5-46
A
Order – To the beginning 5-46
Order – To the end 5-46
K Order everything according to data flow 5-46
Keywords 5-3, 5-4 Order topologically 5-44
Properties 5-41
Select All 5-42
L Select Mode 8-13
Set/Reset 5-40
Label 5-14 Menu Insert
Ladder Diagram 2-26, 4-43, 5-22 Block 5-39
LD 2-26, 4-43, 5-22 Block input 5-40
LD Editor 5-22 Curve 8-3
LE 12-11 Input 5-39
LEFT 13-1 Jump 5-39
LEN 13-1 Label 5-39
22-4 WAGO-I/O-PRO 32
Chapter 22 - Index
t
Message window 4-3 Ladder Editor 5-27
MID 13-2 Network Editor 5-15
n
MIN 12-9 Sequential Function Chart Editor 5-35
MOD 12-2 Text Editor 5-10
Modifier 2-12 Watch- and Receipt Manager 6-18
e
Monitoring 2-29, 4-42, 5-7, 5-10, 6-18 Operand 2-3, 5-9
Moving in CFC 5-42 Operands 15-1
MUL 12-1 Operator in FBD 3-4, 5-18
m
Multi Channel 6-14 Operators 5-9, 12-1
MUX 12-10 Options 4-4
OR 12-4
u
Order of execution in CFC 5-44
N Output in FBD 5-19
c
NE 12-12 Output Variable 5-2
Negation in FBD 5-20 Overwrite mode 5-8
o
Negation in LD 5-27
Network 5-15, 5-16
Network Comment 5-15
P
D
Network in FBD 2-26, 3-2 P 14-4
Network in LD 2-27 PACK 14-2
Network in SFC 3-7 Parallel Branch in SFC 2-25, 5-29, 5-30
d
Network number field 4-44, 4-46 Parallel Contacts 2-27, 5-24
New Folder 4-29 Password 4-12
Next error 4-41 Passwords for user groups 4-28
e
NOT 12-4 Pasting 4-38
Note in Help 4-53 Pasting in FBD 5-21
v
Notice at load 4-13 PD 14-5
i
Number Constants 15-2 PID 14-5
Number of data segments 4-12 Placeholder 4-20
h
PLC 4-42, 4-45
PLC_PRG 2-9
O
c
Pointer 11-4
POINTER 11-4
r
Object 2-2, 4-28
Object Organizer 4-2 POU (Program Organization Unit) 2-1, 2-9, 3-1, 4-2
Online 2-2, 5-10, 5-15, 6-18 Presentation 8-14
Previous error 4-41
A
Online Change 4-21, 4-27
Online functions 4-42 Previous version 4-36
Online in Security mode 4-9 Print 4-18
Online Menu Program 2-8
Breakpoint Dialog Box 4-44 PROGRAM 2-9
Download 4-43 Program call 2-8
Force values 4-45 Project 2-1, 2-8, 3-1
Log in 4-42 Project directory 4-10
Logout 4-42 Project info 4-5, 4-25
Release Force 4-46 Project Menu
Reset 4-43 Add object 4-30
Run 4-43 Build 4-21
Show Call Stack 4-46 Check all 4-21
Simulation 4-47 Compare 4-24
Single Cycle 4-45 Convert object 4-31
Copy object 4-31
WAGO-I/O-PRO 32 22-5
Index
t
Open object 4-32 Save Trace 6-15
Options 4-4 Screen divider 4-2
n
Passwords for user groups 4-28 SEL 12-8
Project info 4-25 Selecting 4-8
Rebuild all 4-21
e
Selecting in CFC 5-42
Register Changes 4-27 SEMA 13-6
Rename object 4-31 Sequential Function Chart 2-4, 2-8, 2-20, 3-7, 4-43,
Show call tree 4-34 5-28
m
Show cross reference list 4-34 Set Output 5-20, 5-27
Show unused variables 4-35 Set/Reset coils 2-28
View instance 4-33
u
SFC 2-4, 2-8, 2-20, 3-7, 4-43, 5-28
Project version 1.5 4-18 SFC Editor 5-28
PUTBIT 14-2
c
SFC Flags 2-24
SFC library 2-23
SFC Overview 5-33
Q
o
SFCCurrentStep 2-25
Qualifier 2-23 SFCEnableLimit 2-24
SFCError 2-25
D
SFCErrorPOU 2-25
R SFCErrorStep 2-25
R_TRIG 13-6 SFCInit 2-24
d
RAMP_INT 14-8 SFCPause 2-25
RAMP_REAL 14-9 SFCQuitError 2-24
SFCTrans 2-25
e
Read Receipt 6-19
Read trace 6-11 Shift 12-5
Read Trace 6-12 SHL 12-5
v
REAL 11-1 Shortcut Mode 5-5
i
REAL Constants 15-2 Show Call Stack 4-46
REAL_TO Conversions 12-16 Show grid 6-14
h
Receipt Manager 6-16 SHR 12-6
Redo 4-37 Simulation 2-29, 3-14, 4-42, 4-47
c
References 11-6 SIN 12-20
Sine 12-20
r
Register Changes 4-27
REPEAT 2-15 Single Cycle 4-45
REPEAT loop 2-19 Single Step 2-29, 4-44, 5-35
SINT 11-1
A
Replace 4-26, 4-39
REPLACE 13-4 SINT Constants 15-2
Reset 4-43 SIZEOF 12-3
Reset Output 5-20, 5-27 Sourcecode download 4-51
Resources 2-11, 4-2, 6-1 Sourcedownload 4-13
RETAIN 5-2, 6-2 SQRT 12-19
Retain Variable 5-2 Square Root 12-19
RETURN 2-14, 2-17, 5-18 SR 13-5
RIGHT 13-1 ST 2-3, 2-7, 2-13, 4-43, 5-13
rising edge 13-6 ST Editor 5-13
ROL 12-6 ST operand 2-14
ROR 12-7 ST operator 2-14
Rotation 12-6, 12-7 Standard data types 11-1
RS 13-5 Standard Function 7-2
RTC 13-13 Standard Library 3-4, 7-2
Standard POUs 2-3
22-6 WAGO-I/O-PRO 32
Chapter 22 - Index
Standard.lib 7-2
Start Trace 6-12
U
Statistics 4-26 UDINT 11-1
STATISTICS_INT 14-3 UDINT Constants 15-2
STATISTICS_REAL 14-4 UINT 11-1
Status bar 4-3, 4-9, 8-5 UINT Constants 15-2
Step 2-21, 4-44, 5-28 Undo 4-36
Step Attributes 5-31 UNPACK 14-2
t
Step Init 2-22 Unused variables 4-22
Stepping 5-10, 5-15, 5-35 User group 4-27
n
Stop 4-43 User information 4-6
Stop Trace 6-12 USINT 11-1
Stretch 6-14 USINT Constants 15-2
e
STRING 11-2
STRING Constants 15-3
String Functions 13-1 V
m
STRING_TO Conversions 12-18 VAR 5-2, 5-6
STRUCT 11-5 VAR_CONFIG 6-2, 6-3
Structured Text 2-3, 2-7, 2-13, 4-43, 5-13
u
VAR_GLOBAL 5-6, 6-2
Structures 2-3, 11-5 VAR_IN_OUT 5-2
SUB 12-1
c
VAR_INOUT 5-6
Syntax Coloring 5-1, 5-4 VAR_INPUT 5-1, 5-6
System Flag 15-3 VAR_INPUT CONSTANT 5-41
o
VAR_OUTPUT 5-2, 5-6
T Variable Configuration 6-3
Variables 15-3
D
Tab-width 4-7 Variables declaration 5-3
TAN 12-21 VARIANCE 14-4
Tangent 12-21 Visualization 2-11, 4-2, 8-1
d
Task Configuration 6-6 Bitmap 8-11
Text Editors 5-8 Colors 8-7
TIME 11-3 File - Print 8-16
e
TIME Constants 15-1 Input 8-10
Time Management in SFC Editor 5-32 Motion absolute 8-8
v
TIME_OF_DAY 11-3 Motion relative 8-8
i
TIME_OF_DAY Constants 15-2 Operation in online mode 8-16
TIME_TO Conversions 12-16 Operation over the keyboard 8-16
h
Timer 13-10 Shape 8-6
TO_BOOL Conversions 12-15 Text 8-6
c
TOD 11-3 Tooltip 8-11
TOD_TO Conversions 12-16 Variables 8-9
r
TOF 13-12 Visualization Elements, Configure 8-5
TON 13-11 Visualization Elements, Copy 8-4
Tool bar 4-2, 4-9 Visualization Elements, Insert 8-2
A
Tooltip 4-2, 4-29, 5-8, 5-10, 5-15, 5-22, 5-28 Visualization Elements, Shift, Move 8-4
TP 3-5, 13-10
Trace Buffer 6-9, 6-13
Trace in ASCII-file 6-15 W
Trace Variable 6-12 WAGO-I/O-PRO 2-1
Trace, Automatically Read 6-12 WAGO-I/O-PRO 32 Server 4-47
Transition 2-22, 5-28 Watch and Receipt Manager 6-16
Trigger 2-28, 6-11, 13-6 Watch and Receipt Manager Offline 6-16
Trigger Edge 6-11 Watch and Receipt Manager Online 6-18
Trigger Level 6-11 Watch List 6-16
Trigger Position 6-11 Watch Variable 5-8, 5-21
TRUNC 12-18 Watchdog 1-7
TYPE 11-5, 11-6 WHILE loop 2-15, 2-19
Type Conversions 12-13 Window 4-51
Types 5-4
WAGO-I/O-PRO 32 22-7
Index
Window Menu
Arrange symbols 4-51
Cascade 4-51
Close all 4-51
Library Manager 7-1
Messages 4-52
Tile Horizontal 4-51
Tile Vertical 4-51
t
WORD 11-1
WORD Constants 15-2
n
Work space 4-3
Write protection password 4-12
Write Receipt 6-19
e
m
XOR 12-4
u
Y
c
Y Scaling 6-14
o
Z
Zoom 5-20
D
Zoom Action 5-31
Zoom Transition 5-31
ed
iv
ch
A r
22-8 WAGO-I/O-PRO 32