
- •Important Comments
- •Legal Principles
- •Copyright
- •Personnel Qualification
- •Intended Use
- •Symbols
- •Font Conventions
- •Number Notation
- •Scope
- •Abbreviations
- •Scope of Delivery
- •System Configuration
- •Installation
- •Uninstall
- •Start
- •Important Informations
- •WAGO-I/O-PRO 32 V2.2 Overview
- •What is WAGO-I/O-PRO 32
- •Overview of WAGO-I/O-PRO 32 Functions
- •How is a project structured?
- •How do I set up my project?
- •How can I test my project?
- •Debugging
- •Additional Online Functions
- •Additional WAGO-I/O-PRO 32 Features
- •Summary
- •Project Components
- •Project
- •POU (Program Organization Unit)
- •Function
- •Function Block
- •Function Block Instances
- •Calling a function block
- •Program
- •Action
- •Resources
- •Libraries
- •Data types
- •Visualization
- •Languages
- •Instruction List (IL)
- •Modifiers and operators in IL
- •Structured Text (ST)
- •Expressions
- •Valuation of expressions
- •Assignment operator
- •Calling function blocks in ST
- •RETURN instruction
- •IF instruction
- •CASE instruction
- •FOR loop
- •WHILE loop
- •REPEAT loop
- •EXIT instruction
- •Sequential Function Chart (SFC)
- •Step
- •Action
- •Entry or exit action
- •Active step
- •IEC step
- •Qualifier
- •Implicit variables in SFC
- •SFC Flags
- •Alternative branch
- •Parallel branch
- •Jump
- •Function Block Diagram (FBD)
- •The Continuous Function Chart Editor (CFC)
- •Ladder Diagram (LD)
- •Contact
- •Coil
- •Function blocks in the Ladder Diagram
- •Set/Reset coils
- •Debugging, Online Functions
- •Sampling Trace
- •Debugging
- •Breakpoint
- •Single step
- •Single Cycle
- •Change values online
- •Monitoring
- •Simulation
- •The Standard
- •Programming Example
- •Controlling a Traffic Signal Unit
- •Create POU
- •What does TRAFFICSIGNAL do?
- •What does WAIT do?
- •What does SEQUENCE do?
- •What does PLC_PRG do?
- •"TRAFFICSIGNAL" declaration
- •"TRAFFICSIGNAL" body
- •Connecting the standard.lib
- •"WAIT" declaration
- •"WAIT" body
- •"SEQUENCE" first expansion level
- •Create a SFC diagram
- •Actions and transition conditions
- •"SEQUENCE" second expansion level
- •The result
- •TRAFFICSIGNAL simulation
- •Visualizing a Traffic Signal Unit
- •Creating a new visualization
- •Insert element in Visualization
- •The other traffic lights
- •The TRAFFICSIGNAL case
- •The second traffic signal
- •The ON switch
- •Font in the visualization
- •Components of WAGO-I/O-PRO 32
- •The Main Window
- •Menu bar
- •Tool bar
- •Object Organizer
- •Screen divider
- •Work space
- •Message window
- •Status bar
- •Context Menu
- •Options
- •'Project' 'Options'
- •Options for Load & Save
- •Options for User information
- •Options for Editor
- •Autodeclaration
- •Autoformat
- •Declarations as tables
- •Print margins
- •Comment
- •Tab-Width
- •Font
- •Mark
- •Bitvalues
- •Options for the Desktop
- •Options for Colors
- •Options for Directories
- •Options for Log
- •Options for Build
- •Passwords
- •'Sourcedownload'
- •Options for 'Symbol Configuration'
- •Options for 'Macros'
- •Managing Projects
- •'File' 'New'
- •'File' 'Open'
- •'File' 'Close'
- •'File' 'Save'
- •'File' 'Save as'
- •'File' 'Save/Mail Archive'
- •'File' 'Print'
- •'File' 'Printer setup'
- •'File' 'Exit'
- •'Project' 'Build'
- •'Project' 'Rebuild all'
- •'Project' 'Clean all'
- •'Project' 'Translate into another language'
- •Create translation file
- •Editing of the translation file
- •Translate Project (into another Language)
- •'Project' 'Document'
- •'Project' 'Export'
- •'Project' 'Import'
- •'Project' 'Merge'
- •'Project' 'Compare'
- •'Extras' 'Next difference'
- •'Extras' 'Previous difference'
- •'Extras' 'Accept change'
- •'Extras' 'Accept changed item'
- •'Extras' 'Accept properties'
- •'Extras' 'Accept access rights'
- •'Project' 'Project info'
- •'Project' 'Global Search'
- •'Project' 'Global replace'
- •'Project' 'Check'
- •Unused Variables
- •Overlapping memory areas
- •Access conflict
- •Multiple writes to output
- •User groups
- •'Project' 'Passwords for user groups'
- •Managing Objects in a Project
- •Object
- •Folder
- •'New Folder'
- •'Expand nodes' 'Collapse nodes'
- •'Project' 'Object Delete'
- •'Project' 'Object Add'
- •'Project' 'Object Rename'
- •'Project' 'Object Convert'
- •'Project' 'Object Copy'
- •'Project' 'Object Open'
- •'Project' 'Object Access rights'
- •'Project' 'Object properties'
- •'Project' 'Add Action'
- •'Project' 'Open Instance'
- •'Project' 'Show Call Tree'
- •'Projekt' 'Show cross reference'
- •General Editing Functions
- •'Edit' 'Undo'
- •'Edit' 'Redo'
- •'Edit' 'Cut'
- •'Edit' 'Copy'
- •'Edit' 'Paste'
- •'Edit' 'Delete"
- •'Edit' 'Find'
- •'Edit' 'Find next'
- •'Edit' 'Replace'
- •'Edit' 'Input Assistant'
- •Unstructured Display
- •Stuctured Display
- •'Edit''Declare Variable'
- •'Edit' 'Next error'"
- •'Edit' 'Previous error'"
- •'Edit' 'Macros'
- •General Online Functions
- •'Online-Change' Functionality
- •'Online' 'Login'
- •If the system reports
- •'Online' 'Logout'
- •'Online' 'Download'
- •'Online' 'Run'
- •'Online' 'Stop'
- •'Online' 'Reset'
- •'Online' 'Reset (cold)'
- •'Online' 'Reset (original)'
- •'Online' 'Toggle Breakpoint'
- •'Online' 'Breakpoint Dialog Box'
- •'Online' 'Step over'
- •'Online' 'Step in'
- •'Online' 'Single Cycle'
- •'Online' 'Write values'
- •'Online' 'Force values'
- •'Online' 'Release force'
- •'Online' 'Write/Force' Dialog'
- •'Online' 'Show Call Stack'
- •'Online' 'Flow Control'"
- •'Online' 'Simulation'
- •'Online' 'Communication Parameters'
- •Principle of a gateway system
- •What the communications parameters dialog on the local PC shows
- •Setting up the desired gateway server and channel
- •Setting up a new channel for the local gateway server
- •Tips for editing the parameters in the communications parameters dialogue
- •Quick check in the event of unsuccessful connection attempt to the gateway
- •'Online' 'Sourcecode download'
- •'Online' 'Create bootproject'
- •'Online' 'Write file to controller'
- •'Online' 'Load file from controller'
- •'Window' 'Log'
- •Menu Log
- •Storing the project log
- •Window set up
- •'Window' 'Tile Horizontal'
- •'Window' 'Tile Vertical'
- •'Window' 'Cascade'
- •'Window' 'Arrange Symbols'
- •'Window' 'Close All'
- •'Window' 'Messages'
- •Help when you need it
- •'Help' 'Contents and Index'
- •Main Help Window
- •Index Window
- •Context Sensitive Help
- •The Editors
- •Print margins
- •Comment
- •Zoom to POU
- •Open instance
- •Declaration Editor
- •Declaration Part
- •Input Variable
- •Output Variable
- •Input and Output Variables
- •Local Variables
- •Remanent variables
- •Constants, Typed Literals
- •External variables
- •Keywords
- •Variables declaration
- •AT Declaration
- •'Insert' 'Declarations keywords'
- •'Insert' 'Type'
- •Syntax Coloring
- •Shortcut Mode
- •Autodeclaration
- •Line Numbers in the Declaration Editor
- •Declarations as tables
- •'Insert' 'New Declaration'
- •Pragma instructiion
- •Declaration Editors in Online Mode
- •The Text Editors
- •'Insert''Operators'in text editors
- •'Insert''Operand'in text editors
- •'Insert''Function' in text editors
- •'Insert''Function Block' in text editors
- •Calling POUs with output parameters in text editors
- •The text editors in Online mode
- •'Extras' 'Monitoring Options'
- •Breakpoint Positions in Text Editor
- •How do you set a breakpoint?
- •Deleting Breakpoints
- •What happens at a breakpoint?
- •Line Number of the Text Editor
- •The Instruction List Editor
- •IL in Online mode
- •The Editor for Structured Text
- •The Graphic Editors
- •Zoom
- •Network
- •Label
- •Network Comments,'Extras' 'Options'
- •'Insert' 'Network (after)' or 'Insert' "Network (before)"
- •The network editors in the online mode
- •The Function Block Diagram Editor
- •Cursor positions in FBD
- •How to set the cursor in FBD
- •'Insert' 'Assign' in FBD
- •'Insert' 'Jump' in FBD
- •'Insert' 'Return' in FBD
- •'Insert' 'Box' in FBD
- •'Insert' 'Input'
- •'Insert' 'Output'
- •'Extras' 'Negate
- •'Extras' 'Set/Reset'
- •Cutting, Copying, Pasting, and Deleting in FBD
- •The Function Block Diagram in the Online Mode
- •The Ladder Editor
- •Cursor Positions in the LD Editors
- •'Insert' 'Contact'in LD
- •'Insert' 'Parallel Contact'
- •'Insert' 'Function Block in LD'
- •'Insert''Coil' in LD
- •POUs with EN Inputs
- •'Insert' 'Box with EN in LD'
- •'Insert' 'Function Block with EN'
- •'Insert' 'Function with EN'
- •'Insert' 'Insert at blocks in LD
- •'Insert' 'Jump' in LD
- •'Insert' 'Return' in LD
- •'Extras' 'Paste after' in LD
- •'Extras' 'Paste below'in LD
- •'Extras' 'Paste above' in LD
- •'Extras' 'Negate' in LD
- •'Extras' 'Set/Reset' in LD
- •The Ladder Diagram in the Online Mode
- •The Sequential Function Chart Editor
- •Marking Blocks in the SFC
- •'Insert' 'Step Transition (before)'
- •'Insert' 'Step Transition (after)'
- •'Insert' 'Alternative Branch (right)'
- •'Insert' 'Alternative Branch (left)'
- •'Insert' "Parallel Branch (right)"
- •'Insert' 'Parallel Branch (left)'
- •'Insert' 'Jump'
- •'Insert' 'Transition-Jump'
- •'Extras' 'Paste Parallel Branch (right)'
- •'Extras' 'Add label to parallel branch'
- •Delete a label
- •'Extras' 'Paste after'
- •'Extras' 'Zoom Action/Transition'
- •'Extras' "Clear Action/Transition"
- •'Extras' 'Step Attributes'
- •'Extras' 'Time Overview'
- •'Extras' 'Options'
- •'Extras' 'Associate Action'
- •Sequential Function Chart in Online Mode
- •The Continuous Function Chart Editor (CFC)
- •Cursor positions in the CFC
- •'Insert' 'Box' in the CFC
- •‚Insert' ‚Input' in CFC
- •'Insert' 'Output'in CFC
- •'Insert' 'Jump'in CFC
- •'Insert' 'Label' in CFC
- •'Insert' 'Return' in CFC
- •'Insert' 'Comment' in CFC
- •'Insert' 'Input of box' in CFC
- •'Extras' 'Negate' in CFC
- •'Extras' 'Set/Reset' in CFC
- •'Extras' 'EN/ENO' in CFC
- •‚Extras' ‚Properties...' in CFC
- •Selecting elementsin CFC
- •Moving elementsin CFC
- •Copying elementsin CFC
- •Creating connections
- •Deleting connections
- •Changing connections
- •'Extras' 'Connection marker'
- •Insert inputs/outputs "on the fly"
- •Order of execution
- •'Extras' 'Order' 'Display'
- •'Extras' 'Order' 'Order topologically'
- •'Extras' 'Order' 'One forwards'
- •'Extras' 'Order' 'One backwards'
- •'Extras' 'Order' 'To the beginning'
- •'Extras' 'Order' 'To the end'
- •'Extras' 'Order' 'Order everything according to data flow''
- •'Extras' 'Create macro''
- •'Extras' 'Jump into Macro'
- •'Extras' 'Expand macro'
- •'Extras' 'Back one macro level', 'Extras' 'Back all macro level'
- •Feedback paths in CFC
- •CFC in Online mode
- •Overview of the Resources
- •Global Variables
- •Editing Global Variables
- •Several Variables Lists
- •Global Variables
- •Create a Global Variable List
- •Editing Global Variable Lists
- •Editing Remanent Global Variables Lists
- •Global Constants
- •Variable Configuration
- •‚Insert' 'All Instance Paths'
- •Document Frame
- •Document Frame
- •'Extras' 'Make Docuframe File'
- •'Extras' 'Link Docu File'
- •PLC Browser
- •PLC Configuration
- •PLC Selection
- •Task Configuration
- •Which task is being processed?
- •Working in the Task Configuration
- •'Insert' 'Insert Task' or 'Insert' 'Append Task'
- •'Insert' 'Insert Program Call' or 'Insert' 'Append Program Call'
- •'Extras' 'Edit Entry'
- •'Extras' 'Set Debug Task'
- •Sampling Trace
- •'Extras' 'Trace Configuration'
- •'Extra' 'Start Trace'
- •'Extra' 'Read Trace'
- •'Extra' 'Auto Read'
- •'Extra' 'Stop Trace'
- •Selection of the Variables to be Displayed
- •Display of the Sampling Trace
- •'Extras' 'Cursor Mode'
- •'Extras' 'Multi Channel'
- •'Extras' 'Show grid'
- •'Extras' 'Y Scaling'
- •'Extras' 'Stretch'
- •'Extras' 'Compress'
- •'Extras' 'Save Trace'
- •'Extras' 'Load Trace'
- •Watch and Receipt Manager
- •Watch and Receipt Manager
- •Watch and Receipt Manager in the Offline Mode
- •'Insert' 'New Watch List'
- •'Extras' 'Rename Watch List'
- •'Extras' 'Save Watch List'
- •'Extras' 'Load Watch List'
- •Watch and Receipt Manager in the Online Mode
- •'Extra' 'Monitoring Active'
- •'Extras' 'Write Receipt'
- •'Extras' 'Read Receipt'
- •Force values
- •Library Manager
- •Using the Library Manager
- •Standard Library
- •User-defined Libraries
- •'Insert' 'Additional Library'
- •Remove Library
- •Visualization
- •Visualization
- •Create Visualization
- •Visualization Elements, Insert
- •Visualization Elements, Insert
- •'Insert' 'Rectangle'
- •'Insert' 'Rounded Rectangle'
- •'Insert' 'Ellipse'
- •'Insert' 'Polygon'
- •'Insert' 'Line'
- •'Insert' 'Curve'
- •'Insert' 'Bitmap'
- •'Insert' 'Visualization'
- •'Insert' 'Button'
- •Working with Visualization Elements
- •Selecting Visualization Elements
- •Modifying Visualization Elements
- •Dragging Visualization Elements
- •Copying Visual Elements
- •Changing the Selection and Insert Mode
- •Status Bar in the Visualization
- •Visualization Elements, Configure
- •'Extras' 'Configure'
- •Placeholder
- •'Extras' 'Placeholder list'
- •Shape
- •Text
- •Line width
- •Colors
- •Motion absolute
- •Motion relative
- •Variables
- •Input
- •ToolTip
- •Bitmap
- •Visualization
- •Additional Visualization Element Functions
- •'Extras' 'Send to Front'
- •'Extras' 'Send to Back'
- •'Extras' 'Select Background Bitmap'
- •'Extras' 'Clear Background Bitmap'
- •'Extras' 'Align'
- •'Extras' 'Select All'
- •'Extras' 'Select Mode'
- •'Extras' 'Element list'
- •'Extras' 'Settings'
- •Operation over the keyboard - in online mode
- •'File' 'Print' in online mode
- •Visualizations in libraries
- •DDE Interface
- •DDE Communication with WAGO-I/O-PRO 32
- •Activating the DDE Interface
- •General Approach to Data
- •Which variables can be read?
- •Linking variables using WORD
- •Linking variables using EXCEL
- •Accessing variables with Intouch
- •Keyboard Commands
- •Use of Keyboard
- •Key Combinations
- •Data Types
- •Standard Data types
- •Data types
- •BOOL
- •Integer Data Types
- •REAL
- •STRING
- •Time Data Types
- •Defined Data Types
- •ARRAY
- •Function Checkbounds
- •Pointer
- •Enumeration
- •Structures
- •References
- •Subrange types
- •The IEC Operators
- •The IEC Operators
- •Arithmetic Operators
- •INDEXOF
- •SIZEOF
- •Bitstring Operators
- •Bit-Shift Operators
- •Selection Operators
- •LIMIT
- •Comparison Operators
- •Address Operators
- •Content Operator
- •Calling Operator
- •Type Conversion Functions
- •BOOL_TO Conversions
- •TO_BOOL Conversions
- •Conversion between Integral Number Types
- •REAL_TO Conversions
- •TIME_TO/TIME_OF_DAY Conversions
- •STRING_TO Conversions
- •TRUNC
- •Numeric Functions
- •SQRT
- •ASIN
- •ACOS
- •ATAN
- •EXPT
- •Standard Library Elements
- •String functions
- •LEFT
- •RIGHT
- •CONCAT
- •INSERT
- •DELETE
- •REPLACE
- •FIND
- •Bistable Function Blocks
- •SEMA
- •Trigger
- •R_TRIG
- •F_TRIG
- •Counter
- •CTUD
- •Timer
- •The UTIL.LIB Library
- •UTIL.LIB Library
- •BCD conversion
- •Bit/byte functions
- •EXTRACT
- •PACK
- •PUTBIT
- •UNPACK
- •Mathematical help functions
- •DERIVATIVE
- •INTEGRAL
- •STATISTICS_INT
- •STATISTICS_REAL
- •VARIANCE
- •Controllers
- •Signal generators
- •BLINK
- •Function manipulators
- •CHARCURVE
- •RAMP_INT
- •RAMP_REAL
- •Analogue value processing
- •HYSTERESIS
- •LIMITALARM

318 • Standard Library Elements
String functions
13Standard Library Elements
13.1 String functions
Note:
String functions are not "thread safe": When using tasks, string functions may only be used in a single task. If the same function is used in different tasks, there is a danger of overwriting.
13.1.1LEN
Returns the length of a string. Input STR is of type STRING, the return value of the function is type INT.
Example in IL:
LD 'SUSI'
LEN
ST |
VarINT1 |
(* Ergebnis ist 4 *) |
Example in FBD:
Example in ST:
VarSTRING1 := LEN ('SUSI');
Note:
String functions are not "thread safe"
13.1.2LEFT
Left returns the left, initial string for a given string. Input STR is type
STRING, 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 string STR.
Example in IL:
LD 'SUSI'
LEFT 3
ST |
VarSTRING1 (* Ergebnis ist 'SUS' *) |
WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

Standard Library Elements |
• 319 |
String functions |
|
|
|
Example in FBD:
Example in ST:
VarSTRING1 := LEFT ('SUSI',3);
Note:
String functions are not "thread safe"!
13.1.3RIGHT
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.
Example in IL:
LD |
'SUSI' |
RIGHT 3 |
|
ST |
VarSTRING1 (* Ergebnis ist 'USI' *) |
Example in FBD:
Example in ST:
VarSTRING1 := RIGHT ('SUSI',3);
Note:
String functions are not "thread safe"!
13.1.4MID
Mid returns a partial string from within a string.
WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

320 • Standard Library Elements
String functions
Input STR is type STRING, LEN and POS are type INT, the return value of the function is type STRING.
MID (STR, LEN, POS) means: Retrieve LEN characters from the STR string beginning with the character at position POS.
Example in IL:
LD |
'SUSI' |
RIGHT 2,2 |
|
ST |
VarSTRING1 (* Ergebnis ist 'US' *) |
Example in FBD:
Example in ST:
VarSTRING1 := MID ('SUSI',2,2);
Note:
String functions are not "thread safe"!
13.1.5CONCAT
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' *) |
Example in FBD:
Example in ST:
VarSTRING1 := CONCAT ('SUSI','WILLI');
WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32

Standard Library Elements |
• 321 |
String functions |
|
|
|
Note:
String functions are not "thread safe"!
13.1.6INSERT
INSERT inserts a string into another string at a defined point.
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 POS.
Example in IL:
LD |
'SUSI' |
|
INSERT |
'XY',2 |
|
ST |
VarSTRING1 (* Ergebnis ist 'SUXYSI' *) |
Example in FBD:
Example in ST:
VarSTRING1 := INSERT ('SUSI','XY',2);
Note:
String functions are not "thread safe"!
13.1.7DELETE
DELETE removes a partial string from a larger string at a defined position.
The input variable STR is type STRING, LEN and POS are type INT, the return value of the function is type STRING.
DELETE(STR, L, P) means: Delete L characters from STR beginning with the character in the P position.
Example in IL:
LD 'SUXYSI'
DELETE 2,23
ST |
Var1 (* Ergebnis ist 'SUSI' *) |
WAGO-I/O-SYSTEM 759 WAGO-I/O-PRO 32