0% found this document useful (0 votes)
156 views952 pages

AADvance Workbench

Aadvantage PLC Bech Rockwell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
156 views952 pages

AADvance Workbench

Aadvantage PLC Bech Rockwell
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 952

AADvance 2.

1 Workbench
System release 1.40
AADvance

Printing History 1st printing — January 2018

Copyright © 2018: Rockwell Automation Technologies, Inc. All rights reserved. No portion
of this work may be reproduced in any form or by any means, without the prior written
permission of Rockwell Automation.
Table of Contents
Additional Information _____________________________ 1
AADvance Workbench _____________________________ 5
Language Editor..................................................................................................... 7
Editing the Contents of Language Containers ................................................ 8
Block Library ....................................................................................................... 13
Version Control.................................................................................................... 15
Defining a Repository................................................................................... 18
Checking In Elements to Version Control.................................................... 19
Checking Out Elements from Version Control ............................................ 21
Undoing Check Outs of Elements ................................................................ 22
Reviewing Pending Checkins ....................................................................... 23
Getting the Latest Versions of Elements ...................................................... 24
Labeling a Version........................................................................................ 25
Archiving and Restoring Repository Projects .............................................. 26
Accessing Repository Projects ..................................................................... 28
Publishing Libraries...................................................................................... 30
Working Offline and Reconnecting to a Repository .................................... 31
Viewing the History of Elements ................................................................. 33
Refreshing the Version Control Status of Elements ..................................... 35
Controller Status .................................................................................................. 37
Front Panel Status Indicators ........................................................................ 39
Variable Dependencies ........................................................................................ 43
Properties Window ....................................................................................... 47
Locked Variables Viewer .................................................................................... 49
Toolbox ................................................................................................................ 51
Variable Selector.................................................................................................. 55
Managing Variables from the Variable Selector .......................................... 59
Creating Variables from the Variable Selector........................................60
Editing Variables from the Variable Selector..........................................64
Deleting Variables from the Variable Selector........................................65
Block Selector...................................................................................................... 67
Parameters Display ....................................................................................... 70

AADvance Workbench i
Parameters View.................................................................................................. 71
Find and Replace Utility...................................................................................... 75
Quick Find .................................................................................................... 76
Quick Replace .............................................................................................. 78
Compiler Verification.......................................................................................... 81
Spy Lists .............................................................................................................. 89
Add-in Manager................................................................................................... 99
External Tools.................................................................................................... 101
Working in the Development Environment....................................................... 103
Zooming the Contents of Active POUs...................................................... 104
Displaying the Output Window.................................................................. 105
Using the Error List .................................................................................... 107
Arranging and Docking Windows.............................................................. 109
Searching in the Development Environment.............................................. 112
Navigating in the Development Environment............................................ 113
Customizing Toolbars ................................................................................ 115
Creating Toolbars ....................................................................................... 116
Customizing Commands ............................................................................ 117
Importing and Exporting Settings .............................................................. 121
Export Selected Environment Settings ..................................................122
Naming a Settings File.....................................................................123
Settings Export in Progress..............................................................124
Import Selected Environment Settings ..................................................125
Choosing a Collection of Settings to Import....................................126
Choosing Settings to Import ............................................................127
Settings Import in Progress..............................................................128
Reset all Settings ...................................................................................129
Settings Reset in Progress................................................................130
Operations Summary .............................................................................131
Development Environment Keyboard Shortcuts........................................ 132
Options for the Development Environment....................................................... 135
Setting Environment Options ..................................................................... 136
Find and Replace Settings .....................................................................138
Import and Export Settings....................................................................139
Shortcut Keyboard Combinations..........................................................140
Startup....................................................................................................143
Tabs and Windows ................................................................................144
Specifying Project Options......................................................................... 146

ii AADvance 2.1 - Table of Contents


Build Options .........................................................................................148
Online Settings.......................................................................................149
Specifying Block Library Settings.............................................................. 150
Setting Grid Options ................................................................................... 151
Arrays View ...........................................................................................152
Defined Words View .............................................................................153
Dictionary View.....................................................................................154
Parameters Grid .....................................................................................155
Structures View......................................................................................156
Variable Groups View ...........................................................................157
Variable Selector Settings......................................................................158
Setting IEC Language Options ................................................................... 159
Function Block Diagram Settings..........................................................160
Ladder Diagram Settings .......................................................................164
Sequential Function Chart Settings........................................................167
Structured Text Settings.........................................................................171
Defining Spy List Settings.......................................................................... 174
Offline Grid Settings..............................................................................175
Online Grid Settings ..............................................................................176
Description Window .......................................................................................... 177

Working with AADvance Workbench _______________ 179


Creating a Project............................................................................................... 180
Controllers .................................................................................................. 184
Programs ..................................................................................................... 191
Functions .................................................................................................... 194
Function Blocks .......................................................................................... 198
Variables ..................................................................................................... 202
Libraries...................................................................................................... 204
Opening a Project............................................................................................... 210
Closing a Project ................................................................................................ 211
Setting Project Access Control .......................................................................... 212
Setting Target Access Control ........................................................................... 215
Importing and Exporting Variables Data........................................................... 217
Generating Code ................................................................................................ 223
Building a Project ....................................................................................... 224
Verifying Program Syntax.......................................................................... 226

AADvance Workbench iii


Cleaning a Project ...................................................................................... 227
Running an Application Online ......................................................................... 228
Downloading Code to Controllers.............................................................. 229
Performing Updates.................................................................................... 230
Starting and Stopping Controllers .............................................................. 236
Clearing an Application.............................................................................. 238
Connecting with Controllers ...................................................................... 239
Modifying Cycle Timing............................................................................ 241
Disconnecting from Controllers ................................................................. 243
Simulating an Application ................................................................................. 244
Pausing Projects and Controllers................................................................ 246
Forcing the Values of Variables ........................................................................ 247
Monitoring the Values of Variables .................................................................. 249
Accessing the Values of System Variables ....................................................... 250
Naming Conventions and Limitations ............................................................... 254
File System Paths............................................................................................... 262
Dictionary .......................................................................................................... 263
Arrays Grid................................................................................................. 265
Structures Grid ........................................................................................... 268
Defined Words Grid ................................................................................... 271
Variables Grid ............................................................................................ 274
Quick Declaration of Variables .............................................................281
Cross Reference Browser .................................................................................. 283
Application View............................................................................................... 287
Communication View........................................................................................ 291
Defining Ethernet Ports .............................................................................. 294
Using Modbus Communications ................................................................ 296
Defining a Modbus Slave ......................................................................302
Defining a Modbus Master ....................................................................304
Defining a Modbus Master Slave ....................................................310
Defining Modbus Master Slave Messages.......................................317
Specifying the Workbench and OPC Communications ............................. 322
Mapping OPC Variables........................................................................323
Mapping SOE Variables ........................................................................326
Configuring Serial Ports ............................................................................. 329
Configuring the Controller for SNTP......................................................... 331
Configuring a Controller as an SNTP Client.........................................333

iv AADvance 2.1 - Table of Contents


Configuring a Controller as an SNTP Server ........................................336
Using a Controller as an SNTP Client and Server.................................339
Configuring Serial Tunneling ..................................................................... 340
Defining Bindings....................................................................................... 342
Creating Links between Controllers ......................................................348
Mapping Variable Bindings...................................................................354
Using CIP over Ethernet/IP ........................................................................ 357
Creating the CIP Produce Link ..............................................................359
Map CIP Producer Variables ...........................................................360
Creating CIP Consume Links ................................................................362
Map CIP Consumer Variables .........................................................364
Configuring Peer-to-Peer Communications ............................................... 366
Configuring a Peer-to-Peer Network .....................................................369
Configuring a Peer-to-Peer Subnet ..................................................370
Defining the Peer List ......................................................................374
Configuring Peer-to-Peer Data Blocks.............................................376
Digital Inputs..............................................................................378
Analog Inputs .............................................................................381
Digital Outputs ...........................................................................384
Analog Outputs...........................................................................385
Data Variables ............................................................................386
Defining the Quality of Service.................................................................. 388
Equipment View ................................................................................................ 391
Configuring the Controller ......................................................................... 394
Configuring Processor Variables................................................................ 397
Status Processor Variables.....................................................................399
Status Integers ..................................................................................401
Status Booleans ................................................................................403
Control Processor Variables ..................................................................411
Control Integers................................................................................412
Control Booleans..............................................................................414
RTC Processor Variables and the Real Time Clock..............................417
RTC Status Variables.......................................................................419
RTC Program Variables...................................................................422
RTC Control Variables ....................................................................425
Configuring the Controller I/O ................................................................... 431
Configuring I/O Modules ........................................................................... 435
Series 9000 Structure Data Types..........................................................444
Digital Inputs .........................................................................................445

AADvance Workbench v
Channels for Digital Inputs..............................................................446
Threshold Values for Digital Inputs ................................................450
Analog Inputs.........................................................................................454
Channels for Analog Inputs .............................................................455
HART for Analog Inputs .................................................................459
HART Pass-Through for Analog Inputs ....................................465
Threshold Values for Analog Inputs................................................474
Digital Outputs ......................................................................................478
Channels for Digital Outputs ...........................................................479
Advanced Settings for Digital Output Channels........................485
Variables for Digital Outputs...........................................................487
Status Booleans ..........................................................................489
Field Power Status Integers........................................................490
Analog Outputs......................................................................................492
Channels for Analog Outputs...........................................................493
Advanced Settings for Analog Output Channels .......................498
HART for Analog Outputs...............................................................500
HART Pass-Through for Analog Outputs..................................506
System Security ................................................................................................. 515
Network Firewall........................................................................................ 517
Windows Firewall ...................................................................................... 519
AADvance Discover.......................................................................................... 521
Generating Documentation................................................................................ 535
FBD Language................................................................................................... 541
FBD Diagram Main Format ....................................................................... 542
Execution Order of FBD Programs ............................................................ 544
Debugging FBD Programs ......................................................................... 546
FBD Elements ............................................................................................ 547
Blocks ....................................................................................................549
Variables ................................................................................................551
Vertical Bars ..........................................................................................553
Labels.....................................................................................................554
Jumps .....................................................................................................556
Returns...................................................................................................558
Rungs .....................................................................................................559
Left Power Rails ....................................................................................560
Right Power Rails ..................................................................................561
Coils.......................................................................................................562

vi AADvance 2.1 - Table of Contents


Direct Coil........................................................................................564
Reverse Coil .....................................................................................565
Set Coil.............................................................................................566
Reset Coil .........................................................................................567
Contacts..................................................................................................568
Direct Contact ..................................................................................570
Reverse Contact ...............................................................................571
Pulse Rising Edge Contact ...............................................................572
Pulse Falling Edge Contact ..............................................................573
Regions ..................................................................................................574
Comments ..............................................................................................575
FBD Keyboard Shortcuts............................................................................ 576
LD Language ..................................................................................................... 579
Debugging LD Programs............................................................................ 581
LD Elements ............................................................................................... 585
Rungs .....................................................................................................587
Blocks ....................................................................................................590
Coils .......................................................................................................595
Direct Coil........................................................................................598
Reverse Coil .....................................................................................599
Pulse Rising Edge Coil.....................................................................600
Pulse Falling Edge Coil....................................................................601
Set Coil.............................................................................................602
Reset Coil .........................................................................................603
Contacts..................................................................................................604
Direct Contact ..................................................................................607
Reverse Contact ...............................................................................608
Pulse Rising Edge Contact ...............................................................609
Pulse Falling Edge Contact ..............................................................610
Jumps .....................................................................................................611
Returns ...................................................................................................614
Branches.................................................................................................616
Selecting LD Elements ............................................................................... 618
LD Keyboard Shortcuts .............................................................................. 620
ST Language ...................................................................................................... 625
ST Main Syntax .......................................................................................... 626
Expressions and Parentheses ...................................................................... 630
Calling Functions........................................................................................ 631

AADvance Workbench vii


Calling Function Blocks ............................................................................. 632
Debugging ST Programs ............................................................................ 633
ST Basic Elements and Statements ............................................................ 635
Assignments...........................................................................................636
CASE Statement ....................................................................................637
EXIT Statement .....................................................................................638
FOR Statement ......................................................................................639
IF-THEN-ELSIF-ELSE-END_IF Statement.........................................641
REPEAT Statement ...............................................................................643
RETURN Statement ..............................................................................644
WHILE Statement .................................................................................646
ST Extensions............................................................................................. 647
GSTART Statement in SFC Action.......................................................648
GFREEZE Statement in SFC Action.....................................................650
GKILL Statement in SFC Action ..........................................................652
GSTATUS Statement in SFC Action ....................................................654
GRST Statement in SFC Action ............................................................656
ST Keyboard Shortcuts .............................................................................. 658
SFC Language ................................................................................................... 663
SFC Main Format ....................................................................................... 664
SFC Execution Behavior ............................................................................ 666
SFC Program Hierarchy ............................................................................. 668
Child SFC POUs ........................................................................................ 669
Debugging SFC Programs.......................................................................... 671
Breakpoint on Step Activation...............................................................672
Breakpoint on Step Deactivation ...........................................................673
Breakpoint on Transition .......................................................................675
Transition Clearing Forcing...................................................................676
SFC Elements ............................................................................................. 677
Steps.......................................................................................................679
Transitions .............................................................................................681
Sequence Controls .................................................................................682
Selection Divergences......................................................................683
Selection Convergences ...................................................................685
Simultaneous Divergences...............................................................686
Simultaneous Convergences ............................................................687
Jumps to Steps .......................................................................................688
Coding Action Blocks for Steps ................................................................. 690
Boolean Actions.....................................................................................692

viii AADvance 2.1 - Table of Contents


Pulse Actions .........................................................................................693
Non-Stored Actions ...............................................................................694
SFC Actions ...........................................................................................695
Coding Conditions for Transitions ............................................................. 697
Conditions Programmed in ST...............................................................698
Conditions Programmed in LD..............................................................699
Calling Functions from Transitions ............................................................ 700
Calling Function Blocks from Transitions ................................................. 701
SFC Keyboard Shortcuts ............................................................................ 702
Language Reference .......................................................................................... 707
Programs ..................................................................................................... 708
Functions .................................................................................................... 710
Function Blocks .......................................................................................... 711
Execution Rules .......................................................................................... 712
Reserved Keywords .................................................................................... 713
Variables ..................................................................................................... 715
Directly Represented Variables .................................................................. 716
Defined Words............................................................................................ 718
Data Types .................................................................................................. 719
Elementary IEC 61131-3 Types.............................................................720
Boolean Data Type...........................................................................722
Short Integer Data Type ...................................................................723
Unsigned Short Integer or BYTE Data Type...................................724
Integer Data Type.............................................................................725
Unsigned Integer or Word Data Type..............................................726
Double Integer Data Type................................................................727
Unsigned Double Integer or Double Word Data Type ....................728
Long Integer Data Type ...................................................................729
Unsigned Long Integer or Long Word Data Type ...........................730
Real Data Type.................................................................................731
Long Real Data Type .......................................................................732
Time Data Type................................................................................733
Date Data Type ................................................................................734
String Data Type ..............................................................................735
Derived Types: Arrays...........................................................................737
Derived Types: Structures......................................................................738
Operators............................................................................................................ 739
1 GAIN ....................................................................................................... 741

AADvance Workbench ix
Addition...................................................................................................... 742
AND .......................................................................................................... 744
ANY_TO_BOOL ....................................................................................... 745
ANY_TO_BYTE........................................................................................ 746
ANY_TO_DATE ....................................................................................... 747
ANY_TO_DINT ........................................................................................ 748
ANY_TO_DWORD ................................................................................... 749
ANY_TO_INT ........................................................................................... 750
ANY_TO_LINT ......................................................................................... 751
ANY_TO_LREAL ..................................................................................... 753
ANY_TO_LWORD ................................................................................... 754
ANY_TO_REAL........................................................................................ 756
ANY_TO_SINT ......................................................................................... 757
ANY_TO_STRING.................................................................................... 758
ANY_TO_TIME ........................................................................................ 760
ANY_TO_UDINT...................................................................................... 761
ANY_TO_UINT ........................................................................................ 762
ANY_TO_ULINT ...................................................................................... 763
ANY_TO_USINT ...................................................................................... 765
ANY_TO_WORD...................................................................................... 766
Division ...................................................................................................... 767
Equal........................................................................................................... 769
Greater Than............................................................................................... 771
Greater Than or Equal ................................................................................ 773
Less Than ................................................................................................... 775
Less Than or Equal..................................................................................... 777
Multiplication ............................................................................................. 779
NEG ........................................................................................................... 781
NOT ........................................................................................................... 782
Not Equal.................................................................................................... 783
OR ............................................................................................................. 785
Subtraction.................................................................................................. 786
XOR ........................................................................................................... 788
Functions ........................................................................................................... 789
ABS ........................................................................................................... 791
ACOS ........................................................................................................ 792
AND_MASK.............................................................................................. 793
ASCII.......................................................................................................... 794
ASIN .......................................................................................................... 795

x AADvance 2.1 - Table of Contents


ATAN ........................................................................................................ 796
CHAR ........................................................................................................ 797
COS ........................................................................................................... 798
CURRENT_ISA_DATE............................................................................. 799
DELETE ..................................................................................................... 800
EXPT ......................................................................................................... 802
FIND .......................................................................................................... 803
INSERT ...................................................................................................... 805
LEFT .......................................................................................................... 807
LIMIT ......................................................................................................... 809
LOG ........................................................................................................... 810
MAX .......................................................................................................... 811
MID ............................................................................................................ 812
MIN ............................................................................................................ 814
MLEN ........................................................................................................ 815
MOD .......................................................................................................... 817
MUX4 ........................................................................................................ 818
MUX8 ........................................................................................................ 820
NOT_MASK............................................................................................... 822
ODD ........................................................................................................... 823
OR_MASK ................................................................................................. 824
POW .......................................................................................................... 825
RAND ........................................................................................................ 826
REPLACE .................................................................................................. 828
RIGHT ........................................................................................................ 830
ROL ........................................................................................................... 832
ROR ........................................................................................................... 833
SEL ............................................................................................................ 834
SHL ............................................................................................................ 835
SHR ........................................................................................................... 836
SIN ............................................................................................................. 838
SQRT ......................................................................................................... 839
SUB_DATE_DATE ................................................................................... 840
TAN ........................................................................................................... 841
TRUNC....................................................................................................... 842
XOR_MASK .............................................................................................. 843
Function Blocks ................................................................................................. 845
AVERAGE ................................................................................................. 846
BLINK ........................................................................................................ 848

AADvance Workbench xi
CMP ........................................................................................................... 849
CTD ........................................................................................................... 851
CTU ........................................................................................................... 853
CTUD ........................................................................................................ 854
DERIVATE ................................................................................................ 856
F_TRIG ...................................................................................................... 858
HYSTER .................................................................................................... 859
INTEGRAL ................................................................................................ 860
LIM_ALRM ............................................................................................... 862
R_TRIG ...................................................................................................... 864
RS .............................................................................................................. 865
SIG_GEN ................................................................................................... 867
SR .............................................................................................................. 869
STACKINT ................................................................................................ 871
TOF ........................................................................................................... 873
TON ........................................................................................................... 874
TP .............................................................................................................. 875
Series 9000_L Function Blocks......................................................................... 877
KvbConsNetStatus ..................................................................................... 878
KvbProdNetStatus ...................................................................................... 880
MathErr ...................................................................................................... 882
ModbusServiceStatus ................................................................................. 883
SoeServiceStatus ........................................................................................ 884
Glossary ............................................................................................................. 887
Licensing ........................................................................................................... 913

xii AADvance 2.1 - Table of Contents


Additional Information
DISCLAIMER

In no event will Rockwell Automation be responsible or liable for indirect or consequential


damages resulting from the use or application of this equipment. The examples given in this
manual are included solely for illustrative purposes. Because of the many variables and
requirements related to any particular installation, Rockwell Automation does not assume
responsibility or reliability for actual use based on the examples and diagrams.

No patent liability is assumed by Rockwell Automation, with respect to use of information,


circuits, equipment, or software described in this manual. All trademarks are acknowledged.

It is not intended that the information in this publication cover every possible detail about the
construction, operation, or maintenance of a control system installation. You should also refer
to your own local (or supplied) system safety manual, installation and operator/maintenance
manuals.

Important: System integrators tasked with building and setting up systems must ensure the
application is compliant with local, national, international, and safety standards.

PROGRAM ENABLE KEY

The AADvance controller has a program enable key plugged into the key connector on the
9100 processor base unit. When the key is removed, the controller application is protected from
unwanted changes. You must fit the program enable key before performing downloads,
modifying the application, or modifying the controller IP address.

AADvance Workbench 1
ADDITIONAL INFORMATION

For additional information about the AADvance Workbench and AADvance controllers,
review the information located at the Rockwell Automation Support Center:

http://rockwellautomation.custhelp.com

Important: A login account is required to access the Support Center. Click Sign Up to create
an account. Additionally, some Knowledgebase articles require a TechConnect Support
Contract.

From the Support site, you can access the following information:

Knowledgebase product notifications and technical notes

Literature Library

Compatibility & Downloads Center

For Knowledgebase articles, refine the search by Product, and then select ICS
Triplex>AADvance.

2 AADvance 2.1 - Additional Information


You are recommended to read the following manuals found on the Literature Library support
site:

Publication # Manual
ICSTT-RM446M- AADvance Safety Manual
EN-P
(http://literature.rockwellautomation.com/idc/groups/literature/document
s/rm/icstt-rm446_-en-p.pdf)
ICSTT-RM458A- AADvance Configuration Guide (WB2.x)
EN-P
(http://literature.rockwellautomation.com/idc/groups/literature/document
s/rm/icstt-rm458_-en-p.pdf)

Note: The majority of the information found in this manual is also found
in the current Workbench online help.
ICSTT-RM448I-E AADvance System Build Manual
N-P
(http://literature.rockwellautomation.com/idc/groups/literature/document
s/rm/icstt-rm448_-en-p.pdf)
ICSTT-RM406G- Troubleshooting and Repair Manual
EN-P
(http://literature.rockwellautomation.com/idc/groups/literature/document
s/rm/icstt-rm406_-en-p.pdf)
553701 OPC Portal Server User Guide
(http://literature.rockwellautomation.com/idc/groups/literature/document
s/rm/icstt-rm407_-en-p.pdf)

DOCUMENTATION FEEDBACK

Your comments help us to write better user documentation. If you discover an error, or have a
suggestion on how to make this publication better, send your comment to our technical support
group:

http://rockwellautomation.custhelp.com

AADvance Workbench 3
4 AADvance 2.1 - Additional Information
AADvance Workbench
AADvance is a complete suite for building process control projects for use with Series 9000
controllers. The AADvance environment includes development tools and other technologies
simplifying design, development, and deployment of applications. You develop projects on a
Windows development platform, from the workbench and language editors.

The workbench graphically represents and organizes controllers and networks. The
development process consists of creating projects made up of controllers, representing
individual target nodes. The development environment is made up of multiple windows and
tools:

Application View

Communication View

Equipment View

AADvance Discover

Language Editors

Block Library

Version Control and Pending Checkins

Controller Status

Cross Reference Browser

Variable Dependencies

Collection Editor

Variable Selector

Block Selector

AADvance Workbench 5
Parameters Display

Parameters List

Find and Replace Utility

Spy List

Add-in Manager

Description Window

Properties Window

Toolbox

Error list

Output Window

Document Generator

6 AADvance 2.1 - AADvance Workbench


Language Editor
The language editor is the environment where you develop the contents of POUs. You develop
these POUs using language containers. Language containers hold elements of a given IEC
61131-3 programming language. A POU can only have one language container. Description
containers hold non-semantic information. When building projects, the compiler excludes
information from description and HMI containers.

From the language editor, you can edit multiple POUs simultaneously. Individual POUs are
opened in separate workspaces each having a tab indicating the POU name. The tabs enable
moving from one POU to another.

When working in the language editor, you can choose to expand the workspace to a full-screen
view.

You can edit the contents of language containers in the editor workspace.

To expand the workspace to the full-screen view


From the View menu, click Full Screen.

AADvance Workbench 7
Editing the Contents of Language Containers
You develop POUs using language containers. When developing POUs, you can only insert
elements from the corresponding language Toolbox into the open language container. POUs
can have only one language container.

Selecting elements

Inserting elements

Inserting identifiers

Inserting blocks

Moving elements

Resizing elements

Deleting elements

For graphical POUs, the workbench displays an error symbol ( ) below elements having
errors in the programming logic. Pausing on this symbol displays a description of the error.

To select elements

In the workspace, you can select individual or multiple elements within a language container.
Selected elements are displayed with a colored handles. When selecting multiple elements, the
handles of the first element are green and subsequent elements are turquoise.

When aligning multiple elements, the reference point differs depending on the programming
language.

1. To select one element, click the element in the language container.

2. To select multiple elements, do one of the following:

8 AADvance 2.1 - Language Editor


 Starting from empty workspace, drag the pointer over the elements.
 While pressing SHIFT, use the pointer to select elements individually.

To insert elements

You can insert elements of a given language into its corresponding language container within
the workspace.
From the Toolbox, drag the element into the language container.

To insert an identifier

You can insert identifiers, i.e., variables, from the Dictionary. You can also create new
variables, enter literal values into a POU, and access the parameters of functions or function
blocks. When creating a new variable, you need to assign a unique name, specify its type, and
define its scope in relation to the POU.

When inserting identifiers, you can choose to insert a constant or variable automatically via the
Variable Selector.

1. From the Toolbox, drag the variable element into the language container.

2. From the Variable Selector, perform one of the following, and then click OK.:
 In the Name field, type a literal value.
When inserting literal values that begin with a letter or an underscore, enclose the
variable name in single quotes as follows: 'abc'
 Select the required variable from the lists of variables.

The variable is displayed.

AADvance Workbench 9
To insert a block

You insert blocks into language containers of graphical programs from the Toolbox. Following
insertion, you specify the type of block, i.e., operator, function, or function block, in the Block
Selector accessed by double-clicking the block. For programs, the available items are operators
(OPE), standard functions (SFU), standard function blocks (SFB), user IEC 61131-3
Functions (IFU), user IEC 61131-3 Function Blocks (IFB) and all "C" Functions (CFU) and
Function Blocks (CFB) supported by the target attached to the current controller. From the
Toolbox, drag the block element into the language container.

1. In the Block Selector, in the list of blocks, locate the required block.

2. To limit the blocks displayed, you can sort the block list and filter the block list.

3. From the list of available blocks, select a block, and then click OK.

To move elements within a language container

You can move elements within a language container.

1. In the language container, select one or more elements.

2. Drag the elements to another position.

To resize an element

When developing POUs using certain graphical programming languages, you can change the
dimensions of specific individual elements.

1. In the language container, select an element.

2. Place the cursor over the element handles, then click and drag to the required size.

10 AADvance 2.1 - Language Editor


To delete elements

You can delete one or more elements from a language container. Deleting a variable element
does not remove the variable from the dictionary.
In the language container, select one or more elements, then do one of the following:
 Right-click the selection, and then click Delete.
 Press DELETE.

AADvance Workbench 11
12 AADvance 2.1 - Language Editor
Block Library
The block library provides a graphical view of all operators, functions, and function blocks
available for the POUs of a project. When developing POUs, you can drag and drop blocks
from the library to the language container. You can sort blocks displayed in the library
according to alphabetical order, categories, or scope as well as limit a search based on names.
You can also display the blocks in either tile or list views.

The following types of blocks may be available from the block library:

Standard operators

Standard functions

Standard function blocks

User IEC 61131 functions

User IEC 61131 function blocks

User functions and function blocks from a library

Blocks are sorted by scope:

Standard blocks

AADvance Workbench 13
Library blocks (a scope for each library dependency)

Target-specific C blocks

To access the block library

The block library displays the blocks applicable to the project template and target.

From the View menu, click Block Library.

Note: The block library can also be accessed using the keyboard shortcut Ctrl+Alt+T.

To insert a block in a POU

In the block library, locate the required block, then click and hold the mouse on the block
while dragging to the destination in the POU container.

To sort blocks in the library

Right-click in the block library window, and then for each sort group click one of the
following:
Category or Scope
List View or Tree View
Expander display mode or Tabs display mode

To search blocks in the library

You can perform searches for blocks by entering any part a block name. As you type text
in the library search field, the library displays only the blocks containing these characters.

In the field in the block library window, type the required text.

To limit searches

You can perform searches for blocks by entering any part of a block name. As you type text in
the library search field, the library displays only the blocks containing these characters.

In the search field of the block library window, type the required text.

14 AADvance 2.1 - Block Library


Version Control
You manage the changing versions of AADvance elements including projects, libraries,
controllers, programs, functions, and function blocks by saving these to a version control
repository. Saving these elements to a control repository enables multiple users to work on the
same solutions and project elements at the same time as well as retrieve older versions of
elements at a later time.

The version control automatically checks in elements to the version control repository upon
performing the following operations:

Creating a project

Downloading code to targets

Updating targets

Such automatic check-ins ensure that the code located on a target always has a corresponding
version stored in the version control repository. When a user performs one of these operations
for a project or an element while others also have elements checked out, the user performing
the operation steals the locks from the other users. Modifications performed on such elements
by the original lock holder are no longer available for committing.

When modifying elements, you automatically check out elements then check in these
modifications.

From the repository, you check out elements for exclusive access when making modifications.
Also, upon modifying checked-in elements, these elements become checked out for your
exclusive access. Afterwards, you can check in modifications performed on these elements into
the repository. When checking in elements, you can choose to recursively check in all
sub-elements to the repository.

When deleting, renaming, and adding elements, you check out the parent of that element.

Element Parent
Program, Function, Controller, Library
Function Block

AADvance Workbench 15
Controller Project
Library Project

When retrieving, i.e., updating, a Workbench element from the repository, you can choose to
update this element to the latest version or any specific version previously checked in to the
repository. When getting the latest version, you can recursively replace all sub-elements from
the repository. When retrieving a specific version from the version control history, the local
element and its sub-elements revert to those from the version control. For controllers having
been renamed, you must retrieve the required version from the controller history; you cannot
retrieve the required controller version from the project history.

Note: When a controller has been renamed, you must execute the View History command on
the most recent version of the controller.

From the Application View, you can view the version control status for all elements. From the
Communication View and Equipment View, you can view the version control status for
projects and controllers.

Available element where local version is the same as the version in the
repository
Available element where local version differs from the modified version in the
repository
Available element where locally modified version differs from the version in
the repository
Locked element currently checked out by another user where local version is
the same as the version in the repository
Locked element currently checked out by another user where local version
differs from the modified version in the repository
Locked element currently checked out by another user where locally modified
version differs from the version in the repository
Checked out element where local version is the same as the version in the
repository
Checked out element where locally modified version differs from the version
in the repository
New element not yet checked in to the repository

16 AADvance 2.1 - Version Control


When working with version control, you can perform the following tasks:

Defining a Repository

Checking In Elements to Version Control

Checking Out Elements from Version Control

Undoing Check Outs of Elements

Reviewing Pending Checkins

Getting the Latest Versions of Elements

Labeling a Version

Archiving and Restoring Repository Projects

Accessing Repository Projects

Publishing Libraries

Working Offline and Reconnecting to a Repository

Viewing the History of Elements

Refreshing the Version Control Status of Elements

This product includes software developed by * CollabNet (http://www.Collab.Net/) based on


the Subversion source control plug-in for Visual Studio.

AADvance Workbench 17
Defining a Repository
AADvance uses a repository where it stores version control files containing the history for
projects and elements. You can choose to define a repository at any local or server (URI)
location. AADvance creates all necessary files in which to store the changes for projects and
elements for the repository. The default installation for the repository is the following:

%PUBLIC%\Public Documents\AADvance 2.1\Repository

When opening projects, the available projects are those from the current repository.

The information stored in a repository does not include customizations to the workbench
options.

To define a repository

When defining a control repository location, specify an empty folder. AADvance


automatically creates all necessary files for the repository in the folder.

1. From the File menu, point to Version Control, and then click Select Repository.

2. In the Select Repository dialog box, enter the path for the repository or browse for the
repository folder location.

18 AADvance 2.1 - Version Control


Checking In Elements to Version Control
You can check in AADvance elements such as projects, libraries, controllers, programs,
functions, and function blocks to a repository. Checking in elements enables managing the
changing versions of elements and retrieving previous versions. You can also add elements to
previously checked in projects.

When creating a project, all elements are automatically checked in to the repository.

When checking in elements having sub-elements, you can perform a recursive check in which
includes checking in sub-elements. You can also choose to keep elements checked out
following a check-in. When performing recursive operations, elements locked, i. e, checked
out, by other users are not modified.

Warning: When deleting or renaming elements, you need to check in these modifications.
Otherwise, subsequent deleting and renaming is no longer available.

From the Application View, you can perform version control operations for all elements. From
the Communication View and Equipment View, you can perform version control operations
for projects and controllers.

To check in a project or element to a repository

You can check in projects or elements that have been checked out from a repository. When
checking in projects, the necessary files are added to the repository.

1. From the required view, select the project or element to check in to the repository.

2. From the File menu, point to Version Control, and then click Check In.

3. In the Check In dialog box, indicate whether to perform a recursive check in and whether
to keep the elements checked out following the check-in, and then click OK.

The elements are saved in the repository and are displayed with the checked in icon in the
Application View.

To check in a new element

You can add new elements to a repository. Elements available for checking in to a repository
are displayed with a blue asterisk in the Application View.

AADvance Workbench 19
1. From the required view, select the element to add to the repository.

2. From the File menu, point to Version Control, and then click Check In.

3. In the Check In dialog box, indicate whether to perform a recursive check in and whether
to keep the elements checked out following the check-in, and then click OK.

The elements are saved in the repository and are displayed with the checked in icon in the
Application View.

20 AADvance 2.1 - Version Control


Checking Out Elements from Version Control
You can check out AADvance elements such as projects, libraries, controllers, programs,
functions, and function blocks from a repository. Checking out provides exclusive access when
modifying these elements. When you modify elements that are checked in, these elements are
automatically checked out when no other user has these checked out.

When creating a project, all elements are automatically checked in to the repository.

When checking out elements having sub-elements, you can perform a recursive check out
which includes checking out sub-elements. When performing recursive operations, elements
locked, i. e, checked out, by other users are not modified.

From the Application View, you can perform version control operations for all elements. From
the Communication View and Equipment View, you can perform version control operations
for projects and controllers.

To check out a project or element from a repository

You can check out projects or elements from a repository.

1. From the Application View, select the project or element to check out from the repository.

2. From the File menu, point to Version Control, and then click Check Out.

3. In the Check Out dialog box, indicate whether to perform a recursive check out including
all sub-elements, and then click OK.

The elements are checked out from the repository and are displayed with the unlocked icon in
the Application View.

AADvance Workbench 21
Undoing Check Outs of Elements
You can undo check outs of projects, libraries, controllers, programs, functions, and function
blocks from a repository. Undoing a check out undoes all changes to the elements definitions
since these were checked out. The elements are no longer checked out, but instead of updating
the repository with the edited version, Undo Check Out reverts to the local version to the latest
version from the repository.

When performing recursive operations, elements locked, i. e, checked out, by other users are
not modified.

From the Application View, you can perform version control operations for all elements. From
the Communication View and Equipment View, you can perform version control operations
for projects and controllers.

To undo a check out of a project or an element

1. From the required view, select the project or element for which to undo the check out
from the repository.

2. From the File menu, point to Version Control, and then click Undo Check Out.

3. In the Undo Check Out dialog box, indicate whether to perform a recursive undo check
out including all sub-elements, and then click OK.

The elements are replaced in the repository and are displayed with the checked in icon in the
Application View.

22 AADvance 2.1 - Version Control


Reviewing Pending Checkins
The Pending Checkins window provides a global view of all checked out and locally modified
elements for a specific user. In this window, you can perform the following version control
operations:

Check in individual or all checked out and locally modified elements

Undo check outs for all checked out and locally modified elements

Refresh the display of checked out and locally modified elements

Files for pending checkins can have the following action types: locked, deleted, modified,
added, and renamed.

When performing check ins and check outs, you can choose to keep files checked out.

To check in checked out and locally modified elements

1. In the Pending Checkins window, select the elements to check in to the repository.

2. On the Pending Checkins toolbar, click .

To undo check outs of checked out and locally modified elements

1. In the Pending Checkins window, select the elements for which to undo check outs.

2. On the Pending Checkins toolbar, click .

To refresh the list of checked out and locally modified elements

In the Pending Checkins toolbar, click .

AADvance Workbench 23
Getting the Latest Versions of Elements
You can get the latest version for elements such as projects, libraries, controllers, programs,
functions, and function blocks. When getting the latest version, you can recursively replace all
sub-elements from the repository. When performing recursive operations, elements locked, i.
e, checked out, by other users are not modified.

From the Application View, you can perform version control operations for all elements. From
the Communication View and Equipment View, you can perform version control operations
for projects and controllers.

To get the latest version of an element

1. From the required view, select the element for which to get the latest version from the
repository.

2. From the File menu, point to Version Control, and then click Get Latest Version.

3. In the Get Latest dialog box, indicate whether to perform a recursive get latest version
including all sub-elements and whether to keep or replace locally modified elements, and
then click OK.

24 AADvance 2.1 - Version Control


Labeling a Version
You can label a version of a project or an element for reference in the repository. The label is
also applied to all sub-elements of the latest version checked in to the repository.

From the Application View, you can perform version control operations for all elements. From
the Communication View and Equipment View, you can perform version control operations
for projects and controllers.

To label a version of a project or an element

1. From the required view, select the project or element for which to apply a label.

2. From the File menu, point to Version Control, and then click Label.

3. In the Add Label dialog box, enter the text to display as the label in the version control
history, and then click OK.

AADvance Workbench 25
Archiving and Restoring Repository Projects
You can archive projects contained in a repository and you can restore projects that were
previously archived. Archiving a repository project means compressing the content of a project
into a *.vsc file. You can either archive the complete version of a project, including the
modification history and all comments, or you can archive the latest version of a project
checked into a repository. You can then restore the archived file in another repository. The
archived file can then be restored in another repository. Note that performing updates or
connecting to controllers is unavailable after restoring a project archived at the latest version.

Note: To reduce the time taken to perform archive and restore operations, have a different
repository folder for each project.

You can restore projects archived with the AADvance 2.1 Workbench. Projects archived from
the AADvance 2.1 Workbench cannot be restored in AADvance 1.X or 2.0 Workbench
versions.

From the Application View, you can perform version control operations for all elements. From
the Communication View and Equipment View, you can perform version control operations
for projects and controllers.

To archive a repository project

Note: Before archiving a project at the latest version, you are recommended to label the version
of the project, ensuring the version control history displays the expected description after
project restoration.

1. From the required view, select the project to archive.

2. From the File menu, point to Version Control, and then click Archive.

3. In the Archive Project dialog box, indicate whether to archive the complete project
history or the latest version, and then click Archive.

4. In the Save As dialog box, specify a name and storage location for the archive file, and
then click Save.

The default name and storage location for archive files is the project name and folder.

26 AADvance 2.1 - Version Control


To restore a repository project

1. From the File menu, click New Project.

The New Project dialog box is displayed.

2. In the New Project dialog box, in the Project Types list, click Restore.

3. In the Templates list, click the Restore Project from an Archive template, and then click
Browse.

4. In the Select Archive File dialog box, locate the project archive, and then click Open.

The default name and storage location for archive files is the project name and folder.

5. In the New Project dialog box, click OK.

AADvance Workbench 27
Accessing Repository Projects
While working with the AADvance Workbench, you need to access projects stored in a
repository. When multiple computers need to access the same project, you are recommended
to use a repository located in a shared folder. This preferred method enables different users to
check out and modify the project while ensuring a complete modification history. Only one
user can check out a project element at any given time.

When only using a locally stored repository, you may need to transfer the storage location of
the repository to another computer. Transferring a repository also transfers all of the projects
contained within the repository folder. Needing to transfer the storage location of the repository
occurs when upgrading to a new computer or permanently changing workstation. You should
only keep one instance of the repository folder.

When needing to access a specific project on a computer other than the one storing the local
repository folder, you are recommended to archive your project and then restore the *.vsc file
in the local repository folder of the other computer. Note that the modification history is
retained when restoring the project.

To access a repository in a shared folder

Warning: You cannot open a project having the same name as a project saved in the
projects directory; you must delete the local copy before opening the project.

1. In the Workbench, from the File menu, point to Version Control, and then click Select
Repository.

2. In the Select Repository dialog box, click Browse to locate the shared folder, and then
click OK.

3. For all required computers, ensure the Workbench uses the repository located in the
shared folder.

To transfer a repository to another computer

Warning: You cannot open a project having the same name as a project saved in the
projects directory; you must delete the local copy before opening the project.

1. Transfer the repository folder to another computer.

28 AADvance 2.1 - Version Control


Note: Make sure to remove the repository folder located on the original computer.

2. On the other computer, open the Workbench and then from the File menu, point to
Version Control, and then click Select Repository.

3. In the Select Repository dialog box, click Browse to locate the transferred repository
folder, and then click OK.

To access a project stored in the local repository of another computer

Warning: You cannot restore a project having the same name as a project saved in the
projects directory; you must delete the local copy before restoring the project. If the project
is already stored in the repository, you should restore the project in another repository
folder. Replacing the project currently stored in the repository folder may corrupt the
project.

1. From the Application View, right-click the project, point to Version Control, and then
click Archive.

2. In the Archive Project dialog box, select the Complete archive mode, and then click
Archive.

3. In the Save As dialog box, specify a name and storage location for the archive file, and
then click Save.

4. Transfer the archived *.vsc file to another computer.

5. On the other computer, open the Workbench and then from the File menu, click New
Project.

6. In the New Project dialog box, in the Project Types list, click Restore.

7. In the Templates list, click the Restore Project from an Archive template, and then click
Browse.

8. In the Select Archive File dialog box, locate the project archive, and then click Open.

9. In the New Project dialog box, click OK.

The project is checked into to the repository located on the other computer.

AADvance Workbench 29
Publishing Libraries
Publishing libraries makes these available from the repository for use in other projects. You
can only publish a library after checking in the library. You publish libraries that you create in
projects.

When publishing a library, you must enter the following information:

Name The name of the library


Version The version number of the library. You must enter numerical values.
Comment Free-format text

To publish a library

When publishing a library, AADvance places a copy of the library in the repository.

1. From the Application View, select the library to publish.

2. From the File menu, point to Version Control, and then click Check In.

3. In the Check In dialog box, select whether to keep the library checked out, and then click
OK.

4. Right-click the library, and then click Publish Library.

5. In the Publish dialog box, enter a name, version, and comment for the library, and then
click Publish.

30 AADvance 2.1 - Version Control


Working Offline and Reconnecting to a
Repository
While working with files from a repository, your local working copy may become
disconnected from the repository for reasons such as a disconnected network cable. In such a
case, you can continue to work offline with your local working copy. However, after
reconnecting to the repository, your working copy may differ from the copy located in the
repository if other users proceeded to modify that version.

To work offline and reconnect to a repository

1. When a local working copy becomes disconnected from the repository, the workbench
displays a message informing you of the disconnection from the repository.

The workbench proceeds to attempt to reconnect with the repository.

2. When unable to reestablish the connection, you can choose to work offline with the local
file by creating a temporary local repository:

a) Save and close the current project.

b) To set a local folder to a new or existing repository, from the File menu, point to
Version Control, and then click Select Repository.

c) To point to the previously saved project, from the File menu, click New Project, and
from the New Project dialog box import the required project.

d) Proceed to making the necessary modifications to the project.

Warning: Downloading this local copy prevents other team members from connecting to the
respective controller. Also, the history for the local file is not transferred to the temporary local
repository.

3. When the connection is restored with the original repository, return your local working
copy to the original repository:

a) For each element to merge back, save the element as its original name in the original
repository.
The element is saved as a *.pxf file.

AADvance Workbench 31
b) Open the original project file, and then import the element *.pxf file.

c) Check in the new version of the element.

Warning: When checking in elements that were modified locally, you may overwrite
modifications other users performed for the element.

4. To enable connecting to the physical controllers, download the most current code to the
required controllers.

32 AADvance 2.1 - Version Control


Viewing the History of Elements
You can view the history of elements such as projects, libraries, controllers, programs,
functions, and function blocks. The history of an element is available from the time of creation.

When viewing the history of an element, a list displays all available versions of the element
with their assigned version numbers. Each version entry includes the date, the user, the action,
and a description from the check-in.

Note: When a controller has been renamed, you must execute the View History command on
the most recent version of the controller.

When viewing the history of elements, you can perform the following tasks:

Retrieving a specific version of an element

Refreshing the list of versions available for an element

Clearing the list of versions for an element

To retrieve a specific version of an element

You can retrieve specific versions for elements such as projects, libraries, controllers,
programs, functions, and function blocks. When retrieving a specific version from the version
control history, the local element and its sub-elements revert to those from the version control.

1. From the Application View, select the element for which to get the latest version from the
repository.

2. From the File menu, point to Version Control, and then click View History.

3. In the Version History dialog box, select the required version from the list of available
versions, and then click Get Version.

To update the list of versions available for an element

To update the list of displayed versions available for an element, click Refresh.

AADvance Workbench 33
To clear the list of versions for an element

When clearing the list of versions for an element, the history for the element remains in the
repository. Therefore, subsequently retrieving the history for the element produces the versions
listed prior to clearing the list.

To clear the list of displayed versions for an element, click Clear.


Refreshing the Version Control Status of
Elements
Version control status information for elements is available from many sources. From the
Application View, you can refresh the displayed control status for all elements. From the
Communication View and Equipment View, you can refresh the displayed control status for
projects and controllers. From the Application, Communication, and Equipment Views, you
can obtain version control status details by mousing over the version control icons. In the
Output window, you can also display complete status details for an element including its
version control status, locked by, locked on, path, user, version time, latest revision, and local
revision.

To refresh the control status of elements

You can refresh the control status of icons displayed in the different views using menu options
or the Refresh button located at the top of the views.

From the required view, right-click any element in the structure, point to Version
Control, and then click Refresh Status.

The Application View displays the current version control status for all elements.

To display complete status information for an element

From the required view, right-click any element in the structure, point to Version
Control, and then click Refresh Status.

The Application View displays the current version control status for all elements.

AADvance Workbench 35
36 AADvance 2.1 - Version Control
Controller Status
You can access real-time status information for all controllers in a project. The available
information is the following:

Name Name of the controller


Status Status of the controller:
- Building, indicates that the project or controller build
is in progress
- Unable to Connect, indicates that the Workbench is
unable to connect with the controller
- Need Password, indicates that the Workbench
requires the controller password to connect and
provide status information
- Need Save Status, indicates that the project requires
saving
- Unavailable, indicates that the Workbench is
switching from design to online or simulation mode
- Simulator Running, indicates that the Workbench is
unable to connect with the controller since it is in
simulation mode
- Connecting, indicates that the Workbench is
retrieving status information or is unable to
communicate with the controller
- Running, indicates that the controller is running an
application while displaying the application version
and date
- Stopped, indicates that the controller is not running
an application
Controller statuses are also displayed with a system
health condition: Healthy, Faulted, or Warning.
Locked Variables Number of locked input and output variables for the
controller.
Cycle Time Current cycle time of the controller

AADvance Workbench 37
Locked By Name of the Workbench user that applied read-only
mode to the controller.
Password Protected Indication that the controller is password-protected.
True indicates a password-protected controller.

When viewing the Controller Status, the Name column displays icons that indicate the
connection status of the controllers.

Indicates a healthy, running controller having a good


system health
Indicates a faulted controller having a bad system
health
Indicates any other condition

To access the status information for controllers


From the View menu, click Controller Status.

38 AADvance 2.1 - Controller Status


Front Panel Status Indicators

The front panel of the T9110 processor module displays the following status indicators:

Indicator Status Description


Healthy Indicates the fault status of the module as well as the power-on or
operational status.
OFF No power
RED The module has a fault or the controller is offline.

Note: The Healthy LED briefly flashes RED while booting up after
installation or when a reset is in progress.
GREEN During installation, the Healthy LED briefly flashes RED when
receiving power, and then turns GREEN as the module boots up. The
LED remains GREEN indicating the module is operational and
contains no hardware faults.
When in recovery mode and no faults are present, the LED is GREEN.

Note: If the Healthy LED is GREEN and all other status indicators are
OFF, the module has failed to boot up.
If the Healthy LED is GREEN and the Ready and Run LEDs are RED,
the module is in the shutdown state.

AADvance Workbench 39
Indicator Status Description
Ready Indicates the education and synchronization status of the module.
OFF No power
RED The modules is booting up, not educated, or not synchronized with
partners.
GREEN The module is educated and synchronized.
FLASHI Education or synchronization of the module is in progress.
NG
GREEN
AMBER The module is in recovery mode.
Run Indicates the application status of the module. The application status
should be identical for all educated and synchronized processors.
OFF No power. The LED also remains OFF while the module boots up.
RED The module is not educated, not synchronized, or no application is
loaded. The LED is also RED when the processor module is in
recovery mode and the base-level firmware is running.
GREEN The application is running.
AMBER The module is in recovery mode or the application data may be present
but not running; press Fault Reset to run the application.
System Indicates the global health of the system, including all processors and
Healthy I/O modules. All educated and synchronized processors must indicate
the same status.
OFF No power. The LED also remains OFF while the module boots up.
RED System or module faults are present. The LED is also RED when the
application stops running due to the module being in recovery mode.
GREEN No system or module faults are present during normal operations or
when in recovery mode.

40 AADvance 2.1 - Controller Status


Indicator Status Description
Force Indicates variables are being locked or forced by the application. All
educated and synchronized processors indicate the same status.
OFF No power. The LED also remains OFF while the module boots up.
GREEN No variables are being locked or forced.
AMBER The module is in recovery mode or at least one variable of an
operating controller is being locked or forced.
Aux The application controls the Aux indicator. The application can
display any status except when in recovery mode and the application is
stopped.
OFF No power. The LED also remains OFF while the module boots up or
when the application is in control of the indicator.
GREEN The application is in control of the indicator.
AMBER The module is in recovery mode or the application controls the
indicator.
Serial 1 Indicates the serial port activity.
and 2 OFF No power. The LED also remains OFF while the module boots up.
RED Pulse stretched transfer (Tx)
GREEN Pulse stretched receive (Rx)
AMBER The transfer (Tx) and receive (Rx) activity is in close proximity.
Ethernet 1 Indicates the Ethernet port activity.
and 2 OFF No power. The LED also remains OFF while the module boots up.
GREEN An Ethernet link is present.
AMBER Transfer (Tx) or receive (Rx) activity.

AADvance Workbench 41
42 AADvance 2.1 - Controller Status
Variable Dependencies
You can view the dependencies of a variable in both ascending and descending directions.
Ascending dependencies display the variables affecting the variable while descending
dependencies display the variables affected by the variable. These dependencies are displayed
as structures leading to the right for ascending dependencies and to the left for descending
dependencies. When viewing the dependencies of a variable, the variable identification
indicates its source: ProjectName.ControllerName.VariableName.

You can view dependencies of variables while editing or connected. While connected, you can
monitor and force the values of variables from the dependencies.

The following example shows the dependencies of the Alarm_Memo variable where the
variables on the right, ascending, affect its value while the variable affects the values of the
variables to the left, descending.

Descending Dependencies Ascending Dependencies

When viewing the dependencies of a variable, you can perform the following tasks:

Display the dependencies of variables within the dependencies structures

Add variables to the Spy list

Access dictionary instances containing selected variables

Adjust the zoom factor for individual dependencies windows

Furthermore, you can also force the values of variables while connected.

AADvance Workbench 43
To display the dependencies of a variable

You can access the dependencies of variables from graphic programs or dictionary instances.

Note: Before accessing the dependencies of variables, you need to generate the cross
references for a project.

From a graphic program or a dictionary instance, right-click the variable, and then click
Dependencies.

The dependencies structure is displayed for the variable.

To display the dependencies of a variable within the dependencies structures

You can display the dependencies of variables from the ascending or descending structures.

From the dependencies structure for a variable, double-click the variable from the
ascending or descending structure for which to display the dependencies.

The dependencies structure for the selected variable is displayed in another window.

To add a variable to the Spy List

You can add variables from dependencies structures to the Spy List.

From the dependencies structure for a variable, right-click the variable to add to the Spy
List, and then click Add to Spy List.

The variable is added to the Spy List window.

To force the value of a variable

You can force, i.e., write, the value of a variable from the ascending or descending structures.

1. From the dependencies structure for a variable, right-click the variable for which to force
the value, and then click Write Variable.

2. In the Write Logical Value dialog box, type the value for the variable.

3. To lock the value for the variable, click Lock.

44 AADvance 2.1 - Variable Dependencies


4. Click Write.

The variable displays the written value within the dependencies structure.

To access the dictionary instance containing a variable

You can access the dictionary instance containing a variable for variables displayed in
dependencies structures.

From the dependencies structure for a variable, right-click the variable for which to
access the dictionary instance, and then click Variables.

The dictionary instance having the variable is displayed.

To set the zoom of a dependencies window

You can adjust the magnification factor for individual dependencies windows.

From the dependencies window for a variable, slide the zoom scale to the required
magnification factor.

AADvance Workbench 45
46 AADvance 2.1 - Variable Dependencies
Properties Window
The Properties window enables viewing and editing the properties of items selected within
language containers and the Application View. You can also use the Properties window to view
and edit file, and project properties. You can view the common properties for multiple objects
and elements. When selecting multiple objects, the Properties window displays only the
properties that are common to all the objects and elements.

In the Properties window, properties are organized into categories displayed alphabetically.
You can expand the categories to view the property information including property names and
values. Note that properties displayed in gray are read-only.

You edit property values using the plain text fields and drop-down combo-boxes provided.
Where required, links to custom editors or dialogs are displayed in the property value fields.

The Properties window toolbar containing the following:

Displays the name of the item or group of items selected.

Displays the property names and values organized into categories.


You click to expand categories and to collapse categories.
Displays the properties sorted in alphabetical order

Not applicable

To access the Properties window


From the View menu, click Properties Window. The keyboard shortcuts F4 or
Alt+Enter can also be used.

The Properties window is displayed.

AADvance Workbench 47
48 AADvance 2.1 - Properties Window
Locked Variables Viewer
The Locked Variables window enables unlocking locked variables while an application is
connected. This window lists all locked variables and their source throughout an application.
When viewing locked variables, the variable identification indicates its source:
ProjectName.ControllerName.ControllerName.VariableName.

Note: You can only lock I/O variables.

From the Locked Variables window, you can perform the following tasks:

Find variables within the list of locked variables based on any part of their source name

Unlock variables from the list of locked variables

To access the list of locked variables

You can only access the Locked Variables window while an application is connected. The
viewer lists all locked variables throughout the application.

From the Online menu, point to Windows, and then click Locked Variables.

To find variables from the list of locked variables

You can perform searches based on any part of the variable identification displayed in the
Locked Variables window such as the complete or partial variable, controller, or project name.

AADvance Workbench 49
In the search field, enter text contained in the identification of the required variable, then
do one of the following:

- To find the first instance of the variable, click .

- To find the next instance of the variable, click .

To unlock variables from the list of locked variables

You can unlock one or more variables from the list of locked variables.

In the list of locked variables, select the variables to unlock or click to select all the

variables in the list, then click to unlock them.

50 AADvance 2.1 - Locked Variables Viewer


Toolbox
You can expand the multiple segments or tabs of the toolbox. You can also scroll though the
entire tree within the toolbox. To expand toolbox tabs, click the blank right-pointing arrow next
to the tab name. To collapse expanded toolbox tabs, click the darkened down-pointing arrow
next to the tab name.

The toolbox displays icons for elements that you can add to POUs. When shifting focus to a
different program, the current selection in the toolbox shifts to the tab for the corresponding
programming language. You can manipulate the toolbox in the following ways:

Display the toolbox


Search elements in the toolbox
Restore default toolbox settings

You can customize the toolbox by rearranging elements within a tab or adding custom tabs and
elements. You can manipulate toolbox tabs in the following ways:

Expand tabs Add custom tabs


Collapse tabs Remove custom tabs
Move tabs Display all tabs
Rename tabs Restore default tab settings

You can insert elements in language containers displayed in the integrated development
environment (IDE). This action adds the fundamental code to create an instance of the toolbox
element in the active program file. You can manipulate toolbox elements in the following
ways:

Rename elements Move elements between toolbox tabs


Sort elements Remove elements
Hide element names Restore default elements settings
Rearrange elements

To display the toolbox


From the View menu, click Toolbox (or press Ctrl+Alt+X).

AADvance Workbench 51
To search elements in the toolbox
In the search field of the toolbox, enter text contained in the element to locate.

The toolbox displays only the elements containing the specified text.

To restore all default tabs and elements to the toolbox


Right-click on the toolbox, and then click Reset Toolbox.

To expand a toolbox tab

Click the blank right-pointing arrow next to the name of the collapsed toolbox tab.

To collapse a toolbox tab

Click the darkened down-pointing arrow next to the name of the expanded toolbox tab.

To move a toolbox tab

You can move toolbox tabs within the toolbox by performing one of the following:

Right-click on the name of the tab, and then click Move Down or Move Up.

Drag the tab to the required position in the toolbox.

To rename a toolbox tab

1. From the Toolbox, right-click the required tab, and then click Rename Tab.

2. In the space provided, type a name for the tab, and then press ENTER.

To add a custom toolbox tab

When adding tabs, these are displayed at the bottom of the toolbox. You can reposition and add
elements to tabs.

1. From the Toolbox, right-click any tab, and then click Add Tab.

2. On the blank tab, in the space provided, type a name for the tab, and then press ENTER.

52 AADvance 2.1 - Toolbox


To remove a custom toolbox tab

When removing custom tabs, move the elements to retain to other tabs before you delete the
custom tabs.

1. From the Toolbox, right-click the tab to remove, and then click Delete Tab.

When elements remain on the tab, a message box informs you that those elements will be
deleted.

2. To proceed with the deletion of the selected tab, click OK.

To display all available toolbox tabs


Right-click on the toolbox, and then click Show All.

To insert an element in the workspace


From the toolbox, drag the required element into the workspace.

The element is displayed in the language container.

To rename an element

1. In the toolbox, right-click the required element, and then click Rename Item.

2. In the space provided, type a name for the element, and then press ENTER.

To sort the elements alphabetically


In the toolbox, right-click the required tab, then click Sort Items Alphabetically.

To hide element names


In the toolbox, right-click the required tab, then click List View.

To rearrange elements

You can reposition elements displayed on toolbox tabs.

In the toolbox, select the required element and perform one of the following:

AADvance Workbench 53
 Right-click on the element, then click Move Down or Move Up.
 Drag the element to the required position.

To move an element between tabs

In the toolbox, select the required element and perform one of the following:
 Drag the required element onto another tab.
 Right-click the element and click Cut or Copy, then right-click the required tab and
click Paste.

To remove an element

Note that certain elements cannot be removed, such as the Pointer element.
In the toolbox, right-click the required element, and then click Delete.

54 AADvance 2.1 - Toolbox


Variable Selector
The Variable Selector enables selecting variables for use in POUs or mapping variables for the
various communication protocols, such as SOE and Modbus. Depending on the context from
which you access the Variable Selector, the available scopes are different. The Selector
displays variables in alphanumerical order. You can modify or limit the list by sorting or
filtering the variables.

Warning: Make sure to read this section attentively before using the Variable Selector.
The main purpose of the selector is to select variables for use in POUs or mapping variables
for the communication protocols. The preferred method to create variables is from dictionary
instances.

When working with the Variable Selector, the following features enable performing many
tasks:

Grid filtering fields, limits the variables displayed in the variables grid by typing
alphanumeric characters in the Name field.

Scope tabs, indicates the scope for the variables to display in the variables grid. For
POUs, the available scopes are local, global, system variables, directly represented
variables, and defined words. When mapping variables for communication protocols, the
available scopes are either local and global, or only global.

Grid column headers, sorts the contents of the grid in ascending or descending
alphanumerical order according to the individual attributes.

AADvance Workbench 55
Column filtering cells, filters the contents of the grid by typing specific alphanumerical
characters contained in the variables to display or clicking the down arrow to display the
available grouping options from a drop-down list. You can also perform filtering other
than the default “starts with” operation by clicking the rightmost icon in the filtering cell.

Variables grid, contains the variables defined for the selected scope.

Available definition row, enables the definition of the attributes for a new variable.

When working in the Variable Selector, you can navigate using keyboard and mouse controls.

Arrow keys Enable moving up, down, left, and right among the cells of the list of
variables. Also enables moving left and right among the tabs.
Tab key Enables moving from left to right between the fields, tab, and list of
variables. Within the list, enables moving left to right between cells of a row.
After exiting the list of variables, enables moving between the command
buttons and back to the fields.
Esc key Enables closing the Variable Selector without selecting a variable.
Enter key Enables closing the Variable Selector and displaying the selected variable in
the workspace.

To select a variable

1. Access the Variable Selector by doing one of the following:


For graphical POUs (FBD or LD), drag an element requiring the selection of a
variable, such as a variable, coil, or contact. The Variable Selector is displayed
(when the Automatically invoke the Variable/Block Selector option is set to True).
You can also double-click an element in the language container to invoke the
Variable Selector.
For textual POUs (ST), right-click in the language container, and then click Variable
Selector (Ctrl+I).

When mapping variables for communication protocols, click Add Variable or .

The Variable Selector is displayed listing the available variables in the variables grid.

2. To sort the variables listed in the variables grid, click the column heading of the attribute
for which to toggle between ascending and descending alphanumeric order.

56 AADvance 2.1 - Variable Selector


3. To reduce the number of variables listed in the variables grid, in the grid filtering cell
directly below the column header of the variable attribute from which to filter, do one of
the following:

Type specific characters (alphanumerical) contained in the variables to display.


When typing characters, you can also perform filtering other than the default starts
with operation by clicking the icon at the rightmost in the grid filtering cell.
Available filtering functions include ends with, equal to, like, match, and other
Boolean operations.
Click the down arrow to display the available grouping options from a drop-down
list.

4. Locate the required variable by scrolling down the list of variables displayed in the grid.

5. Select the variable by clicking anywhere in the row, and then click OK.

The Variable Selector closes and the variable is added.

To add a variable to a variable group

You can add a variable defined in the variable selector to existing variable groups.
In the variable grid, right-click the variable, point to Add to Variable Group, then click
the required group.

AADvance Workbench 57
The variable is added to the group.

58 AADvance 2.1 - Variable Selector


Managing Variables from the Variable Selector
Warning: The preferred method to manage variables, i.e., create, delete, and edit variables, is
from dictionary instances to avoid potential mistakes. For example, inserting a variable in an
unintended scope when creating variables.

From the Variable Selector, you can also perform the following actions:

Creating Variables from the Variable Selector

Editing Variables from the Variable Selector

Deleting Variables from the Variable Selector

AADvance Workbench 59
Creating Variables from the Variable Selector

Warning: The preferred method to create variables is from dictionary instances to avoid
potential mistakes such as inserting a variable in an unintended scope.

When creating variables from the Variable Selector, you define the variables in the variables
grid where you specify values for all variable attributes. In the grid, you create a variable by
providing the required information in the cells of the available definition row (having an
asterisk). A quick declaration feature enables creating multiple variables having the same
prefix, suffix (optional), numbering range, data type, direction, and string length (string data
types only).

To create a single variable

1. Access the Variable Selector by doing one of the following:


For graphical POUs (FBD or LD), drag an element requiring the selection of a
variable, such as a variable, coil, or contact. The Variable Selector is displayed
(when the Automatically invoke the Variable/Block Selector option is set to True).
You can also double-click an element in the language container to invoke the
Variable Selector.
For textual POUs (ST), right-click in the language container, and then click Variable
Selector (Ctrl+I).

When mapping variables for communication protocols, click Add Variable or .

2. In the variables grid, locate the available definition row (having the asterisk), define the
required attributes, and then press ENTER.

60 AADvance 2.1 - Variable Selector


The variable is defined and the next row becomes available. For graphical POUs, the variable
is defined for the element. For textual POUs, the variable is placed in the editor.

To create multiple variables using Quick Declaration

You can create multiple variables having the same prefix, suffix, data type, and continuous
numbering definition. You create multiple variables from the grid area in the Variable Selector.

1. Access the Variable Selector by doing one of the following:


For graphical POUs (FBD or LD), drag an element requiring the selection of a
variable, such as a variable, coil, or contact. The Variable Selector is displayed
(when the Automatically invoke the Variable/Block Selector option is set to True).
You can also double-click an element in the language container to invoke the
Variable Selector.
For textual POUs (ST), right-click in the language container, and then click Variable
Selector (Ctrl+I).

When mapping variables for communication protocols, click Add Variable or .

2. Create multiple variables having the same prefix, suffix, data type, and continuous
numbering definition:

a) In the grid area, locate the available definition row (having the asterisk), right-click
in the Name cell, and then click Quick Declaration.

AADvance Workbench 61
b) In the Quick Declaration dialog box, specify the numbering range, a prefix, a suffix
(optional), the data type, the direction, and the string length (if applicable), and then
click OK.

The numbering range indicates the number of variables to create, i.e., a range of 0 to 9
creates ten variables. When using the quick declaration method for creating variables, the
consecutive variables shall have the same prefix followed by the starting range number,
and optionally finishing with the same suffix.

62 AADvance 2.1 - Variable Selector


The defined variables are displayed in the variables grid.

To insert a literal value

You can insert literal values when using the Variable Selector. When inserting literal values
beginning with a letter or an underscore, enclose the variable name in single quotes as follows:
'abc'

1. Access the Variable Selector by doing one of the following:


For graphical POUs (FBD or LD), drag an element requiring the selection of a
variable, such as a variable, coil, or contact. The Variable Selector is displayed
(when the Automatically invoke the Variable/Block Selector option is set to True).
You can also double-click an element in the language container to invoke the
Variable Selector.
For textual POUs (ST), right-click in the language container, and then click Variable
Selector (Ctrl+I).

When mapping variables for communication protocols, click Add Variable or .

2. In the Name field, type the literal value, and then click OK.

The literal value is displayed in the language container.

AADvance Workbench 63
Editing Variables from the Variable Selector

Warning: The preferred method to edit variables is from dictionary instances to avoid
potential mistakes such as editing a variable from an unintended scope.

To edit a variable

1. Access the Variable Selector by doing one of the following:


For graphical POUs (FBD or LD), drag an element requiring the selection of a
variable, such as a variable, coil, or contact. The Variable Selector is displayed
(when the Automatically invoke the Variable/Block Selector option is set to True).
You can also double-click an element in the language container to invoke the
Variable Selector.
For textual POUs (ST), right-click in the language container, and then click Variable
Selector (Ctrl+I).

When mapping variables for communication protocols, click Add Variable or .

2. In the variables grid, locate the variable to edit, modify the required attribute cells for the
variable, and then press ENTER.

The attributes for the variable are modified.

64 AADvance 2.1 - Variable Selector


Deleting Variables from the Variable Selector

Warning: The preferred method to delete variables is from dictionary instances to avoid
potential mistakes such as editing a variable from an unintended scope.

Deleting variables from the Variable Selector also removes these variables from the Dictionary
instance for the program or controller.

To delete a variable

1. Access the Variable Selector by doing one of the following:


For graphical POUs (FBD or LD), drag an element requiring the selection of a
variable, such as a variable, coil, or contact. The Variable Selector is displayed
(when the Automatically invoke the Variable/Block Selector option is set to True).
You can also double-click an element in the language container to invoke the
Variable Selector.
For textual POUs (ST), right-click in the language container, and then click Variable
Selector (Ctrl+I).

When mapping variables for communication protocols, click Add Variable or .

2. In the variables grid, right-click the variable to delete, and then click Delete.

The variable is removed from the variables grid.

AADvance Workbench 65
66 AADvance 2.1 - Variable Selector
Block Selector
The Block Selector enables the selection of operators, functions, and function blocks for use in
block elements defined in programs. For FBD 61131 programs, you enter blocks and declared
instances.

The Block Selector lists the available operators, functions, and function blocks for
IEC 61131-3 programs. For IEC 61131-3 programs, the available items are operators (OPE),
standard functions (SFU), standard function blocks (SFB), user IEC 61131-3 Functions (IFU),
user IEC 61131-3 Function Blocks (IFB) and all "C" Functions (CFU) and “C” Function
Blocks (CFB) supported by the target attached to the current controller.

For the block list, the properties are the following:

AADvance Workbench 67
Column Description
Name Name of the function, function block, or operator
Type Type of function, function block, or operator. Possible types are
"C" function (CFU), "C" function block (CFB) , IEC 61131-3 function
(IFU), IEC 61131-3 function block (IFB), operator (OPE), standard
function block (SFB), and standard function (SFU).
Category Category of function, function block, or operator. Possible categories vary
depending on the target definition.
Comment Comment for the function, function block, or operator. Free-format text.
Scope Indicates where the POU is defined.

When selecting operators such as addition, multiplication, and AND, you need to specify the
number of inputs.

Using the Block Selector, you can refine the list of available blocks by sorting the block list
and limiting searches. You can also choose to display the parameters while viewing the blocks.

When working in the Block Selector, you can navigate using keyboard and mouse controls.

Arrow keys Enable moving up, down, left, and right within the cells of the blocks list
Tab key Enables moving left and right within the cells of each row in the blocks list.
After exiting the blocks list, enables moving from left to right between the
fields, option, command buttons and back to the blocks list.
Esc key Enables moving from the blocks list to the fields
Space bar When the Show Parameters option is selected, opens the Parameters Display.
Enter key Enables closing the Block Selector and displaying the chosen block in the
workspace.

From the Block Selector, you can access help for the displayed operators, functions, and
function blocks.

To access the Block Selector

The Block Selector is available while editing language containers for POUs and displays only
the operators, functions, and function blocks available to the POU.

68 AADvance 2.1 - Block Selector


From the language container of a graphical program, perform one of the following:
 From the Toolbox, drag the block element into the language container.
 In the language container, double-click an existing block.

The Block Selector is displayed.

To create a declared instance of a function block

Declared instances are function blocks having assigned instances. For graphical and
non-graphical programs, you declare such instances in the Block Selector. These instances are
considered as variables.

1. From the list of available blocks, select the function block type.

2. In the Instance field, type a name for the instance, and then click OK.

A declared instance of a block is displayed in the language container.

To sort the block list

You can sort the columns of the block list by setting these in ascending or descending order.
Click the required column header to toggle the sort order between ascending and
descending.

To limit searches

As you type text in the Search field, the list displays only the blocks containing these
characters.

In the Search field in of the Block Selector, type the required text.

AADvance Workbench 69
Parameters Display
The parameters display graphically presents the parameters for a POU selected in the Block
Selector. When selecting a POU from the block list, the parameters display automatically
shows the local, input, and output parameters. You can expand all or collapse all parameters
for POUs.

To access the parameters display


In the Block Selector, click Show Parameters.

The parameters display opens on the right.

To expand or collapse all input and output parameters

You can expand or collapse all input and output parameters for user-defined functions and
function blocks.

1. In the block list, select the required block for which to display the existing parameters.

2. To expand all parameters, right-click in the parameters display, and then click Expand
All.

3. To collapse all parameters, right-click in the parameters display, and then click Collapse
All.

70 AADvance 2.1 - Block Selector


Parameters View
The Parameters view enables managing parameter and local variables for user-defined POUs.
When defining these POUs, the Parameters view provides a graphic display of the parameters
and local variables. You can manage the parameters and local variables for user-defined POUs.

You can perform the following tasks from the parameter view:

Creating parameters or local variables

Editing parameters or local variables

Deleting parameters or local variables

Cutting, copying, and pasting parameters and local variables

Display data types for parameters or local variables

AADvance Workbench 71
In the Parameters view, you can define the properties of parameters and local variables:

Column Description
Name Name of the parameter
Alias The short name used in the graphical language editors for display only.
Limited to four characters.
Data Type Data type of the parameter
Dimension For function blocks, dimension of the block. The dimension is defined as
a positive double integer (DINT) value.
Attribute Property of a parameter indicating its read and write access rights.
Possible values are Read, Write, or ReadWrite.
Comment Comment for the parameter. Free-format text.
Initial Value Value held by a variable when the virtual machine starts the execution of
the controller.

You can modify the parameters for functions and function blocks. User-defined functions are
limited to one output parameter having a modifiable data type.

To access the parameter view for a user-defined function or function block

You access the parameters view when defining parameters for user-defined functions and
function blocks.

1. From the Application View, create a user-defined function or function block in the
respective section.

2. Right-click the function or function block, and then click Parameters.

To create parameters and local variables

You create parameters for a currently opened user-defined function or function block.
Functions can only have one output.

1. In the Application View, right-click the required function or function block, and then
click Parameters.

The function or function block parameters are displayed.

72 AADvance 2.1 - Parameters View


2. To add an input parameter, click New Input, then define the properties for the parameter.

3. To add an output parameter to a function block, click New Output, then define the
properties for the parameter.

4. To add a local variable, click New Variable, then define the properties for the variable.

To edit parameters and local variables

You edit parameters and local variables for a currently opened user-defined function or
function block.

1. In the Application View, right-click the required function or function block, and then
click Parameters.

The function or function block parameters are displayed.

2. To edit a parameter, select the parameter, then modify its properties.

3. To edit a local variable, select the variable, then modify its properties.

To delete parameters and local variables

You delete parameters and local variables for a currently opened user-defined function or
function block.

1. In the Application View, right-click the required function or function block, and then
click Parameters.

The function or function block parameters are displayed.

2. Select the parameter or local variable to delete, right-click and then click Delete.

To cut, copy, and paste parameters and local variables

You can cut, copy, and paste parameters and local variables for a currently opened user-defined
function or function block.

1. In the parameters view for a user-defined function or function block, cut or copy the
required parameter or local variable:

AADvance Workbench 73
 To remove the parameter or local variable, select the item, then right-click and then
click Cut.
 To copy the parameter or local variable, select the item, then right-click and then
click Copy.

2. To paste a copied parameter or local variable, right-click in the parameters view and then
click Paste.

Duplicated parameters or local variables are automatically placed in their respective area,
i.e., input, output, or variable.

To display data types for parameters and local variables

You can expand and collapse the display of data types for all parameters and local variables of
a currently opened user-defined function or function block.

In the parameters view, right-click and then click Expand All.

74 AADvance 2.1 - Parameters View


Find and Replace Utility
The Find and Replace utility enables performing the following operations:

Quick Find

Quick Replace

AADvance Workbench 75
Quick Find
You can find strings or expressions in files using the Quick Find utility. Quick Find steps from
one search result to the next in sequence, either backwards or forwards from the insertion point.
Upon reaching the end or beginning of a document, Quick Find automatically jumps to
unsearched sections. When the search is complete, a message is displayed.

When all search options are defined, you can choose to find the next instances of the required
string or expression within the specified scope.

Find What, enables defining the string or expression to find within the open document.
You can type the required string into the field, select one of the last twenty searches from
the Find What drop-down combo-box, and use wildcards or regular expressions in
searches. When using wildcards or regular expressions, the Expression Builder displays a
list of available wildcards or expressions.

Look in, enables defining the scope for the search. You can select the required scope from
the Look in drop-down combo-box.

Find Options, enables selecting options that refine the search. You can search for case
sensitive matches using Match Case. You can disregard partial word matches by selecting
Match whole word. You can search for matches from the insertion point to the top of the
file by selecting Search up. You can search collapsed or concealed text by selecting
Search hidden text. You can include special characters, such as wildcards or regular
expressions, in the Find What field by selecting Use.

To find a string or expression in a file

You can perform searches using the Find and Replace utility or you can type the necessary text
in the search field on the toolbar. You can place the cursor in the toolbar search field using the
Ctrl+D keyboard shortcut.

1. From the Edit menu, click Find and Replace, then click Quick Find (or press Ctrl+F).

2. In the Quick Find utility, enter the required information, then click Find Next (or press
F3).

Note: You can also access the Find utility found on the toolbar using the keyboard shortcut
Ctrl+D.

76 AADvance 2.1 - Find and Replace Utility


To use wildcards or regular expressions

1. From Quick Find, expand Find Options, then select Use.

2. From the Use drop-down combo-box, select the required option, either Wildcards or
Regular expressions.

3. In the Find What field, type the required wildcard or regular expression, or click to
select from the list of available wildcards or regular expressions.

AADvance Workbench 77
Quick Replace
You can replace strings or expressions in files using the Quick Replace utility. Quick Replace
steps from one search result to the next in sequence, either backwards or forwards from the
insertion point. Upon reaching the end or beginning of a document, Quick Replace
automatically jumps to unsearched sections. When the search is complete, a message is
displayed.

When all search options are defined, you can choose to find the next instance of the required
string or expression within the specified scope, then replace individual or all instances of
searched items.

Find What, enables defining the string or expression to find within the open document.
You can type the required string or expression in the field, select one of the last twenty
searches from the Find What drop-down combo-box, and use wildcards or regular
expressions in searches. When using wildcards or regular expressions, the Expression
Builder displays a list of available wildcards or expressions.

Replace with, enables defining the string or expression that will replace each match
found. You can type the required string or expression in the field provided, or select one
of the last twenty items entered using the drop-down combo-box. You can delete matches
found by leaving the Replace with field empty. You can use wildcards or regular
expressions in the Replace with field.

Look in, enables defining the scope for the search. You can select the required scope from
the Look in drop-down combo-box.

Find Options, enables selecting options that refine the search. You can search for case
sensitive matches using Match Case. You can disregard partial word matches by selecting
Match whole word. You can search for matches from the insertion point to the top of the
file by selecting Search up. You can search collapsed or concealed text by selecting
Search hidden text. You can include special characters, such as wildcards or regular
expressions, in the Find What field by selecting Use.

To replace a string or expression in a file

From the Edit menu, click Find and Replace, then click Quick Replace (or press Ctrl+H).

1. In the Quick Replace utility, enter the required information, then click one of the
following command buttons: Find Next, Replace, or Replace All.

78 AADvance 2.1 - Find and Replace Utility


To use wildcards or regular expressions

1. From Quick Replace, expand Find Options, then select Use.

2. From the Use drop-down combo-box, select the required option, either Wildcards or
Regular expressions.

3. In the Find What or Replace with fields, type the required wildcard or regular expression,

or click to select from the list of available wildcards or regular expressions.

AADvance Workbench 79
80 AADvance 2.1 - Find and Replace Utility
Compiler Verification
The Compiler Verification Tool (CVT) ensures the following:

The compiler output is correct

The compiler output matches source code input

The compiler output contains only the essential elements of the source code input.

The compilation verification process validates the accuracy of the compilation process by
comparing individual POU STF files with their resulting TIC code. The verification process
starts when the compiler completes the generation of the TIC code from the STF file. The
process consists of converting the STF file to an XML file and disassembling the TIC code
towards another XML file, then comparing both resulting XML files for differences. The
conversion of the STF file and the disassembly of the TIC code is performed by separate
utilities.

Code Generation

Verification Process

Output Window Comparison errors

To ensure the CVT provides an efficient and accurate analysis of the source TIC code, the
following best practices on keeping the code simple and clear are recommended:

AADvance Workbench 81
82 AADvance 2.1 - Compiler Verification
Best Practice Example
Use simple networks FBD network having a loop:
In FBD, loops can yield
CVT mismatches due to
the execution order. Note
that the compiled
execution is not at fault,
only the CVT
comparison. To avoid
these mismatches, you are
recommended to reassign
variables instead.
Best practice:

AADvance Workbench 83
Best Practice Example
Avoid overlapping loops FBD program having overlapping networks:
In FBD, networks should
be separate from one
another to avoid network
overlapping.

Best practice:

84 AADvance 2.1 - Compiler Verification


Best Practice Example
Place labels outside of Label placed inside an FBD network:
FBD networks

Best practice:

Avoid directly using FBD network having constants as inputs:


constants as inputs for
operators
In FBD, when using
constants as inputs for an
operator, you are
recommended to insert a Best practice:
temporary variable
between the constant and
the operator.

AADvance Workbench 85
Best Practice Example
Avoid using user-defined FBD program with a user-defined function block having no input
function blocks having no or output parameters:
input or output
parameters
To avoid CVT errors as
well as get the correct
execution, each
user-defined function
block must have at least Best practice:
one input.

86 AADvance 2.1 - Compiler Verification


Best Practice Example
Avoid using vertical bars FBD program using vertical bars:
in FBD POUs
Using vertical bars in
FBD can yield CVT
mismatches due to the
execution order. You are
recommended to create a
user-defined LD POU and
then use the block in the xxx := V1;
required FBD application. v6out := (((xxx & V5) & V6) OR (xxx & V7) OR (((xxx
& V2) & V3) & V4));
Best practice:

Then use the user-defined LD POU in the required FBD


application.

AADvance Workbench 87
Best Practice Example
Avoid assigning multiple FBD network having multiple levels of variables:
levels of variables in a
network
To avoid CVT
mismatches due to the
execution order, flatten
the variables on a single boolValue3 := boolValue1;
level. boolValue2 := NOT(boolValue1);
boolValue4 := boolValue3;
boolValue5 := boolValue1;
Best practice:

In ST, avoid using the ST statement containing the result of an operation as a parameter
result of an operation as a to a function:
parameter to a function.
dVal := TON_BOOL((realMin > realMax), boolValue);
To prevent safety issues
Best practice:
from occurring, you are
recommended to store the boolParam := (realMin > realMax);
result of the operation in a dVal := TON_BOOL(boolParam, boolValue);
temporary variable.

88 AADvance 2.1 - Compiler Verification


Spy Lists
You can spy on, i.e., monitor changes in values, for variables, arrays, structures, and instances
of function blocks by adding them to spy lists directly, from the dictionary, or from the
language editors. You create spy lists, then proceed to adding the required items for monitoring
while editing, simulating, or running an application. From spy lists, you can also modify values
for the displayed items.

You view spy lists in the Spy List window.

When managing spy lists, you can perform the following tasks:

Accessing existing spy lists

Deleting a spy list

Adding items to a spy list

Removing items from a spy list

Saving spy lists

Cutting, copying, and pasting items between spy lists

Dragging items between spy lists

Forcing the value of spy list variables

For spy lists, the properties are the following:

AADvance Workbench 89
Column Description Possible Values
Name Name of the variable or function Limited to 128 characters beginning
block instance with a letter or underscore character
followed by letters, digits, and single
underscore characters. These names
cannot have two consecutive underscore
characters.
Alias Any name (for use in LD POUs) Limited to 128 characters beginning
with a letter or underscore character
followed by letters, digits, and single
underscore characters. These cannot
have two consecutive underscore
characters.
Logical Value Available when online. The Input: Locked
displayed value differs depending Output: Updated by the running TIC
on the direction of the variable or code
function block instance. Internal: Locked
Physical Value Available when online. The Input: Updated by the field value
displayed value differs depending Output: Locked
on the direction of the variable or Internal: Updated by the running TIC
function block instance. code
Lock Available when online. The Yes or No
indication of whether the value of
the variable or function block
instance is locked. Locking
operates differently for simple
variables, array and structure
elements, and function block
parameters. For simple variables,
individual variables are locked
directly. For structure and array
elements, locking an element locks
all the elements of the structure or
array.

90 AADvance 2.1 - Spy Lists


Column Description Possible Values
Comment User-defined text Free format
Access Path The location of the variable or Name of the project, controller, and
function block instance within the program is displayed, as well as the
project. name of the variable or function block
instance.

You can also customize spy lists by arranging the columns to display and setting the display
colors. In the Spy List, you can refine the contents of the grid by grouping items in a list, sorting
items in a list, and filtering items in a list.

For spy lists, the properties are the following:

Monitoring Refresh Rate The rate at which the values of variables are refreshed in the
spy list, in milliseconds. You can only change the refresh rate
while in edition mode.
Spy List Name Name of the spy list displayed in the spy list title bar and the
menu

When working in the Spy List, you can navigate using the mouse controls and arrow keys to
move up and down the list.

Arrow keys Enable moving up or down in the list


Enter key When selecting variables using the Name field, enables saving the selected
variable to the grid.

To create a spy list

1. From the Online menu, point to Windows, then point to Watch, and then click Create
Spy List.

AADvance Workbench 91
2. To assign a name other than the default name, specify the required name in the Name
field of the spy list window.

A spy list having an empty grid is displayed.

To access an existing spy list

From the Online menu, point to Windows, then point to Watch, and then click the
required spy list.

To delete a spy list

1. From the Debug menu, point to Spy Lists, then click the name of the spy list to remove.

2. In the spy list window, verify the correct name of the spy list to remove, then click .

The spy list is removed.

To add items to a spy list

While editing, simulating, or running an application, you add variables, arrays, structures, and
instances of function blocks individually to a spy list directly, from the dictionary, or from a
language editor.

1. To add items directly in a spy list:

a) Access the existing spy list from the Debug menu, point to Spy Lists, then click the
required spy list name.

b) In the spy list window, click in the available Name cell and type the specific
alphanumerical characters contained in the name of the item to add to the spy list.

92 AADvance 2.1 - Spy Lists


c) From the drop-down list displaying the variables, arrays, structures, and function
block instances having the characters in their name, select the required item and
press Enter.

2. To add items from the dictionary:

a) Access the dictionary instance containing the item to add to the spy list.

b) In the dictionary instance, right-click the name field for the item to add, point to Add
to Spy List, then click the name of the required spy list from the available lists.

AADvance Workbench 93
3. To add items from a language editor:

a) Access the POU containing the item to add to the spy list.

b) In the language container, right-click the item to add, point to Add to Spy List, then
click the name of the required spy list from the available lists.

94 AADvance 2.1 - Spy Lists


To remove items from a spy list

While editing, simulating, or running an application, you can delete variables, arrays,
structures, and instances of function blocks from a spy list. When selecting an item, an
indicator arrow is displayed in the leftmost column of the list.

In the spy list, select the item to delete, right-click the selection, and then click Delete.

The items are removed from the list.

To save a spy list

Changes to spy lists are saved automatically upon closing.

From the required spy list, click the Close button at the top-left corner of the Spy List
window.

To cut, copy, and paste items between spy lists

You can cut, copy, and paste variables, arrays, structures, and instances of function blocks
between spy lists. When selecting these items, an indicator arrow is displayed in the leftmost
column of the list.

AADvance Workbench 95
1. In the grid of the required spy list, cut or copy the required items.
 To remove variables, select the required item or items, right-click the selection, and
then click Cut.
 To copy variables, select the required item or items, right-click the selection, and
then click Copy.

2. In the grid of the required spy list, right-click the required location, and then click Paste.

The items are displayed at the desired location.

To drag items between spy lists

You can drag variables, arrays, structures, and instances of function blocks from one spy list
to another.

1. Access the spy lists containing the required items and their destination.

2. From the spy list containing the required items, select the items.

The selection indicator is displayed in the leftmost column.

3. Drag to the destination, placing it at the required location within the list.

The items are displayed at the destination.

To arrange the columns to display

1. To move a column, drag the column header to another location.

When dragging a column header, arrows indicate the current position of the header.

2. To show or hide a column, right-click on a column header, and then click the required
column name.

To sort items in a spy list

You can sort items in a spy list according to the ascending or descending order for the different
columns.

96 AADvance 2.1 - Spy Lists


Click the required column header to toggle the sort order between ascending and
descending.

To filter items in the grid

You can filter variables, arrays, structures, and instances of function blocks displayed in a list.
When filtering, you create a view displaying only the entries containing specified characters.

The filter row is the top row of the grid. You can filter variables and function block instances
by typing alphabetical and numerical characters in the cells of the filter row. You can also
select from the drop-down-combo box. Matching variables and function block instances are
automatically displayed.

In the filter row of the Spy List, click the required cell, then do one of the following:
 Type the characters to use in the filtering operation
 Select the required structure from the drop-down combo box

To group items in a spy list

You can group items contained in a spy list according to columns.


Drag the required column header to toggle the sort order between ascending and
descending.

To force the value of a spy list variable

For spy list variables having a write access value of false, you must restrict access before
forcing the values. For variables having a write access value of true:

From the spy list, double-click the variable's corresponding cell in the Value column, then
in the dialog box, click Write. For boolean variables, click the required boolean value.

AADvance Workbench 97
98 AADvance 2.1 - Spy Lists
Add-in Manager
The Add-in manager enables specifying the loading method of available, i.e., registered,
add-ins. The Add-in manager dialog box lists the available add-ins for which you specify
whether to load at startup or using a command line. The dialog box also displays descriptions
defined for add-ins.

At startup or build time, when add-ins are set to load using command line switches, those
having user interfaces are automatically displayed. Add-ins displaying as toolbar icons or
menu commands are also displayed within the toolbars and menus. When add-ins are set to
load at startup time, you can stop the add-in from loading by pressing and holding SHIFT during
startup. Add-ins having user interfaces remain accessible from toolbars and menus.

For projects containing add-ins, you can avoid errors when moving a project to another
location by updating its paths in the following tag of the respective *.Addin XML file:
<Assembly>C:\MyAddin1.dll</Assembly>

When working in the Add-in Manager dialog box, you can toggle the selection of the loading
options using keyboard shortcuts for a selected add-in: Startup option using ALT+S and
Command Line option using ALT+C.

To access the Add-in Manager

From the Tools menu, click Add-In Manager.

The Add-in Manager is displayed.

To set the loading behavior for an add-in

1. From the Add-In Manager, in the Available Add-ins column, click the check box next to
the add-in name, then perform the following as required:
To load the add-in at startup, click the check-box in the Startup column.
To load the add-in using a command line, click the check-box in the
Command Line column.

2. Click OK.

AADvance Workbench 99
100 AADvance 2.1 - Add-in Manager
External Tools
You can launch external tools and applications by adding items to the Tools menu. You can
also create keyboard shortcuts for external tools added to the Tools menu. Supported file types
include *.exe, *.bat, *.com, *.cmd, and *.pif.

From the External Tools dialog box, you can perform the following tasks:

Adding an external tool

Specifying a tool for handling arguments

Defining a working directory

When specifying a tool for handling arguments, the required argument is immediately
transferred to the tool when the external tool is launched. At this time, you can also choose to
edit required arguments. Upon subsequent startups of the external tool from the Tools menu,
selected arguments are automatically passed to the tool. When Prompt for Arguments is
selected, the Arguments dialog box is displayed.

You can define a working directory for tools or commands. You can also specify additional
arguments when the command is launched.

To add an external tool

1. From the Tools menu, click External Tools.

2. In the External Tools dialog box, in the Title field, type a name for the menu option. To
include a keyboard shortcut, type an ampersand (&) before the letter in the title to use as
shortcut. For example: "My External Tool", the letter "x" is the keyboard shortcut.

3. In the Command field, type the path to the file, or browse for the file by clicking .

4. Select the Use Output window and Close on exit check boxes (optional).

The Use Output window option is only available for .bat and .com files.

5. Click Add, then click OK.

AADvance Workbench 101


The external tool is available from the Tools menu.

To specify a tool for handling arguments

When the specified tool is launched, the required argument is immediately transferred to the
tool. Selecting the Prompt for Arguments option enables editing the argument at launch time.

1. From the Tools menu, click External Tools.

2. In the External Tools dialog box, in the Menu contents list, select the required tool.

3. In the Arguments field, type the required arguments, or select a predefined argument by

clicking .

4. Select Prompt for arguments (optional), click Apply, then click OK.

To define a working directory

Selecting the Prompt for Arguments option enables adding additional arguments at launch
time.

1. From the Tools menu, click External Tools.

2. In the External Tools dialog box, in the Menu contents list, select the required tool.

3. In the Initial directory field, enter the working directory for the tool, or select a

predefined directory path by clicking .

4. Select Prompt for arguments (optional), click Apply, then click OK.

102 AADvance 2.1 - External Tools


Working in the Development
Environment
When working in the development environment, you can display the Output window to view
output messages and the Error list to display errors from builds. You can also use keyboard
shortcut combinations to perform multiple tasks. These tasks include customizing, creating,
and renaming toolbars. You can also customize commands and edit buttons.

AADvance Workbench 103


Zooming the Contents of Active POUs
You can set the zoom factor for viewing the contents of individual active graphic POU
documents. The zoom toolbar contains the following commands:

Zoom in, enlarges the contents of an active graphic POU document

Zoom out, provides a larger overview of the contents of an active graphic POU
document, as if viewed from further away

Zoom to fit all, sets the magnification factor to display the contents within the width and
height of an active graphic POU document

Zoom to page width, sets the magnification factor to display the contents within the width
of an active graphic POU document

Zoom percentage factor, enables specifying the magnification factor for the contents of
an active graphic POU document

To set the zoom factor for an active POU document

You can access the zoom options from the Zoom toolbar and from the View menu.

1. Click the active graphic POU document for which to adjust the zoom factor.

2. From the zoom toolbar, click the required zoom option.

104 AADvance 2.1 - Working in the Development Environment


Displaying the Output Window
You can review messages generated by various features of the Workbench by accessing the
Output window. From the Output window, you can perform the following tasks:

Reviewing status messages

Managing the contents of the window

The Output window toolbar contains the following commands:

Show output from: Enables selecting individual features for which to view
generated status messages
Moves the insertion point to the line in the language editor
Find Message in Code
containing the selected build error
In the Output window, jumps to the previous build error
Go to Previous Message
message. In the code editor, locates the build error and
automatically moves the insertion point to the error.
In the Output window, jumps to the next build error
Go to Next Message message. In the code editor, locates the build error and
automatically moves the insertion point to the error.
In the Output window, deletes all displayed messages.
Clear all
Wraps text to continue on the next line for messages
Toggle Word Wrap
extending beyond the viewing area

To access the Output window


From the View menu, click Output (or press Ctrl+Alt+O).

The Output window is displayed.

To review the generated status messages


In the Output window, from the Show output from drop-down combo box, click the
required feature.

The status messages are displayed.

AADvance Workbench 105


To manage the contents of the Output window

You can manage the word wrapping and clear the contents of the window.

1. To wrap text to continue on the next line, click .

2. To delete the contents of the window, click .

106 AADvance 2.1 - Working in the Development Environment


Using the Error List
You can view the errors, warnings, and messages produced when you edit programs and
perform build operations by accessing the Error List window.

From the Error List window, you can navigate from one error to the next using the contextual
menu options. You can also navigate between errors using the keyboard arrows.

Column Description
Category Displays an icon identifying the type of error
Default Order Displays an integer indicating the order in which the error occurred
relative to the other errors
Description Displays the error message text
File Displays the program name or the program location and program name
Line Displays the line number
Column Displays the column number
Project Displays the name of the project

The Error List toolbar contains the following commands:

Displays the number of generated errors. Click to toggle between


displaying and hiding the errors in the list.
Displays the number of generated warnings. Click to toggle between
displaying and hiding the warnings in the list.
Displays the number of generated messages. Click to toggle between
displaying and hiding the messages in the list.

You can sort the contents of the Error List. You can customize the Error List by hiding
columns, resizing columns, and arranging the columns to display.

To display the Error List window


From the View menu, click Error List (or press Ctrl+\, Ctrl+E).

The error list is displayed.

AADvance Workbench 107


To sort the errors

You can sort the list of displayed errors.


In the Error List window, click the required column heading for which to sort. To further
sort the list, click another column heading while pressing SHIFT.

To search messages in the Error List window


In the Search Error List field of the error list window, enter text contained in the message
to locate.

The Error List window displays only the messages containing the specified text.

To customize the Error List window

1. To move a column, drag the column heading to the required location.

2. To modify the width of columns, drag the column dividers to the required location.

108 AADvance 2.1 - Working in the Development Environment


Arranging and Docking Windows
You can arrange the development environment by placing tool windows and document
windows in various positions. You can undock and move tool windows or document windows
from their default location. You can also dock multiple windows together and move these as a
group. While moving windows, a guide diamond indicates the available positions for the
window.

Tool windows are available from the View menu. Open document windows are listed in the
Window menu with the top-most window listed first.

For tool windows such as the Application View, Communication View, Equipment View,
Toolbox, and Properties windows, you can choose the following window positions:

Float, the window floats over or outside the workspace

Dock, the window remains open at a chosen location

Dock as tabbed, the window is placed as a tabbed document

Auto hide, the window is reduced to a navigation bar item on the edges of the workspace.
Clicking toggles between showing and reducing the window.

Hide, the window is not displayed in the interface

For document windows such as programs, you can choose the following positions:

Float, the window floats over or outside the workspace

Dock, the window remains open at a chosen location

AADvance Workbench 109


Dock as tabbed, the window is placed as a tabbed document

When omitting to set floating tab wells or tool windows to stay on top of the main window, the
View > All Windows option is available to bring forth such windows that may be hidden
behind the development environment or any other application on the desktop.

To display tool windows and document windows

1. For a tool window, click the window to display from the View menu.

2. For a document window, double-click the document from the respective view. For
example, you open a program by double-clicking it from the Application View.

To dock tool windows and document windows

1. Locate and click the tool windows or document window to dock.

2. Drag the window toward the center of the workspace. To move a dockable window
without snapping it into place, press Ctrl while dragging the window.

A guide diamond appears. The four arrows of the diamond point toward the four sides of
the workspace. For tool windows, an additional four arrows point to the four edges of the
Workbench.

3. When the window reaches the docking location, move the pointer over the corresponding
portion of the guide diamond. The shaded area indicates the respective window position.

4. To dock the window in the indicated position, release the mouse button.

5. To return a tool window or document window to its previous position, double-click its
title bar while pressing Ctrl.

To arrange the windows layout

When arranging the windows layout, you can auto hide tool windows, display windows as
tabbed documents within one or more tab groups. Tool windows set to auto hiding are reduced
to a navigation bar item on the edges of the Workbench and remain open when closing all
documents. At any time, you can reset the windows layout to the default layout. You can return
a window to its previous position by double-clicking the title bar while pressing Ctrl.

110 AADvance 2.1 - Working in the Development Environment


1. To auto hide a tool window, dock the window and then click Auto Hide from the
Window menu.

2. To display a window as a tabbed document, click the window and then click Dock as
Tabbed Document on the Window menu.

3. To add a horizontal or vertical tab group for tool windows or document windows:

a) For a horizontal tab group, click a window to add to the new group and then click
New Horizontal Tab Group from the Window menu. The window is displayed in
the new tab group.

b) For a vertical tab group, click a window to add to the new group and then click New
Vertical Tab Group from the Window menu. The window is displayed in the new
tab group.

c) To move subsequent windows to the next tab group, click each window and then
click Move to Next Tab Group from the Window menu.

4. To close a tool window, click the tool window and then click Hide from the Window
menu.

5. To close a document window, click the Close button on the window tab.

6. To close all tool windows and document windows at once, click Close All Documents
from the Window menu. The windows set to auto hide remain open.

7. To bring forth floating tab wells and tool windows hidden behind the main window or
any other application on the desktop, click All Windows from the View menu. This
feature is only available when you clear the Floating tab wells always stay on top of the
main window and Floating tool windows always stay on top of the main window items in
the Tabs and Windows environment options in the Options dialog box.

8. To reset the windows layout to the default layout, click Reset Window Layout from the
Window menu. Click Yes when prompted to confirm the restoration of the windows
default layout.

AADvance Workbench 111


Searching in the Development Environment
You can perform searches for text strings in various windows of the development environment.
These searches are used to locate specific information or filter displayed information.

Options dialog box (available from the Tools menu), where you can search for text
contained in entries of the table of contents

Toolbox, where you can filter the number of displayed elements by entering text
contained in the required elements

Error list, where you can filter the number of displayed messages by entering text
contained in the required messages. Pressing the Esc key returns filtered messages to
their unfiltered results. Pressing the Enter key opens the document containing the source
of a displayed error.

Block library, where you can filter the number of displayed blocks by entering text
contained in the required blocks. For example, a search for "and" results in the display of
the AND, AND_MASK, and RAND standard blocks.

To perform searches in the development environment


In the respective tool window or dialog box, enter the required text in the text field.

The search results display the information containing the specified text.

112 AADvance 2.1 - Working in the Development Environment


Navigating in the Development Environment
Navigating in the development environment is simplified with the use of the Windows dialog
box. The Windows dialog box displays the active files open in the current project. Active files
consist of language containers, the Application View, Communication View, Equipment
View, and other windows docked in the workspace.

From the Windows dialog box, you can perform the following management tasks for active
files:

Switch between active files

Save changes to one or more active files

Close active files

To navigate using the Windows dialog box

1. From the Window menu, click Windows.

The Windows dialog box displays the list of active files.

AADvance Workbench 113


2. To switch to another active file in the list, select the required file, and then click Activate.

3. To save changes to active files, select the required files from the list, and then click Save.

4. To close active files, select the required files from the list, and then click Close
Window(s).

114 AADvance 2.1 - Working in the Development Environment


Customizing Toolbars
For toolbars provided with Automation Collaborative Platform, you can modify docking
locations. For custom toolbars, you can modify docking locations, rename toolbars, and delete
toolbars.

To customize a toolbar

The Customize dialog box lists the provided toolbars as well as any custom user toolbars.

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Toolbars tab, make the required changes, and
then click Close.
 To modify the docking location for a toolbar, select the required toolbar from the
Toolbars list, click Modify Selection, then select the preferred location for docking
the toolbar. Available docking locations are top, left, right, and bottom.
 To rename a custom toolbar, select the required toolbar from the Toolbars list,
click Modify Selection, and then type the required name in the text field.
 To delete a custom toolbar, select the required toolbar from the Toolbars list, and
then click Delete.
The toolbar is removed from the Toolbars list.

AADvance Workbench 115


Creating Toolbars
You can create custom toolbars for use in the workbench.

To create a custom toolbar

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Toolbars tab, and then click New.

3. In the New Toolbar dialog box, type a name for the custom toolbar, and then click OK.

The custom toolbar name is added to the Toolbars list.

116 AADvance 2.1 - Working in the Development Environment


Customizing Commands
You can customize menu bar, toolbar, and contextual menu commands by selecting a set of
commands, then choosing an individual command to modify using the available options. You
can add, rename, reset, delete, and rearrange the order of commands in the menus. You can also
delimit groups of commands in menus and specify display options.

When customizing menus, the following image shows the different levels and options for menu
items.

Menu Bar Menu Category

Menu Items

Submenu
Commands

To add a menu category to the menu bar

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab.

3. Select Menu Bar from the Menu bar drop-down combo box.

AADvance Workbench 117


4. To add a menu category to the menu bar, click Add New Menu.

The menu category is added to the menu bar.

5. Rename the menu item by clicking Modify Selection, then typing the required name in
the text field.

To add a menu item to an existing menu category, toolbar, or contextual menu.

Menu items are either commands or subcategories leading to submenus. Before adding a menu
item, you need to arrange the required order by selecting the menu item following the location
of the new item in the list or rearranging the menu items after insertion.

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab.

3. Select the required menu from the Menu bar, Toolbar, or Context menu drop-down
combo boxes.

4. Perform one of the following operations:


 To add a menu item to an existing menu category, toolbar, or contextual menu, select
the item following the location for the new item, and then click Add New Menu.
 To add a command to an existing menu category, toolbar, or contextual menu, select
the item following the location for the new item, click Add Command. From the
Add Command dialog box, select the category, choose from the available commands
in the Commands list, and then click OK.

The menu item is added to the existing menu category, toolbar, or contextual menu.

5. To rename the menu or command, click Modify Selection, and then type the required
name in the text field.

To reset menu bars, toolbars, or contextual menus

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab.


3. Perform the required reset operation:
 To reset a command or menu item, select the item from the respective drop-down
combo box, select the command or menu item from the Controls list, click Modify
Selection, and then click Reset.
 To reset a menu, toolbar, or contextual menu, select the item from the respective
drop-down combo box, and then click Reset All.

To delete a menu item, toolbar, or contextual menu

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab.

3. Select the required menu from the Menu bar, Toolbar, or Context menu drop-down
combo boxes.

4. In the Controls list, select the item to delete, and then click Delete.

To create a group of commands

You can create groups of commands by inserting separator bars.

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab.

3. Select the required menu from the Menu bar, Toolbar, or Context menu drop-down
combo boxes.

4. From the Controls list, select the menu item starting the group, click Modify Selection,
and then click Begin a Group.

A separator bar is inserted before the selected menu item.

To rearrange menu items

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab.

AADvance Workbench 119


3. Select the required menu from the Menu bar, Toolbar, or Context menu drop-down
combo boxes.

4. To place the menu item at a different location in the selected menu or toolbar, select the
menu item in the Controls list, and then click Move Up or Move Down to move across
the existing menu items.

To specify the display options for a command

Initially, the display options for commands are set to default. In menus, the default display
option is Image and Text, while in toolbars it is Text Only (in Menus). The Text Only (in
Menus) option displays an image in a toolbar or text in a menu. The Text Only (Always) option
displays text in a menu or toolbar. The Image and Text option displays both image and text in
a menu or toolbar. A command may not have an associated image.

1. From the Tools menu, click Customize.

2. From the Customize dialog box, click the Commands tab

3. Select the menu to modify from the Menu bar, Toolbar, or Context menu drop-down
combo boxes.

4. To specify the display options, select the required command in the Controls list,
click Modify Selection, and then select from the following:
 Default style
 Text Only (Always)
 Text Only (in Menus)
 Image and Text

120 AADvance 2.1 - Working in the Development Environment


Importing and Exporting Settings
You can import or export specific categories of settings, or reset the environment to one of the
default collections of settings. The environment settings include the settings for the various
development views, editors, and tools.

Export Selected Environment Settings

Import Selected Environment Settings

Reset all Settings

To import, export, or reset environment settings

1. From the Tools menu, click Import and Export Settings...

2. Select the required option, and then follow the on-screen instructions.

AADvance Workbench 121


Export Selected Environment Settings

When exporting selected environment settings, you need to choose the settings to export from
the list of available environment settings. Environment settings identified with a warning
symbol are not selected by default since these may contain intellectual property or sensitive
information. Some categories may have sub-categories visible upon expanding the arrows to
the left of the category item.

The settings exportation process requires the following operations:

1. Choosing the environment settings to export.

2. Naming a settings file.

During the environment settings export process, a dialogue indicates the progress of the
operation. Upon completion of the environment settings export process, a summary page
indicates the results of the operation.
Import Selected Environment Settings

122 AADvance 2.1 - Working in the Development Environment


Naming a Settings File

When exporting selected environment settings, you need to specify a settings file in which to
store the exported settings. The default location of this settings file is the following:

%USERPROFILE%\Documents\AADvance 2.1\Settings\AADvance

AADvance Workbench 123


Settings Export in Progress

During the environment settings export process, a window indicates the progress of the
operation.

124 AADvance 2.1 - Working in the Development Environment


Import Selected Environment Settings

When importing selected environment settings, you need to choose a file containing the
settings to import, then select the required settings to import from the list of available
environment settings in the file. Environment settings identified with a warning symbol are not
selected by default since these may contain intellectual property or sensitive information. Some
categories may have sub-categories visible upon expanding the arrows to the left of the
category item.

The settings importation process requires the following operations:

1. Choosing whether to save the current environmental settings or overwriting the current
setting with the settings to import.

2. Choosing a file containing the collection of environmental settings to import.

3. Selecting the individual settings to import from the list of available environment settings
in the settings file.

During the environment settings import process, a dialogue indicates the progress of the
operation. Upon completion of the environment settings import process, a summary page
indicates the results of the operation.
Export Selected Environment Settings

AADvance Workbench 125


Choosing a Collection of Settings to Import

When importing selected environment settings, you need to choose a file containing the
settings to import.
Choosing Settings to Import

126 AADvance 2.1 - Working in the Development Environment


Choosing Settings to Import

When importing selected environment settings, you can select the required settings to import
from the list of available environment settings contained in the settings file. Environment
settings identified with a warning symbol are not selected by default since these may contain
intellectual property or sensitive information. Some categories may have sub-categories visible
upon expanding the arrows to the left of the category item.
Choosing a Collection of Settings to Import

AADvance Workbench 127


Settings Import in Progress

During the environment settings import process, a window indicates the progress of the
operation.

128 AADvance 2.1 - Working in the Development Environment


Reset all Settings

You can revert the environment settings to the initial settings. When resetting the environment
settings, you can choose whether to save the current environment settings to a file.

AADvance Workbench 129


Settings Reset in Progress

During the environment settings reset process, a window indicates the progress of the
operation.

130 AADvance 2.1 - Working in the Development Environment


Operations Summary

When performing one of the following tasks regarding the environment settings, the wizard
informs you of the results (whether successful or unsuccessful) for the operation.

Export Selected Environment Settings

Import Selected Environment Settings

Reset all Settings

AADvance Workbench 131


Development Environment Keyboard Shortcuts
When working in the development environment, keyboard shortcuts are available for the
following tasks:

Accessing Windows

Online and Simulation

Navigating in the Dictionary

Getting Help

Saving and Closing

Working with the Cross Reference Browser and Find utility

Zooming the contents of active POUs

Navigating in the Development Environment

Some keyboard shortcuts do not apply or may differ while debugging.

Note: Keyboard shortcuts specific to the programming languages, debugging, and version
source control are indicated on their respective keyboard shortcut pages.

Accessing Windows

Ctrl+Alt+T Accesses the Block Library


Ctrl+W, Ctrl+C Accesses the Cross Reference Browser
Ctrl+\, Ctrl+E Accesses the Error List window
Ctrl+Shift+N Accesses the New Project dialog box (not available while debugging)
Ctrl+Shift+O Accesses the Open Project dialog box (not available while
debugging)
Ctrl+Alt+O Accesses the Output window
F4 Accesses the Properties window
Alt+Enter Accesses the Properties window
Ctrl+F Accesses the Quick Find utility

132 AADvance 2.1 - Working in the Development Environment


Ctrl+H Accesses the Quick Replace utility
Shift+Alt+M Brings to the front floating windows
Ctrl+Alt+X Accesses the Toolbox

Online and Simulation

Ctrl+Shift+B Builds the solution (not available while online)


F5 Displays the Connect dialog box
F10 While debugging, steps over the next rung or line of code
F11 While debugging, steps into the next rung or line of code
Shift+F5 Disconnects from the controllers
Ctrl+D Only available in debug mode for the date data type. When the Write
Logical Value dialog box is open, enters the current date.

Navigating in the Dictionary

Up Arrow Moves up the grid between cells


Down Arrow Moves down the grid between cells
Left Arrow Moves left across the grid between cells
Right Arrow Moves right across the grid between cells
Ctrl+PLUS SIGN on Expands the fields of complex data types
numeric keypad (+)
Ctrl+MINUS SIGN on Collapses the fields of complex data types
numeric keypad (-)

Getting Help

Ctrl+F1 Accesses the Help Viewer


Shift+F1 Accesses help for the selected window
F1 Accesses help for the selected element

AADvance Workbench 133


Saving and Closing

Ctrl+S Saves the selected elements (not available while debugging)


Ctrl+Shift+S Saves all files making up a solution (not available while debugging)
Alt+F4 Exits the AADvance Workbench
Ctrl+F4 Closes files and windows located in the workspace
Shift+Esc Closes selected windows except for programs

Working with the Cross Reference Browser and Find utility

Ctrl+T, Ctrl+R Refreshes the Cross Reference Browser data


F8 Jumps to the selected instance of an element
Shift+F8 Jumps to the selected instance of an element
F3 Finds next text in a selected window
Ctrl+D Goes to the find toolbar. Current text is highlighted/selected.

Zooming the contents of active POUs

Ctrl+mouse wheel Increases and decreases the magnification factor of the contents of
POUs

Navigating in the Development Environment

Shift+F10 Displays the contextual menu for the selected item.


Alt+- For language containers, displays various menu options including
saving, docking, and tiling.
For other windows, displays docking options.
Ctrl+Alt+Down Displays a drop down list on the top right corner of the workspace
Arrow listing all active files tabbed in the workspace.
Ctrl+F6 Navigates to the next Active File
Ctrl+Shift+F6 Navigates to the previous Active File
Alt+F6 Navigates to the next Active Tool Window
Alt+Shift+F6 Navigates to the previous Active Tool Window

134 AADvance 2.1 - Working in the Development Environment


Options for the Development
Environment
When setting the development options, you can customize the following aspects of the
development environment:

Setting Environment Options

Specifying Project Options

Specifying Block Library Settings

Setting Grid Options

Setting IEC Language Options

Defining Spy List Settings

To search entries in the Options table of contents

You can perform searches for entries in the Options table of contents.
In the Search field of the Options dialog box, enter text contained in the entry to locate in
the table of contents.

The Options table of contents displays only the entries containing the specified text.

AADvance Workbench 135


Setting Environment Options
You can define the environment options for the following:
Find and Replace Settings
Import and Export Settings
Shortcut Keyboard Combinations
Tabs and Windows

You can modify the general settings for the workbench by accessing the general environment
options. Some changes to the general settings take effect after restarting the workbench.

Visual experience, indicates the color theme to use in the development environment and
specifies whether the visual experience is set automatically or explicitly. For the color
theme, the possible colors are blue and light. For the visual experience, the adjustment
may change the display of colors from gradients to flat colors, or it may restrict the use of
animations in menus or popup windows. Enabling the full visual experience includes
gradients and animations. Clear this option when using remote desktop connections or
older graphics adapters because these features may have poor performance in such cases.
Use hardware graphics acceleration if available rather than software acceleration.

Window menu, indicates the number of windows (ranging from 1 to 24) displayed in the
Windows list of the Window menu. For the number of items shown in the Window menu,
the default value is 10.

Recently used, indicates the number of recently used files displayed in menus. The items
shown in recently used lists field defines the number of recent projects and files (ranging
from 1 to 24) displayed in the File menu. For the number of items shown in recently used
lists, the default value is 4.

Show status bar, displays the status bar showing progress information for ongoing
operations.

Close button affects active tool window only, enables the Close button to shut down the
active window only. This option is selected by default.

Auto Hide button affects active tool window only, enables Auto Hide to hide the active
window only.

136 AADvance 2.1 - Options for the Development Envi-


To access the general environment options

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Environment, then click General.

The general environment options are displayed in the Options dialog box.

AADvance Workbench 137


Find and Replace Settings

You can define the display settings for the Find and Replace dialog box. You can choose to
display informational messages and warnings as well as populate the Find What field with text
from an open editor.

To define the display settings for the Find and Replace dialog box

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Environment, then click Find and Replace.

3. In the Options dialog box, select the required options, then click OK.

138 AADvance 2.1 - Options for the Development Envi-


Import and Export Settings

You can define options for saving settings files. You can choose to save your settings to a
*.vssetting file located on your system or to a shared settings files. When saving settings to a
shared *.vssettings file, you must provide a UNC path or local path to the shared file.

Automatically save my settings to this file, displays the name and path to the *.vssettings
file currently in use. You can change the setting file used by typing a different path or
browsing to locate the required settings file on your system.

Use team settings file, enables navigating to a shared *.vssettings file. You can browse to
locate the required settings file. This *.vssettings file is automatically re-applied to the
workbench following each modification.

To define the options for saving the settings file

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Environment, then click Import and Export
Settings.

3. In the Options dialog box, define the required name and location of the settings file, then
click OK.

AADvance Workbench 139


Shortcut Keyboard Combinations

The keyboard options enable you to perform many tasks regarding the keyboard shortcuts for
the various commands available in the AADvance environment. You can perform the
following tasks:

Viewing defined keyboard shortcuts

Defining keyboard shortcuts

Removing defined keyboard shortcuts

Keyboard shortcuts enable quicker operation of the AADvance environment. The keyboard
options enable viewing the defined keyboard shortcuts mapping schemes available for
commands. In AADvance, only the default keyboard shortcut mapping scheme is available.
You view commands in the Show commands containing section listing all available commands
and their respective keyboard shortcuts. In the text field, you can also type text to find a specific
command. By default, only some commands have pre-defined shortcuts. Users can define
(add) a shortcut to a command or modify an existing shortcut by adding a new shortcut and
removing an unwanted shortcut. You manage keyboard combinations from the following
options:.

Apply the following additional keyboard mapping scheme, only the default mapping
scheme is available for AADvance.

Show commands containing, displays all commands available in the AADvance


environment. When typing characters into the text box, the list displays all entries
containing the specified characters.

Shortcuts for selected command, lists mapped keyboard shortcuts for the command
selected in the Show commands containing list.

Use new shortcut in, specifies the scope of the keyboard shortcut. You can use the
shortcut globally in the AADvance environment or only within a specific context (or
window). The default setting is global, meaning the shortcut key works in any active
window. If a global keyboard shortcut and context specific shortcut are identical, the
context specific shortcut takes precedence. For example, commands having the MLGE
editor scope have precedence over commands having the global scope. A context specific
keyboard shortcut remains in effect only while the context (or window) is active.

140 AADvance 2.1 - Options for the Development Envi-


Press shortcut keys, enables pressing a key combination to be used for the currently
selected command. You must use one or more modifier keys such as CTRL, ALT, or
SHIFT combined with various keys. SHIFT cannot be combined with letters or numbers.
The F1-F12 keys can be used with or without a modifier. You can enter one or two key
combinations to use as a shortcut. For example, you can enter CTRL+Y, or enter F6,
CTRL+Y. Regardless of their scope, shortcut key combinations cannot contain the
following keys:
PRT SCR/SYS RQ Application key
SCRLK NUM LOCK
CAPS LOCK CTRL+ALT+DELETE key combination
ESCAPE

Shortcut currently used by, displays the command assigned to the current keyboard
shortcut combination. The textbox is only activated when you assign a key combination
that is already assigned to another command. To replace the current shortcut keyboard
combination with a custom one you must define a new keyboard shortcut mapping
scheme.

To view existing commands and keyboard shortcuts

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Environment, then click Keyboard.

The keyboard options are displayed in the Options dialog box.

3. In the Show commands containing field, scroll to find a command or type the required
command name without spaces. For example, ShowNextStatement.

4. In the Show commands containing list, select the required command.


For example, Debug.ShowNextStatement.

The shortcuts for the selected command drop-down combo-box displays the required shortcut
key combinations.

To define keyboard shortcuts

Clicking Assign permanently saves changes for a selected command.

AADvance Workbench 141


1. From the keyboard options, in the Show commands containing field, type the required
command name without spaces. For example, ShowNextStatement.

2. In the Show commands containing list, select the required command.


For example, Debug.ShowNextStatement.

3. In the Use new shortcut in drop-down combo-box, select the scope. For example, MLGE.

4. In the Press shortcut keys field, type the new key combination.

5. Click Assign, then click OK.

The shortcut key combination is saved for the required command.

To remove keyboard shortcuts

1. From the keyboard options, in the Show commands containing field, type the required
command name without spaces. For example, ShowNextStatement.

2. In the Show commands containing list, select the required command.


For example, Debug.ShowNextStatement.

3. In the Shortcuts for selected command field, select the keyboard shortcut to be removed.

4. Click Remove.

The keyboard shortcut is no longer assigned to the command.

142 AADvance 2.1 - Options for the Development Envi-


Startup

The startup options enable you to specify the Workbench behavior when launching
AADvance:

Open Home Page, where the Workbench automatically displays the AADvance home
page

Load last loaded solution, where the Workbench opens the last opened project

Show Open Project dialog box, where the Workbench automatically displays the Open
Project dialog box

Show New Project dialog box, where the Workbench automatically displays the New
Project dialog box

Show empty environment, where the Workbench opens without displaying any project or
dialog box

AADvance Workbench 143


Tabs and Windows

You can specify various options for arranging tabs and windows in the development
environment. These options also enable specifying the tool windows mouse-over behavior.

Tab Wells

Insert new tabs to the right of existing tabs, opens document windows as new tabs to the
right of existing tabs on tab wells. The default placing of new tabs on tab wells is to the
left of existing tabs.

Floating tab wells always stay on top of the main window, keeps tab wells set to floating
over or outside the development environment on top of the main window. When omitting
to set floating tab wells to stay on top of the main window, the View > All Windows
menu item is available when the environment includes at least one floating tab well.

Floating tool windows always stay on top of the main window, keeps tool windows set to
floating over or outside the development environment on top of the main window. When
omitting to set floating tool windows to stay on top of the main window, the View > All
Windows menu item is available when the environment includes at least one floating tool
window.

Pinned Tabs

Show pinned tabs in a separate row, places pinned tabs in a row separate from unpinned
tabs.

Show pin button in unpinned tabs, displays and makes available pin buttons in unpinned
tabs.

Maintain pin status if document is removed from well, holds the pinned or unpinned
status for a document tab following manipulations including closing and reopening.

Preview Tab

Allow new files to be opened in the preview tab, Not supported

Preview selected files in Solution Explorer (Alt+click to avoid previewing), Not


supported

144 AADvance 2.1 - Options for the Development Envi-


Preview selected files in Find Results, Not supported

Preview selected files in Navigate to, Not supported

Tool Windows

Show auto-hidden windows on mouse over, displays tool windows set to auto hide upon
mouse-over.

To specify tabs and windows options

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Environment, then click Tabs and Windows.

3. In the Options dialog box, select the required options, then click OK.

AADvance Workbench 145


Specifying Project Options
You can specify the default locations and behavior of project components. You can set default
paths for projects and templates. For the Output window, and Application View, you can set
the default behavior during project creation and building. You can also set the options for
building projects.

Project location, User project template location, and User item template location, enable
defining the default path to project folders used in workbench dialog boxes. The Project
location path is used in the Open Project dialog box to define the My Projects location.
The User project template location is used in the New Project dialog box to define the My
templates list. The User item template location is used in the Add New Item dialog box to
define the My Templates list. When defining these default paths, you can type directly in
the field or browse for the required location.

Note: When setting the project location, you need to specify a local path; network paths
may cause unexpected results.

Always show Error List if build finishes with errors, enables opening the Error list
window when errors occur during a build operation. When the build operation is
complete, the Error List is displayed containing the errors generated by the build
operation.

Track Active Items in Solution Explorer, Not supported

Show advanced build configurations, Not supported

Always show solution, Not supported

Save new projects when created, Not supported

Warn user when the project location is not trusted, displays a warning message when
opening projects from an untrusted location.

Show Output window when build starts, enables displaying the Output window when
starting build operations.

Prompt for symbolic renaming when renaming files, enables displaying a message
prompting you to select whether to rename all references in the project or just the selected
file.

146 AADvance 2.1 - Options for the Development Envi-


To specify the default locations and behavior of project components

1. From the Tools menu, click Options

2. In the Options dialog box, expand Projects, then click General.

3. In the Options dialog box, type the required paths or click to browse for their
locations, select the required options, then click OK.

AADvance Workbench 147


Build Options

You can specify whether a message is displayed before cleaning and rebuilding operations are
executed. After performing cleaning operations, online changes are unavailable.

Proceed to cleaning without asking, enables displaying a message indicating that online
updates become unavailable after performing a cleaning operation.

Proceed to rebuilding without asking, enables displaying a message indicating that online
updates become unavailable after rebuilding.

To enable the display of messages prior to cleaning operations

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Projects, then click Build.

3. In the Proceed to cleaning without asking drop-down combo-box, select False.

148 AADvance 2.1 - Options for the Development Envi-


Online Settings

When monitoring applications, you can choose to display messages prompting you to confirm
the locking or unlocking of variables. You can also specify the number system and number of
significant digits used for displaying of numerical values of the different data types categories.

Prompt for Lock or Unlock, enables the display of messages prompting users to confirm
the locking or unlocking of selected variables.

Bool display format, indication of whether to display boolean values in bool


(TRUE/FALSE), bit (1/0), or mixed (TRUE (1)/FALSE (0)) format.

Integer, indication of whether to display integer values in decimal, hexadecimal, octal, or


binary format.

REAL, indication of whether to display REAL values using scientific notation or a


specific number of significant digits after the decimal.

LREAL, indication of whether to display LREAL values using scientific notation or a


specific number of significant digits after the decimal.

To enable the display of message prompts when locking and unlocking variables

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Projects, then click Online.

3. Select the Prompt for Lock or Unlock option.

To specify the options for displaying numerical values

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Projects, then click Online.

In the Numerical Display section, set the required values for the different data type categories.

AADvance Workbench 149


Specifying Block Library Settings
You can specify the display mode for the Block Library on startup. The block library can be
displayed using expanders or tabs.

To adjust the display mode for the block library

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Block Library Settings, then click General.

In the Options dialog box, select the required display mode from the drop-down menu,
then click OK.

150 AADvance 2.1 - Options for the Development Envi-


Setting Grid Options
You can customize the colors displayed in the various workbench grids. You can access the
grid options for the following grids:

Arrays View

Defined Words View

Dictionary View

Parameters Grid

Structures View

Variable Groups View

Variable Selector Settings

To access the grid options

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Grid Settings, then click required grid type.

The grid options for the selected grid type are displayed in the Options dialog box.

AADvance Workbench 151


Arrays View

You can customize the colors displayed in the Arrays grid including column headers and rows.
The Arrays grid automatically alternates colored rows with white rows. You can adjust the
number of consecutive rows used for the alternating sequence. The default row coloring
scheme is one colored row followed by one white row. For colored rows, you can define the
colors displayed. You can also define the color used to indicate disabled rows. You can choose
whether to display the filter bar in the Arrays grid.

To customize the colors displayed in the Arrays grid

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Arrays.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, click the
respective option, then select a color from the drop-down combo-box.

152 AADvance 2.1 - Options for the Development Envi-


Defined Words View

You can customize the colors displayed in the Defined Words grid including column headers
and rows. The Defined Words grid automatically alternates colored rows with white rows. You
can adjust the number of consecutive rows used for the alternating sequence. The default row
coloring scheme is one colored row followed by one white row. For colored rows, you can
define the colors displayed. You can also define the color used to indicate disabled rows. You
can choose whether to display the filter bar in the Defined Words grid.

To customize the colors displayed in the Defined Words grid

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Dictionary.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, for the
respective option, then select a color from the drop-down combo-box.

AADvance Workbench 153


Dictionary View

You can customize the colors displayed in Dictionary instances including column headers and
rows. The Dictionary grid automatically alternates colored rows with white rows. You can
adjust the number of consecutive rows used for the alternating sequence. The default row
coloring scheme is one colored row followed by one white row. For colored rows, you can
define the colors displayed. You can also define the color used to indicate disabled rows. You
can choose whether to display the filter bar in the Dictionary.

To customize the colors displayed in the Dictionary

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Dictionary.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, for the
respective option, then select a color from the drop-down combo-box.

154 AADvance 2.1 - Options for the Development Envi-


Parameters Grid

You can customize the colors displayed in Parameters grid including column headers and rows.
The Parameters grid automatically alternates colored rows with white rows. You can adjust the
number of consecutive rows used for the alternating sequence. The default row coloring
scheme is one colored row followed by one white row. For colored rows, you can define the
colors displayed. You can also define the color used to indicate disabled rows. You can choose
whether to display the filter bar in the Parameters grid.

To customize the colors displayed in the Parameters grid

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Parameters.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, for the
respective option, then select a color from the drop-down combo-box.

AADvance Workbench 155


Structures View

You can customize the colors displayed in Structures grid including column headers and rows.
The Structures grid automatically alternates colored rows with white rows. You can adjust the
number of consecutive rows used for the alternating sequence. The default row coloring
scheme is one colored row followed by one white row. For colored rows, you can define the
colors displayed. You can also define the color used to indicate disabled rows. You can choose
whether to display the filter bar in the Structures grid.

To customize the colors displayed in the Structures grid

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Structures.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, for the
respective option, then select a color from the drop-down combo-box.

156 AADvance 2.1 - Options for the Development Envi-


Variable Groups View

You can customize the colors displayed in the Variable Groups view including column headers
and rows. The Variable Groups view automatically alternates colored rows with white rows.
You can adjust the number of consecutive rows used for the alternating sequence. The default
row coloring scheme is one colored row followed by one white row. For colored rows, you can
define the colors displayed. You can also define the color used to indicate disabled rows. You
can choose whether to display the filter bar in the Variable Groups view.

To customize the colors displayed in the Variable Groups view

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Variable Groups.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, for the
respective option, then select a color from the drop-down combo-box.

AADvance Workbench 157


Variable Selector Settings

You can customize the colors displayed in Variable Selector including column headers and
rows. The Variable Selector automatically alternates colored rows with white rows. You can
adjust the number of consecutive rows used for the alternating sequence. The default row
coloring scheme is one colored row followed by one white row. For colored rows, you can
define the colors displayed. You can also define the color used to indicate disabled rows. You
can define whether the Variable Selector opens with the local or global (controller) variables
tab selected. You can choose whether to display the filter bar in the Variable Selector. You can
also specify whether the Variable Selector opens displaying the local or global variables tab.

To customize the colors displayed in the Variable Selector

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Grid Settings, then click Variable Selector.

3. Customize the required options, then click OK.


 To specify the number of consecutive rows for the alternating sequence,
for Consecutive Rows, indicate the required value.
 To change the colors applied to headers, alternate rows, and disabled rows, for the
respective option, then select a color from the drop-down combo-box.

158 AADvance 2.1 - Options for the Development Envi-


Setting IEC Language Options
You can customize the display settings for programs built in different IEC languages:

Function Block Diagram Settings

Ladder Diagram Settings

Sequential Function Chart Settings

Structured Text Settings

AADvance Workbench 159


Function Block Diagram Settings

You can customize the displayed settings for FBD diagrams. You can choose to display grids
and instance names. You can choose the comment position for variables. You can choose
whether to display instance names for function blocks. You can define the colors used when
displaying FBD elements and text as well as define which variable information is displayed in
FBD diagrams. You can also choose whether to display grid lines inside FBD language
containers.

The following options are available for customization:

Block Style
Background Color The function and function block background color. The
possible colors are custom, web, and system colors.
Background Gradient Color The function and function block background gradient color.
The possible colors are custom, web, and system colors.
Cell Width The width for a function or function block, in number of grid
cells.
Display Instance Names The indication of whether to display instance names for
function blocks.
In design mode, go to While in design mode, enables going to the definition on
definition on double click double click.
Transparency The level of transparency. The possible values range from 0 to
255 where 0 indicates complete transparency.
Comment Style
Background Color The comment background color. The possible colors are
custom, web, and system colors.
Constant Style
Background Color - Events The constant background color. The possible colors are
custom, web, and system colors.
Background Gradient Color - The constant background gradient color. The possible colors
Events are custom, web, and system colors.
Cell Width The width for a constant, in number of grid cells.

160 AADvance 2.1 - Options for the Development Envi-


Comment Position The position of the comment in reference to the constant
shape. The possible positions are top, bottom, left, and right.
Transparency The level of transparency. The possible values range from 0 to
255 where 0 indicates complete transparency.
Variable Information The information to display for variables. The possible values
are name, alias, name and alias, or name and wiring.
Container Settings
Auto Resize Elements when When modifying, automatically resize blocks and variables to
Modifying accommodate length of text.
Automatically Invoke Controls whether the Variable or Block Selector is
Variable/Block Selector automatically displayed when inserting a variable or block in
the language container.
Display Grid The indication of whether to display the grid in the language
container.
Text Color Online The color of text displayed while running online. The possible
colors are custom, web, and system colors.
Event Link Style
Arrow The indication of whether to display an arrow at the end of the
link.
Line Style The style of the line. The possible values are solid, dash, dot,
dash-dot, dash-dot-dot, and custom.
Line Type The type of line. The normal line type has squared corners and
overlapping link intersections. The rounded line type has
rounded corners and overlapping link intersections. The
rounded with jump line type has rounded corners and link
intersections are jumped over.
Link Event Color The color of event links. The possible colors are custom, web,
and system colors.
Jump
Cell Width The width for a jump, in number of grid cells.
Label
Cell Width The width for a label, in number of grid cells.

AADvance Workbench 161


Left Power Rail
Background Color The left power rail background color. The possible colors are
custom, web, and system colors.
Background Gradient Color The left power rail background gradient color. The possible
colors are custom, web, and system colors.
Link Style
Arrow The indication of whether to display an arrow at the end of the
link.
Line Style The style of the line. The possible values are solid, dash, dot,
dash-dot, dash-dot-dot, and custom.
Line Type The type of line. The normal line type has squared corners and
overlapping link intersections. The rounded line type has
rounded corners and overlapping link intersections. The
rounded with jump line type has rounded corners and link
intersections are jumped over.
Link Color The color of links. The possible colors are custom, web, and
system colors.
Operator Style
Background Color The operator background color. The possible colors are
custom, web, and system colors.
Background Gradient Color The operator background gradient color. The possible colors
are custom, web, and system colors.
Cell Width The width for an operator, in number of grid cells.
Display Instance Names The indication of whether to display instance names for
operators.
In design mode, go to While in design mode, enables going to the definition on
definition on double click double click.
Transparency The level of transparency. The possible values range from 0 to
255 where 0 indicates complete transparency.
Region Style
Background Color The region background color. The possible colors are custom,
web, and system colors.

162 AADvance 2.1 - Options for the Development Envi-


Header Color The header color of a region. The possible colors are custom,
web, and system colors.
Header Transparency The level of transparency of the header section of a region.
The possible values range from 0 to 255 where 0 indicates
complete transparency.
Transparency The level of transparency. The possible values range from 0 to
255 where 0 indicates complete transparency.
Right Power Rail
Background Color The right power rail background color. The possible colors are
custom, web, and system colors.
Background Gradient Color The right power rail background gradient color. The possible
colors are custom, web, and system colors.
Variable Style
Background Color The variable background color. The possible colors are
custom, web, and system colors.
Background Gradient Color The variable background gradient color. The possible colors
are custom, web, and system colors.
Cell Width The width for a variable, in number of grid cells.
Comment Position The position of the comment in reference to the variable
shape. The possible positions are none, top, bottom, left, and
right.
Transparency The level of transparency. The possible values range from 0 to
255 where 0 indicates complete transparency.
Variable Information The information displayed for variables. The possible values
are name, alias, name and alias, or name and wiring.

To customize the display settings for FBD Diagrams

1. From the Tools menu, click Options.

2. From the Options dialog box, expand IEC Languages, then click Function Block
Diagram (FBD).

3. Using the available options, customize the required settings, then click OK.

AADvance Workbench 163


Ladder Diagram Settings

You can customize the displayed settings for Ladder diagrams. You can choose to display grids
and instance names. You can define the colors used when displaying LD elements and text as
well as define which variable information is displayed in LD diagrams. You can choose the
width and height for LD elements in the language container.

The following options are available for customization:

Block Settings
Display Image The indication of whether to display block images.
Display Instance Names The indication of whether to display instance names for
function blocks.
Enable EN/ENO Forces EN and ENO parameters onto all operators, functions,
and function blocks.
Function Blocks Background The function block background color. The possible colors are
Color custom, web, and system colors.
Function Blocks Background The function block background gradient color. The possible
Gradient Color colors are custom, web, and system colors.
Functions Background Color The function background color. The possible colors are
custom, web, and system colors.
Functions Background The function background gradient color. The possible colors
Gradient Color are custom, web, and system colors.
Go to Definition on While in design mode, enables going to the definition on
Double-click double click.
Operators Background Color The operator background color. The possible colors are
custom, web, and system colors.
Operators Background The operator background gradient color. The possible colors
Gradient Color are custom, web, and system colors.
Container Settings
Cell Height The height of individual cells making up the grid, in pixels.
Cell Width The width of individual cells making up the grid, in pixels.
Display Grid The indication of whether to display the grid.

164 AADvance 2.1 - Options for the Development Envi-


Element Height The height of elements, in grid cells. Basic elements are
blocks without inputs or outputs, coils, and contacts. For
blocks, each input and output adds a basic element dimension.
Element Width The width of elements, in grid cells. Basic elements are blocks
without inputs or outputs, coils, and contacts. For blocks, each
input and output adds a basic element dimension.
Font The type of font. The definition includes the font name, size,
unit of measure, as well as the indication of whether to apply
bold, italic, strikeout, and underline styles. The GDICharSet
and GDIVerticalFont properties are not editable.
Rung Line Thickness The thickness of the rung line. The possible values range from
1.0 to 3.0.
Editor Settings
Automatically invoke Controls whether the Variable or Block Selector is
Variable/Block Selector automatically displayed when inserting a variable or block in
the language container.
Rung Settings
Coil Alignment Indicates whether to align all coils on the rightmost section of
the rung.
Comment Background Color The comment background color. The possible colors are
custom, web, and system colors.
Comment text color The text color for comments. The possible colors are custom,
web, and system colors.
Display Comment The indication of whether to display comments for rungs.
Display Label The indication of whether to display labels for rungs. When
not displaying labels, an arrow appears in the leftmost section
of the rung indicating the existence of a label.
Label Color The color of rung labels. The possible colors are custom, web,
and system colors.
Power Flow False Color The color displayed when power flow monitoring is false. The
possible colors are custom, web, and system colors.
Power Flow True Color The color displayed when power flow monitoring is true.The
possible colors are custom, web, and system colors.

AADvance Workbench 165


Power Rail Color The color of power rails. The possible colors are custom, web,
and system colors.
Rung Header Color The color of rungs. The possible colors are custom, web, and
system colors.
Variables Settings
Text Color The color of text displayed while in design mode. The possible
colors are custom, web, and system colors.
Text Color - Online The color of text displayed while running online. The possible
colors are custom, web, and system colors.
Transparency The level of transparency. The possible values range from 0 to
255 where 0 indicates complete transparency.
Variable Background Color The variable background color. The possible colors are
custom, web, and system colors.
Variable Background The variable background gradient color. The possible colors
Gradient Color are custom, web, and system colors.
Variable Information The indication of whether to display the variable name only,
alias only, name and alias, or name and wiring.

To customize the display settings for LD Diagrams

1. From the Tools menu, click Options.

2. From the Options dialog box, expand IEC Languages, then click Ladder Diagram.

3. Using the available options, customize the required settings, then click OK.

166 AADvance 2.1 - Options for the Development Envi-


Sequential Function Chart Settings

You can customize the displayed settings for SFC diagrams. You can choose the orientation of
the pane splitting when displaying SFC diagram and actions/conditions programming
simultaneously in the language container. You can choose to display grids and sequence
control types as well as diagram background and grid colors for design and online modes. For
action blocks, jumps, and transitions, you can define the background, gradient, and font colors
as well as the font style. For steps, you can define the active and inactive step and step gradient
colors, the font color and style as well as the action list and list gradient colors.

The following options are available for customization:

Action Block Settings


Action Block Color The background color of action blocks. The possible colors
are custom, web, and system colors.
Action Block Font The font definition used for the text displayed in an action
block. The definition includes the font name, size, unit of
measure, as well as the indication of whether to apply bold,
italic, strikeout, and underline styles. The GDI Character Set
and GDI Vertical Font properties are not editable.
Action Block Font Color The color of the font for action blocks. The possible colors are
custom, web, and system colors.
Action Block Gradient Color The background gradient color of action blocks. The possible
colors are custom, web, and system colors.
Container Settings
Background Color - Design The background color for SFC diagrams while in design
mode. The possible colors are custom, web, and system colors.
Background Color - Online The background color for SFC diagrams while online. The
possible colors are custom, web, and system colors.
Container Split Orientation Controls the orientation for the splitting of the container
between the SFC diagram and Actions/Conditions views. The
possible values are vertical or horizontal.
Display Grid The indication of whether to display the grid.
Display Sequence Control The indication of whether to display the sequence controls
Type type.

AADvance Workbench 167


Display Transition Priority The indication of whether to display the transition priority.
Grid Color - Design The color of the grid while in design mode. The possible
colors are custom, web, and system colors.
Grid Color - Online The color of the grid while running online. The possible colors
are custom, web, and system colors.
Jump Settings
Jump Color The background color of jumps. The possible colors are
custom, web, and system colors.
Jump Font The font definition used for the text displayed in a jump. The
definition includes the font name, size, unit of measure, as
well as the indication of whether to apply bold, italic,
strikeout, and underline styles. The GDI Character Set and
GDI Vertical Font properties are not editable.
Jump Font Color The color of the font for jumps. The possible colors are
custom, web, and system colors.
Jump Gradient Color The background gradient color of jumps. The possible colors
are custom, web, and system colors.
Macro Call Settings
Macro Call Color The background color of macro calls. The possible colors are
custom, web, and system colors.
Macro Call Font The font definition used for the text displayed in a macro call.
The definition includes the font name, size, unit of measure, as
well as the indication of whether to apply bold, italic,
strikeout, and underline styles. The GDI Character Set and
GDI Vertical Font properties are not editable.
Macro Call Font Color The color of the font for macro calls. The possible colors are
custom, web, and system colors.
Macro Call Gradient Color The background gradient color of macro calls. The possible
colors are custom, web, and system colors.
Step Settings
Action List Color The background color of action lists. The possible colors are
custom, web, and system colors.

168 AADvance 2.1 - Options for the Development Envi-


Action List Gradient Color The background gradient color of action lists. The possible
colors are custom, web, and system colors.
Step Color The background color of steps. The possible colors are
custom, web, and system colors.
Step Color - Active The background color of active steps while online. The
possible colors are custom, web, and system colors.
Step Font The font definition used for the text displayed in a step. The
definition includes the font name, size, unit of measure, as
well as the indication of whether to apply bold, italic,
strikeout, and underline styles. The GDI Character Set and
GDI Vertical Font properties are not editable.
Step Font Color The color of the font for steps. The possible colors are custom,
web, and system colors.
Step Gradient Color The background gradient color of steps. The possible colors
are custom, web, and system colors.
Step Gradient Color - Active The background gradient color of active steps while online.
The possible colors are custom, web, and system colors.
Transition Settings
Transition Color The background color of transitions. The possible colors are
custom, web, and system colors.
Transition Font The font definition used for the text displayed in a transition.
The definition includes the font name, size, unit of measure, as
well as the indication of whether to apply bold, italic,
strikeout, and underline styles. The GDI Character Set and
GDI Vertical Font properties are not editable.
Transition Font Color The color of the font for transitions. The possible colors are
custom, web, and system colors.
Transition Gradient Color The background gradient color of transitions. The possible
colors are custom, web, and system colors.

To customize the display setting for SFC diagrams

1. From the Tools menu, click Options.

AADvance Workbench 169


2. From the Options dialog box, expand IEC Languages, then click Sequential Function
Chart.

3. Using the available options, customize the required settings, then click OK.

170 AADvance 2.1 - Options for the Development Envi-


Structured Text Settings

You can define the default display setting for ST elements and text displayed in ST language
containers. You can choose the font used when displaying comments, editor text, identifiers,
numbers, operators, POUs, punctuation, reserved words, and strings. You can choose to
display these in bold, italic, strike-through, or underlined text as well as define their text color
and size.

The following options are available for customization:

Comment
Comment Font The font definition used for comment text. The definition
includes the font name, size, unit of measure, as well as the
indication of whether to apply bold, italic, strikeout, and
underline styles. The GDI Character Set and GDI Vertical
Font properties are not editable.
Comment Text Color The color of the font for comments. The possible colors are
custom, web, and system colors.
Editor
Editor Font The font definition used for the ST editor. The definition
includes the font name, size, unit of measure, as well as the
indication of whether to apply bold, italic, strikeout, and
underline styles. The GDI Character Set and GDI Vertical
Font properties are not editable.
Editor Text Area Background The color of the ST editor background. The possible colors are
Color custom, web, and system colors.
Identifier
Identifier Font The font definition used for identifiers. The definition includes
the font name, size, unit of measure, as well as the indication
of whether to apply bold, italic, strikeout, and underline styles.
The GDI Character Set and GDI Vertical Font properties are
not editable.
Identifier Text Color The color of the font for identifiers. The possible colors are
custom, web, and system colors.
Number

AADvance Workbench 171


Number Font The font definition used for numbers. The definition includes
the font name, size, unit of measure, as well as the indication
of whether to apply bold, italic, strikeout, and underline styles.
The GDI Character Set and GDI Vertical Font properties are
not editable.
Number Text Color The color of the font for numbers. The possible colors are
custom, web, and system colors.
Operator
Operator Font The font definition used for operators. The definition includes
the font name, size, unit of measure, as well as the indication
of whether to apply bold, italic, strikeout, and underline styles.
The GDI Character Set and GDI Vertical Font properties are
not editable.
Operator Text Color The color of the font for operators. The possible colors are
custom, web, and system colors.
POU
POU Font The font definition used for POUs. The definition includes the
font name, size, unit of measure, as well as the indication of
whether to apply bold, italic, strikeout, and underline styles.
The GDI Character Set and GDI Vertical Font properties are
not editable.
POU Text Color The color of the font for POUs. The possible colors are
custom, web, and system colors.
Punctuation
Punctuation Font The font definition used for punctuation. The definition
includes the font name, size, unit of measure, as well as the
indication of whether to apply bold, italic, strikeout, and
underline styles. The GDI Character Set and GDI Vertical
Font properties are not editable.
Punctuation Text Color The color of the font for punctuation. The possible colors are
custom, web, and system colors.
Reserved Word
Reserved Word Font The font definition used for reserved words. The definition
includes the font name, size, unit of measure, as well as the
indication of whether to apply bold, italic, strikeout, and
underline styles. The GDI Character Set and GDI Vertical
Font properties are not editable.
Reserved Word Text Color The color of the font for reserved words. The possible colors
are custom, web, and system colors.
String
String Font The font definition used for strings. The definition includes
the font name, size, unit of measure, as well as the indication
of whether to apply bold, italic, strikeout, and underline styles.
The GDI Character Set and GDI Vertical Font properties are
not editable.
String Text Color The color of the font for strings. The possible colors are
custom, web, and system colors.

To customize the display setting for ST programs

1. From the Tools menu, click Options.

2. From the Options dialog, expand IEC Languages, then click Structured Text (ST).

3. Expand the respective category, customize the required setting, then click OK.

AADvance Workbench 173


Defining Spy List Settings
You can customize the offline and online behavior options and look and feel of spy lists. The
available behavior options are the following:

Offline Grid Settings

Online Grid Settings

174 AADvance 2.1 - Options for the Development Envi-


Offline Grid Settings

You can customize the offline behavior options and look and feel of spy lists. The available
behavior options are the following:

Filter Row, displaying a row below the column heading enabling the filtering of items in
the list.

Grouping Drop Area, displaying an area at the top of spy lists enabling the grouping of
items in a list according to column types.

Indent Sub-items, indenting sub-items of arrays, structures, and function blocks.

Item Count Rows, displaying rows indicating the item count for complete spy lists as
well as individual arrays, structures, and function block instances.

Look and Feel options, the available options enable customizing the colors used for the
headers, various rows, and borders as well the text colors.

Default Refresh Rate, the default rate for refreshing spy list variables, in milliseconds.
You can also modify the refresh rate of individual spy lists. You can only modify refresh
rates while offline.

To customize spy lists for offline usage

You can define different settings for the offline and online options.

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Spy List Settings, then click Offline Grid Settings
and make the required changes.

AADvance Workbench 175


Online Grid Settings

You can customize the online behavior options and look and feel of spy lists. The available
behavior options are the following:

Filter Row, displaying a row below the column heading enabling the filtering of items in
the list

Grouping Drop Area, displaying an area at the top of spy lists enabling the grouping of
items in a list according to column types

Indent Sub-items, indenting sub-items of arrays, structures, and function blocks

Item Count Rows, displaying rows indicating the item count for complete spy lists as
well as individual arrays, structures, and function block instances

The available look and feel options enable customizing the colors used for the headers, various
rows, and borders as well the text colors.

To customize spy lists

You can define different settings for the offline and online options.

1. From the Tools menu, click Options.

2. From the Options dialog box, expand Spy List Settings, click Online Grid Settings and
make the required changes.

176 AADvance 2.1 - Options for the Development Envi-


Description Window
The Description window enables adding descriptions to projects, controllers, and POUs. These
descriptions are free-formatted text using rich text format (RTF). When adding a description,
all content is automatically saved. When editing descriptions, a text editor toolbar provides the
means for performing basic formatting operations such as selecting a font, size, style, and
color.

The Description window is dockable and scalable. When clicking the different items in the
Application View, the contents of the Description window automatically displays the
description for the selected item.

While in debug mode, the content displayed in the Description window is read-only.

To access the description window

You can access the description window from the menus or from the properties for items.
To access the Description Window, from the View menu, click Description Window.

AADvance Workbench 177


178 AADvance 2.1 - Description Window
Working with AADvance
Workbench
The AADvance Workbench is the development environment for the AADvance controller
enabling the creation of one comprehensive project to control individual AADvance
controllers. The AADvance 2.1 Workbench enables the creation of AADvance 2.1
applications supporting multi-process control. Applications consist of virtual machines
running on hardware components. The development process consists of creating a project
made up of controllers, representing individual hardware equipment which are downloaded. At
runtime, the virtual machines run on these hardware equipments.

Projects can be developed using the following programming languages from the IEC 61131-3
standard: Functional Block Diagram (FBD), Ladder Diagram (LD), Structured Text (ST), and
Sequential Function Chart (SFC). Note that SFC is not supported for safety related
applications.When building, controllers are compiled to produce very fast "target independent
code" (TIC).

You can declare variables using standard IEC 61131-3 data types (i.e., Boolean, integer, real,
etc.) or user-defined types such as arrays or structures.

You develop projects on a Windows development platform. The AADvance Workbench


graphically represents and organizes controllers, POUs, and networks within a project from
many views.

Libraries enable you to define functions, function blocks, and data types for reuse throughout
projects.

Individual controllers are downloaded, using SNCP networks, onto hardware equipment.

You can choose to simulate the running of a project, after building a project, using high-level
debugging tools, before actually downloading controllers to hardware equipment. You then
connect the Workbench to monitor real-time information and perform updates. A standard
Ethernet network is used to connect the AADvance Workbench to controllers and to connect
controllers to other controllers.

AADvance Workbench 179


Creating a Project
You can create projects with the AADvance Workbench. You can also import existing
projects created using any version of the AADvance Workbench.

A project is composed of hardware platforms called controllers. A project can contain one or
more programming units called POUs (Program Organization Unit). POUs are linked together
in a tree-like architecture and can be described using any of SFC, ST, FBD, or LD graphic or
literal languages. POUs can be programs, functions, or function blocks.

The following templates are available for AADvance 2.1 projects:

Import AADvance Project, enables importing an AADvance project into the AADvance
2.1 Workbench

Restore Project from an Archive, enables restoring an AADvance version 2.1 project that
was previously archived from an AADvance repository

Series 9000, enables creating a series 9000 project containing one controller in the
AADvance 2.1 workbench

For projects, you can set many properties:

Info
Comment Text displayed next to the project name
Description Free-form text describing a project
Name (Read-only) Name of the project. Project names are limited to 128
characters beginning with a letter followed by letters, digits, and
single underscores. The last character for a project name must be a
letter or digit; project names cannot end with an underscore
character. Names cannot be reserved words, defined words, or data
types (i.e., elementary, structures, or arrays). Names must be
unique for projects within a solution.

180 AADvance 2.1 - Working with AADvance Workbench


Password Protected (Read-only) Indication that the project is protected by a password
controlling its access
Path (Read-only) Complete path where the project files are stored on the
computer. The path is automatically assigned:
%USERPROFILE%\Documents\AADvance
2.1\Projects\ProjectName
You can modify the storage location for projects in the Projects
options from the Tools > Options menu. When setting the project
location, you need to specify a local path; network paths may cause
unexpected results.

You can perform the following tasks for projects:

Setting the properties of projects

Importing target definitions

Building projects

Cleaning projects

Downloading project code to controllers

Connecting projects

You control access for projects by setting a password restricting modifications such as adding
controllers, programs, functions, and function blocks.

You can add controllers to existing projects.

To create a project

1. From the File menu, click New Project (or press Ctrl+Shift+N).

The New Project dialog box is displayed.

2. In the New Project dialog box, in the Project Types list, click Series 9000.

3. In the Templates list, click the Create Empty Series 9000 Project template.

AADvance Workbench 181


4. Specify a name and location for the project, then click OK.

To set properties for a project


In the Application View, right-click the project, and then click Properties.

The Properties window displays the properties for the project.

To import target definitions for use in a project

You can import target definition files having the *.txt or *.tdb extensions.

1. In the Application View, right-click the project, and then click Import Target
Definitions.

2. In the Open dialog box, locate the target definition file to import, and then click Open.

The Importing dialog box displays the importation progress.

To import an AADvance project

You can import projects created using any version of AADvance. You can also import a
project and then rename it to create a duplicate version of the project.

Note: When importing a project having a dependency on a library, make sure to import the
library immediately after importing the project, before performing any other operation, to
ensure maintaining the references between function blocks and user-defined data types in the
library.

1. From the File menu, click New Project.

The New Project dialog box is displayed.

2. In the New Project dialog box, in the Project Types list, click Import.

3. In the Templates list, click Import AADvance Project.

4. Specify a name for the project, and then click Browse to select the database path.

5. In the Select Database File dialog box, locate and select the project database file (*.mdb),
and then click Open.

182 AADvance 2.1 - Working with AADvance Workbench


6. You may encounter a message asking if you want to update the database to the current
version. Note that after updating the database, the project can no longer be opened in a
previous version of the Workbench. To continue the importation process, click OK.

7. In the New Project dialog box, click OK.

In the Workbench, you can only open one project at any given time. If changes have been made
to an open project, the system automatically prompts you to save changes before closing a
project or opening another.

AADvance Workbench 183


Controllers
A controller corresponds to a programmable logic controller. You can perform the following
tasks for controllers:

Adding controllers

Saving controllers as exchange files

Adding existing controllers from exchange files

Setting the properties of controllers

Copying and pasting controllers

Renaming controllers

Deleting controllers

Building controllers

Cleaning controllers

For controllers, you need to specify the following properties:

Code
Code For Indication of whether to produce code for simulation for an application
Simulation

184 AADvance 2.1 - Working with AADvance Workbench


Compiler Each controller has defined compiler options. These options enable setting up
Options the parameters used by the Code Generator to build and optimize the controller
code. In the Compilation Options for a controller, you select the type of code to
generate according to corresponding equipment and set up the optimizer
parameters according to the expected compilation and run-time
requirements.The general compiler options are the following:
Check Array Index - (Read-only) Indication of whether to verify array
indices
Dump Configuration Files - Indication of whether to generate of
controller level files containing debugging information and place them
at the root of the controller folder. The files are named using the
controller name as a prefix with .ttc and .tws as extensions.
Dump Network - Indication of whether to generate network and
controller level files containing debugging information. The files are
placed at the root of the network folder and at the root of the controller
folder. The files placed in the network folder are named
"NetworkConf" and have the extensions .ttc and .tws. The files placed
in the controller folder are named using the controller name as a prefix
and have .ttc and .tws as extensions.
Dump POU Files - Indication of whether to generate controller-level
files containing debugging information and place these at root of the
controller folder. Some of the files are named using the controller
name as a prefix, the POU name as a suffix, and have the extensions
.ttc and .tws. Other files are named using the POU name with .lst and
.unc as extensions.
Enable Compiler Verification - Indication of whether to validate the
compilation process for all POUs of a controller. Comparison errors
are displayed in the Output window.
Function Internal State Enable - Indication of whether to produce
internal state information for functions. Functions containing no
internal state information denote that the invocation of a function with
the same arguments always yields the same values.
Generate Map File - Indication of whether to generate controller-level
files containing debugging information. The files are placed at the root
of the controller folder and are named using the controller name as a
prefix with .ttc, .tws, and .map as extensions.

AADvance Workbench 185


TIC Code (Read-only) Indication of whether TIC code is produced by the compiler
General
Battery For the 9110 processor module, enables the battery alarm informing of a low
Alarm voltage for the battery and need for replacement. For standard and mixed
controllers, the default value is enabled. For Eurocard controllers, the default
value is disabled.
Remote Fault Resets faulty processors from a remote location as well as joins processors to a
Reset running system. To enable, you must enter a non-zero hexadecimal value
matching the value of the control integer Allow Remote Fault Reset. Possible
values range from 0x1 to 0xFFFFFFFF, or 0x0 to disable.
Hardware
Memory IO The memory space allocated for I/O structures. The default value is 150000
Structures bytes.
Memory Size The space reserved for monitoring variables, constants, and temporary compiler
variables
Target (Read-only) Target type to which is attached the controller
Update I/O For targets supporting online changes, indication of whether to enable
Device modifying I/O devices and structures while running an application online.
Online
Info
Comment Text displayed next to the controller name
Compilation (Read-only) The compilation version number
Version
Description Free-form text describing a controller
Full Name (Read-only) Full name of the controller indicating the project to which it
belongs
Last (Read-only) Date of the last compilation of the controller code
Compilation
Date

186 AADvance 2.1 - Working with AADvance Workbench


Name (Read-only) Name of the controller. Controller are limited to 128 characters
beginning with a letter followed by letters, digits, and single underscores. The
last character for a controller name must be a letter or digit; controller names
cannot end with an underscore character. Names cannot be reserved words,
defined words, or data types (i.e., elementary, structures, or arrays). Names
must be unique for the same type of elements within a scope.
Number Unique number identifying the controller within the project. Also known as the
resource number in AADvance Discover. This number is automatically
assigned. When changing the number, you need to assign a value that is unique
within the project. The resource number identifies the physical AADvance
controller that will run the application code.
Password (Read-only) Indication that the controller is protected by a password
Protected controlling its access
Path (Read-only) Complete path where the controller files are stored on the computer.
The path is automatically assigned to a controller folder within the project
folder.
Memory Size for
Online Changes
Code Size For updates, the amount of memory reserved for code sequence changes. The
code size can be increased up to 1441792 bytes.
Maximum The maximum number of POUs (other than SFC) that can be added while
Extra POUs performing updates
SFC States The memory space allocated for step and transition structures. A step requires
Mem Size 40 bytes and a transition requires 20 bytes.
User For updates, the amount of memory reserved for adding variables data. When
Variable Size generating monitoring symbols information for a POU, the same amount of
memory is also reserved for the POU.
Safety
Process The maximum time, in milliseconds, that the controller outputs remain in the
Safety Time ON state after detecting important diagnostic or application faults. When the
defined PST is exceeded, the outputs go into their specified safe states. You
must set the PST for the controller. The default value for the controller is 2500
ms. By default, each group of I/O modules inherits the PST from the controller.
You can also set an alternate PST for each I/O group.

AADvance Workbench 187


Settings
Cycle Time The amount of time given to each cycle. If a cycle is completed within the cycle
timing period, the system waits until this period has elapsed before starting a
new cycle. The cycle consists of scanning the physical inputs of the process to
drive, executing the POUs of the controller, then updating physical outputs. The
virtual machine executes the controller code according to the execution rules.
Cycle Time Unit of measure for the cycle time. Possible values are ms (milliseconds) or µs
Units (microseconds). To use µs, the equipment must support this unit of measure.
Detect Errors Indication of whether to store errors. You need to define Nb Stored Errors.
Memory For Location where retained values are stored (the required syntax depends on the
Retain implementation)
Nb Stored Number of entries, i.e., the size of the queue (FIFO) in which detected errors
Errors are stored
Start Indication of whether a controller executes in real time or cycle-to-cycle.
Simulation Real-time mode is the run time normal execution mode where controller cycles
Mode are triggered by the cycle timing. In cycle-to-cycle mode, the virtual machine
loads the controller code but does not execute it until you execute one cycle or
activate real-time mode. When debug information is generated for POUs, the
controller automatically switches to step-by-step mode when the application
encounters a breakpoint.
Trigger Indication of whether a controller cycle executes according to the defined
Cycles Cycle Time
SFC Dynamic
Behavior Limits
Gain Factor For SFC, specifies factor of dynamic behavior limits determining the amount of
memory, allocated by a controller at initialization time, designated to manage
token moving. The amount of allocated memory is calculated as a linear
relation with the number of SFC POUs:
Alloc Mem (bytes) = N * NbElmt * sizeof(typVa)
NbElmt = GainFactor * NbOfSFC + OffsetFactor

188 AADvance 2.1 - Working with AADvance Workbench


Offset Factor For SFC, specifies factor of dynamic behavior limits determining the amount of
memory, allocated by a controller at initialization time, designated to manage
token moving. The amount of allocated memory is calculated as a linear
relation with the number of SFC POUs:
Alloc Mem (bytes) = N * NbElmt * sizeof(typVa)
NbElmt = GainFactor * NbOfSFC + OffsetFactor
System
System Type Type of the controller. Possible values are the following:
- Standard, (AADvance controller) configuring 48 empty IOB IO slots for
I/O modules (IOB IO Bus 1 and IO Bus 2)
- Eurocard, configuring 18 empty slots on IOB Bus 1
- Mixed, configuring 48 empty IOB IO slots for I/O modules (IOB Bus 1 and
IO Bus 2).

To add a controller
In the Application View, right-click the project element, point to Add, and then click
New Controller.

You can import controllers, programs, functions, and function blocks from exchange files
(*.pxf) from projects

To save a controller as an exchange file

You can save controllers as exchange files (*.pxf) to export them.

1. In the Application View, select the controller to save as an exchange file.

2. From the File menu, click Save As.

3. In the Save As dialog box, browse for the location in which to store the element exchange
file, then click Save.

AADvance Workbench 189


To add an existing controller from an exchange file

You can import controllers from AADvance elements previously saved as exchange files
(*.pxf). When adding controllers having bindings, these controllers must keep the same
number and name as when exported to retain binding definitions. Therefore, before adding
such controllers, make sure to renumber and rename conflicting controllers.

1. In the Application View, right-click the Project element, point to Add, and then click
Existing Controller.

2. In the Select Exchange File dialog box, locate the exchange file containing the controller,
and then click Open.

3. In the Add Existing Controller dialog box, select the element to import, and then click
Import.

To set properties for a controller


In the Application View, right-click the controller, and then click Properties.

The Properties window displays the properties for the controller.

To copy and paste a controller

1. In the Application View, right-click the controller, and then click Copy.

2. Right-click the project element and click Paste.

A copy of the controller is added to the project.

To rename a controller
In the Application View, right-click the controller, then click Rename, and then type a
name for the controller.

To delete a controller
In the Application View, right-click the controller, and then click Delete.

190 AADvance 2.1 - Working with AADvance Workbench


Programs
You define programs in the Programs section of a controller in the Application View. Within
a Programs section, sequential programs must be adjacent. Programs belonging to a same
section must have different names. You can perform the following tasks for programs:

Adding programs

Saving programs as exchange files

Adding programs from exchange files

Setting the properties of programs

Copying and pasting programs

Renaming programs

Deleting programs

Verifying the syntax of programs

For programs, you need to specify the following properties:

Code Generation
Generate Debug Info Indication of whether to generate information required for
debugging using step-by-step execution
Generate Monitoring For graphical POUs, indication of whether to generate information
Symbols required for graphically displaying the output values of elements
when debugging or simulating
Info
Comment Text displayed next to the program name
Description Free-form text describing a program
Full Name (Read-only) Full name of the program indicating the project and
controller to which it belongs
Language (Read-only) Programming language of the POU

AADvance Workbench 191


Name (Read-only) Name of the program. Program names are limited to
128 characters beginning with a letter followed by letters, digits,
and single underscores. The last character for a program name must
be a letter or digit; program names cannot end with an underscore
character. Names cannot be reserved words, defined words, or data
types (i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Order Position of the program within the execution order
Password Protected (Read-only) Indication that the program is protected by a password
controlling its access
Path (Read-only) Complete path where the program files are stored on
the computer

To add a program

You define programs for a controller.


In the Application View, right-click the Programs element for a controller, point to Add
Programs, and then click one of the following:
New ST: Structured Text
New FBD: Function Block Diagram
New LD: Ladder Diagram
New SFC: Sequential Function Chart

To save a program as an exchange file

You can save programs as exchange files (*.pxf) to export them.

1. In the Application View, select the program to save as an exchange file.

2. From the File menu, click Save As.

3. In the Save As dialog box, browse for the location in which to store the element exchange
file, and then click Save.

192 AADvance 2.1 - Working with AADvance Workbench


To add a program from an exchange file

You can import programs previously saved as exchange files (*.pxf).

1. In the Application View, right-click the Programs element, point to Add Programs, then
Existing Program.

2. In the Select Exchange File dialog box, locate the exchange file containing the program,
and then click Open.

3. In the Add Existing Program dialog box, select the element to import, and then click
Import.

To set properties for a program


In the Application View, right-click the program, and then click Properties.

The Properties window displays the properties for the program.

To copy and paste a program

1. In the Application View, right-click the program, and then click Copy.

2. Right-click the program element, and click Paste.

A copy of the program is added.

To rename a program
In the Application View, right-click the program, then click Rename, and then type a
name for the program.

To delete a program
In the Application View, right-click the program, and then click Delete.

AADvance Workbench 193


Functions
You define functions in the Functions section of a controller in the Application View.
Functions can be programmed in FBD, LD, or ST. You can perform the following tasks for
functions:

Adding functions

Saving functions as exchange files

Adding functions from exchange files

Setting the properties of functions

Copying and pasting functions

Renaming functions

Deleting functions

Building functions

For functions, you can specify the following properties:

Code Generation
Generate Debug Info Indication of whether to generate information required for
debugging using step-by-step execution.
Info
Comment Text displayed next to the function name
Description Free-form text describing a function
Full Name (Read-only) Full name of the function indicating the project and
controller to which it belongs
Language (Read-only) Programming language of the POU

194 AADvance 2.1 - Working with AADvance Workbench


Name (Read-only) Name of the function. Function names are limited to
128 characters beginning with a letter followed by letters, digits,
and single underscores. The last character for a function name must
be a letter or digit; function names cannot end with an underscore
character. Names cannot be reserved words, defined words, or data
types (i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Order Execution order of the POU
Password Protected (Read-only) Indication that the function is protected by a password
controlling its access
Path (Read-only) Complete path where the function files are stored on
the computer

When adding functions, you also need to define parameters. Functions can have a maximum
of 128 parameters (inputs and outputs). When defining parameters, consider the following
limitations:

Parameter names are limited to 128 characters beginning with a letter followed by letters,
digits, and single underscores. The last character for a parameter name must be a letter or
digit; parameter names cannot end with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e., elementary, structures, or arrays).
Names must be unique for the same type of elements within a scope.

Possible data types for parameters are BOOL, SINT, USINT, BYTE, INT, UINT, WORD,
DINT, UDINT, DWORD, LINT, ULINT, LWORD, REAL, LREAL, TIME, DATE,
STRING, Array types, Structure types, Function blocks

For String type variables, string capacity is limited to 252 characters excluding the
terminating null character (0), a byte for the current length of the string, and a byte for the
maximum length of the string

For user defined addresses, the format is hexadecimal and the value ranges from 1 to
FFFF

For dimensions, example: [1..10] for a one dimensional array, [1..4,1..7], for a two
dimensional array

AADvance Workbench 195


To add a function
In the Application View, right-click the Functions element, point to Add Functions, and
then click one of the following:
New ST: Structured Text
New FBD: Function Block Diagram
New LD: Ladder Diagram

To save a function as an exchange file

You can save functions as exchange files (*.pxf) to export them. You can also save functions
from libraries.

1. In the Application View, select the function to save as an exchange file.

2. From the File menu, click Save As.

3. In the Save As dialog box, browse for the location in which to store the element exchange
file, and then click Save.

To add a function from an exchange file

You can import functions previously saved as exchange files (*.pxf).

1. In the Application View, right-click the Functions element, point to Add Functions, and
then click Existing Function.

2. In the Select Exchange File dialog box, locate the exchange file containing the function,
and then click Open.

3. In the Add Existing Function dialog box, select the element to import, and then click
Import.

To set properties for a function


In the Application View, right-click the function, and then click Properties.

The Properties window displays the properties for the function.

196 AADvance 2.1 - Working with AADvance Workbench


To copy and paste a function

1. In the Application View, right-click the function, and then click Copy.

2. Right-click the function element, and then click Paste.

A copy of the function is added.

To rename a function
In the Application View, right-click the function, then click Rename, and then type a
name for the function.

To delete a function
In the Application View, right-click the function, and then click Delete.

AADvance Workbench 197


Function Blocks
You define function blocks in the Function Blocks section of the Application View. Function
blocks can be programmed in FBD, LD, SFC, or ST. You can perform the following tasks for
function blocks:

Adding function blocks

Saving function blocks as exchange files

Adding function blocks from exchange files

Setting the properties of function blocks

Copying and pasting function blocks

Renaming function blocks

Deleting function blocks

Building function blocks

For function blocks, you can specify the following properties:

Code Generation
Generate Debug Info Indication of whether to generate information required for
debugging using step-by-step execution.
Generate Monitoring For graphical POUs, indication of whether to generate information
Symbols required for graphically displaying the output values of elements
when debugging or simulating
Instance Symbols Extra Size of memory reserved for each function block instance for
Bytes adding symbols monitoring information during updates. A
string-type output takes up 260 bytes.
Info
Comment Text displayed next to the function block name in the Application
View
Description Free-form text describing a function block

198 AADvance 2.1 - Working with AADvance Workbench


Full Name (Read-only) Full name of the function indicating the project and
controller to which it belongs
Language (Read-only) Programming language of the POU
Name (Read-only) Name of the function block. Function block names are
limited to 128 characters beginning with a letter followed by
letters, digits, and single underscores. The last character for a
function block name must be a letter or digit; function block names
cannot end with an underscore character. Names cannot be reserved
words, defined words, or data types (i.e., elementary, structures, or
arrays). Names must be unique for the same type of elements
within a scope.
Order Position of the function block within the execution order
Password Protected (Read-only) Indication that the function is protected by a password
controlling its access
Path (Read-only) Complete path where the function block files are
stored on the computer

When adding function blocks, you also need to define parameters. Function blocks can have a
maximum of 128 parameters (inputs and outputs). When defining parameters, consider the
following limitations:

Parameter names are limited to 128 characters beginning with a letter followed by letters,
digits, and single underscores. The last character for a parameter name must be a letter or
digit; parameter names cannot end with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e., elementary, structures, or arrays).
Names must be unique for the same type of elements within a scope.

Possible data types for parameters are BOOL, SINT, USINT, BYTE, INT, UINT, WORD,
DINT, UDINT, DWORD, LINT, ULINT, LWORD, REAL, LREAL, TIME, DATE,
STRING, Array types, Structure types, Function blocks

For String type variables, string capacity is limited to 252 characters excluding the
terminating null character (0), a byte for the current length of the string, and a byte for the
maximum length of the string

For user defined addresses, the format is hexadecimal and the value ranges from 1 to
FFFF

AADvance Workbench 199


For dimensions, example: [1..10] for a one dimensional array, [1..4,1..7], for a two
dimensional array

For instances of function blocks, you can reset the initial values defined for individual
instances.

To add a function block


In the Application View, right-click the Function Blocks element, point to Add Function
Blocks, and then click one of the following:
New ST: Structured Text
New FBD: Function Block Diagram
New LD: Ladder Diagram
New SFC: Sequential Function Chart

To save a function block as an exchange file

You can save function blocks as exchange files (*.pxf) to export them. You can also save
functions from libraries.

1. In the Application View, select the function block to save as an exchange file.

2. From the File menu, click Save As.

3. In the Save As dialog box, browse for the location in which to store the element exchange
file, and then click Save.

To add a function block from an exchange file

You can import function blocks previously saved as exchange files (*.pxf).

1. In the Application View, right-click the Function Blocks element, point to Add Function
Blocks, and then click Existing Function Block.

2. In the Select Exchange File dialog box, locate the exchange file containing the function,
and then click Open.

200 AADvance 2.1 - Working with AADvance Workbench


3. In the Add Existing Function Block dialog box, select the element to import, and then
click Import.

To set properties for a function block


In the Application View, right-click the function, and then click Properties.

The Properties window displays the properties for the function.

To copy and paste a function block

1. In the Application View, right-click the function block, and then click Copy.

2. Right-click the function block element, and then click Paste.

A copy of the function block is added.


To rename a function block

3. In the Application View, right-click the function block, then click Rename, and then type
a name for the function block.

To delete a function block


In the Application View, right-click the function block, and then click Delete.

AADvance Workbench 201


Variables
Variables are defined for their scope. For instance, controller variables are global, i.e.,
available for use throughout the programs, functions, and functions blocks of a controller.
Whereas, variables defined for a program, a function, or a function block are local to that
element. You define variables in the Variables grid. For controller variables, you can create
groups to which you add existing controller variables. Variables can belong to multiple groups.
For individual variable scopes, you can import and export variables data having the Microsoft
Excel (*.xls) or comma-separated values (*.csv) format.

Variable names are limited to 128 characters beginning with a letter or single underscore
followed by letters, digits, and single underscores. The last character for a variable name must
be a letter or digit; variable names cannot end with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e., elementary, structures, or arrays). Names
must be unique for the same type of elements within a scope.

When defining complex variables such as arrays and structures, the syntax for the variable
name is as follows:

For arrays: arrayname[index]

Name,Alias,Data Type,StringSize,InitValue,Direction,Wiring,Attribute ...


array1,,BOOL,0,,, ...
"array1[1,1]",,BOOL,0,,, ...
"array1[1,2]",,BOOL,0,,, ...
"array1[1,3]",,BOOL,0,,, ...
"array1[1,4]",,BOOL,0,,, ...
"array1[1,5]",,BOOL,0,,, ...

For structures: structurename.membername

Name,Data Type,Dimension,Alias,Comment,InitValue,Direction ...


structure1,,T9K_DI_FULL,0,, ...
structure1.DI,,BOOL,0,, ...
structure1.LF,,BOOL,0,, ...
structure1.DIS,,BOOL,0,, ...
structure1.CF,,BOOL,0,, ...
structure1.V,,UINT,0,, ...
structure1.STA,,USINT,0,, ...

202 AADvance 2.1 - Working with AADvance Workbench


When managing variables data, you can perform the following tasks:

Creating groups for controller variables data

To create a controller variable group

When adding controller variables to a group, you can add these to the group from the variables
grid or you can drag these between the variables grid and the group grid.

1. In the Application View, expand the Variables item, right-click Groups, and then click
Add New Variable Group.

The group is added.

2. To add a single variable to the group:

a) Open the controller variables grid, right-click the left most column for the required
variable, point to Add to Group, and then click the required group.

3. To add multiple variables to the group by dragging:

a) Open the variables grid for the group by double-clicking and place both grids
side-by-side.

b) In the controller variables grid, select the consecutive variables, then click and drag
from the cell having the arrow in the left most column to within the variables group
grid.

AADvance Workbench 203


Libraries
Libraries are made up of functions, function blocks, and data types including arrays, structures,
and defined words for reuse throughout AADvance projects. Projects can depend on more than
one library. A library cannot use functions, function blocks, and data types including arrays,
structures, and defined words belonging to another library. Using the IEC 61131-3 languages,
you can write functions (FBD, LD, or ST) and function blocks (FBD, LD, ST, or SFC).

You add libraries from different sources to projects:

Adding an AADvance library, where you create a library based on the AADvance
template

Adding a library from a repository, where you add a library from a repository. Libraries
having been previously published are available from a version control repository.

Importing an AADvance (*.mdb) library, where you import a project or library having
the MS-Access database (*.mdb) format. When adding libraries based on projects or
libraries from previous versions, these libraries only contain the functions, function
blocks, and data types.

Importing an AADvance 1.X (*.pxf) library, where you import an existing library having
been saved as an exchange file (*.pxf) format. When importing libraries based on
projects or libraries from previous versions, these libraries only contain the functions,
function blocks, and data types.

Importing an AADvance 2.x (*.pxf) library, where you import an existing library having
been saved as an exchange file (*.pxf) format.

Libraries are stored within the projects where these are created. When a library becomes
unresolved, you need to restore the reference to the library.

Library functions, function blocks, and data types must have unique names within a project,
including other libraries used in the project. When these have the same names as those defined
in a project in which these are used, only those from the project are recognized.

Library functions and function blocks are compiled with the project. However, you can verify
the syntax for library functions and function blocks.

When working with libraries, you can perform the following tasks:

204 AADvance 2.1 - Working with AADvance Workbench


Copying and pasting functions and function blocks between libraries

Exporting functions and function blocks

Importing functions and function blocks

Dragging and dropping functions and function blocks between libraries

Renaming libraries

Deleting libraries

To add an AADvance library

When adding new libraries, you can choose to add an empty AADvance library.

1. In the Application View, right-click the Libraries item, point to Add, and then click New
Library.

2. In the New Library dialog box, click AADvance Library in the Library Types list, and
then click the Create Empty Library template.

3. Enter a library name and description, and then click OK.

The AADvance library is added to the project.

To add a published library from a repository

Libraries having been previously published are available from a version control repository.

1. In the Application View, right-click the Libraries item, point to Add, and then click
Published Library.

2. In the Add Published Library dialog box, browse for the repository containing the
published library, indicate whether to only show the latest versions of the published
libraries, and then select the required library from the list.

3. Click OK.

AADvance Workbench 205


To import an AADvance library having the MS-Access database format

When adding libraries, you can import an AADvance 1.X library having the MS-Access
database (*.mdb) format.

1. In the Application View, right-click the Libraries item, point to Add, and then click New
Library.

2. In the New Library dialog box, click Import in the Library Types list, then click the
Import AADvance Library template.

3. Enter a library name and description, and then click Browse to locate the MS-Access
database (*.mdb).

4. From the Select a Database File dialog box, locate the required MS-Access database
(*.mdb), and then click Open.

5. Click OK.

The imported AADvance library is added to the project.

To import an existing AADvance library from a AADvance 1.X exchange file format

When adding libraries, you can import an AADvance 1.X project or library having the
exchange (*.pxf) file format.

1. In the Application View, right-click the Project item, point to Add, and then click
Existing Controller.

2. In the Select Exchange File dialog box, click Browse to locate the exchange file (*.pxf),
and then click Open.

The imported AADvance library is added to the project as a controller.

3. Create a new library.

4. Cut and paste or drag POUs from the imported controller to the library.

5. Delete the imported controller.

206 AADvance 2.1 - Working with AADvance Workbench


To import an existing AADvance library from a AADvance 2.x exchange file format

When adding libraries, you can import an AADvance 2.x library having been previously saved
as an exchange file (*.pxf).

1. In the Application View, right-click the Libraries element, point to Add, and then click
Existing Library.

2. In the Select Exchange File dialog box, locate the exchange file containing the library,
and then click Open.

3. In the Add Existing Library dialog box, select the library to import, and then click
Import.

To restore a library reference

When a reference towards a library is unresolved, you need to restore this reference.

1. From the Application View, select the Libraries element.

2. Follow the steps for the respective library import method while making sure to specify
the exact name of the library for which to restore the reference.
To add a published library from a repository
To import an AADvance library having the MS-Access database format
To import an existing AADvance library from a AADvance 2.x exchange file format

To copy and paste a function or function block between libraries

1. In the Application View, right-click the function block in the source library, and then
click Copy.

2. Right-click the respective section of the destination library, and then click Paste.

A copy of the function or function block is added.

AADvance Workbench 207


To export a function or function block

You can export functions or function blocks from libraries and save these as exchange files
(*.pxf).

1. In the Application View, select the function or function block to export.

2. From the File menu, click Save As.

3. In the Save As dialog box, browse for the location in which to store the element exchange
file, and then click Save.

To import a function or function block

In libraries, you can import functions or function blocks from AADvance elements saved as
exchange files (*.pxf).

1. In the Application View, right-click the Functions or Function Blocks element of the
respective library, point to Add, and then click Existing Function or Existing Function
Block.

2. In the Select Exchange File dialog box, locate the exchange file containing the function
or function block, and then click Open.

3. In the Add Existing dialog box, select the element to import, and then click Import.

To drag a function or function block between libraries

In the source library, drag the function or function block to the respective section in the
destination library.

The function or function block is moved to the destination library.

To rename a library
In the Application View, right-click the library, then click Rename, and then type a name
for the library.

208 AADvance 2.1 - Working with AADvance Workbench


To delete a library
In the Application View, right-click the library, and then click Delete.

AADvance Workbench 209


Opening a Project
When opening a project, you can choose from projects available from the current version
control repository. The available projects also lists the recently opened projects.

To open a project from the Workbench

1. From the File menu, click Open Project (or press Ctrl+Shift+O).

2. In the Open Project dialog box, select the required project, and then click OK.

The project structure is displayed in the Application View.

To open a project from the Projects directory


From the Windows Explorer, access the Projects directory and perform one of the
following:
Double-click the required *.aadsln file.
Drag the *.aadproj or *.aadsln file onto the desktop Workbench icon.

The Workbench opens displaying the required project.

210 AADvance 2.1 - Working with AADvance Workbench


Closing a Project
When closing a project, the Workbench prompts you to save changes made to the project.

To close a project

1. From the File menu, click Close Project.

2. When prompted to save changes, click Yes.

AADvance Workbench 211


Setting Project Access Control
For project security, you can set access control using a password for projects, controllers,
POUs, libraries, and library functions and function blocks. Password definitions are limited to
eight characters and can consist of letters, digits, and symbols. When projects are
password-protected they cannot be opened for editing. Project sub-elements, can have their
own level of access control. For example, a POU having its own password remains locked and
cannot be modified without entering its password.

Note: Since POUs are encrypted, you need to retain password definitions.

In the Application View, the following indicates the security state for elements:

Indicates that a lock is applied to the element

When opening a project having password-protected elements, you are only prompted to enter
the password once for each element. Password-protected elements have the following
modification restrictions:

Password-Protected Modification Restrictions


Element
Project Opening the project
Controller Adding, editing, and deleting a program, modifying the
communication protocols, modifying the system type and
controller properties, wiring variables, and adding, editing, and
deleting I/O modules.
Program Viewing the program
Library Adding, editing, and deleting a library function or function
block
Library Function Viewing the function
Library Function Block Viewing the function block

You can edit existing passwords for projects and project sub-elements. You can also remove
existing passwords. When copying, pasting, importing, and exporting elements having access
control, password definitions are retained.

212 AADvance 2.1 - Working with AADvance Workbench


To set a password

1. In the Application View, right-click the required element, and then click Set Password.

2. In the Set Password dialog box, enter the required information, then click OK.

a) In the Password field, type the required password.

b) In the Confirm Password field, re-type the required password.

To edit a password

1. In the Application View, right-click the required element, and then click Set Password.

2. In the Change Password dialog box, enter the required information, then click OK.

a) In the Old Password field, type the current password.

b) In the New Password field, type the required password.

c) In the Confirm Password field, re-type the required password.

To remove a password

1. In the Application View, right-click the required element, and then click Set Password.

2. In the Change Password dialog box, enter the required information, then click OK.

AADvance Workbench 213


In the Old Password field, type the current password.
The New Password and Confirm Password fields must remain blank.

The element is no longer password-protected.

214 AADvance 2.1 - Working with AADvance Workbench


Setting Target Access Control
For controller security, you can set access control by defining a password for the target
AADvance controller. Password definitions are limited to eight characters and can consist of
letters, digits, and symbols. Target access control prevents the connection of all IXL clients not
having the password for the target controller. Users having the password can attach the target
to controllers in different projects.

Note: The password definitions for controller targets are saved on target systems.

Targets having passwords are protected from the following:

Stopping the application from the Workbench

Downloading an application

Updating an application

Locking a variable

Modifying the value of a variable

You can edit existing passwords for targets. You can also remove existing passwords for target
controllers. When setting, editing, and deleting the password for a controller target, the
attached target must be running.

To set a password for a target

1. In the Application View, right-click the controller instance, and then click Set Target
Password.

2. In the Set Password dialog box, enter the required information, then click OK.

AADvance Workbench 215


a) In the New Password field, type the required password.

b) In the Confirm Password field, re-type the required password.

To edit a password for a target

1. In the Application View, right-click the required controller, and then click Set Target
Password.

2. In the Set Password dialog box, enter the required information, then click OK.

a) In the Old Password field, type the current password.

b) In the New Password field, type the required password.

c) In the Confirm Password field, re-type the required password.

To remove a password for a target

1. In the Application View, right-click the required controller, and then click Set Target
Password.

2. In the Set Password dialog box, enter the required information, then click OK.
In the Old Password field, type the current password.
The New Password and Confirm Password fields must remain blank.

The target is no longer password-protected.

216 AADvance 2.1 - Working with AADvance Workbench


Importing and Exporting Variables
Data
You can import variables saved as Microsoft Excel spreadsheets (.xls) or comma-separated
values (.csv). Exporting variables enables the management of simple and complex variables
data including adding, removing, and modifying variables. You can import variables data files
into controllers and programs in the same project or in other projects.

Note: When importing a variables data file missing any columns, the Workbench uses the
default values for the missing data.

When exporting variables, you specify the location in which to save the exported files. To
develop the contents of variables data files (*.xls or *.csv) in a respective editor, i.e., Microsoft
Excel or Notepad, you can export an empty file serving as a template.

A variables data file includes a header row, a mapping row, a version number, and the variables
data. The header row displays the names of the data columns. Note that the column names of
the header row are the various variable properties. The mapping row displays the internal
names of data columns in brackets used for processing. An automatically generated version
number indicates the version of the import/export feature. The individual variable data is
placed in the respective columns.

The following table indicates the syntax used in the variables data files for the variable
properties and the associated internal names:

AADvance Workbench 217


Variable Property Internal Name Description
Name (Name) Name of the variable. Variable name are
limited to 128 characters beginning with a
letter or single underscore character followed
by letters, digits, and single underscore
characters. The last character for a variable
name must be a letter or digit; variable names
cannot end with an underscore character.
Names cannot be reserved words, defined
words, or data types (i.e., elementary,
structures, or arrays). Names must be unique
for the same type of elements within a scope.
Data Type (DataType) Data type of the variable
Dimension (Dimension) The number of elements defined for an array
String Size (StringSize) The maximum character length for string-type
variables
Initial Value (InitialValue) The value held by a variable when the virtual
machine begins executing the controller
Direction (Direction) For I/O wiring, indicates whether a variable is
an input, output, or internal
Attribute (Attribute) Indicates the read and write access rights
Comment (Comment) User-defined free-format text for variables and
array elements. Each array element of the same
type can have a different comment.
Alias (Alias) Any name
Wiring (Wiring) Indicates the I/O channel wired to the variable
Address (UserAddress) User-defined address of the variable
Retained (IsRetained) Indicates whether the value of the variable is
saved by the virtual machine at each cycle
Retained Flags (RetainFlags) Enables retaining specific elements of a
variable and indicates whether to use the initial
value of a variable or the value previously
retained on the target.

218 AADvance 2.1 - Working with AADvance Workbench


Variable Property Internal Name Description
Groups (Groups) Variable group containing the variables listed
in alphabetical order
OPC Write (AllowOPCWrite) Indicates the variable can be written by an
external client.
Message True (MsgTrue) Message defined for the TRUE value message
Message False (MsgFalse) Message defined for the FALSE value message
Base Address (ModBusBaseAddress) For Modbus communications, the base address
of the variable.
Type (ModBusType) For Modbus communications, indicates one of
the following variable types:
When the data type is BOOL and the type is
True, the variable type is Coils.
When the data type is BOOL and the type is
False, the variable type is Discrete Inputs.
When the data type is DINT and the type is
True, the variable type is Holding Registers.
When the data type is DINT and the type is
False, the variable type is Input Registers.
Write Protected (ModBusWriteProtected) For Modbus Communications for Coils and
Holding Registers, indicates whether data can
be copied from the Modbus master to the slave
device.
Reference Variable (SOERefVar) For the SOE service, the referenced variable of
any elementary data type.
Falling Edge Level (SOEFallingLevel) Indicates whether the SOE service detects a
fall from TRUE to FALSE.
Rising Edge Level (SOERisingLevel) Indicates whether the SOE service detects a
rise from FALSE to TRUE.
Filter Time (SOEFilterTime) For the SOE service, the minimum time lapse
between two events.
CIP Kind (CIPKind) For CIP communications, indicates whether
the variable is a producer or consumer.

AADvance Workbench 219


Variable Property Internal Name Description
Producer Name (CIPProducerName) When the CIP variable is a consumer, indicates
the CIP producer from which the consumer
receives data.
Path To Producer (CIPCPathToProducer) When the CIP variable is a consumer, indicates
the path to the producer.
Consumer Remote (CIPRemoteTag) When the CIP variable is a consumer, indicates
Tag the remote tag name of the producer variable
communicating with the consumer variable.
RPI (ms) (CIPCRPI) When the CIP variable is a consumer, indicates
the frequency in milliseconds that the remote
controller offers the variable to the AADvance
controller.
Producer Remote (CIPPRemoteTag) When the CIP variable is a producer, indicates
Tag the remote tag name of the consumer variable
communicating with the producer variable.
Max Number of (CIPPMaxConnections) When the CIP variable is a producer, the
Connections maximum number of simultaneous consumer
variables.
To Controller (SNCPToController) For the SNCP producer binding variable, the
name of the controller consuming the variable
binding group
From Controller (SNCPFromController) For the SNCP consumer binding variable, the
name of the controller producing the variable
binding group.
From Symbol (SNCPFromSymbol) For the SNCP consumer binding variable, the
name of the producer variable.

220 AADvance 2.1 - Working with AADvance Workbench


Variable Property Internal Name Description
Error Value (SNCPErrorValue) For the SNCP consumer binding variable, the
value defined for the error behavior. When no
value is specified for the error behavior, the
binding uses the last value.
Update Value (SNCPUpdateValue) For the SNCP consumer binding variable, the
value defined for the update behavior. When
no value is specified for the update behavior,
the binding uses the last value.

A progress bar indicates the advancement of import and export operations. You can choose to
cancel import and export operations. For import operations, the process stops after importing
the last variable in progress. For export operations, the process does not produce an exported
variables file.

To import variables

You can import variables stored as Excel (.xls) or comma-separated values (.csv) format.

1. In the Application View, right-click the destination receiving the Local Variables or
Controller Variables, and then click Import Variables....

2. From the Import Variables dialog box, select the file type containing the variables, locate
the file, and then click Open.

The progress bar indicates the advancement of the import operation. Upon completion of the
import operation, the imported variables are available for use as local variables or controller
variables. When you cancel an import operation, the process stops after importing the last
variable in progress.

To export variables

You can export variables data in Excel (.xls) or comma-separated values (.csv) format.

1. In the Application View, right-click the Local Variables or Controller Variables


containing the variables to export, and then click Export Variables....

AADvance Workbench 221


2. From the Export Variables dialog box, specify a name and locate the destination in which
to store the file containing the exported variables, select the file type and then click Save.

A progress bar indicates the advancement of the export operation. The variables are exported
to the specified file. When you cancel an export operation, the process does not produce an
exported variables file.

222 AADvance 2.1 - Working with AADvance Workbench


Generating Code
Before downloading code onto your target systems, you need to build the code for the whole
project. This operation builds the code for all controllers, programs, functions, and function
blocks as well as build information used to recognize your systems on networks. Once a project
is built, subsequent build operations only recompile the parts of the project needing
regeneration.

You can choose to build specific project elements, including controllers, functions, and
function blocks. You can also verify the syntax of programs. When building a selected project
element, the Workbench builds the code for the selected element only.

You can choose to clean projects and controllers. Cleaning projects and controllers deletes the
intermediate and output files generated during the last build operation. However, after
cleaning, you cannot perform online changes. Therefore, to retain the capacity to perform
online changes, you can perform subsequent builds for a project or controller rather than
cleaning then building it.

Building a Project

Verifying Program Syntax

Cleaning a Project

AADvance Workbench 223


Building a Project
You can choose to generate code and the necessary files for a project. You can also choose to
build only a selected element within a project such as a controller, function, or function block.

When building projects, controllers, functions, or function blocks, you can view the progress
of the build operation in the Output window. When the build operation is complete, you can
view generated errors in the Error List.

The Workbench rebuilds controllers and increases the build number in the following
conditions:

The controller has been modified since the last compilation

A dependent library is not compiled, was compiled after the controller, or was modified
since the last compilation

Contains a POU needing compilation: a POU has been modified since the last
compilation, a POU is an LD or FBD function block for which symbol monitoring is
activated, and a POU has local array variables when array index verification is activated.

The controller contains variables in binding consumer links or variables in CIP consumer
links

The compiler generates different code for simulation than for targets. Therefore, you need to
specify the code for simulation in the controller properties before building.

Generating monitoring symbols information to graphically monitor the values of variables


requires a significant amount of memory space. Therefore, when compiling, an error message
stating that the memory limit has been reached may be displayed in the output window. In such
a case, to enable compiling, you need to either disable monitoring for the POU, remove
elements from the POU, or reduce the size of the POU.

To build a project
In the Application View, right-click the project element, and then click Build All (or
press Ctrl+Shift+B).

The build process is initiated for the project.

224 AADvance 2.1 - Working with AADvance Workbench


To build a selected element within a project

You can perform build operations for controllers, functions, or function blocks.

1. In the Application View, click the required element.

2. From the Build menu, click Build Selection.

The build process is initiated for the selected element only.

To view the build progress and errors generated

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Projects, click General, select the following options,
and then click OK.
Always show Error List if build finishes with errors
Show Output window when build starts

3. Build the required project.

The Output and Error List windows are displayed.

AADvance Workbench 225


Verifying Program Syntax
You can choose to verify the syntax for programs. When verifying the syntax, the Workbench
only verifies the programming syntax without producing code. You can view the verification
progress in the Output window.

To verify the syntax for a program


In the Application View, right-click the program, and then click Verify.

The verification process is initiated for the program.

To view the verification progress and generated errors

1. From the Tools menu, click Options.

2. In the Options dialog box, expand Projects, click General, select the following options,
and then click OK.
Always show Error List if build finishes with errors
Show Output window when build starts

3. Verify the required program.

The Output and Error List windows are displayed.

226 AADvance 2.1 - Working with AADvance Workbench


Cleaning a Project
You can delete intermediate and output files belonging to projects or controllers. Cleaning
projects, i.e., deleting these files, enables the generation of new files during the next build
operation. When cleaning individual controllers, the intermediate and output files are deleted
for the controller only.

After cleaning a project, you cannot perform updates for any controllers. After cleaning a
controller, you cannot perform updates for the controller. To retain the capacity to perform
updates, you can perform a subsequent build rather than cleaning and building.

To clean a project

Cleaning a project removes the capacity to perform updates for all controllers.
In the Application View, right-click the project to clean, and then click Clean All.

To clean a controller

Cleaning a controller removes the capacity to perform updates for the controller.
In the Application View, right-click the controller to clean, and then click Clean
Controller.

AADvance Workbench 227


Running an Application Online
Running online signifies that an application is connected to physical controllers. The
Workbench ensures the execution of the code and files having the version control label
corresponding to the running version of the controller. While running online, you can modify
cycle timings for controllers, force the values of variables, and monitor the values of variables.

Before running an application on physical controllers, you need to build the project code and
download the application code onto the target.

For debugging purposes, you can also simulate the running of an application. The compiler
generates different code for simulation than for online.

To run an application online

1. From the Communication View, specify the IP addresses for the controllers in the
project.

2. From the Properties Window, specify the required Number for the controller. Each
controller in a project must have a unique Number matching the Resource Number of the
required AADvance controller. From the AADvance Discover tool, you can view and
change the Resource Number of AADvance controllers.

3. To set the connection mode for the project, from the Project menu, point to Connect
Mode, and then click Online.

Note the appearance of the Online menu category having the online command options.

4. Build the project code.

5. Download the application code onto the physical controllers.

The Workbench applies a version control label to the downloaded code and files.

6. Connect the controllers with the physical equipment.

The Workbench saves the application state and gets the corresponding version control
label for the running version of the controller. Upon disconnecting, the Workbench
returns the controllers to the state previous to connecting.

228 AADvance 2.1 - Working with AADvance Workbench


Downloading Code to Controllers
You perform download operations for projects and controllers having code to send to physical
controllers. When simulating, you do not need to perform download operations. When
performing download operations, you select the controllers for which to download code to the
physical equipment.

When performing a download operation, the AADvance Workbench verifies that the latest
build reflects the current project.

Note: If you are unable to download an application to a controller, you can free memory by
clearing the applications from the AADvance controller.

If you need to change the resource number of a controller, you are recommended to perform
the following:

1. Clear the application from the AADvance controller

2. Modify the resource number in AADvance Discover and in the Workbench controller
properties.

3. Download the code to the AADvance controller

The computer where the AADvance Workbench is installed must be connected to the
hardware controller through an SNCP network.

To download project code to a target

1. Build the project code.

2. From the Application View, right-click the project element, and then click Download.

3. In the Download window, select the controllers for which to download code to the
physical equipment, and then click Download.

AADvance Workbench 229


Performing Updates
You can modify a controller while it runs. This is sometimes necessary for processes where
any interruption may jeopardize production or safety. When performing builds having
unsupported update modifications, you may get warnings.

When performing updates, you need to ensure sufficient free memory space for the storage of
modified or added items. Updates are denied when memory space is insufficient. You specify
the available memory size for updates in the controller properties.

You can modify the I/O configuration of a controller. Modifications to the controller I/O must
match the hardware configuration. To modify the controller I/O, you must enable the Update
I/O Device Online controller property. The default value for this property is False.

Attention: Performing updates while the application is running can affect


the Safety Function of the system. Updates should only be performed
when absolutely required since the safety integrity of the system may be
reduced during the modification.

Before modifying the I/O configuration and performing updates while the
controller is connected, you must set up alternative safety measures lasting
the duration of the update.

Performing an update on a Safety Implemented System is the responsibility


of the user. The running application may stop if modifications are
performed incorrectly.

When modifying properties of controllers, you need to perform a download for the changes to
take effect. Also, the initial values of variables are applied upon starting controllers. Updates
do not start controllers.

An update is split into the following three phases:

1. Downloads the update to the required controllers

2. Confirms the download is error free and verifies if the controller will accept the update

3. Realizes the update

230 AADvance 2.1 - Working with AADvance Workbench


During the realization of an update, all bindings are closed and all consumed variables go to
their defined Update behavior states. The controller realizes the update and then attempts to
re-establish the bindings. If the amount of time between closing and re-establishing the
bindings exceeds the binding Update Timeout value, the consumed variables transition from
their Update behavior values to their Error behavior values.

For all AADvance versions, the following limitations exist for updates:

Declared, i.e., user-defined, arrays and structures cannot be modified. Declared arrays and
structures are defined as data types.
Modifications to controller properties are not applied after an update.

The following tasks are available for the latest AADvance version when performing updates:

Bindings Adding, deleting, and editing.


Creating and deleting bindings between variables.
Changing the consume status variable and consumption behavior of a
binding. Changing the producing variable, consuming variable, or
network for a binding creates a new one.
Adjusting the update timeout period in the network parameters. The
update timeout period is the maximum time during which the consumer
can remain in the update state.

AADvance Workbench 231


Internal Adding, deleting, and editing internal variables.
Variables
When renaming or changing the data type of internal variables, the
Workbench creates new variables. Therefore, variables are initialized.
Changing the alias, initial value, group, scope, direction, retain setting,
address, and comment of variables. When changing the initial value of a
read-only internal value, the Workbench reinitializes the variable. When
changing the scope of a variable, the Workbench reinitializes the variable.
Modifying the length of string variables. When decreasing the length, the
contents of the string is truncated to the new length.
Switching a variable attribute between the input and output attribute. You
cannot switch variables between the internal and input/output attribute.
Adding and removing elements in arrays for internal variables. For
multi-dimensional arrays, you can only add elements to the first
dimension. The Workbench initializes these new elements. Adding
elements to other dimensions causes the Workbench to initialize a new
array.
Renaming, adding variables to, removing variables from the group to
which a variable belongs or moving the variable to another group.

232 AADvance 2.1 - Working with AADvance Workbench


Programs Adding, deleting, renaming, and reordering (for execution within the
programs section) programs. When renaming programs, the Workbench
detects a CRC mismatch and updates the code on the target for the
program and reinitializes all local variables. When renaming SFC
programs, instance data and local variables are not preserved, i.e, elements
are reset to their initial state.
When planning to add programs (other than SFC) by updating, you need
to allocate a sufficient number of maximum extra POUs.
When planning to add SFC programs by updating, you need to allocate
sufficient memory space for SFC programs.
Adding, deleting, renaming steps and transitions as well as modifying the
initial step or the flow between elements. When modifying SFC programs,
instance data and local variables is preserved, i.e., elements are not reset to
their initial state.
Adding, deleting, and moving action blocks within steps of SFC
programs. Action blocks within steps are executed in the order of
appearance. You can also change the qualifier of an action block.
Functions and Adding, deleting, and moving function blocks. Adding and deleting
Function function block instances.
Blocks
Renaming and modifying user-defined functions and function blocks.
Adding, removing, and modifying the parameters of user-defined
functions and function blocks. When modifying the parameters, instance
data is not preserved. You need to recompile modified functions and
function blocks called by other POUs as well as the calling POUs.
I/O Channels Changing the wired variable.
For analog I/O channels, modifying the raw and engineering values to
configure the gain and offset settings.
For input channels, modifying the threshold values.

AADvance Workbench 233


I/O Modules You can perform the following tasks when the Update I/O Device Online
controller property is set to True:
- Adding, deleting, and modifying I/O modules
- Changing the wired variable.
- For input modules, modifying the threshold values.
After an update, the module is configured but not connected. You must
press the Fault Reset button located on the physical AADvance
controller. After resetting the controller, the faults disappear and the
connection is successful.
I/O Variables Adding, deleting, and modifying I/O variables.
Wiring, unwiring, and swapping I/O variables whose data type (scalar
type for arrays), length (string variables), dimension (arrays), and address
remains unchanged. For these I/O variables, you can modify the direction
(input or output only), scope, attribute (read, write, or read/write), retain
flag, alias, and comment. When modifying the direction, I/O variables
cannot change to or from the internal type. Note that modifying the
Equipment View causes the values of new and removed output I/O
variables to be reinitialized.
Modifying the group and bindings in which I/O variables are defined.

The Update window contains the following columns:

234 AADvance 2.1 - Working with AADvance Workbench


Name The name of the controller
Comment Free-format text
Local Version The latest version built by the Workbench.
Controller Status The status of the AADvance controller. Possible values are Running,
Stopped, Unable to connect, or Unrecognized application.
This column also displays the current version of the application running
on the AADvance controller. The Controller Status version must match
the Required Version.
Required Version The version of the application downloaded or updated on the AADvance
controller by the Workbench.
If Download Required is displayed in the Required Version column, abort
the update and perform a download operation.

Warning: Updates are unavailable after getting a previous version from the repository; you
must perform a download operation.

To perform an update

You can perform an update after building a project. Updates are unavailable after cleaning a
project.

1. Make sure that the memory size properties for the required controllers indicate sufficient
memory space.

2. From the Application View, right-click the project for which to perform the update, and
then click Update.

3. In the Update window, select the controllers to update, and then click Update.

AADvance Workbench 235


Starting and Stopping Controllers
You can stop an AADvance controller while it runs. You can also start a stopped AADvance
controller. You can start or stop individual controllers or all controllers in a project. Starting or
stopping a controller is only available when the controller is disconnected. For individual
controllers, you can view the version information as well as the current status and any
comments.

To start or stop an application running on an AADvance controller

1. Disconnect from the running controllers.

2. From the Project menu, click Start/Stop.

The Start/Stop Application dialog box is displayed.

3. In the Start/Stop Application dialog box, set one of the following actions for each
controller:
None
Start
Stop

236 AADvance 2.1 - Working with AADvance Workbench


4. Click Apply. A warning is displayed confirming you want to perform the actions. Click
OK.

The applications running on the AADvance controllers are stopped or started.

AADvance Workbench 237


Clearing an Application
You can clear, i.e., delete, previously downloaded applications from a physical controller. For
a project, you can choose to clear either individual controllers or all controllers. You can only
clear applications from disconnected controllers. You replace an application in an AADvance
controller by clearing the controller and then downloading a new application.

When clearing applications, you specify the individual controllers from those existing in a
project, then specify the controllers for which to clear applications. For individual controllers,
you can view version information for the local and physical controller applications as well as
the status of the controller and any comments.

Note: When clearing an application, only the files belonging to the current resource number
are deleted. You are recommended to clear the application before changing resource number.

To clear an application from a physical controller

1. Disconnect from the running controllers.

2. In the Application View, select the Project, then from the Project menu, click Clear.

3. In the Clear Application dialog box, perform one of the following steps:
To clear applications for individual controllers, select the required controllers, and
then click Clear.
To clear applications for all controllers, click Select All, and then click Clear.

The application files are removed from the required physical controllers. You can now
download a different application having the same IP address to the physical controller.

238 AADvance 2.1 - Working with AADvance Workbench


Connecting with Controllers
When developing an application, you can choose to connect with the physical controllers.
While connected, each controller is executed in real-time mode by a virtual machine on the
equipment.

Before initially connecting controllers, you need to build the project, then download the code
to the controller. Subsequent connections automatically extract the controller code from the
version control repository resulting from the latest download or update operation.

When you connect, you can choose to connect individual controllers within a project. The
Connect dialog box enables the selection of individual controllers to connect. You can also
choose to connect all controllers.

While connected, a local or remote Workbench locks, i. e., restricts access to, a controller from
other users when performing any operation modifying the controller. Only one Workbench can
lock a controller at any given time. Operations locking a controller include performing
downloads, performing updates, modifying the values of variables and I/Os, modifying cycle
timing, and more. A Workbench unlocks access when disconnecting from the controller. When
performing downloads, a Workbench unlocks access upon completion of the download. When
a Workbench locks a controller, the identity is indicated as the user name from the computer.
If the Workbench is unable to restrict access to the controller, the operation modifying the
controller, such as performing an update, will fail.

Status information for a controller is indicated in the Application, Communication, and


Equipment Views as a lightning bolt icon:

Yellow. Controller is unlocked and available to any Workbench

Green. Controller is locked by a local Workbench and unavailable from other


Workbenches
Red. Controller is locked by a remote Workbench and unavailable to local
Workbenches
Grey. Controller is not connected or in simulation mode

From these Views, you can obtain detailed status information for controllers including the
identity of a Workbench locking a controller by mousing over the controller status icons. From
the Controller Status, you can also view the identities of Workbenches locking controllers.

AADvance Workbench 239


While connected, you can perform many tasks:

monitor program execution and the values of variables

lock and unlock I/O channels of an I/O module

modify values of variables

modify cycle timing

To connect an application

Before connecting an application, you need to build the application code and download the
code to the target.

1. In the Communication View, specify the IP addresses for the controllers in the project.

Note: The compiler generates different code for simulation than for targets.

2. From the Project menu, point to Connect Mode, and then click Online.

Note the appearance of the Online menu category having the online command options.

3. Build the project code.

4. Download the project code to the physical controllers.

5. In the Application View, select the Project element, then from the Online menu, click
Connect (or press F5).

6. In the Connect window, select the controllers to connect, and then click Connect.

The selected controllers are connected.

240 AADvance 2.1 - Working with AADvance Workbench


Modifying Cycle Timing
While running an application online, i.e., connected, you can modify the cycle timing for
individual controllers. When modifying cycle timing, you can view the following cycle timing
information from system variables for individual controllers:

Cycle Information System Variable Description


True Cycle Time __SYSVA_TCYTRUECURRENT The real duration of a cycle
Current Cycle Time __SYSVA_TCYCURRENT The time spent with the virtual
machine
Maximum Cycle Time __SYSVA_TCYMAXIMUM The longest period of time used
for a current cycle
(__SYSVA_TCYCURRENT),
since connecting to the
controller
Cycle Overflow __SYSVA_TCYOVERFLOW The number of current cycles
(__SYSVA_TCYCURRENT)
having exceeded the
programmed cycle time
Programmed Cycle __SYSVA_TCYCYCTIME The defined cycle time for the
Time controller

The minimum cycle time for an AADvance application is 64 milliseconds. The cycle time for
most applications is between 64 and 260 milliseconds, depending on the system size. Note that
the cycle time will increase during an update or when a new processor is synchronizing.

Note: Setting the Programmed Cycle Time to 0 allows the controller to execute cycles as fast
as possible, i.e. at a rate close to the True Cycle Time.

To modify the cycle timing for a running application

1. From the Online menu, click Cycle Timing.

The Cycle Timing dialog box displays cycle time information for all controllers defined
in the project.

AADvance Workbench 241


2. Select the controller for which to modify the cycle timing, indicate a new programmed
cycle time, and then click Update.

To reset maximum cycle time and cycle overflow statistical information

You can reset the statistical values for the maximum cycle time and cycle overflow
information.

1. From the Online menu, click Cycle Timing.

The Cycle Timing dialog box displays cycle time information for all controllers defined
in the project.

2. To refresh the maximum cycle time and cycle overflow information displayed for
controllers, click Reset all Statistics.

242 AADvance 2.1 - Working with AADvance Workbench


Disconnecting from Controllers
For a project, you can disconnect all running controllers executing applications. Before
downloading code to controllers or clearing applications from controllers, you need to
disconnect controllers.

To disconnect controllers
In the Application View, select the Project element, then from the Online menu, click
Disconnect.

AADvance Workbench 243


Simulating an Application
Simulating the running of an application signifies that virtual machines execute the code of
individual controllers and the Windows platform.

The compiler generates different code for simulation than for online.

Before simulating an application, you need to build the code for the project and controllers.
When starting simulation, you can choose to start all controllers or start individual controllers.

Virtual machines disregard inputs and outputs. All tasks such as binding exchanges and
execution of POUs are executed by the Windows platform. Each controller is executed by one
virtual machine on the computer running the Workbench.

While simulating, you can execute controller code using one of two execution modes:

Real-time, the run time normal execution mode where target cycles are triggered by the
programmed cycle timing. While in real-time mode, you can switch to cycle-to-cycle
mode.

Cycle-to-cycle, a cyclical execution mode where the virtual machine loads the code but
does not execute it until you execute one cycle or activate real-time mode.

When setting breakpoints for LD and ST programs for which you generate debug information,
the controller automatically switches to step-by-step execution when the application
encounters a breakpoint. At this time, you can choose to step into or step over the next code.

To start the simulation of an application

Simulation of an application means simulating the running of some or all controllers in a


project.

1. In the Properties window, set the following properties for each controller to simulate:
Set the Code for Simulation property to True.
Specify the Execution Mode as either Real Time or Cycle to Cycle.

2. To enable monitoring the values for operators and functions, for the applicable programs
and function blocks, set Generate Monitoring Symbols to True.

244 AADvance 2.1 - Working with AADvance Workbench


3. To set the connection mode for the project, from the Project menu, point to Connect
Mode, and then click Simulation.

Note the appearance of the Simulation menu category having the simulation command
options.

4. Build the project code.

5. In the Application View, select the project, then choose one of the following options from
the Simulation menu:
To start the simulation of all controllers in the project, click Start Simulation Now.
To start the simulation of some controllers in the project, click Start Simulation,
then in the Simulate dialog box, select the controllers for which to start simulation,
and then click Simulate.

AADvance Workbench 245


Pausing Projects and Controllers
You can pause projects or individual controllers during simulation. Pausing a project affects
all controllers running in simulation. You cannot pause projects or controllers running online.
After pausing a project, you can resume, i.e., continue simulation. After pausing a controller,
you can continue, i.e., resume simulation or execute one cycle.

To pause a project running in simulation

1. In the Application View, select the project.

2. From the Simulation menu, click Pause.

To pause a controller running in simulation

1. In the Application View, select the controller to pause.

2. From the Simulation menu, click Pause Controller.

To continue simulation for a paused project

1. In the Application View, select the project.

2. From the Simulation menu, click Continue.

To continue simulation for a paused controller

1. In the Application View, select the controller for which to resume simulation.

2. From the Simulation menu, click Continue Controller.

To execute one cycle for a paused controller

1. In the Application View, select the controller for which to resume simulation.

2. From the Simulation menu, click Execute One Cycle on Controller.

246 AADvance 2.1 - Working with AADvance Workbench


Forcing the Values of Variables
While connected or simulating, you can force, i.e., override, the values of variables. These
variables can be user-defined or directly represented. The behavior of a variable is defined by
its logical value, physical value, lock state, and direction. When forcing the values of variables,
the value to overwrite depends on the direction of the variable. You force the values of
variables from the Dictionary, language containers, and the Watch window.

Locking and unlocking operates differently for simple variables, array elements, and structure
elements. For simple variables, individual variables are locked and unlocked directly. For
simple-type members of a complex variable such as a structure or array, when locking or
unlocking any member, you can lock or unlock individual members. For array and structure
elements, locking and unlocking an element affects only that element.

For structure-type variables, you can display one simple-type field.

For locked variables, the values displayed in the Logical Value and Physical Value columns
differ depending on their direction:

Input Variable (Read) Behavior

Example: To force the temperature reading from a sensor.

AADvance Workbench 247


Output Variable (Write) Behavior

Example: To force the closing of an actuator valve.

To force the value of a variable

For variables with the write access value of false, you must lock access before forcing the
values. For variables with the write access value of true:

From the Dictionary, double-click the variable's corresponding cell in the Logical
column, then in the dialog box, enter a value and click Write.

From the LD and FBD editors, double-click the variable, then in the dialog box, enter a
value and click Write.

You can also force the value of variables from the spy list.

While debugging, you can force the values of locked user-defined or directly-represented
variables.

1. From the Dictionary instance, locate the required variable.

2. Write the required value in the respective value column:


For an input variable, write the value in the Logical Value column.
For an output variable, write the value in the Physical Value column.
Monitoring the Values of Variables
While running an application online, i.e., connected, or simulating, you can monitor values,
updated by the running code or simulation code, in Dictionary instances as well as graphical
programs and function blocks. For individual graphical POUs, you enable monitoring by
generating monitoring symbols for operators and functions.

For dictionary instances, the logical values, physical values, and lock status of variables are
displayed in their respective columns. For graphical programs and function blocks, values are
displayed differently depending on their type:

Values of variables having the boolean type are displayed using color. The output value
color continues to the next input. The default colors are red when True and blue when
False.

Values of variables having the SINT, USINT, BYTE, INT, UINT, WORD, DINT,
UDINT, DWORD, LINT, ULINT, LWORD, REAL, LREAL, TIME, DATE, and
STRING type are displayed as a numeric or textual value. When the output is a structure
type, the displayed value is the selected member.

Note: You cannot monitor the values of arrays having a variable as an index.

When the variable value is unavailable, Offline is displayed in the variable.

To generate symbols monitoring information for a graphical POU

1. In the Application View, select the graphical POU for which to generate symbols
monitoring.

2. In the Properties window, set the Generate Monitoring Symbols property to True.

AADvance Workbench 249


Accessing the Values of System
Variables
While running an application online, i.e., connected, or simulating, you can access diagnostic
information from system variables for individual controllers, updated by the running code or
simulation code. When running an application online, the cycle timing system variables are
also available from the Cycle Timing dialog box, accessed from the Online menu.

System variables hold the values of information relating to cycle count, timing, kernel
bindings, and controller information. You can monitor system variables from the dictionary
instances for resources. You can read from and write to system variables. The available system
variables are the following:

Variable Name Type Read/Write Description


__SYSVA_CYCLECNT DINT Read Cycle counter
__SYSVA_CYCLEDATE UDINT Read Timestamp of the
beginning of the cycle
in milliseconds
__SYSVA_KVBPERR BOOL Read/Write Kernel variable binding
producing error
(production error)
__SYSVA_KVBCERR BOOL Read/Write Kernel variable binding
consuming error
(consumption error)
__SYSVA_RESNAME STRING Read Resource name (max
length=255)
__SYSVA_SCANCNT DINT Read Input scan counter
__SYSVA_TCYCYCTIME TIME Read/Write Programmed cycle time.
The defined cycle time
for the controller.
__SYSVA_TCYCURRENT TIME Read Current cycle time. The
time spent with the
virtual machine.

250 AADvance 2.1 - Working with AADvance Workbench


Variable Name Type Read/Write Description
__SYSVA_TCYMAXIMUM TIME Read Maximum cycle time.
The longest period of
time used for a current
cycle
(__SYSVA_TCYCURR
ENT), since connecting
to the controller.
__SYSVA_TCYOVERFLOW DINT Read Cycle overflow. The
number of current
cycles
(__SYSVA_TCYCURR
ENT) having exceeded
the programmed cycle
time.

AADvance Workbench 251


Variable Name Type Read/Write Description
__SYSVA_RESMODE SINT Read Resource execution
mode. Possible modes
are:
-5: Non-fatal error
-4: Stopped in stepping
mode after bound check
exception
-3: Stopped in stepping
mode after division by
zero exception
-2: Stopped in stepping
mode after exception
-1: Fatal error
0: No resource available
1: Stored resource
available NOT USED
(CMG)
2: Ready to run
3: Running in real time
4: Running in cycle by
cycle
5: Stopped from
encountering an SFC
breakpoint
7: Stopped while in
stepping mode
__SYSVA_CCEXEC BOOL Write Execute one cycle when
application is in cycle to
cycle mode
__SYSVA_TCYTRUECURRENT TIME Read True cycle time. The
real duration of a cycle.

To monitor system variables

You can monitor the values of system variables for an application running online or in
simulation.

252 AADvance 2.1 - Working with AADvance Workbench


From a POU, right-click the required variable, and then click Variable Monitoring (or
press Ctrl+I).

AADvance Workbench 253


Naming Conventions and Limitations
Projects

Project names Project names are limited to 128 characters beginning


with a letter followed by letters, digits, and single
underscores. The last character for a project name must
be a letter or digit; project names cannot end with an
underscore character. Names cannot be reserved
words, defined words, or data types (i.e., elementary,
structures, or arrays). Names must be unique for
projects within a solution.
Controller names Controller names are limited to 128 characters
beginning with a letter followed by letters, digits, and
single underscores. The last character for a controller
name must be a letter or digit; controller names cannot
end with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e.,
elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Programs in a project Projects can contain up to 65 536 programs.
Hierarchical levels Projects can have up to 65 536 levels.
POUs (Programs, Functions, and Function Blocks)

POUs Projects can have up to 65 536 POUs.


Program names Program names are limited to 128 characters beginning
with a letter followed by letters, digits, and single
underscores. The last character for a program name
must be a letter or digit; program names cannot end
with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e.,
elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.

254 AADvance 2.1 - Working with AADvance Workbench


Function names Function names are limited to 128 characters
beginning with a letter followed by letters, digits, and
single underscores. The last character for a function
name must be a letter or digit; function names cannot
end with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e.,
elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Function parameters Functions can have a maximum of 128 parameters
(127 inputs and one output)
Function parameter names Function parameter names are limited to 128
characters beginning with a letter followed by letters,
digits, and single underscores. The last character for a
parameter name must be a letter or digit; parameter
names cannot end with an underscore character. Names
cannot be reserved words, defined words, or data types
(i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Function block names Function block names are limited to 128 characters
beginning with a letter followed by letters, digits, and
single underscores. The last character for a function
block name must be a letter or digit; function block
names cannot end with an underscore character. Names
cannot be reserved words, defined words, or data types
(i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Function block parameters Function blocks can have a maximum of 128
parameters (inputs and outputs)
Function block parameter names Function block parameter names are limited to 129
characters beginning with a letter followed by letters,
digits, and single underscores. The last character for a
parameter name must be a letter or digit; parameter
names cannot end with an underscore character. Names
cannot be reserved words, defined words, or data types
(i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.

AADvance Workbench 255


Variables

Dictionary variables The dictionary can contain up to 4 294 967 296 entries
for each variable type.
Variable names Variable names are limited to 128 characters beginning
with a letter or single underscore followed by letters,
digits, and single underscores. The last character for a
variable name must be a letter or digit; variable names
cannot end with an underscore character. Names
cannot be reserved words, defined words, or data types
(i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
BOOL variables Boolean variables can have the boolean value TRUE
(1) or FALSE (0).
SINT variables SINT variable integer values range from -128 to +127.
Short integer constants must begin with a prefix
identifying the base. There is no prefix for DECIMAL
values. For HEXADECIMAL values the prefix is
"16#", for OCTAL values the prefix is "8#", and for
BINARY values the prefix is "2#".
USINT variables USINT variable integer values range from 0 to 255.
Unsigned short integer constants must begin with a
prefix identifying the base. There is no prefix for
DECIMAL values. For HEXADECIMAL values the
prefix is "16#", for OCTAL values the prefix is "8#",
and for BINARY values the prefix is "2#".
BYTE variables BYTE variable integer values range from 0 to 255.
BYTE constants must begin with a prefix identifying
the base. There is no prefix for DECIMAL values. For
HEXADECIMAL values the prefix is "16#", for
OCTAL values the prefix is "8#", and for BINARY
values the prefix is "2#".

256 AADvance 2.1 - Working with AADvance Workbench


INT variables INT variable integer values range from -32768 to
+32767. Integer constants must begin with a prefix
identifying the base. There is no prefix for DECIMAL
values. For HEXADECIMAL values the prefix is
"16#", for OCTAL values the prefix is "8#", and for
BINARY values the prefix is "2#".
UINT variables UINT variable integer values range from 0 to 65535.
Unsigned integer constants must begin with a prefix
identifying the base. There is no prefix for DECIMAL
values. For HEXADECIMAL values the prefix is
"16#", for OCTAL values the prefix is "8#", and for
BINARY values the prefix is "2#".
WORD variables WORD variable integer values range from 0 to 65535.
WORD constants must begin with a prefix identifying
the base. There is no prefix for DECIMAL values. For
HEXADECIMAL values the prefix is "16#", for
OCTAL values the prefix is "8#", and for BINARY
values the prefix is "2#".
DINT variables DINT variable integer values range from -2147483648
to +2147483647. Double integer constants must begin
with a prefix identifying the base. There is no prefix
for DECIMAL values. For HEXADECIMAL values
the prefix is "16#", for OCTAL values the prefix is
"8#", and for BINARY values the prefix is "2#".
UDINT variables UDINT variable integer values range from 0 to
4294967295. Unsigned double integer constants must
begin with a prefix identifying the base. There is no
prefix for DECIMAL values. For HEXADECIMAL
values the prefix is "16#", for OCTAL values the
prefix is "8#", and for BINARY values the prefix is
"2#".

AADvance Workbench 257


DWORD variables DWORD variable integer values range from 0 to
4294967295. Double word constants must begin with a
prefix identifying the base. There is no prefix for
DECIMAL values. For HEXADECIMAL values the
prefix is "16#", for OCTAL values the prefix is "8#",
and for BINARY values the prefix is "2#".
LINT variables LINT variable integer values range from
-9223372036854775808 to +9223372036854775807.
Long integer constants must begin with a prefix
identifying the base. There is no prefix for DECIMAL
values. For HEXADECIMAL values the prefix is
"16#", for OCTAL values the prefix is "8#", and for
BINARY values the prefix is "2#".
ULINT variables ULINT variable integer values range from 0 to
18446744073709551615. Unsigned long integer
constants must begin with a prefix identifying the base.
There is no prefix for DECIMAL values. For
HEXADECIMAL values the prefix is "16#", for
OCTAL values the prefix is "8#", and for BINARY
values the prefix is "2#".
LWORD variables LWORD variable integer values range from 0 to
18446744073709551615. Long word constants must
begin with a prefix identifying the base. There is no
prefix for DECIMAL values. For HEXADECIMAL
values the prefix is "16#", for OCTAL values the
prefix is "8#", and for BINARY values the prefix is
"2#".

258 AADvance 2.1 - Working with AADvance Workbench


REAL variables Real variables have six significant digits. For larger
values, the maximum possible value
is ±3.402823466E+38 while for smaller values, the
minimum possible value is ±1.175494351E-38.
Therefore, values greater than ±3.402823466E+38 and
greater than 0.0 but less than ±1.175494351E-38 are
not supported. Real literal values can be written with
either decimal or scientific representation. The
exponent part of a real scientific expression must be a
signed integer value ranging from -37 to +37. The
scientific representation uses the 'E' letter to separate
the mantissa part and the exponent.
LREAL variables Long real variables have 15 significant digits. For
larger values, the maximum possible value
is ±1.7976931348623158e+308 while for smaller
values, the minimum possible value is
±2.22507385850721E-308. Therefore, values greater
than ±1.7976931348623158e+308 and greater than 0.0
but less than ±2.22507385850721E-308 are not
supported. Long real literal values can be written with
either decimal or scientific representation. The range
of a real scientific expression must be a signed integer
value from 1.7E -308 to 1.7E +308.
TIME variables Time variables can have positive values ranging from 0
to 49d17h2m47s294ms. The time literal value must
begin with the "T#" or "TIME#" prefix.
DATE variables Date variable values range from 1970-01-01 to
2038-01-18. The date literal expression must begin
with the "D#" or "DATE#" prefix.

AADvance Workbench 259


STRING variables STRING variable string capacity is limited to 252
characters excluding the terminating null character (0),
a byte for the current length of the string, and a byte for
the maximum length of the string. String variables can
contain any character of the standard ASCII table.
Characters must be preceded and followed by single
quote (') characters. When placing single quote (‘)
characters within a string literal, these characters must
be preceded by the dollar ($) character.
Alias names Alias names are limited to 128 characters consisting of
letters, digits, and the following special characters: !, #,
$, %, &, \, *, +, -, /, <, :, =, >, ?, @, ^, _, `, |, and ~.
User-defined Types

Array names Array names are limited to 128 characters beginning


with a letter or single underscore followed by letters,
digits, and single underscores. The last character for an
array name must be a letter or digit; array names
cannot end with an underscore character. Names
cannot be reserved words, defined words, or data types
(i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.
Structure names Structure names are limited to 128 characters
beginning with a letter or single underscore followed
by letters, digits, and single underscores. The last
character for a structure name must be a letter or digit;
structure names cannot end with an underscore
character. Names cannot be reserved words, defined
words, or data types (i.e., elementary, structures, or
arrays). Names must be unique for the same type of
elements within a scope.

260 AADvance 2.1 - Working with AADvance Workbench


Defined Words

Defined word names Defined word names are limited to 128 characters
beginning with a letter or single underscore followed
by letters, digits, and single underscores. The last
character for a defined word name must be a letter or
digit; defined word names cannot end with an
underscore character. Names cannot be reserved
words, defined words, or data types (i.e., elementary,
structures, or arrays). Names must be unique for the
same type of elements within a scope.
Defined word equivalents Defined word equivalents are limited to 128
characters.
SFC

SFC steps per program SFC programs are limited to 65 536 steps.
SFC transitions per program SFC programs are limited to 65 536 transitions.
SFC step and transition names SFC step and transition names are limited to
128 characters beginning with a letter or single
underscore followed by letters, digits, and single
underscores. The last character for an SFC step and
transition name must be a letter or digit; SFC step and
transition names cannot end with an underscore
character. SFC step and transition names cannot
contain reserved keywords or share the same names as
the variables.

AADvance Workbench 261


File System Paths
The AADvance 2.1 Workbench uses the following default file system paths:

AADvance projects
%USERPROFILE%\Documents\AADvance 2.1\Projects
Version control repository
%PUBLIC%\Public Documents\AADvance 2.1\Repository
Document Generation templates
%USERPROFILE%\AppData\Local\Rockwell Automation\AADvance
2.1\ACP\Templates\DocumentGenerator
OPC configuration
%ALLUSERSPROFILE%\Rockwell Automation\AADvance 2.1\AADvance Gateway
Workbench and OPC logs
%USERPROFILE%\AppData\Local\Rockwell Automation\AADvance 2.1
Application binary files
%PROGRAMFILES(x86)%\Rockwell Automation\AADvance 2.1
Environment settings file (when exporting)
%USERPROFILE%\Documents\AADvance 2.1\Settings\AADvance

262 AADvance 2.1 - Working with AADvance Workbench


Dictionary
The Dictionary, i.e., tag editor, is the environment where you manage variables, arrays,
structures, defined words, and edit the contents of the grid. The Dictionary is made up of
multiple grids having different purposes.

Arrays Grid, enables managing the arrays for a project

Structures Grid, enables managing the structures for a project

Defined Words Grid, enables managing the defined words for a project

Variables Grid, enables managing the variables for controllers and programs. Each
controller and program has its instance of the grid. For controllers, the grid displays
global variables. For programs, the grid displays local variables.

The grids each display the properties for the type of element. You can open multiple grid
instances simultaneously. When working in a grid, you can navigate the cells using the mouse
controls. For complex data types, you can expand fields using Ctrl+PLUS SIGN on numeric
keypad (+) and collapse fields using Ctrl+MINUS SIGN on numeric keypad (-).

You access Dictionary grids from the Application View.

You can customize the Dictionary environment by arranging the columns to display and setting
the display colors.

To access a Dictionary grid instance

1. From the Application View, expand the project and controller nodes.

2. For the variables of a controller, expand the required controller node, then expand the
Variables node, and then double-click Controller Variables.

The Dictionary instance is displayed containing the variables belonging to the controller.

3. For the variables of a program, expand the required program node, and then double-click
Local Variables.

The Dictionary instance is displayed containing the variables belonging to the program.

AADvance Workbench 263


4. For the data types of a project, double-click the Global Data Types element.

The data types Dictionary instance is displayed with the Arrays, Structures, and Defined
Words tabs.

5. For the data types of a library, expand the Libraries node, then expand the required
library, and then double-click Data Types.

The Dictionary instance is displayed containing the data types belonging to the library.

To arrange the columns to display

To retain customized display settings, you must save the Dictionary instance before closing.

1. To move a column, drag the column header to another location.

When dragging a column header, arrows indicate the current position of the header.

2. To hide a column, right-click on a column header, and then click Hide Column.

3. To show a column, right-click on any column header, point to Show Column, and then
click the required column name.

264 AADvance 2.1 - Dictionary


Arrays Grid
The Arrays grid of the Dictionary enables managing the arrays for a project. You can perform
the following tasks from the Arrays grid:

Creating arrays

Editing existing arrays

Deleting arrays

Sorting arrays in the grid

Filtering arrays in the grid

For arrays, the properties are the following:

Column Description Possible Values


Name Name of the array Limited to 128 characters beginning
with a letter or single underscore
character followed by letters, digits, and
single underscores. The last character
for an array name must be a letter or
digit; array names cannot end with an
underscore character. Names cannot be
reserved words, defined words, or data
types (i.e., elementary, structures, or
arrays). Names must be unique for the
same type of elements within a scope.
Data Type Type of the array BOOL, BYTE, DATE, DINT, DWORD,
INT, LINT, LREAL, LWORD, REAL,
SINT, STRING, TIME, UDINT, UINT,
ULINT, USINT, WORD, user arrays,
and structures
Dimension The dimension of the array Example: [1..10] for a one dimensional
array, [1..4,1..7], for a two dimensional
array. The dimension is defined as a
positive double integer (DINT) value.

AADvance Workbench 265


Column Description Possible Values
Comment Comment for the array Free-format text
String Size If Data Type is STRING, String capacity is limited to 252
represents the length characters excluding the terminating
null character (0), a byte for the current
length of the string, and a byte for the
maximum length of the string

You can customize the Dictionary environment by arranging the columns to display.

To create an array

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Arrays tab.

3. In an empty row of the Arrays grid, define the required properties for the array, and then
press ENTER.

To edit an existing array

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Arrays tab.

3. In the Arrays grid, make the required changes.

To delete an array

You can delete arrays from the Arrays grid.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Arrays tab.

266 AADvance 2.1 - Dictionary


3. In the Arrays grid, right-click the array to remove, and then click Delete.

To sort arrays in the grid

You can sort the arrays in the grid using an ascending or descending order for the individual
columns.

1. From the Application View, expand the project, controller, and lib nodes, then
double-click the Data Types item.

2. From the Data Types instance, click the Arrays tab.

3. In the Arrays grid, select the required column header.

An arrow showing the current order is displayed on the column header.

4. Toggle the column header to switch between ascending and descending order.

To filter arrays in the grid

You can filter arrays displayed on the Arrays tab of Data Types instance. When filtering, you
create a view displaying only the arrays containing specified characters.

The filter row is the top row of the grid. You can filter arrays by typing alphabetical and
numerical characters in the cells of the filter row. You can also select from the drop-down
combo box. Matching arrays are automatically displayed.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Arrays tab.

3. In the filter row of the Arrays grid, click the required cell, and then do one of the
following:
 Type the characters to use in the filtering operation
 Select the required array from the drop-down combo box

AADvance Workbench 267


Structures Grid
The Structures grid of the Dictionary enables managing the structures for a project. You can
perform the following tasks from the Structures grid:

Creating structures

Editing existing structures

Deleting structures

Sorting structures in the grid

Filtering structures in the grid

For structures, the properties are the following:

Column Description Possible Values


Name Name of the structure Limited to 128 characters beginning
with a letter or single underscore
followed by letters, digits, and single
underscores. The last character for a
structure name must be a letter or digit;
structure names cannot end with an
underscore character. Names cannot be
reserved words, defined words, or data
types (i.e., elementary, structures, or
arrays). Names must be unique for the
same type of elements within a scope.
Data Type Type of the structure BOOL, BYTE, DATE, DINT, DWORD,
INT, LINT, LREAL, LWORD, REAL,
SINT, STRING, TIME, UDINT, UINT,
ULINT, USINT, WORD, user arrays,
and structures

268 AADvance 2.1 - Dictionary


Column Description Possible Values
Comment Comment for the structure Free-format text
String Size If Data Type is STRING, String capacity is limited to 252
represents the length characters excluding the terminating
null character (0), a byte for the current
length of the string, and a byte for the
maximum length of the string

You can customize the Dictionary environment by arranging the columns to display.

To create a structure

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Structures tab.

3. In an empty row of the Structures grid, define the required properties for the structure,
and then press ENTER.

To edit an existing structure

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Structures tab.

3. In the Structures grid, make the required changes, and then press ENTER.

To delete a structure

You can delete structures from the Structures grid.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Structures tab.

AADvance Workbench 269


3. In the Structures grid, right-click the structure to remove, and then click Delete.

To sort structures in the grid

You can sort the structures in the grid using an ascending or descending order for the individual
columns.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Structures tab.

3. In the Structures grid, select the required column header.

An arrow showing the current order is displayed on the column header.

4. Toggle the column header to switch between ascending and descending order.

To filter structures in the grid

You can filter structures in Structures grid. When filtering, you create a view displaying only
the structures containing specified characters.

The filter row is the top row of the grid. You can filter structures by typing alphabetical and
numerical characters in the cells of the filter row. You can also select from the drop-down
combo box. Matching structures are automatically displayed.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Structures tab.

3. In the filter row of the Structures grid, click the required cell, then do one of the
following:
 Type the characters to use in the filtering operation
 Select the required structure from the drop-down combo box

270 AADvance 2.1 - Dictionary


Defined Words Grid
The Defined Words grid of the Dictionary enables managing the defined words for a project.
You can perform the following tasks from the Structures grid:

Creating defined words

Editing existing defined words

Deleting defined words

Sorting structures in the grid

Filtering structures in the grid

For defined words, the properties are the following:

Column Description Possible Values


Word Name of the defined word Limited to 128 characters beginning
with a letter or single underscore
followed by letters, digits, and single
underscores. The last character for a
defined word must be a letter or digit;
defined words cannot end with an
underscore character. Names cannot be
reserved words, defined words, or data
types (i.e., elementary, structures, or
arrays). Names must be unique for the
same type of elements within a scope.
Equivalent String replacing the defined Limited to 128 characters
word during compilation. For
example, the defined word "PI"
is replaced by its equivalent
"3.14159"
Comment Comment for the defined word Free-format text

You can customize the Dictionary environment by arranging the columns to display.

AADvance Workbench 271


To create a defined word

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Defined Words tab.

3. In the Defined Words grid, define the required properties, and then press ENTER.

To edit an existing defined word

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Defined Words tab.

3. In the Defined Words grid, make the required changes.

To delete a defined word

You can delete defined words from the Defined Words grid.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Defined Words tab.

3. In the Defined Words grid, right-click the defined word to remove, and then click Delete.

To sort defined words in the grid

You can sort the defined words in the grid using an ascending or descending order for the
individual columns.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Defined Words tab.

272 AADvance 2.1 - Dictionary


3. In the Defined Words grid, select the required column header.

An arrow showing the current order is displayed on the column header.

4. Toggle the column header to switch between ascending and descending order.

To filter defined words in the grid

You can filter defined words in Defined Words grid. When filtering, you create a view
displaying only the defined words containing specified characters.

The filter row is the top row of the grid. You can filter defined words by typing alphabetical
and numerical characters in the cells of the filter row. You can also select from the drop-down
combo box. Matching defined words are automatically displayed.

1. From the Application View, access the Dictionary instance for the data types of the
project.

2. From the Data Types instance, click the Defined Words tab.

3. In the filter row of the Defined Words grid, click the required cell, and then do one of the
following:
 Type the characters to use in the filtering operation
 Select the required defined word from the drop-down combo box

AADvance Workbench 273


Variables Grid
The variables grid of the Dictionary enables managing the variables for a controller or
program. Each controller and program has its instance of the grid. For controllers, the grid
displays global variables. For programs, the grid displays the local variables. You can perform
the following tasks from the variables grid:

Creating variables

Editing existing variables

Dragging variables

Deleting variables

Cutting, copying, and pasting variables

Sorting variables in the grid

Filtering variables in the grid

Adding variables to variable groups

For variables of controllers or programs, the properties are the following:

274 AADvance 2.1 - Dictionary


Column Description Possible Values
Name Name of the variable Limited to 128 characters beginning
with a letter or single underscore
character followed by letters, digits, and
single underscore characters. The last
character for a variable name must be a
letter or digit; variable names cannot
end with an underscore character.
Names cannot be reserved words,
defined words, or data types (i.e.,
elementary, structures, or arrays).
Names must be unique for the same type
of elements within a scope.
Logical Value Available when online. The Input: Locked
displayed value differs Output: Updated by the running TIC
depending on the direction of code
the variable. In the dictionary Internal: Locked
view the columns display values
for the variables used in
controllers where debugging is
enabled.
Physical Value Available when online. The Input: Updated by the field value
displayed value differs Output: Locked
depending on the direction of Internal: Updated by the running TIC
the variable. In the dictionary code
view the columns display values
for the variables used in
controllers where debugging is
enabled.

AADvance Workbench 275


Column Description Possible Values
Lock Available when the application Yes or No
is connected. The indication of
whether the value of the variable
is locked. You can only lock I/O
variables. Locking operates
differently for simple variables,
array and structure elements,
and function block parameters.
For simple variables, individual
variables are locked directly. For
structure and array elements,
locking an element locks only
that element of the structure or
array.
Data Type Data type of the variable BOOL, BYTE, DATE, DINT, DWORD,
INT, LINT, LREAL, LWORD, REAL,
SINT, STRING, TIME, UDINT, UINT,
ULINT, USINT, WORD, user arrays,
and structures
Dimension The size (number of elements) For example: [1..3,1..10] - represents a
of an array. two-dimensional array containing a total
of 30 elements.
String Size For String type variables, String capacity is limited to 252
indicates the maximum length characters excluding the terminating
null character (0), a byte for the current
length of the string, and a byte for the
maximum length of the string. The
default value is 80.
Initial Value Value held by a variable when The initial value of a variable can be the
the virtual machine starts the default value, a value given by the user
execution of the controller when the variable is defined or the value
of the retain variable after the virtual
machine has stopped.

276 AADvance 2.1 - Dictionary


Column Description Possible Values
Direction For I/O wiring, indicates Var, VarInput, or VarOutput
whether a variable is an input,
output, or internal.
Attribute The property of a variable Read, Write, or Read/Write
indicating its read and write
When the direction of a variable is
access rights.
VarInput, the attribute must be Read.
When the direction is VarOutput, the
attribute can be Write or Read/Write.
Retained The indication of whether the True or False
value of the variable is saved in
When the processor battery voltage is
non-volatile memory by the
low or no battery is fitted, setting
virtual machine at each cycle.
Retained to True has no effect.
When setting the Retained
property for a variable having a
structure data type, the property
is set for the entire structure;
you cannot retain individual
structure members.

Note: Do not use the Retained


property for safety related
settings.
Comment User-defined text Free format
Alias Any name (for use in POUs) Limited to 128 characters consisting of
letters, digits, and the following special
characters: !, #, $, %, &, \, *, +, -, /, <, :,
=, >, ?, @, ^, _, `, |, and ~.
Wiring Read-only cell, generated by the Uses the syntax of directly represented
I/O wiring tool indicating the variables
I/O channel to which the
variable is wired
Groups Group name or "None"
Allow OPC Write Indication that a variable can be The default value is FALSE
written by an external client.

AADvance Workbench 277


Column Description Possible Values
Message True Message defined for the TRUE Limited to 65535 characters
value message
Message False Message defined for the FALSE Limited to 65535 characters
value message

You can customize the Dictionary environment by arranging the columns to display.

To create a variable

1. From the Application View, access the Dictionary instance for the required controller or
program.

2. In an empty row of the variables grid, define the required properties for the variable, and
then press ENTER.

To edit an existing variable

1. From the Application View, access the Dictionary instance for the required controller or
program.

2. In the variables grid, make the required changes.

To drag a variable

You can drag variables from a Dictionary instance to multiple locations within a project. These
locations include other Dictionary instances as well as elements within a language container.

You drag variables to other locations individually. When dragging a variable to another
Dictionary instance, you can place the variable anywhere in the grid. When dragging a variable
into a language container, you can place the variable anywhere in the language container. To
retain changes made to Dictionary instances and language containers, save the respective
instance or POU before closing.

1. From the Application View, access the Dictionary instance containing the required
variable and the destination for the variable.

278 AADvance 2.1 - Dictionary


2. From the Dictionary instance containing the required variable, in the variables grid, select
the variable by clicking the cell in the left-most column.

The selection indicator ( ) is displayed in the leftmost column.

3. Drag , placing the variable in the grid or open language container.

The variable is displayed at the destination.

To delete a variable

You can delete variables from Dictionary instances. Deleting variables from an instance
opened for a program element removes the variables from the instance only.

1. From the Application View, access the Dictionary instance for the required controller or
program.

2. In the variables grid, right-click the variable to remove, and then click Delete.

To cut, copy, and paste variables

When selecting variables, an indicator arrow ( ) is displayed in the leftmost column of the
grid. You can cut, copy, and paste variables from one Dictionary instance to another. You can
also cut, copy, and paste variables from the Variable Selector to the Dictionary.

1. In the grid of the required Dictionary instance, cut or copy the required variables.
To remove variables, select the required variable or variables, right-click the
selection, and then click Cut.
To copy variables, select the required variable or variables, right-click the selection,
and then click Copy.

2. In the grid of the required Variable Selector tab or Dictionary instance, right-click the
required location, and then click Paste.

The variables are displayed at the required location.

AADvance Workbench 279


To sort variables in the grid

You can sort the variables in the grid using an ascending or descending order for the individual
columns.

1. From the Application View, access the Dictionary instance for the required controller or
program.

2. In the variables grid, select the required column header.

An arrow showing the current order is displayed on the column header.

3. Toggle the column header to switch between ascending and descending order.

To filter variables in the grid

You can filter variables in variables grid instances. When filtering, you create a view
displaying only the variables containing specified characters.

The filter row is the top row of the grid. You can filter variables by typing alphabetical and
numerical characters in the cells of the filter row. You can also select from the drop-down
combo box. Variables containing matching characters are automatically displayed in the grid.

1. From the Application View, access the Dictionary instance for the required controller or
program.

2. In the filter row of the variables grid, click the required cell, and then do one of the
following:
 Type the characters to use in the filtering operation
 Select the required defined word from the drop-down combo box

To add a variable to a variable group

You can add a variable defined in the variables grid to existing variable groups.
In the variable grid, right-click the variable, point to Add to Variable Group, then click
the required group.

The variable is added to the group.


Quick Declaration of Variables

Using the Quick Declaration dialog box, you can simultaneously create multiple local or global
variables. Quick Declaration can be accessed using the Dictionary. A preview of the variable
is available on the top-right of the Quick Declaration dialog box.

The following attributes can be configured for variables in Quick Declaration:

Property Description
Numbering The range of values for the variables. The digits option is set to auto by default
and can be changed to alter the quantity of displayed digits.

AADvance Workbench 281


Property Description
Name The variable name is separated into a prefix and suffix. The prefix appears
before the number value and can contain letters, digits, and single underscores.
The suffix appears after the number value and can contain letters, digits, and
single underscores. Neither can contain two consecutive underscores.
Attributes The following attributes are available:
Data type: Drop down combo box displaying the variable types. Possible val-
ues are elementary IEC 61131-3 types (BOOL, BYTE, DATE, DINT,
DWORD, INT, LINT, LREAL, LWORD, REAL, SINT, STRING, TIME,
UDINT, UINT, ULINT, USINT, or WORD) or derived types (arrays, struc-
tures, or function blocks).
Direction: Indicates whether the variable is internal, input, or output. Possible
values are Var, VarInput, or VarOutput.
String Length: Defined length only applying to the STRING variable. Possible
values are 1 to 252.

To create multiple variables using Quick Declaration

1. In the required dictionary instance, right click an empty row, and then click Quick
Declaration.

2. Configure the variable attributes in the Quick Declaration dialog box, and then click OK.

282 AADvance 2.1 - Dictionary


Cross Reference Browser
The cross reference browser provides an overview of the variables, programs, functions,
function blocks, and defined words existing in a project including information such as names,
various properties, location of usage, and comments. When locating items in the browser, you
need to select a context view for the type of elements to locate. You can find specific elements
by name or filter the element list. In the browser, some columns from the different context
views reflect the respective properties of the items. You can sort the items in the list according
to the different column headings in ascending or descending order.

The Cross Reference Browser toolbar contains the following:

Enables locating elements within the


element list. You can type the element name
in the field or select a previous search from
the drop-down combo-box.
Enables locating the element specified in
the Find field within the element list
Enables filtering the element list using text.
You can type element name in the field or
select a previous search from the drop-down
combo-box. To remove a filter, select
<Remove Filter> from the drop-down
combo-box.
Enables selecting a context view for the
element list. Possible views include
Variable, Programs, Functions,
Function Blocks, and Defined Words.
Enables refreshing the element list to
include the latest elements from the project
Enables displaying the previous instance of
the selected element within the project
Enables displaying the next instance of the
selected element within the project

AADvance Workbench 283


The properties for the Variables view are the following:

Name Name of the variable


Scope Range of accessibility of a variable in relation to POUs of a
controller
Alias Alias name of the variable
Type Data type of the variable
Project Project using the variable
Controller Controller using the variable
Comment Comment of the variable
Group Group containing the variable

The properties for the Programs view are the following:

Name Name of the program


Language Programming language of the program
Project Project using the program
Controller Controller using the program
Comment Comment of the program

The properties for the Functions and Function Blocks views are the following:

Name Name of the function or function block


Category Type of function or function block. Possible types are standard,
user-defined, and native.
Language Programming language of the function or function block
Project Project using the function or function block
Controller Controller using the function or function block
Comment Comment of the function or function block
From Library Library containing the function or function block

The properties for the Defined Words view are the following:

284 AADvance 2.1 - Cross Reference Browser


Name Name of the defined word
Equivalent String replacing the defined word during compilation. For
example, the defined word "PI" is replaced by its equivalent
"3.14159"
Project Project using the defined word
Comment Comment for the defined word

In the element list, color is used to identify elements used within the project. Element displayed
as blue are used at least once within the project. Elements displayed as red are not in use. For
elements other than programs, you can select elements displayed as blue to view the location
information for each instance of the element within the project. You can jump to the location
of individual instances by double-click in the instance list.

When working in the Cross Reference Browser, you can navigate using keyboard and mouse
controls.

Arrow keys Enable moving up, down, left and right within the rows of the elements list
Tab key Enables moving left and right within the fields and commands of the toolbar.
Also enables moving from the elements list to the list of instances.
Esc key Enables moving from the Cross Reference Browser to the workspace

To access the Cross Reference Browser

From the View menu, click Cross Reference Browser (or press Ctrl+W, Ctrl+C).

The Cross Reference Browser is displayed.

To locate element in the Cross Reference Browser

When locating elements in the Cross Reference Browser, you refresh the list of
cross references by clicking (or pressing Ctrl+T, Ctrl+R).

1. From the Context View drop-down list, select the type of elements to display.

2. To refine the element list, do one of the following:

AADvance Workbench 285


 To sort the elements list, click the column heading by which to sort in an ascending
order. Clicking twice sorts in descending order.
 To filter the elements list, type in the filter field or select a previous filter from the
drop-down combo-box.

3. Select the required element by performing one of the following:


 Type the name of the element in the Find field or select a previous search from the

drop-down combo-box, then click .


 Scroll through the element list.

To jump to an instance of an element

In the element list, elements displayed in blue are used at least once within the project. For
these elements, selecting in the element list displays all related instances in the instance list.

1. In the Cross Reference Browser, locate the required element.

2. In the instance list, double-click the required instance of the element (or press F8 or
Shift+F8).

The program containing the instance of the element is displayed with the instance selected.

286 AADvance 2.1 - Cross Reference Browser


Application View
The Application View is an interface that displays a graphical view of projects in a logically
organized tree view. Projects include controllers, programs, functions, function blocks,
controller variables, data types, and libraries. A project can house multiple controllers. The
physical locations of project files can differ from the representation in the tree view structure.

From the tree view, you can perform many tasks for project elements:

Adding controllers, programs, functions, and function blocks

Adding new libraries, published libraries, and existing libraries

Importing target definitions

AADvance Workbench 287


Setting properties of projects, controllers, programs, functions, and function blocks

Setting passwords for projects, controllers, targets, and programs

Building projects, controllers, functions, and function blocks

Verifying syntax for programs

Cleaning projects and controllers

Downloading and updating projects and controllers

Connecting controllers

Accessing version control operations for projects, controllers, programs, functions, and
function blocks

Copying, pasting, deleting, and renaming controllers

Cutting, copying, pasting, deleting, and renaming programs, functions and function
blocks

Opening, defining, importing, and exporting variables

Creating variable groups

Opening and defining global data types

From the Application View, you can obtain version control status and controller status details
by mousing over the respective icons.

To access the Application View

From the View menu, click Application View.

The Application View is displayed.

To add an element

You can add elements such as controllers, programs, functions, and function blocks to projects.

288 AADvance 2.1 - Application View


Right-click the parent for which to add an element, point to Add <element>, then click
the required option.

To cut or copy an element

1. Right-click the element, then do one of the following:


 To cut the selection, click Cut.
 To copy the selection, click Copy.

2. Right-click the required destination, then click Paste.

To move an element

You can drag and drop elements to change their position in the tree structure. You can only
move elements

You can drag and drop elements within their corresponding element type (Controllers,
Programs, Functions, Function Blocks, Variable Groups, or Libraries) to change their position
in the tree structure. For example, you can move an LD program to any position in the Program
section.
In the Application View, drag the required element to the new position within the same
section.

Note: For SFC POUs, you can move an SFC main program, to a different position in the tree
structure. When you move an SFC POU having children, the children follow their parent. You
can also move a child SFC POU to a different main SFC POU or to a different hierarchy level.
You can only drag child SFC POUs to hierarchical levels already containing an SFC child.

To delete an element
To permanently delete an element, right-click the element, then click Delete. Projects
always have at least one controller.

To rename an element
Right-click an element, click Rename, then type a new name in the space provided.

AADvance Workbench 289


290 AADvance 2.1 - Application View
Communication View
The Communication View is a graphical environment displaying various aspects of
communication information related to communication events. The Communication View
displays a tree-like structure with nodes that expand to reveal the available communication
functions and configurations for the series 9000 equipment.

From the Communication View, you can use the following protocols with Ethernet networks
and serial ports:

Modbus RTU/TCP

OPC

SOE

SNTP

Serial Tunneling using TCP/IP

SNCP bindings

CIP

Peer-to-Peer

Quality of Service

In the Communication View, you select tree nodes to access related communication options for
the equipment series. These options are displayed in the property pages. When working in the
Communication View, you can navigate using the mouse controls or keyboard arrows. You can
view additional properties for selected elements in the Properties window.

AADvance Workbench 291


To access the Communication View

When working in the Communication View, you can navigate using the mouse controls or
keyboard arrows. You can view additional properties for selected elements in the
Communication property page and Properties window.

292 AADvance 2.1 - Communication View


From the View menu, click Communication View.

AADvance Workbench 293


Defining Ethernet Ports
The AADvance controller provides up to six Ethernet communication ports, two for each 9110
processor module present. Each pair of Ethernet ports is identified as En-1 and En-2 where n
indicates the processor module.

[E1-1 and E1-2]

[E2-1 and E2-2]

[E3-1 and E3-2]

The En-1 Ethernet ports are all on one network and the En-2 ports are on a second network.

Note: To avoid unexpected ARP requests, you are strongly recommended to configure IP
addresses for En-2 ports (even if they are unused).

When defining Ethernet ports, you indicate an IP address and optionally a comment. Each
controller on a local area network must have a unique IP address. You must set the IP address
when creating a system or fitting a new processor base unit. The IP address must be configured
in the physical controller by using AADvance Discover and must then be configured in the
Workbench controller.

To configure the IP Address of the Workbench controller

To connect the AADvance Workbench project to the physical controller, you must define the
IP addresses set for the controller in the project. You can also add comments to IP address
definitions.

1. From the Workbench, open or create the required project.

2. From the View menu, click Communication View.

3. In the Communication View, right-click Ethernet, and then click Open.

294 AADvance 2.1 - Communication View


The Communication property page is displayed with the six Ethernet Ports.

4. In the Communication property page, type the IP address for each required port.

Note: Ports that are Not Configured can be configured individually by selecting the required
port in the Communication View.

AADvance Workbench 295


Using Modbus Communications
The AADvance controller supports Modbus communications and can act as a Modbus master
or Modbus slave. A Modbus master can have Modbus master slaves. The AADvance controller
can use serial or Ethernet ports for Modbus communications.

Note: The AADvance controller does not support the Modbus ASCII protocol.

The Modbus functionality implemented by the AADvance controller meets the following
standard: Modbus Application Protocol Specification, version 1.1b. December 2006. The
Modbus Organization.

To use Modbus communications, you must map Modbus variables for the controller. These
variables are then used by Modbus slaves, Modbus masters, and Modbus master slaves. When
mapping variables, these are mapped as the following types:

Coils

Discrete Inputs

Input Registers

Holding Registers

The Modbus mapping includes the following properties:

Name The name of the variable.


Data Type The data type of the variable.
Direction The direction of the variable.
Base Address The base address of the variable. Possible values range from 1 to 65536;
the default starting address value is 1.
Allow MODBUS For Coils and Holding Registers, indicates whether data can be copied
Write from the Modbus master to the slave device.

296 AADvance 2.1 - Communication View


Modbus uses a numeric addressing scheme to move data between devices. AADvance
controllers provide a dedicated area for each of the four variable types. The original Modbus
standard defines the address field as a four-digit field with a prefix relating to the variable type.
The crosshatch areas in the following example display how the original-style, five-digit
Modbus addresses (for example, a holding register at 40,001) are related to the AADvance
memory map.

The base addresses used for Modbus data transfer listings start at one. The first variable
network address of the AADvance Workbench is 1 and the first coil is 00001.

When managing Modbus variables, you can perform the following tasks in the Modbus
element:

Adding Modbus variables

AADvance Workbench 297


Renumbering the base addresses of Modbus variables

Allowing Modbus write on variables

Disabling Modbus write on variables

Removing Modbus variables

You can also configure Modbus Master and Slave protocols for use in the communication
services for controllers.

Defining a Modbus Slave

Defining a Modbus Master

To add a Modbus variable

When adding variables, these are placed at the top of the mapped variables list and are assigned
the next available base address.

1. In the Communication View, double-click the Modbus element.

The Communication property page is displayed.

2. In the property page, select the tab in which to map the variable, and then click Add
Variable.

298 AADvance 2.1 - Communication View


3. From the Variable Selector, locate the variable to use for the Modbus mapping, and then
click OK.

4. In the property page, enter the required value for the Base Address property.

5. For Coils and Holding Registers, set the Allow MODBUS Write property to the required
value.

The variable is added to the Modbus mapping list.

To renumber base addresses of Modbus variables

You can renumber the base addresses of Modbus mapped variables. Base address values are
assigned in the order of appearance in the list of mapped variables. Base addresses range from
1 to 65536; the default starting address value is 1.

1. In the Communication View, double-click the Modbus element.

The Communication property page is displayed.

2. In the property page, select the tab having the required mapped variables.

AADvance Workbench 299


3. In the list of mapped variables, select and right-click the variables to renumber, and then
click Renumber.

4. In the Renumber Addresses dialog box, specify the value to use for the base address of
the first selected variable, and then click OK.

The base addresses of the selected variables are renumbered starting from the specified value.

To allow the Modbus write attribute for Modbus variables

You can allow the Modbus write attribute for coils and holding registers mapped variables.

1. In the Communication View, double-click the Modbus element.

2. In the Communication property page, select the tab having the required mapped
variables.

3. In the list of mapped variables, select and right-click the variables for which to allow the
Modbus write attribute, and then click Allow MODBUS Write.

The Allow Modbus Write attribute is selected for the variables.

To disable the Modbus write attribute for Modbus variables

You can disable the Modbus write attribute for mapped variables. The Modbus write attribute
is only available for coils and holding registers variables.

1. In the Communication View, double-click the Modbus element.

2. In the Communication property page, select the tab having the required mapped
variables.

3. In the list of mapped variables, select and right-click the variables for which to disable
the Modbus write attribute, and then click Disable MODBUS Write.

The Allow Modbus Write attribute is disabled for the variables.

To remove Modbus variables

1. In the Communication View, double-click the Modbus element.

300 AADvance 2.1 - Communication View


2. In the Communication property page, select the tab from which to remove mapped
variables.

3. In the list of mapped variables, select the variables to remove, and then click Remove
Selected.

The selected variables are removed from the Modbus mapping list.

To delete a Modbus object


In the Communication View, right-click the Modbus slave, master, or master slave, and
then click Delete.

AADvance Workbench 301


Defining a Modbus Slave

The AADvance controller can operate as a Modbus slave, supporting up to a maximum of 10


Modbus slaves on each processor module. A controller having three processor modules
supports up to 30 Modbus slaves.

Note: As a Modbus slave device, the controller only transmits data upon a request from a
Modbus master and does not communicate with other slaves.

When configuring a controller as a Modbus slave, you need to select whether the slave uses a
serial or Ethernet connection. The connection type affects the slave properties such as the
available protocols and ports.

Serial Slave Connection

Serial Port The serial port used for Modbus communications. Possible value
is one of the following: S1-1, S1-2, S2-1, S2-2, S3-1, or S3-2.
Name Name of the Modbus slave.
Protocol When using a serial port, the controller supports Modbus RTU.
ID Represents the Slave ID for a serial connection. Possible values
range from 1 to 247; the default value is 1.
Port For serial connections, the Port field is disabled.
Comment Free-formatted text

Per processor, you can have a maximum of two Modbus slaves using a serial connection, one
per serial port. A controller having three processor modules supports up to six Modbus slaves
using serial ports.

Ethernet Slave Connection

Ethernet Port The Ethernet ports used for Modbus communications. Possible
value is one of the following slices: E1-1 and E1-2, E2-1, and
E2-2, or E3-1 and E3-2.
Name Name of the Modbus slave.

302 AADvance 2.1 - Communication View


Protocol When using an Ethernet connection, the controller supports
Modbus RTU and TCP; the default value is RTU.
ID Ethernet connections require a port. The Slave ID is 255.
Port Possible values range from 1 to 65535. For the RTU protocol, the
default value is 2000. For the TCP protocol, the default value is
502. Make sure the Port field matches the port expected by the
Modbus master.

Note: Modbus slaves having the same Modbus master must use
unique port numbers.
Comment Free-formatted text

Per processor, you can have a maximum of 10 Modbus slaves using an Ethernet connection. A
controller having three processor modules supports up to 30 Modbus slaves using Ethernet
ports.

To configure a Modbus slave

1. In the Communication View, expand the required controller, and then expand the
MODBUS element.

The MODBUS Slave and MODBUS Master elements are displayed.

2. Right-click the MODBUS Slave element, and then click Add New Slave.

3. In the Communication View, double-click the slave instance, then in the Communication
property page, select the connection type and define the required properties.

AADvance Workbench 303


Defining a Modbus Master

The AADvance controller can fulfill the role of a Modbus master to one or more Modbus slave
devices. Slave devices can include programmable logic controllers, remote devices (typically
with little or no processing capability) and, more rarely, other functional safety controllers
(Trusted or AADvance). A controller can have a maximum of 32 Modbus masters.

The AADvance controller supports the Modbus TCP and Modbus RTU protocols, as well as a
subset of Modbus commands. Each Modbus master can connect to only one Modbus TCP slave
device or to one or more Modbus RTU slave devices. You can use Modbus TCP with Ethernet
ports and Modbus RTU with point-to-point or multi-drop serial links. Serial links can use a
full-duplex, 4-wire connection, or a half-duplex, 2-wire connection.

The Modbus master functionality has a safety integrity level of zero (SIL0) and
should only be used for non-safety applications.

To use the AADvance controller as a Modbus master, you must perform the following:

Define the physical connections from the controller to the slave devices

Configure the characteristics for serial ports

Set up the project for Modbus master and configure the application

The Modbus master functionality is built into the 9110 processor module and the physical
communication ports are located on the 9100 processor base unit.

The following example displays possible arrangements for Modbus master connections:

304 AADvance 2.1 - Communication View


In the above example, the Modbus RTU slave devices are connected to one or more serial ports
on the controller; a common arrangement uses multi-drop (RS-485). In the example, the
engineering workstation and the Modbus TCP slave devices are connected to Ethernet ports on
different networks. You can also combine these devices to use the same network.

You can set up an individual list of messages (commands) for each slave device. Modbus read
commands cause data to be read from the slave device to the Modbus master, while Modbus
write commands cause data to be copied from the Modbus master to the slave device. You can
also define a sequence of broadcast write commands, which a Modbus master can send to
multiple Modbus RTU slaves without requiring an acknowledgment. The AADvance
controller can control and monitor individual Modbus master objects and their slave links.

AADvance Workbench 305


When selecting a serial or Ethernet connection type, you must also select the required port. A
Modbus master uses one of two serial ports related to a processor module. When choosing an
Ethernet connection, the master uses both ports related to the processor module (i.e. the
processor slice). Different Modbus masters can use different connection types and ports.

A processor module failure also causes the failure of the Modbus communications allocated to
that processor. Communication with slaves allocated to different processor modules are
unaffected.

When configuring a Modbus Master, you need to define the following properties:

Master Connection Indication of whether the master uses a Serial or Ethernet


connection.
The default connection type is Serial.
Port The serial or Ethernet port used for Modbus communications.
For a serial connection, the possible value is one of the following:
S1-1, S1-2, S2-1, S2-2, S3-1, or S3-2.
For an Ethernet connection, the possible value is one of the
following slices: E1-1 and E1-2, E2-1, and E2-2, or E3-1 and
E3-2.
Name Name of the Modbus master. Possible values are any combination
of alphanumeric characters and punctuation including spaces.
Protocol When using a serial port, the controller supports Modbus RTU.
When using an Ethernet connection, the controller supports
Modbus TCP.

306 AADvance 2.1 - Communication View


Timeout (ms) The period of time the Modbus master waits for a response from
its slave devices before retrying or assuming that the slave is
unavailable.The timeout is common to all slaves configured to a
particular master. The Modbus master uses the timeout for each of
its configured slaves to determine whether they are still
communicating. If a slave does not respond within this period
(and a specific number of retries), it is deemed to have failed. The
number of retries is defined for individual slave devices.
Possible values are 0 to 60000 milliseconds; the default value is
1000 ms.

Note: To avoid unexpected behaviors in the processor when using


Modbus TCP communications, you should wait at least 100 ms
before attempting to reconnect to the slave device.
Control Address The address of a control register. When using a control variable,
the Modbus address of the holding register. The application may
write the control variable to switch the state of the master.
0 = inactive, the Modbus master is disabled; the link is inactive,
there is no communication activity, and all slaves are inactive.
1 = standby, the Modbus master is forced to operate in standby
mode; the link is active but no data is transferred.
2 = active, the Modbus master is forced to operate in active mode;
the link is active and transfers data.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.

AADvance Workbench 307


Status Address The address of a status register (a holding register). The status
register, is a UINT returned by the Modbus driver to let the
application monitor and act on Modbus master faults.
0 = healthy, the Modbus master is operating normally; the link is
active and no errors are reported.
1 = initializing
2 = error, the Modbus master has an error and is disabled, or is
unable to make a link.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.
Message Wait Interval Enables AADvance to support legacy Modbus slave devices
(ms) having slow communication response times. Only serial RTU
links are supported.
Possible values range from 0 to 65535 milliseconds; the default
value is 100 ms.
Statistics Mode Indicates the statistics reporting mode for the master. Possible
values are:

Disabled, the default reporting mode.

Last Rate, reports the length of the most recent scan time.

Maximum Rate, reports the longest scan time.

Average Rate, reports the average scan time.


Statistics are reported in hundredths of a second.
For the Last Rate, Maximum Rate, and Average Rate reporting
modes, you need to specify the Data Address and Reset Address
properties.
Data Address The holding register of the data variable. The data variable is
reported in hundredths of a second.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.

308 AADvance 2.1 - Communication View


Reset Address The holding register of the reset variable. Any non-zero value in
the reset variable resets the data variable to zero.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.
Comment Free-formatted text

All Modbus masters defined for a project (be they Modbus RTU or Modbus TCP) function
independently of each other. Each master polls its associated slave devices, to send the
messages scheduled for the slaves.

If a Modbus master encounters communication errors to a slave device, the master suspends
polling the slave for a length of time. The suspension enables polling other slaves on the same
master without pausing for the communications timeout on each cycle. At regular intervals, the
controller pings the non-communicating slave. When the slave responds to a ping, the polling
of the slave restarts on the next cycle.

Note: If the controller receives error messages with the replies from a slave, the slave remains
in the polling cycle since the controller does not treat error messages as a communication
failure.

To define a Modbus master

1. In the Communication View, expand the required controller, and then expand the
MODBUS element.

The MODBUS Slave and MODBUS Master elements are displayed.

2. Right-click the MODBUS Master element, and then click Add New Master.

3. Double-click the MODBUS Master instance.

The Communication property page is displayed with the Master properties.

4. In the property page, select the required Master Connection and Port, and then define the
required properties.

AADvance Workbench 309


Defining a Modbus Master Slave

You define Modbus master slaves for existing Modbus masters. A controller and a Modbus
master can have a maximum of 64 master slaves. When adding a master slave, you are creating
a link between the Modbus master and slave device. Each master slave device represents a
server. When configuring a Modbus master, you need to define general and messages
properties.

Important: If the Modbus master is configured for Modbus TCP, only create one master slave
link. If you reconfigure a Modbus RTU master having multiple slave links to Modbus TCP,
you can only keep one master slave and must delete the other links.

Every Modbus master slave link contains a pair of holding registers: a control register and a
slave register. The control register enables the application to control the link and port, while
the status register retrieves the status information. Each register is found at a unique address
and is defined using the Control Address and Status Address. Registers are optional. To use a
register, you must declare a variable for the register in the application variables and the address
must also be specified in the holding registers.

The following are the general properties:

Name Name of the Modbus master slave. Possible values are any
combination of alphanumeric characters and punctuation
including spaces.
Slave ID Unique identifier for the Modbus master slave.
When the protocol of the master is RTU, possible values range
from 1 to 247; the default value is 1.
When the protocol of the master is TCP, possible values range
from 1 to 255; the default value is 255.

310 AADvance 2.1 - Communication View


Control Address The address of a control register. When using a control variable,
the Modbus address of the holding register. If a control variable
address is unspecified, the link is automatically enabled once the
controller starts. The application may write the control variable to
switch the state of the master slave.
0 = inactive, the slave link is disabled and the slave is not polled
or pinged.
1 = standby, the slave is forced to operate in standby mode.
Modbus continues to ping the slave to ensure communications are
possible.
2 = active, the slave is forced to operate in active mode and is
polled for data.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.
Status Address The address of a status register (a holding register). The status
register is a UINT returned by the Modbus driver to let the
application monitor and act on faults. If a status register address is
not specified, the master slave link does not report the status
information to the application.
0 = healthy, the Modbus slave is operating normally; the link is
active and no errors are reported.
1 = initializing, the slave link is initializing. This value is also
reported if the slave device has failed to respond to a ping on a
standby link, if the Modbus master is in error, or if the master is
set to inactive.
2 = error, the last message to the slave resulted in an exception
response.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.
Slave Wait Interval (ms) The minimum amount of time to wait from the start of one
message to the beginning of the next message. Possible values
range from 0 to 65535 milliseconds; the default value is 100 ms.

AADvance Workbench 311


Retries The number of times the master tries to retransmit a message
when receiving no response from the slave. This property is used
in conjunction with the Modbus master Message Wait Interval
value.
Possible values range from 0 to 10; the default value is 3.
Slave IP For TCP connections, the network address used by master slave.
Possible values range from 0.0.0.0 to 255.255.255.255.255; the
default value is 0.0.0.0.
Slave Port For TCP connections, the port number on which the slave device
is offering services.
Possible values range from 0 to 65535; the default value is 502.

Note: Modbus slaves having the same Modbus master must use
unique port numbers.

312 AADvance 2.1 - Communication View


Ping Mode Tests the communications between the master and slave and
determines the action the master takes if no response is received
from the slave after the specified number of Retries.
The AADvance controller supports a Function Code 08 ping
mode for Modbus RTU slaves. Function Code 08 sends a
diagnostic message to the operational slave. If supported by the
slave, select Function Code 08 since it is a short message.
Alternatively, the Read Holding Register mode reads data from
the holding register. You can also set a Do Not Ping setting for
both protocols.
For Modbus RTU, the possible values are Do Not Ping, Function
Code 08, and Read Holding Register.
For Modbus TCP, the possible values are Do Not Ping or Read
Holding Register. Read Holding Register is the only method
available to ping a Modbus TCP slave.
When the Ping Mode is Do Not Ping or Function Code 08, the
Ping Address property is disabled.

Note: You are not recommended to use the Do Not Ping mode
since the master does not look for the slave after disconnection.
When using Do Not Ping, communications only restart when there
is a change to the control register of the master or slave.
Ping Interval The maximum time between each initiation of a Read Holding
Register or Function Code 08 diagnostic message and specified
individually for each master slave.
Possible values range from 0 to 65535 milliseconds; the default
value is 5000 ms.
Ping Address For use with the Read Holding Register ping mode and specified
individually for each master slave; it is the Modbus address of the
slave holding register.
Possible values range from 1 to 65536, or 0 to disable; the default
value is 0.

AADvance Workbench 313


Statistics Mode Indicates the statistics reporting mode for the master slave.
Possible values are:

Disabled, the default reporting mode.

Last Rate, reports the length of the most recent scan time.

Maximum Rate, reports the longest scan time.

Average Rate, reports the average scan time.


Statistics are reported in hundredths of a second.
For the Last Rate, Maximum Rate, and Average Rate reporting
modes, you need to specify the Data Address and Reset Address
properties.
Data Address The holding register of the data variable. The data variable is
reported in hundredths of a second.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.
Reset Address The holding register of the reset variable. Any non-zero value in
the reset variable resets the data variable to zero.
Possible values are 1 to 65536, or 0 to disable; the default value is
0.
Comment Free-formatted text

Modbus Statistics

The AADvance controller has a cycle timer and counters to generate statistics for each slave.
The statistics are available to the application, enabling to react accordingly or report that a link
is operating correctly. These statistics are also used by diagnostic commands.The application
can read the statistics as variables (the address of each variable must be specified) and can also
reset the statistics to zero. Statistics are only available for point-to-point message transfers.

During operation, the statistics are updated on the first message of each slave and on the first
slave linked to each master to provide the slave and master cycle times. The Workbench also
verifies the application interface to see if a statistics reset is required.

314 AADvance 2.1 - Communication View


Meanwhile, the Modbus master measures the overall scan time. A scan measures the time from
the start of the first slave until looping back to the first slave, and then a new scan starts. The
statistics are updated on the first message of each slave and on the first slave linked to each
master to provide the slave and master scan times. The Workbench also verifies the application
interface to see if a statistics reset is required.

The AADvance Workbench also uses these application variables to supply diagnostic
information such as the status of the communication link and the Modbus slave devices
connected to the link.

Modbus Exception Responses

The AADvance controller uses the absence of a response from a slave device to identify an
error on a link between a master and slave. When the AADvance controller operates as a slave,
in some cases the controller can report the following exception codes through the application:

Code Name Description


01 Illegal Function The function code received in the query is not a permitted
action for the slave. Code 01 represents an unknown or
unsupported function in the AADvance controller.
If a Poll Program Complete command was issued, this code
indicates that no program function preceded the command.
02 Illegal Data Address The data address received in the query is not a permitted
address for the slave. The AADvance controller raises Code 02
when a request specifies an address outside of the 0 to 65536
16-bit range.
03 Illegal Data Value A value contained in the query data field is not a permitted
value for the slave. Code 03 is only raised for boolean coil
writes.

AADvance Workbench 315


Code Name Description
04 Slave Device Failure An unrecoverable error occurred while the slave was
attempting to complete instructions. Code 04 represents an
internal error in the AADvance controller.
06 Slave Device Busy The slave is processing a long-duration program command.
The master must retransmit the message once the slave is free.
When the AADvance controller is busy, Code 06 is raised
while the controller waits for the application to download or
start. The controller can report itself to be busy.

The Modbus protocol allows these errors to pass by returning an error frame to the master. The
error frame consists of the originally requested function code with the high bit set and a data
field having the error code. The Modbus master locates these codes and considers them general
errors to the slave device. The slave status variable is set to Slave Error, enabling the
application to respond to the exception.

To define a Modbus master slave

You can define Modbus master slaves for existing Modbus masters.

1. In the Communication View, expand the required controller, and then expand the
MODBUS element.

The MODBUS Slave and MODBUS Master elements are displayed.

2. Expand the MODBUS Master element, right-click the existing Modbus master, and then
click Add New Master Slave.

3. Double-click the master slave instance, and in the Communication property page, define
the required properties and messages:

a) On the General tab, define the required general properties.

b) On the Messages tab, specify the messages for the slave.

316 AADvance 2.1 - Communication View


Defining Modbus Master Slave Messages

You can set up an individual list of messages (commands) for each slave device. A Modbus
master can support a maximum of 400 messages from slave devices. A Modbus master
Modbus read commands cause data to be read from the slave device to the Modbus master,
while Modbus write commands cause data to be copied from the Modbus master to the slave
device. You can also define a sequence of broadcast write commands, which a Modbus master
can send to multiple Modbus RTU slaves without requiring an acknowledgment. The
AADvance controller can control and monitor individual Modbus master objects and their
slave links.

When adding messages, these have the following properties:

Command Read Coils Reads the coil status in a remote slave device. You
can have a maximum Count of 2000 coils for
each message.
Read Discrete Inputs Reads the discrete input (coil) status in a remote
slave device. You can have a maximum Count of
2000 inputs for each message.
Read Holding Registers Reads the holding registers in a remote slave
device. You can have a maximum Count of 125
registers for each message.
Read Input Registers Reads the input registers in a remote slave device.
You can have a maximum Count of 125 registers
for each message.
Write Coils If the Master Space is Coils, forces each coil in a
sequence of coils on and off in a remote slave
device.
If the Master Space is Discrete Inputs, writes to
each discrete input in a remote slave device.
You can have a maximum Count of 2000 coils or
inputs for each message.
Write Holding Registers Writes to the holding or input registers. You can
have a maximum Count of 125 registers for each
message.

AADvance Workbench 317


Master Space Depending on the Command, possible values are Coils, Discrete Inputs,
Input Registers, or Holding Registers.
- For Read Coils or Read Discrete Inputs, the value is Coils.
- For Write Coils, the value is either Coils or Discrete Inputs.
- For Read Input Registers or Read Holding Registers, the value is Holding
Registers.
- For Write Holding Registers, the value is either Input Registers or
Holding Registers.
Slave Address Possible values are 1 to 65536; the default value is 1.
Master Address Possible values are 1 to 65536; the default value is 1.
Count When the Command is Read Coils, Read Discrete Inputs, or Write Coils,
the value ranges from 1 to 2000; the default value is 1.
When the Command is Read Input Registers, Read Holding Registers, or
Write Holding Registers, the value ranges from 1 to 125; the default value
is 1.
Control The address of a control register. When using a control variable, the
Modbus address of the coil register. Possible values range from 1 to 65536,
or 0 to disable; the default value is 0. When the address of a control
variable is unspecified, the link is automatically enabled once the controller
starts. The application may write to the control variable to switch the state
of the master slave.
True = The slave is not polled
False = The slave is polled for data
Comment Free-format text

All Modbus master objects defined for a project (be they Modbus RTU or Modbus TCP)
function independently of each other. Each master polls its associated slave devices, to send
the messages scheduled for the slaves.

318 AADvance 2.1 - Communication View


For Modbus RTU, a master polls its slave devices one at a time, executing one message for
each slave in turn. Different slaves attached to the same master usually need a different
numbers of messages. To accommodate this, the master proceeds to work through the
messages listed for the slaves, one message for each pass, returning to the first message for a
slave after it has sent the last one. This means that some messages (for slaves with fewer
scheduled messages) are sent more than once during a polling cycle. The polling cycle
completes when the Modbus master has made an equal number of polls to each slave and has
sent every message; the cycle then starts again.

Example

The following example displays the message schedule for a master having three slaves
requiring a different number of messages:

AADvance Workbench 319


The total number of messages that the master must send in a complete polling cycle is equal to
the largest number of messages scheduled for any slave, multiplied by the total number of
slaves. In the previous example, the total number of messages is 4 x 3 = 12. Nine messages are
specified for the three slaves. The message scheduling mechanism sends three of these
messages twice, making a total of 12 messages sent. The following table lists the sequence of
messages for the serial communications link in the previous example:

Sequence Slave Message Remarks


Number
1 1 1
2 2 1
3 3 1 End of first pass through all the slaves
4 1 2
5 2 2 End of pass through slave 2
6 3 2
7 1 3
8 2 1 Repeat message
9 3 3 End of pass through slave 3
10 1 4 End of pass through slave 1
11 2 2 Repeat message
12 3 1 Repeat message; end of poll

To add messages for a Modbus master slave

You can add messages to Modbus master slaves.

1. In the Communication View, expand the required MODBUS master, and then
double-click the required MODBUS master slave.

The Communication property page is displayed with the General and Messages tabs.

2. In the property page, click the Messages tab.

3. To add a message, click Add Message, and then specify the message properties.

320 AADvance 2.1 - Communication View


4. If you need to change message order, select the message to move, and then click Move
Up or Move Down.

To remove messages from a Modbus master slave

1. In the Communication View, expand the required MODBUS master, and then
double-click the required MODBUS master slave.

The Communication property page is displayed with the General and Messages tabs.

2. In the property page, click the Messages tab.

3. To delete messages, select the required messages in the grid, and then click Remove
Selected.

AADvance Workbench 321


Specifying the Workbench and OPC
Communications
For communication with the OPC portal, the Workbench uses an Ethernet port from those
defined for the controller processors. By default, the first configured Ethernet port is selected
for communications. You can also select different ports. To enable Workbench and OPC
communications, you must map variables for the following:

OPC

SOE

To select an Ethernet port for Workbench and OPC communications

1. In the Communication View, expand the controller, and double-click Workbench &
OPC.

The Communication property page for the Workbench and OPC is displayed.

2. In the property page, select a configured Ethernet port.

Workbench and OPC use the defined port for communications.

See Also
Defining Ethernet Ports

322 AADvance 2.1 - Communication View


Mapping OPC Variables

The AADvance Workbench enables the write access from the Workbench OPC portal without
restricting access. You can only allow OPC write for variables from the OPC-specific
Communication property page.

By default, the following options to map OPC variables are selected (True):

Include Server Constants

Include Server Functions

Auto-include All Variables

Note: When Auto-include All Variables is selected, all of the controller’s variables are added
to the list of mapped variables.

AADvance Workbench 323


To map OPC variables

When adding or removing individual variables, the Auto-include All Variables option must be
cleared.

1. In the Communication View, expand the required controller, and then expand the
Workbench & OPC element.

2. Double-click OPC.

The Communication property page displays the variables mapped for OPC
communication.

324 AADvance 2.1 - Communication View


3. In the property page, select whether to include server constants and include server
functions.

4. To automatically include all variables for the OPC service, select Auto-include All
Variables. You can also choose to add all of a controller’s variables by clicking Add All
Variables.

5. To add individual variables to the list, click Add Variable, and then choose the required
variable from the Variable Selector.

6. To remove a variable, select a variable from the list, and then click Remove Selected.

To allow OPC write for variables

You can enable OPC write for variables mapped for OPC communications.

1. In the Communication View, expand the required controller, and then expand the
Workbench & OPC element.

2. Double-click OPC.

The Communication property page displays the variables mapped for OPC
communication.

3. In the property page, in the Allow OPC Write column, select the required variables.

The variables are enabled for OPC write.

AADvance Workbench 325


Mapping SOE Variables

The AADvance Workbench supports a Sequence of Events (SOE) service for boolean
variables. When an SOE service is defined, you can define the following SOE properties for
variables:

Property Definition Possible Values


Falling-edge The indication of whether the service detects a Possible values are 0 to
Severity fall from TRUE to FALSE. When selected, the 1000; the default value is
service detects a falling edge; when cleared, the 1.
service ignores the transition.
Rising-edge The indication of whether the service detects a Possible values are 0 to
Severity rise from FALSE to TRUE. When selected, the 1000; the default value is
service detects a rising edge; when cleared, the 1.
service ignores the transition.
Filter time The minimum time lapse between two events. Possible values range
from 0 to 65535 ms; the
default value is 0 ms.
Reference Variable of any elementary data type
Variable

SOE is dependent on the scan time. When you map a wired input variable to SOE and the state
changes, the variable uses the timestamp local to the I/O module. When you map an unwired
variable to SOE and the state changes, the variable uses the timestamp voted by the processors
at the beginning of the application cycle.

326 AADvance 2.1 - Communication View


To map SOE variables

You can add and remove variables from the SOE variables list. For SOE variables, you can also
define the falling-edge severity, rising-edge severity, filter time, as well as reference a variable.

1. In the Communication View, expand the required controller, and then expand the
Workbench & OPC element.

2. Double-click SOE.

The Communication property page displays the variables mapped for SOE
communication.

3. In the property page, add the required variables by clicking Add Variable.

4. For each variable, specify the following properties:


Falling-Edge Severity
Rising-Edge Severity
Filter Time (ms)
Reference Variable

AADvance Workbench 327


5. To remove a variable, select a variable from the list, and then click Remove Selected.

328 AADvance 2.1 - Communication View


Configuring Serial Ports
The AADvance controller provides up to six serial communication ports, two for each 9110
processor module present. Each pair of serial ports is identified as Sn-1 and Sn-2 where n
indicates the processor module:

[S1-1 and S1-2]

[S2-1 and S2-2]

[S3-1 and S3-2]

The serial port settings define the protocol type and the data characteristics of the individual
serial ports.

Name Name of the serial port


Baud Rate The baud data transfer rate, in milliseconds. Possible values are 1200, 2400,
4800, 9600, 19200, 38400, 57600, 76800 or 115200; The default value is
19200.
Data Bits The number of bits representing one character of data in a transmission.
Possible values are 5, 6, 7, and 8; The default value is 8.
Parity The type of parity used. Possible values are None, Even, and Odd; The default
value is None.
Stop Bits The number of stop bits used to indicate the end of a transmission. Possible
values are 1 or 2; The default value is 1.
Type The protocol to use for the serial port. Possible protocols are the following:

RS485fd - Full-duplex, 4-wire connection with separate buses for transmit


and receive

RS485fdmux - Full-duplex, 4-wire connection with separate buses for


transmit and receive and tri-state outputs on the transmit connections

RS485hdmux - Half duplex, 2-wire connection


The default property is RS485hdmux. fd indicates full duplex and hd indicates
half duplex.
Comment Free-formatted text for the serial port

AADvance Workbench 329


Note: Most systems use two bits after each data byte. These bits are either a parity bit (odd or
even) and one stop bit, or no parity and two stop bits.

To configure serial ports

You can choose to configure the serial ports from a list or select them individually by
expanding Serial element.

1. In the Communication View, expand the required controller, and then double-click the
Serial element.

The Communication property page displays the serial ports.

2. In the property page, specify the properties for the individual serial ports.

330 AADvance 2.1 - Communication View


Configuring the Controller for SNTP
You can use the SNTP server to automatically set the real time clock (RTC), ensuring each
controller uses the same date and time for time-related services, events, and log files.

Note: You are strongly recommended to use SNTP to synchronize controllers.

The AADvance controller supports a fault-tolerant Simple Network Time Protocol (SNTP)
service, synchronizing the date and time used by the networks of the system. The NTP protocol
enables time to be communicated using networks. Synchronizing the date and time used by
controllers facilitates using the Sequence of Events (SOE) service for boolean variables,
log-based troubleshooting, as well as increasing the dependability of other investigations.

You can configure a controller in one of two modes for SNTP:

SNTP client

SNTP server

Controllers are usually configured as SNTP clients, receiving the time from a dedicated time
server. When no dedicated time server is available, the AADvance controller can be used as an
SNTP server. Using a local time server enables broadcasting. Broadcasting is considered the
most efficient and predictable way to circulate the time to many clients.

Attention: Using an NTP time server from the Internet is not


recommended for industrial applications since the network transmission
delays are unpredictable.

You can use one of the following methods to provide a network time server:

AADvance Workbench 331


Hardware time server Retrieves the time of day from multiple sources such as GPS
satellites, radio-based international time standards (e.g. DCF 77 in
Germany), and the internal clock of the hardware. The hardware time
server is the most adaptable option.
Software time server A computer-based NTP server. The program enables controlling and
configuring the NTP services for Windows. Certain programs also
enable switching between configurations, changing service settings,
extracting related log entries, and displaying the current status of
local and external NTP services.
Processor module The AADvance controller uses the real time clock of one of the 9110
processor modules. The default value for a new processor module is
January 1, 1900.

Note: You can configure any of the three processor modules as time
servers. When one processor module is configured as an SNTP server,
the other processor modules, including the module set as the server,
must not be configured as SNTP clients.

The processor modules of the controller automatically agree on the


time.

Whether configuring SNTP as a client, server, or both, you must always select both Ethernet
ports of a processor slice (even when only a primary server is required). The first Ethernet port
selected in the list is considered the primary network time server. The secondary time server is
only used when no primary network time server is visible.
Configuring a Controller as an SNTP Client

As an SNTP client, the AADvance controller accepts the current time from an external
Network Time Protocol (NTP) or SNTP network time server.

The SNTP client receives the real time clock data from the primary network time server.

Important: Modifications to the SNTP settings are active after the power has cycled.

The SNTP client settings provide the following information to the controller:

Enable SNTP Client Indication of whether the controller is configured as an SNTP


client
SNTP Client Mode Operating mode for the time synchronization signal used by the
processors for setting their real time clock.
- Unicast where the SNTP client actively polls the configured
servers and uses their responses. The polling rate (19s) is based on
the drift rate of the real time clock and cannot be configured.
- Broadcast where the SNTP client passively waits for regular
broadcasts from the server. This reduces network traffic and the
load on the servers.
Ethernet Port Ethernet port of the controller

AADvance Workbench 333


SNTP Server IP Address IP address of the network time server. Non-fault tolerant
operations require one SNTP server for a processor. Other
processors will automatically synchronize to the server and inherit
the time. Fault-tolerant SNTP client operations require more than
one server address.
If only a primary time server is required, you can set the
secondary time server IP address to the null value of 0.0.0.0.
Required SNTP Version The version of the SNTP server. Possible versions are SNTPv1,
SNTPv2, SNTPv3, SNTPv4, or Any. When the version of the
NTP/SNTP that the server offers is unknown, choose Any. This
latest option disables some validation aspects of the incoming
signal.

To configure a controller as an SNTP client

1. In the Communication View, expand the required controller, and then double-click
SNTP.

The Communication property page is displayed

2. From the property page, in the SNTP Client section, select Enable SNTP Client.

3. Specify the SNTP Client Mode for each server:


To use the broadcast mode where the SNTP client passively waits for regular
broadcasts from the server, from the drop-down combo box, click Broadcast.
To use the unicast mode where the SNTP client actively polls the configured servers
and uses their responses, from the drop-down combo box, click Unicast.

4. Select the required Ethernet Ports and then define the SNTP Server IP Address property
for the required servers.
For a non-fault tolerant operation, define one SNTP server for only one processor.
The other processors will automatically synchronize to the first processor and inherit
the time.
For a fault-tolerant SNTP client operation, define more than one server address.

334 AADvance 2.1 - Communication View


Note: The first address represents the primary server and the second address represents the
secondary server for each processor module. At start up, the SNTP client chooses the primary
server of the lowest slice; if no primary signal is valid, the SNTP client looks for an active
secondary server signal.

5. Define the Required SNTP Version property for each required pair of servers for the
processor modules.

Note: When the NTP/SNTP server version is unknown, use the Any option, disabling some
validation aspects of the incoming signal.

AADvance Workbench 335


Configuring a Controller as an SNTP Server

The AADvance controller can fulfill the role of a primary or secondary SNTP server to provide
a network time signal throughout the network.

SNTP servers can operate in broadcast and unicast time synchronization signal modes. For
both modes, specifying a directed broadcast address for an interface enables serving time on
the interface. This method of configuring is derived from the NTP configuration command
language. For an interface, the directed broadcast address:

= ( (IP address for interface) bitwise-and (subnet-mask) ) bitwise-or (bitwise-not subnet-mask)

For example, if the IP address for an interface is 10.10.1.240 and its subnet-mask is
255.255.255.0, then the directed broadcast address is:

= ((10.10.1.240) bitwise-and (255.255.255.0)) bitwise-or (bitwise-not 255.255.255.0)

= (10.10.1.0) bitwise-or (0.0.0.255)

= (10.10.1.255)

Important: Modifications to the SNTP settings are active after the power has cycled.

336 AADvance 2.1 - Communication View


The SNTP server settings provide the following information to the controller:

Enable SNTP Server Indication of whether the controller is configured as an SNTP


server
SNTP Server Mode Operating mode for the time synchronization signal used by the
processors for setting their real time clock. You can configure the
9110 processor module as one of the following:
- Unicast, where the server waits to be polled by a client and then
responds with a time signal; it will not broadcast any time signals.
- Broadcast, where the controller regularly transmits a time signal:
it will also respond to unicast polling requests from clients.
Broadcasting is the most efficient mode when several devices rely
on the server for the time of day.
Ethernet Port Ethernet port of the controller
SNTP Broadcast IP address for the interface. Setting the Broadcast IP Address to
Address Mask zero (0.0.0.0) for a processor disables the server on that interface.
Broadcast Poll (seconds) The broadcast polling time, in seconds. Possible values range
from 4 to 1024; The default value is 10.

To configure a controller as an SNTP server

You need to configure each pair of servers for all processor modules.

1. In the Communication View, expand the required controller, and then double-click
SNTP.

The SNTP property page is displayed

2. From the property page, in the SNTP Server section, select Enable SNTP Server.

3. Select the required Ethernet Ports, and then define the SNTP Server Broadcast Address
Mask and Broadcast Poll (seconds) properties for the required servers.
To disable the server, set the IP address to 0.0.0.0
For a non-fault tolerant operation, define one SNTP server for only one processor.
The other processors will automatically synchronize to the first processor and inherit
the time.

AADvance Workbench 337


For a system requiring a fault-tolerant operation, define more than one server IP
address.

4. Specify the SNTP Server Mode for each server:


To use the unicast mode where the controller waits to be polled by a client and
responds with a time signal without broadcasting any time signals, from the
drop-down combo box, click Unicast.
To use the broadcast mode where the controller regularly broadcasts and responds to
unicast polling requests on the network, from the drop-down combo box, click
Broadcast.

338 AADvance 2.1 - Communication View


Using a Controller as an SNTP Client and Server

In a system having many AADvance controllers, configuring one controller as a client and
server can be helpful. The controller becomes the client of a hardware or software network time
server and transmits the date and time to the other controllers configured as clients. A controller
being both a client and server can reduce the load on the server when the clients are using
unicast.

See Also
Configuring a Controller as an SNTP Client
Configuring a Controller as an SNTP Server

AADvance Workbench 339


Configuring Serial Tunneling
Serial tunneling enables running a controller in transparent communication (TCI) mode where
the controller supports direct routing of traffic between Ethernet ports and serial ports,
providing a terminal server interface to elements attached to the serial ports. Transparent
communication mode is only available when the controller is not executing an application.
While in grandparents communication mode, TCP/IP port address indicates the serial port to
which is routed the Ethernet connection. Each serial port must have a unique TCP/IP port
address. The TCP/IP port addresses for the serial ports are the following:

10001 for S1-1


10002 for S1-2
10003 for S2-1
10004 for S2-2
10005 for S3-1
10006 for S3-2

Each available serial port shall support a single TCP/IP connection. You cannot establish a TCI
TCP/IP connection to an unavailable serial port, i.e., where the corresponding processor
module is not present or is inactive. Serial ports retain their configured settings for TCI mode.

You can establish TCI links between any serial port and any Ethernet port (i.e., the Ethernet
and serial ports may be for different processor modules).

When a TCI link is established, any incoming data from the TCP/IP connection is transmitted
to the serial port and any incoming data from the serial port is transmitted to the TCP/IP
connection. Incoming data from the TCP/IP connection is immediately transmitted to the serial
port. Incoming data from the serial port is transmitted to the TCP/IP connection when one of
the following conditions occurs:

The elapsed time between received characters exceeds the specified Idle Time value

The total number of characters received reaches 256

Connections only transmit valid characters; Connections ignore characters having errors such
as parity or framing.

340 AADvance 2.1 - Communication View


When configuring serial tunneling, individual serial ports are assigned to a TCP port. For each
port, you need to specify the following properties:

Inactivity Time The period of time where no data flows through the TCP
connection (in either direction) before the TCI function closes
down the connection, in seconds. Closing the connection prevents
a dormant connection being kept open. In any case, if the
controller is re-enabled any TCI connections will be closed.
Possible values are 1 to 65535; The default value is 600.
Idle Time The period of time waiting for incoming characters from a serial
device, in milliseconds. When a complete packet is received,
AADvance forwards the data through the Ethernet interface. If
idle time is 0, individual characters are forwarded in their own
TCP segment, wasting much bandwidth and processing time.
Possible values are 1 to 1000; the default value is 3.

For online changes, while the system is operational, you can enable or disable transparent
communications operations and modify the Inactivity Time and Idle Time properties.

To configure serial tunneling (transparent communication)

1. In the Communication View, expand the required controller, and then double-click Serial
Tunneling.

The Serial Tunneling property page is displayed.

2. In the Serial Tunneling property page, select Enable Serial Tunneling.

3. For each port, define the Inactivity Time and Idle Time properties.

AADvance Workbench 341


Defining Bindings
Bindings are links, i.e., access paths, between variables located in different controllers
belonging to the same project. You can define bindings between variables of the same type.
From a controller, bindings are defined as having a producer variable sending values to a
consumer variable.

The controller consuming the data establishes a binding link with the controller producing the
data. The controller also schedules sending and receiving data, sending diagnostic data,
managing the safety response when faults occur, and managing communications redundancy.

When defining bindings, controllers must be connected via the SNCP (Safety Network Control
Protocol) network. The SNCP network is a SIL 3 certified protocol supplying a safety layer for
the Ethernet network. The following diagram displays an SNCP network:

342 AADvance 2.1 - Communication View


The controllers requiring a binding link must be physically connected to each other. The SIL
rating of the communications interface is unaffected by the design of the Ethernet network, but
the network reliability and spurious trip rate are impacted. SNCP network data can be
combined on a common network resulting in safety and non-safety data sharing a physical
network. The SIL rating is unaffected by using a common network, but introduces failure
modes as well as possible security risks increasing the spurious trip rate.

SNCP networks can be configured as simplex (fail-safe) or redundant (fault tolerant). The
network configuration depends on the application safety and availability requirements. Since
the connection between controllers is treated as a logical network, sending and receiving data
occurs independently from the physical network.

For individual controllers, variable binding definitions are available from both the producer
mapping and consumer mapping perspectives. For example, you can view the C1_Var1
(Producer) to C2_Var1 (Consumer) binding between Controller1 and Controller2 from the
Produce Mapping view for Controller1 or the Consume Mapping section for Controller2.

Note: When importing or adding existing controllers having bindings, these controllers must
keep the same number and name as when exported to retain binding definitions. Therefore,
before importing or adding such controllers, make sure to renumber and rename conflicting
controllers.

Bindings use the parameters defined for the producer controller; parameters defined for the
consumer controller are ignored. Multiple consumers can connect to a single producer. A
single consumer can connect to multiple producers. A producer can also be a consumer and
vice versa.

Variables are not updated in the consuming controller until the producing controller sends the
values through the binding media:

AADvance Workbench 343


Producer

Binding
Consumer

No update of the variable on that cycle

AADvance does not impose the read-only accessibility for consumed variables. However, to
avoid conflicts between bindings and the execution of POUs, it is highly recommended to
declare consumed variables with the read-only attribute.

Before defining bindings between controllers, you need to create a link enabling the transfer of
variable values between these controllers. For each controller, you need to specify the Ethernet
port allowing communication and the SNCP link properties.

Consume Status Variables for Bindings

To test values for the binding status, you should create the following defined words in the
dictionary for your project:

Status Message Value Description


SNCP_KVB_ERR_BINDING_READY 0 Normal steady state data exchange.
The binding link is healthy.
SNCP_KVB_ERR_BINDING_IN_PROCESS 1 Producer and consumer are in the
process of connecting
SNCP_KVB_ERR_UPD_IN_PROCESS 2 Producer and consumer are in the
process of reconnecting following an
online update

344 AADvance 2.1 - Communication View


Status Message Value Description
SNCP_KVB_ERR_UPD_TIMEOUT 3 Producer and consumer did not
reconnect within Update Timeout
milliseconds following an online
update
SNCP_KVB_ERR_NO_PRODUCER 4 At the beginning of a connection or
following Bind Response Timeout
milliseconds during data exchange
SNCP_KVB_ERR_BAD_CRC 5 Producer and consumer binding table
CRC mismatch during connection
SNCP_KVB_ERR_IMPOSSIBLE_TO_BIND 6 Conversion of structures not supported
on heterogeneous binding link
SNCP_KVB_ERR_IP_DENIED 7 Producer only error, indicating a
consumer with an unknown or
unexpected IP address is requesting
binding links. The link is denied.
SNCP_KVB_ERR_BAD_PRODUCER_ID 8 Producer only error, indicating the
producer has received a binding link
request from a consumer containing an
unexpected producer identity. The link
is denied.
SNCP_KVB_ERR_BAD_GROUP_ID 9 Producer only error, indicating the
producer has received a binding link
request from a consumer but the
request does not contain a known
bound variable group identity. The link
is denied.

AADvance Workbench 345


Status Message Value Description
SNCP_KVB_ERR_BAD_BUFF_SIZE 10 Producer only error, indicating that
either the producer or consumer has
insufficient buffer space to translate
the bound variables. Unable to
establish the link.
SNCP_ERR_BAD_CONFIG 11 Producer only error, indicating the
producer is unable to obtain the IP
address of the consumer from the
network configuration file. The link is
denied.

To monitor the health of the bindings network, you can use the consume status variable and the
following function blocks: KvbConsNetStatus and KvbProdNetStatus.

You define bindings between controllers in the Bindings section of the Communication View:

Creating links between controllers

Mapping producer and consumer variable bindings for a controller

Binding Process

At the start-up of a binding process, the consume status variable is set to the
SNCP_KVB_ERR_NO_PRODUCER value and the consumer sends a "Request Connect"
message to the producer. When the producer receives the "Request Connect" message, it
validates the message, enters the consumer in a list, and sends a "Reply Connect" message if
accepted. If no response is received within Connect Timeout milliseconds, the consumer
sends another "Request Connect" message and this process continues until a "Reply Connect"
message is received from the producer. During the connection process, the consume status
variable value is set to the SNCP_KVB_ERR_BINDING_IN_PROCESS for the duration of
the application cycle while sending the "Request Connect" message.

When the consumer receives the "Reply Connect" message, it also validates the message and
may set the consume status variable value to SNCP_KVB_ERR_BAD_CRC if a mismatch
exists between the producer and the consumer CRC. If the connection is accepted, the consume
status variable is set to SNCP_KVB_ERR_BINDING_READY.

346 AADvance 2.1 - Communication View


Following this connection process, the consumer sends a "Request Bindings" message to the
producer at each application cycle. If the consumer receives a "Reply Binding" message with
the requested data in less than Max Age milliseconds, the bound variables are updated. The
consumer may sets its status variable value to SNCP_KVB_ERR_IMPOSSIBLE_TO_BIND
if the data contains a heterogeneous link impossible to convert. If no response is received
within Bind Response Timeout milliseconds, the consume status variable value is set to
SNCP_KVB_ERR_NO_PRODUCER, then the consumer sends a "Disconnect" message to
the producer and restarts the binding process. If the producer does not receive a "Request
Bindings" message within Bind Request Timeout milliseconds, the consumer is removed
from the producer’s list.

During an online change update, the following possibilities can occur:

The target is a producer or a consumer for the first time, the connection process is started
and proceeds as during start-up.

The target was and remains a producer, the producer clears the list of connected
consumers, loads new binding data, restarts the binding process and waits for a consumer
to request a connection.

The target was and remains a consumer, the consumer sends a "Disconnect" message to
the producer, loads new binding data and enters in a reconnection state. In the
reconnection state, the consume status variable is set to the
SNCP_KVB_ERR_UPD_IN_PROCESS value and the consumer sends a "Request
Connect" message to the producer. If an update behavior default value is defined, the
bound variable takes this value. The reconnection process following an online change is
the same as the start-up connection process except CRC errors are ignored since the
producer may not yet be updated. A reconnection attempt will also occur once every
Connect Timeout time lapse.

If the re-connection is successfully completed within Update Timeout milliseconds, the


consume status variable is set to the SNCP_KVB_ERR_BINDING_READY value and
begins sending "Request Bindings" messages. The online change update is over and
successful.

If the reconnection is not successfully completed within Update Timeout milliseconds,


the consume status variable is set to the SNCP_KVB_ERR_UPD_TIMEOUT value and
sends a "Disconnect" message to the producer, then restarts the process as during start-up.
The online change update is over and has failed.

AADvance Workbench 347


Creating Links between Controllers

Links between controllers enable the transfer of values between producer and consumer
variables defined in bindings. Before defining variable bindings, you need to create links
between controllers having producer variables and consumer variables to use in these bindings.

To use bindings, you must define at least one Ethernet port to be used by SNCP bindings. When
multiple ports are defined, each IP address is pinged to locate accessible links. Communication
occurs on the first Ethernet port (slice) selected in the list of ports; the other addresses continue
to be pinged. If a timeout occurs on the active link, communications switch to another IP
address. To use bindings, you must also configure the SNCP link properties.

The binding contains the following SNCP link properties:

348 AADvance 2.1 - Communication View


Consume Status Variable The wired variable used to report the health status of the link. The
data type of the variable must be DINT. A healthy binding link
returns a value of 0, while a link containing a fault returns a
non-zero value. See Consume Status Variables for Bindings.
Bind Request Timeout The time period the producer waits to receive a binding data
request from the consumer, in milliseconds. In the event of a
timeout, the consumer is disconnected. Subsequent requests from
the consumer are ignored until the consumer establishes a new
connection.

Note: The network binding parameters (i.e. timeout values) of the


consumer are found in the producing controller.
Possible values range from 0 to 65535 milliseconds. The default
value is 10000 milliseconds.
Bind Response Timeout The time period during which the consumer awaits binding values
from the producer, in milliseconds. In the event of a timeout, the
consumer can send another request (dependent on the value of
Max Age) or disconnects from the producer.
The number of requests sent is calculated as follows:
Max Age/Bind Response Timeout
Once disconnected, the consumer attempts to reestablish the
connection by sending a "connect" request at Connect Timeout
intervals.
Possible values range from 0 to 65535 milliseconds. The default
value is 1200 milliseconds.
Connect Timeout The time period during which a consumer awaits a connection
response from a producer, in milliseconds. In the event of a
timeout, the consumer sends another "connect" request. The
consumer continues to send requests until a connection is
established.
Possible values range from 0 to 65535 milliseconds. The default
value is 10000 milliseconds.

AADvance Workbench 349


Max Age The total time, in milliseconds, during which the consumer awaits
a valid response from the producer before considering the
physical network unhealthy. Stale, corrupt, and out of sequence
responses are considered invalid. Continuing to receive these
types of responses can indicate underlying network issues,
demonstrated by the unhealthy network status. The unhealthy
status is reported by the KvbConsNetStatus and
KvbProdNetStatus function blocks.
The number of requests is calculated as follows:
Max Age/Bind Response Timeout
The Max Age is also used to verify the age of the binding
response received by the consumer. If a response contains data
older than Max Age, the response is discarded. Discrepancies
may occur when a response is delayed due to network issues.
Possible values range from 0 to 65535 milliseconds. The default
value is 2500 milliseconds.
Update Timeout The timeout period during which a consumer and producer must
reconnect after an update has modified the binding information,
in milliseconds.

Important: Perform updates as quickly as possible to avoid


timeouts.
During the Update Timeout period, the configured consume
status variable continues to indicate a healthy status even though
no connection exists between the consumer and producer. In the
event of a timeout, the consume status variable becomes
unhealthy.
Possible values range from 0 to 65535 milliseconds. The default
value is 60000 milliseconds.
Comment Free format text

Important: Linked controllers must have the same SNCP Link Properties.

350 AADvance 2.1 - Communication View


Timeout Example

The following example displays the timeout behavior when Max Age is set to 2500 ms and
Bind Response Timeout is set to 1000 ms:

To create a link between controllers

You create links between controllers having producer variables and consumer variables to use
in these bindings

1. In the Communication View, expand the required controller to link, then right-click
Bindings, point to Add Controller Link, and then click the controller with which to
link.

2. Double-click the bindings link.

AADvance Workbench 351


The Communication property page is displayed with the Allow Communication and
SNCP Link Properties sections.

3. From the property page, in the Allow Communication section, select the required Ethernet
ports. The available Ethernet ports are those defined for the individual controllers.

4. In the SNCP Link Properties section, enter the required values for the following
properties:
Bind Request Timeout (ms)
Bind Response Timeout (ms)
Connect Timeout (ms)
Max Age (ms)
Update Timeout (ms)

5. If required, click to wire a Consume Status Variable.

The Variable Selector is displayed.

6. In the Variable Selector, select the required variable of type DINT, and then click OK.

352 AADvance 2.1 - Communication View


To delete a link between controllers

1. In the Communication View, expand the required controller, and then expand Bindings.

2. Right-click the controller link to remove, and then click Delete.

AADvance Workbench 353


Mapping Variable Bindings

You can map variable bindings from the producer or consumer mapping perspective for a
controller. When mapping bindings, you can view all available variables for both linked
controllers. You create a binding by selecting a variable from each controller, then adding it to
the bindings list. The Bindings list displays the variables and data type of defined bindings. For
the consumption behavior of individual variable bindings, you can specify a value to use for
error behavior and update behavior; the default value is the last value for the variable binding.

Note: Default values for the error behavior and update behavior are unsupported by variable
bindings using complex data types such as structures and arrays; you must use the last value.

Variable binding from controller produce mapping perspective

354 AADvance 2.1 - Communication View


Variable binding from controller consume mapping perspective

When you select a variable from a list of available variables, the details for the variable are
displayed below the list. You can limit the number of variables displayed for a controller by
typing search characters.

You can delete or rename variables used as producer variables in bindings. However, these
modifications cause the bound variables to display errors.

The consumption behavior indicates the values to use when communication for the binding is
in error, i.e., the update timeout period is exceeded, and during an online update. The update
behavior period begins when the producing or consuming variables are being updated and ends
when the binding definition between the producing and consuming variables match and the
consuming variable receives valid production values.

To map a variable binding

When creating a variable binding, you can choose to create the binding from the perspective of
the controller having the producer variable or from the perspective of the controller having the
consumer variable. This procedure defines a binding from the perspective of the controller
having the producer variable.

AADvance Workbench 355


1. In the Communication View, select the controller having the producer variable to include
in the binding.

2. Create a link with the controller having the consumer variable to include in the binding.

The link between the controllers is created and has a Produce Mapping and Consume
Mapping item.

3. Double-click Produce Mapping.

The Communication property page is displayed and lists the producer controller’s
variables in the list on the left and the linked consumer controller’s variables in the list on
the right.

4. From the property page, select the producer variable from the list of producer variables
on the left and the consumer variable from the list of consumer variables on the right.

5. Verify the variable information displayed below the lists of producer variables and
consumer variables.

6. Specify an Error Behavior and Update Behavior for the binding, and then click Add.

The variable binding is displayed in the Bindings list.

356 AADvance 2.1 - Communication View


Using CIP over Ethernet/IP
The Common Industrial Protocol (CIP) over Ethernet/IP protocol enables AADvance
controllers to exchange data with controllers supporting the CIP protocol, such as
ControlLogix controllers. The CIP network exchanges data using producers and consumers;
this network cannot download to a target or monitor a target.The CIP data sharing mechanism
is similar to the variable bindings mechanism used in AADvance. For each controller, CIP
communication enables defining a produce link and multiple consume links.

CIP should only be used to share non-safety data with other controllers. To share
safety-related data between AADvance controllers, use SNCP bindings.

The controller supports produce and consume communications to redundancy systems. The
support for produce/consume variables is non-interfering; a failure of the Ethernet/IP stack
does not interfere with the safe operation of the system.

To use CIP over Ethernet/IP, define the required consume and produce links, specify an
Ethernet port to connect to the CIP network having the remote controller, then define producer
and consumer variables (or structures) for the exchange of data. For CIP consume links, also
specify the producer and the CIP path to the producer. At runtime, the controller having
producer variables sends values to the remote controller, whereas, the controller having
consumer variables pulls values from the remote controller having producer variables.

Warning: When connecting a controller not supporting CIP to a CIP network, the Workbench
displays a warning and does not implement the connection. The default IP address for a
connection between a controller and a CIP network is blank. When a valid IP address is not
specified, the Workbench reports an error when building: 'Network CIP: invalid connection
properties for … (the particular configuration).'

Communications Cycle

Before executing the logic at the start of an application scan, the AADvance controller sets the
consumer variables to the most recently received values. The controller updates the producer
variables after executing the logic at the end of the application scan. When sending a packet,
the AADvance controller uses the most recent value of a producer variable, ensuring the
variable uses the expected Requested Packet Interval (RPI).

A consumer variable retains the most recently received value; a default value cannot be set.

AADvance Workbench 357


To configure an AADvance controller to communicate with another controller

CIP over Ethernet/IP shares non-safety data between AADvance controllers as well as other
controllers supporting CIP over Ethernet/IP. To use CIP over Ethernet/IP, configure controllers
to use the Unicast mode since AADvance controllers use unicast for CIP.

1. Set the first AADvance controller as a CIP provider.

2. Set the second controller as a CIP consumer.

358 AADvance 2.1 - Communication View


Creating the CIP Produce Link

For a controller, you can create one CIP produce link for sending data to a remote controller
across a CIP network. When defining a produce link, you need to specify the Ethernet port
connecting to the CIP network having the remote controller. You can then map producer
variables.

Note: If the IP address of the producer is modified, you must update the path to the producer
in the consume link.

To define a CIP over Ethernet/IP produce link

1. In the Communication View, expand the required controller, right-click CIP, and then
click Add CIP Produce Link.

The With Any link and CIP Produce item are added to the Communication View tree
structure.

2. Double-click the With Any link, then in the Communication property page, select the
Ethernet port to use for communication with the CIP network.

The producer link is defined and you can now map CIP producer variables.

AADvance Workbench 359


Map CIP Producer Variables

Each AADvance controller supports 128 mapped producer variables and a maximum of 255
CIP variables. The maximum size of a CIP variable is 500 bytes. A variable is configured either
as a producer or as a consumer; a variable cannot be both. Only global variables are available
for use with controllers supporting a connection to a CIP Network. Only BOOL, DINT, INT,
LINT, LREAL, REAL, and SINT data types can be used with CIP; library data types are
unsupported.

The Communication property page displays these properties for CIP producer variables:

Property Description
Name Name of the variable. For CIP producers, variable names are limited to
40 characters.
Remote Tag Name of the consumer variable communicating with the producer
Name variable
Data Type Data type of the global variable.
BOOL, DINT, INT, LINT, LREAL, REAL, and SINT data types are
supported as long as the data type is of size 4 bytes (32 bits) or larger.
Array or structure variables are also supported, but not member elements
of arrays or structures. To transfer data types smaller than four bytes,
create a user-defined data type and pad it accordingly.
When the variable is a structure containing members of supported data
types, each member starts on a new byte or word depending on the size.
For example, a DINT starts a new 4-byte word even though the last word
only had a one-bit BOOL.
Direction For I/O wiring, indicates whether a variable is an input, output, or
internal.
Max Connections The maximum number of simultaneous consumers of the variable.
Possible values range from 1 to 10. The default value is 5.
The AADvance controller supports a maximum of 255 CIP connections.

Warning: The AADvance controller rejects any CIP requests to connect to a producer variable
beyond the maximum number of connections (255). Do not set the number of connections
larger than required since each connection uses resources from a limited pool.

360 AADvance 2.1 - Communication View


To map CIP producer variables

1. In the Communication View, expand the CIP produce link, and then double-click CIP
Produce.

The Communication property page is displayed.

2. In the property page, map a producer variable by clicking Add Variable to access the
Variable Selector.

3. In the Variable Selector, select the required variable, and then click OK.

4. In the property page, define the Max Connections for the producer variable.

The producer variable is added to the CIP Produce list of variables.

AADvance Workbench 361


Creating CIP Consume Links

For a controller, you can define up to 128 CIP consume links for receiving data from remote
controllers across a CIP network. You add one consume link per controller requiring CIP
communications. When defining a CIP consume link, you need to specify the Ethernet port
connecting to the CIP network having the remote controller.

Note: When configuring a CIP consume link, you must define the producer name and the CIP
path to the producer. If the IP address of the producer is modified, you must update the path to
the producer.

You can then map consumer variables.

To define a CIP over Ethernet/IP consume link

1. In the Communication View, expand the required controller, right-click CIP, and then
click Add CIP Consume Link.

The With Unnamedx (Not configured) link and CIP Consume item are added to the
Communication View tree structure.

2. Configure the CIP consume link:

362 AADvance 2.1 - Communication View


a) Double-click the With Unnamedx (Not configured) link to display the
Communication property page.

b) From the property page, select the Ethernet port to use for communication with the
CIP network.

c) In the Producer Name field, indicate the name of the CIP producer from which the
consumer receives data.

d) In the CIP Path to Producer field, type the CIP path to the controller. The path uses
the following format:
IP_address,port,slot

where
IP_address is the address of the CIP Ethernet module in the system.
port is the communications route from the remote controller. For ControlLogix
controllers, the port should always be 1 specifying the ControlLogix backplane.
Other numbers specify different communications routes from ControlLogix.
slot is the number of the slot where the CPU module is installed. These slots start
from 0 and are numbered from left to right.

The consume link is defined and you can now map CIP consumer variables.

AADvance Workbench 363


Map CIP Consumer Variables

Each AADvance controller supports 128 mapped consumer variables and a maximum of 255
CIP variables. The maximum size of a CIP variable is 500 bytes. A variable is configured either
as a producer or as a consumer; a variable cannot be both. Only global variables are available
for use with controllers supporting a connection to a CIP Network. Only BOOL, DINT, INT,
LINT, LREAL, REAL, and SINT data types can be used with CIP; library data types are
unsupported.

Note: When adding a consumer variable, define the Remote Tag Name and Requested Packet
Interval (RPI) properties.

The Communication property page displays these properties for CIP consumer variables:

Property Description
Name Name of the variable. For CIP consumers, variable names are limited to
40 characters.
Remote Tag Name of the producer variable communicating with the consumer
Name variable
RPI Requested Packet Interval. The frequency in milliseconds that the remote
controller offers the variable to the AADvance controller. Possible values
range from 1 to 1000 ms. The default value is 20 ms.

Note: The RPI should be set to a minimum of 200 ms.


Data Type Data type of the global variable.
BOOL, DINT, INT, LINT, LREAL, REAL, and SINT data types are
supported as long as the data type is of size 4 bytes (32 bits) or larger.
Array or structure variables are also supported, but not member elements
of arrays or structures. To transfer data types smaller than four bytes,
create a user-defined data type and pad it accordingly.
When the variable is a structure containing members of supported data
types, each member starts on a new byte or word depending on the size.
For example, a DINT starts a new 4-byte word even though the last word
only had a one-bit BOOL.

364 AADvance 2.1 - Communication View


To map CIP consumer variables

1. In the Communication View, expand the required CIP consume link, and then
double-click CIP Consume.

The Communication property page is displayed.

2. In the property page, map a consumer variable by clicking Add Variable to access the
Variable Selector.

3. In the Variable Selector, select the required variable, and then click OK.

4. In the property page, define the Remote Tag Name and RPI for the consumer variable.

The consumer variable is added to the CIP Consume list of variables.

AADvance Workbench 365


Configuring Peer-to-Peer Communications
The AADvance Workbench provides the option of setting up a Peer-to-Peer network to enable
communicating application data between AADvance and Trusted systems. Each peer network
supports communication with up to 40 AADvance or Trusted systems. Data can be transfered
between individual systems or from one system to multiple systems by using multicast network
communication.

Note: The current version of the AADvance controller only supports two multicast IP
addresses. A fixed address can be configured for each Ethernet port.

A Peer-to-Peer network consists of one or more Ethernet networks connecting together a series
controllers to enable passing safety application data between them. Peer controllers only
communicate with other peer controllers sharing the same network. You can connect the
following types of controllers:

Trusted controller The controller has four communication interfaces with eight
Ethernet ports. The Peer-to-Peer network can use all eight physical
Ethernet networks, referred to as subnets, to provide redundant data
paths via up to eight separate physical routes. The eight ports can be
assigned to one or multiple peer networks.
To participate in peer communication, you must fit each Trusted
system with a T812x processor interface adapter.
AADvance controller The two network interfaces of the AADvance processor module can
be used simultaneously for Peer-to-Peer communication. A triple
modular redundant (TMR) controller having three processor
modules provides a maximum of six physical connections that can
be divided between the different peer networks or assigned to the
same network.

A peer network consists of one or more subnets. Network subnets are assigned to the Ethernet
ports of the processor. Each subnet is considered a physical network representing a redundant
data path on the network. Subnets of the same redundant network should use different
processor modules to achieve the highest level of hardware fault tolerance.

Important: To use Peer-to-Peer communications on both ports of a processor, you must


configure IP addresses having different subnets.

366 AADvance 2.1 - Communication View


When configuring the AADvance controller to communicate with a Trusted Peer-to-Peer
network, you must use the same parameters as a Trusted configuration.

Note: The AADvance Workbench also supports external communications using Modbus over
serial and Ethernet links. Performance may be affected when using both Modbus and
Peer-to-Peer communications.

The information to transfer over the peer network is defined within the application data blocks.
You configure data blocks of 16 or 128 digital points, 16 or 128 analog points, as well as the
network status information.

To configure Peer-to-Peer communications, you must perform the following:

Create a Peer-to-Peer network

Configure the Subnet

Enter the peer IP address information

Define a Peer List

Configure the data blocks

Wire the status variables

Wire the data variables

Communications Cycle

Peer-to-Peer communication functions as a master slave relationship, needing at least one


master per network. You may need to configure redundant masters to ensure subnets remain
connected if the master peer goes offline. The masters arbitrate the control. You can configure
any Ethernet port as a master or slave.

The Peer-to-Peer network operates in a cycle. Each controller is asked in turn to send all the
configured output data.

At the start of the communications cycle, the peer master issues an inquiry command to the first
slave. If the master receives a response, the slave is registered as active and the master repeats
the process with the next slave. The sequence continues until all slaved are polled.

AADvance Workbench 367


The master then sends a transmit data command (token) instructing the first slave to send the
output data to the configured peers. The first slave then returns the token to the master and the
master repeats the process with the next slave. Once all slaves have been polled, the master
transmits the output data. The transmit data cycle is then repeated with the first slave.

The master continuously repeats the communications cycle.

For redundant networks, data integrity is verified using the CRC of the data packet sent
between systems.

368 AADvance 2.1 - Communication View


Configuring a Peer-to-Peer Network

When configuring the Peer-to-Peer network, you must define the following settings:

Network ID The number identifying the network for the controller. Possible values
range from 1 to 8.
Peer ID The number identifying the controller IP address in the Peer List. Possible
values range from 1 to 40.

To configure a Peer-to-Peer network

1. In the Communication View, expand the required controller, then right-click


Peer-to-Peer, and then click Add Network.

The Network Configuration dialog box is displayed.

2. In the Network Configuration dialog box, set the Network ID and Peer ID, and then click
OK.

The Peer-to-Peer network is added to the controller. Subnet 1 is automatically added to the
network.

To delete a Peer-to-Peer network


In the Communication View, right-click the network instance to remove, and then click
Delete.

The Network as well as its subnets and data blocks are deleted.

AADvance Workbench 369


Configuring a Peer-to-Peer Subnet

When configuring the Peer-to-Peer subnet, you must define the following settings:

Subnet ID The number identifying the Ethernet network for the controller. Possible
values are 1 to 8.
Network The processor slice that the peer network is physically connected to.
Interface Possible values are Processor Slice A, Processor Slice B, Processor Slice C,
or No Connection.
Response The amount of time for a peer to acknowledge reception of a data packet, in
Timeout (ms) milliseconds. Possible values range from 0 to 10000 ms. The default value
is 0 ms.
Set the value above 0 to avoid network packet sequence errors, which occur
when the propagation delay between two nodes exceeds 1 ms. The value
must be greater than the propagation delay (measurable by using the ping
command).
Set to 0 when no acknowledgment is required. For example, no
acknowledgment is required if the entire Peer-to-Peer network is on a local
Ethernet network and contains no routers or gateways.
The Response Timeout acts as a watchdog trip for a lost packet and should
be the shortest value for the timeout settings.

Note: To provide some tolerance to message loss, a slave is only declared


inactive (FALSE) after the occurrence of two consecutive response
timeouts.

370 AADvance 2.1 - Communication View


Refresh The maximum amount of time, in milliseconds, the peer controller waits
Timeout (ms) during a cycle for the master to signal to the peer to transmit the output
data. Possible values range from 0 to 10000 ms. The default value is 2000
ms.
The Refresh Timeout value is calculated by multiplying the Slave
Transmit Timeout value with the number of peers lost on a worst case
network break.
When the Refresh Timeout expires, the peer discards any data to transmit
and considers the network inoperable. The network must be reactivated by
the master.
If the network is broken, the Slave Transmit Timeout trips, minimizing
the loss of data transfer.
Slave Transmit The amount of time, in milliseconds, that a subnet master controller waits
Timeout (ms) for a slave to complete transmission of the output data and return control of
the network before declaring the slave absent. The Slave Transmit
Timeout is only used by the master of a subnet. Possible values range from
1 to 10000 ms (a minimum of 64 ms is recommended). The default value is
500 ms.
The Slave Transmit Timeout acts as a watchdog for a lost slave, allowing
enough time for the slave to send all the outputs even if the slave is waiting
for lost packets from the Response Timeout setting.

Note: A slave is only declared inactive (FALSE) after the occurrence of two
consecutive timeouts. The slave remains inoperable until reactivated by the
subnet master.
To calculate the Slave Transmit Timeout value, do the following:

(Response Timeout of the slave) x (Maximum number of output data


boards in any controller) + 16 ms

When the Response Timeout value of the slave is 0 ms, use 2 ms in


the previous calculation.

AADvance Workbench 371


Enable The wired variable starts or stops the peer communications for the
Controller controller. Possible values are TRUE or FALSE.
TRUE - Enable Peer-to-Peer communications
FALSE - Disable Peer-to-Peer communications
Master/Slave Sets if the controller is a master or slave. Possible values are TRUE or
FALSE.
TRUE - The controller acts as a master
FALSE - The controller acts as a slave
You must set at least one master to enable Peer-to-Peer communication.

Important: To use Peer-to-Peer communications on both ports of a processor, you must


configure IP addresses having different subnets.

To configure a Peer-to-Peer subnet

Subnet 1 is automatically created when adding a network. When adding subsequent subnets to
a network, you can define the Subnet ID.

1. In the Communication View, right-click the required Peer-to-Peer network instance, and
then click Add Subnet.

The Subnet Configuration dialog box is displayed.

2. In the Subnet Configuration dialog box, set the Subnet ID and then click OK.

3. In the Communication View, double-click the subnet instance.

The Communication property page is displayed.

4. In the property page, enter the required values for the following properties:
Network Interface
Response Timeout
Refresh Timeout
Slave Transmit Timeout

372 AADvance 2.1 - Communication View


5. Click to wire variables for the following parameters:
Enable Controller
Master/Slave

The Peer-to-Peer subnet is configured for the network.

To delete a Peer-to-Peer subnet

Note: Networks must always have at least one subnet; you cannot remove the last remaining
subnet under a network.
In the Communication View, right-click the subnet instance to remove, and then click
Delete.

The subnet instance is deleted.

AADvance Workbench 373


Defining the Peer List

The Peer List contains the IP addresses of the peer controllers defined for one subnet. Each peer
controller has a unique Peer ID, defining the position of the IP address in the Peer List. The
Peer List can contain up to 40 Peer IDs. The Peer List must be the same for all controllers on
the same subnet. You can configure multicast IP addresses in the Peer List.

Unique IDs enable data to pass between one output data block and one input data block, or
multicast from one output data block to multiple input data blocks on different controllers.
Muticasting is part of TCP/IP communications. The following IP addresses are specifically
used for multicast:

224.1.2.3

224.4.5.6

Each receiving peer is configured to accept data from the multicast addresses as well as the
defined IP address for that peer.

374 AADvance 2.1 - Communication View


From the Peer List, you can wire a boolean input variable to get the peer status. The status
variable is TRUE when the peer is active and FALSE when the peer is inactive or faulty.
Multicast peers are always set to FALSE (even when active).

To define the Peer List

1. In the Communication View, double-click the required Peer-to-Peer subnet instance.

The Communication property page is displayed with the Subnet and Peer List tabs.

2. In the property page, click the Peer List tab.

3. In the list, enter the IP address for each peer. You must enter the IP address in the row
having the corresponding Peer ID.

4. To configure a multicast IP address, enter the following information:


Port 1: 224.1.2.3
Port 2: 224.4.5.6

5. Click to wire status variables for the required peers.

To unwire a status variable

To unwire a status variable, click .

AADvance Workbench 375


Configuring Peer-to-Peer Data Blocks

The information to transfer over the peer network is defined in data blocks. The data blocks
can be used with safety and non-safety data. Data blocks can have either 16 or 128 channels.
You can add the following types of data blocks:

Digital Inputs

Analog Inputs

Digital Outputs

Analog Outputs

Each data block must have a unique ID on the peer network. To enable communication
between an input data block and output data block, the blocks must be on the same network,
have the same Block ID, and reference each other’s Peer ID in the Peer List.

After adding a data block, you can wire status variables and data variables.

When adding a data block, you must define the following properties:

Block ID The number identifying the data block. Possible values range from 1
to 64.
Direction Indicates whether a data block is an input or output.
Peer ID For input data blocks, the number identifying the peer sending data.
For output data blocks, the number identifying the peer receiving
data. Possible values range from 1 to 40.
Type The type of data block. Possible values are digital and analog.
Size The amount of channels associated to a data block. Possible values
are 16 and 128.

Warning: The analog data block having 128 channels must only be used for
non-safety related data since there are insufficient measures to ensure the transport
of data meets the safety integrity level of SIL3.

376 AADvance 2.1 - Communication View


To add a data block

1. In the Communication View, right-click the required peer-to-peer network, and then click
Add Data Block.

The Data Block Configuration dialog box is displayed.

2. In the Data Block Configuration dialog box, enter the required values, and then click OK.

The data block is added to the network.

AADvance Workbench 377


Digital Inputs

When configuring a digital input data block, you must define the following properties:

Refresh Timeout The maximum number of milliseconds allowed between successive


refreshes of the input data. When the time is exceeded, the input data
is declared invalid and either retains the last received value or reverts
to the fail-safe condition, depending on the Hold Last Valid Value
setting. Possible values range from 1 to 10000 ms. The default value is
5000 ms.
Value in Failed State The control value to be adopted by the input when the input data is not
refreshed within the Refresh Timeout value and therefore declared
invalid. Possible values are 0 and 1. The default value is 0.

You can wire the following status variables for digital input data blocks:

Input Data is Valid TRUE - Input data was refreshed within the specified Refresh
Timeout value.
FALSE - Input data was not refreshed within the specified time.
Refreshed by Subnet 1 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 1 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 1 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 2 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 2 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 2 within the specified
Refresh Timeout milliseconds.

378 AADvance 2.1 - Communication View


Refreshed by Subnet 3 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 3 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 3 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 4 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 4 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 4 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 5 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 5 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 5 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 6 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 6 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 6 within the specified
Refresh Timeout milliseconds.

AADvance Workbench 379


Refreshed by Subnet 7 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 7 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 7 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 8 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 8 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 8 within the specified
Refresh Timeout milliseconds.
Hold Last Valid Value When set to FALSE, forces data to the fail-safe state when the input
data is invalid.
When set to TRUE, allows previous data to persist when input data
is invalid.

To configure a digital input data block

1. In the Communication View, double-click the digital input data block.

The Communication property page is displayed with the Data Block and Data Variables
tabs.

2. In the Data Block tab, enter the required values for the Refresh Timeout and Value in
Failed State.

3. Click to wire the required status variables.

To unwire a status variable

To unwire a status variable, click .

380 AADvance 2.1 - Communication View


Analog Inputs

When configuring an analog input data block, you must define the following properties:

Refresh Timeout The maximum number of milliseconds allowed between successive


refreshes of the input data. When the time is exceeded, the input data
is declared invalid and either retains the last received value or reverts
to the fail-safe condition, depending on the Hold Last Valid Value
setting. Possible values range from 1 to 10000 ms. The default value is
5000 ms.
Value in Failed State The control value to be adopted by the input when the input data is not
refreshed within the Refresh Timeout value and therefore declared
invalid. Possible values range from -3.402823E+38 to 3.402823E+38.
The default value is -1024. When the data type of the input variable is
DINT, the decimals are truncated.

You can wire the following status variables for analog input data blocks:

Input Data is Valid TRUE - Input data was refreshed within the specified Refresh
Timeout value.
FALSE - Input data was not refreshed within the specified time.
Refreshed by Subnet 1 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 1 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 1 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 2 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 2 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 2 within the specified
Refresh Timeout milliseconds.

AADvance Workbench 381


Refreshed by Subnet 3 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 3 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 3 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 4 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 4 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 4 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 5 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 5 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 5 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 6 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 6 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 6 within the specified
Refresh Timeout milliseconds.

382 AADvance 2.1 - Communication View


Refreshed by Subnet 7 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 7 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 7 within the specified
Refresh Timeout milliseconds.
Refreshed by Subnet 8 This status variable is used to detect latent faults within a redundant
network. The data is simultaneously delivered over all available
subnets.
TRUE - The input data was refreshed by Subnet 8 within the
specified Refresh Timeout value.
FALSE - The data failed to arrive on Subnet 8 within the specified
Refresh Timeout milliseconds.
Hold Last Valid Value When set to FALSE, forces data to the fail-safe state when the input
data is invalid.
When set to TRUE, allows previous data to persist when input data
is invalid.

To configure an analog input data block

1. In the Communication View, double-click the analog input data block.

The Communication property page is displayed with the Data Block and Data Variables
tabs.

2. In the Data Block tab, enter the required values for the Refresh Timeout and Value in
Failed State.

3. Click to wire the required status variables.

To unwire a status variable

To unwire a status variable, click .

AADvance Workbench 383


Digital Outputs

When configuring a digital output data block, you must define the following property:

Refresh Interval The maximum number of milliseconds allowed between successive


transmissions of the output data. Note that data is immediately sent
following any change in the output state. Possible values range from 0 to
10000 ms. The default value is 2000 ms. Specify a value of 0 to send data
during each application cycle.

To configure a digital output data block

1. In the Communication View, double-click the digital output data block.

The Communication property page is displayed with the Data Block and Data Variables
tabs.

2. In the Data Block tab, enter the required value for the Refresh Interval.

384 AADvance 2.1 - Communication View


Analog Outputs

When configuring an analog output data block, you must define the following properties:

Refresh Interval The maximum number of milliseconds allowed between successive


transmissions of the output data. Note that data is immediately sent
following any change in the output state. Possible values range from 0 to
10000 ms. The default value is 2000 ms. Specify a value of 0 to send data
during each application cycle.
Minimum The minimum change in the value of the output variable required before
Change before an update is sent to the peer input, regardless of the Refresh Interval.
Update Possible values range from 0 to 3.402823E+38. The default value is 0.
When the data type of the output variable is DINT, the decimals are
truncated.

To configure an analog output data block

1. In the Communication View, double-click the analog output data block.

The Communication property page is displayed with the Data Block and Data Variables
tabs.

2. In the Data Block tab, enter the required values for the Refresh Interval and Minimum
Change before Update.

AADvance Workbench 385


Data Variables

Data variables are used to send digital or analog data from data block outputs to data block
inputs. Each data block has either 16 or 128 channels. An input channel must have the same
variable data type as the corresponding output channel.

You can wire data variables for the following types of data blocks:

Digital Inputs

Analog Inputs

Digital Outputs

Analog Outputs

The following columns are displayed for data variables:

Column Description
Channel The number of the channel. Data variable grids can contain 16 or 128 channels,
where the numbering starts at 1 and continues in ascending order.
Variable The name of the variable. When no variable is wired to the channel, the directly
represented variable is displayed.
Type Only available for analog inputs and outputs, sets the data type for the variable.
Possible values are DINT and REAL; the default value is DINT.

To wire data variables for a data block

1. In the Communication View, double-click the required data block.

The Communication property page is displayed with the Data Block and Data Variables
tabs.

2. Click the Data Variables tab.

3. For analog input and output data blocks, set the data type of the variable for a specific
channel by clicking the type to toggle between DINT and REAL.

4. Click to wire the required data variables.

386 AADvance 2.1 - Communication View


To unwire a data variable

To unwire a data variable, click .

AADvance Workbench 387


Defining the Quality of Service
The AADvance Workbench provides the option of specifying the priority of IP traffic for
different applications. The Quality of Service feature ensures high priority services are not
delayed during periods of network congestion. You can set the priority for up to 16 services.
When using the Quality of Service, you can also enable TCP negotiation.

Note: When the Quality of Service feature is enabled, the scan rate of the controller may differ
by five milliseconds.

When enabled, the service uses bit patterns in the "DS-byte" of IP, which is the
Type-of-Service (ToS) octet for IPv4. When defining the quality of service, you can set the
priority of applications as high, medium, low, or as a value ranging from 0 to 255.

388 AADvance 2.1 - Communication View


To set the service, you must arrange routers and switches able to inspect IP headers and
prioritize them by the ToS header octet. The network devices then apply the rules to prioritize
the IP traffic. The AADvance controller maintains the priority when responding to incoming
messages. Outgoing messages are sent out according to the set priority defined in the Quality
of Service.

Important: When using all 8 bits of the ToS byte, the networking equipment may interpret the
packet incorrectly. To avoid issues, you are recommended to use a maximum value of 252 for
ToS.

TCP Negotiation

When TCP negotiation is enabled, the TCP/IP stack applies the user-specified ToS priority
during the TCP negotiation.

When the controller acts as a server, disable TCP negotiation. The controller uses the default
value of 0 for ToS during the 3-way TCP communication and then applies the defined ToS
value when connected.

Whether enabled or disabled, the ToS value may change after the completion of the TCP
negotiation if another service has a more specific rule for the port.

Note: If you need to apply a connection by ToS during the enabled TCP negotiation, you must
define Protocol and Port values; the Peer Address must remain empty.

When setting the Quality of Service, you must define the following:

Protocol The type of protocol.


Possible values are Unused, UDP, or TCP. The default value is Unused.
Port The port number. If the AADvance controller initiates the connection, the service
number of the device being connected to.
Possible values range from 0 to 65535. The default value is 0.

AADvance Workbench 389


Peer When the defined protocol is TCP, the address of the device being connected to.
Address Setting a peer address is optional and only required when needing to set the
priority for traffic from one specific device. The default value is 0.0.0.0.

Note: To prioritize traffic coming from devices using the same port to
communicate with the AADvance controller, leave the Peer Address at 0.0.0.0.
ToS The value of the priority.
Possible values are Low, Medium, High, or a value ranging from 0 to 255. The
default value is 0.

Important: When setting the value of ToS to 255, the networking equipment may
interpret the packet incorrectly. You are recommended to use a maximum value
of 254 for ToS.

To define the quality of service

You can define the priority of services for up to 16 applications. For TCP, each service using
the same port must have a different peer address. For UDP, each service must use a different
port. Note that the same port number can be used for both protocols.

1. In the Communication View, expand the required controller, and then double-click
Quality of Service.

The Communication property page is displayed.

2. In the property page, select Enable Quality of Service to enable the feature.

3. If TCP negotiation is required, select Enable TCP Negotiation.

4. In the table, set the values for the Protocol, Port, and ToS for each required service. If
needed, set the Peer Address.

The Quality of Service priority for IP traffic is now defined for the required applications.

390 AADvance 2.1 - Communication View


Equipment View
The Equipment View displays a graphical tree view of the application hardware. From the
Equipment View, you configure the system type, processor safety time, and battery alarm for
each controller. You also define the Status, Control, and RTC variables for controllers. The
Equipment View contains an IO Bus 1 and IO Bus 2 for each Standard or Mixed controller
defined in a project. Each IO Bus has 24 slots available for assigning I/O modules. Eurocard
controllers only have IO Bus 1, containing 18 slots. The Equipment View displays the digital
and analog I/O modules in their defined slots. From the Equipment View, you can also enable
the HART protocol and HART Pass-Through features for analog I/O modules.

You can perform the following actions from the Equipment View:

Configure the system type, process safety time, and battery alarm for a controller

AADvance Workbench 391


Wire processor variables

Manually set the real time clock

Add or edit I/O modules

Configure I/O modules

Configure the process safety time for an I/O module

Wire a status variable to an I/O module

Wire the channels of an I/O module

Define threshold values for input modules

Configure analog I/O channels to support the HART protocol

Configure the controller to support the HART Pass-Through feature

Hardware Redundancy

The AADvance enables creating hardware redundancy from the Equipment View. When
defining I/O modules to empty IO bus slots, you have the option of adding one, two, or three
modules. Adding two (duplex arrangement) or three (triplex arrangement) modules enables
redundancy, with each module carrying out the same function to improve reliability. When
adding an I/O module having a duplex or triplex arrangement, the Workbench automatically
assigns the modules to the adjacent slots. For duplex or triplex groups, you can only configure
one set of channels.

Note: The AADvance automatically connects to each processor after setting the network
connection.

During redundancy, the processors read all the module inputs independently through the I/O
bus. The processors then share the input data, application variables, and other communication
data to agree on the data to use in the application. The processors run their logic independently,
then share the outputs to send to the I/O and communications. Once they agree on the data, the
processors individually send the output data, and then the next cycle starts.

392 AADvance 2.1 - Equipment View


Input Voting

Digital and analog modules are processed (voted) the following way:

Valid Description
Modules
3 The mid-value is used by the application
2 The lower value is used by the application
1 The value is used by the application
0 The previous value is used by the
application. A fault will occur after the
process safety time (PST).

Note: For analog output modules, the measured currents are added together since they share
the current.

A valid module means the HART and process measurements pass the integrity checks.

Output Voting

For the commanded output data to digital and analog output modules, the application does the
following:

Redundant Description
Configuration
Dual Processors The output modules processing the integrated circuit (FPGA)
disregard discrepant data from the processors and the outputs
hold (freeze) at their last state.
Triple Processors When only two of the three sets of data agree, the 2oo3 data is
used and the third set is discarded. When all three sets of data
disagree, the FPGAs discard all data and the outputs hold
(freeze) at their last state.

Note: Frozen outputs are only tolerated for the PST period. When the PST expires and no valid
data is received, the outputs enter the shutdown state defined in the application.

AADvance Workbench 393


Configuring the Controller
From the Equipment View, you define the following properties for controllers: the system type,
process safety time, battery alarm, and remote fault reset.

System Type

The AADvance supports three types of systems: Standard, Eurocard, or Mixed.

System Type Description


Standard IO Bus 1 and 2, each containing 24 slots
Eurocard IO Bus 1, containing 18 slots
Mixed IO Bus 1 and 2, each containing 24 slots

The type of system affects the available I/O modules. The Mixed controller type enables
configuring a standard controller with both Standard and Eurocard I/O modules.

Note: You must set the required system type before adding I/O modules to a controller.

394 AADvance 2.1 - Equipment View


Process Safety Time

The process safety time (PST) defines the maximum time in milliseconds that the outputs of a
controller remain in the ON state after detecting important diagnostic or application faults.
When the defined PST is exceeded, the outputs go into their specified safe states. You must set
the PST for the controller. The default PST for the controller is 2500 ms. By default, each group
of I/O modules inherits the PST from the controller. You can also set an alternate PST for each
I/O group.

Battery Alarm

The 9110 processor module contains a battery supporting retained variables as well as the Real
Time Clock (RTC) when the system power is turned off. The system contains a processor
battery alarm informing you that the battery voltage is low and the battery must be replaced.
The battery alarm is enabled by default for Standard and Mixed controllers.

Note: You must disable the Battery Alarm for Eurocard controllers.

Remote Fault Reset

The remote fault reset enables resetting faulty processors in the controller without needing to
physically press the Fault Reset button located on the T9110 front panel. As well, you can use
the remote fault reset to join processors to a running system. The remote fault reset is required
for sub-sea systems since it is impossible to physically manipulate the processors. By default,
Remote Fault Reset is disabled (0x00000000). To enable the feature, you must enter a non-zero
hexadecimal value matching the combined values of the control integers Allow Remote Fault
Reset MSB and Allow Remote Fault Reset LSB. Possible values range from 0x00000001 to
0xFFFFFFFF. When enabling Remote Fault Reset, a warning is displayed confirming you
want to remotely reset the controller.

To configure the controller system type, process safety time, battery alarm, and remote

AADvance Workbench 395


fault reset

From the Controller property page, in the Processor tab, you can set the system type, process
safety time, battery alarm, and remote fault reset for a controller.You must set the system type
before adding I/O modules. The defined PST must be larger than the execution time for the
application to run. By default, the battery alarm is enabled. You can disable the alarm for
sub-sea systems or other systems lacking a battery. By default, the remote fault reset is
disabled. You are recommended to enable the fault reset for sub-sea systems.

1. From the Equipment View, double-click the required controller.

The Equipment property page is displayed.

2. From the property page, click the Processor tab.

3. From the Processor tab, select the required System Type. You can select one of the
following:
Standard
Eurocard
Mixed

The Equipment View is refreshed to display the IO Buses and slots attributed to the
specific system type.

4. From the Processor tab, in the Process Safety Time field, type the required value ranging
between 20 ms and 60000 ms.

Note: For large systems, set the PST for the controller to 1500 ms or more, ensuring sufficient
time to educate a second or third processor module.

5. Set the Battery Alarm value to Enabled or Disabled.

6. Set the Remote Fault Reset value to 0x0 (disabled) or a non-zero hexadecimal value
(enabled).
When enabling the property, a warning is displayed confirming the action. Click Yes
to enable Remote Fault Reset.

The controller system type, PST, battery alarm, and remote fault reset are configured for the
controller and you can now add I/O modules to the controller.

396 AADvance 2.1 - Equipment View


Configuring Processor Variables
The 9110 processor module contains status, control, and RTC variables used by the
application. Status variables get data from the processor module while control variables set
data in the processor module. RTC variables are used for the real time clock of the application.

You configure the processor variables from the property page of the controller. Each type of
processor variable is wired in a separate tab, as seen in the following:

Status tab, contains status integers and booleans supplying data about the controller to the
application.

Control tab, contains control integers and booleans enabling the application to send data
to the controller.

RTC tab, contains status, program, and control variables for the real time clock. RTC
status variables supply the date and time to the application. RTC program variables hold
the date and time to be written to the real time clock. RTC control variables set and
update the clock.

To wire a processor variable

1. From the Equipment View, double-click the required controller.

The Equipment property page is displayed.

2. From the property page, click one of the following tabs:


Status
Control
RTC

Each tab displays different processor variables performing specific functions.

AADvance Workbench 397


3. From the processor variable tab, locate the required variable, and in the Wire column
click .

The Variable Selector is displayed.

4. From the Variable Selector, select the required variable and click OK.

The processor variable is now wired.

To unwire a processor variable

1. From the Equipment View, double-click the required controller.

The Equipment property page is displayed.

2. From the property page, click one of the following tabs:


Status
Control
RTC

Each tab displays different processor variables performing specific functions.

3. From the processor variable tab, locate the wired variable, and in the Unwire column
click .

The processor variable is unwired.

398 AADvance 2.1 - Equipment View


Status Processor Variables

Status processor variables supply data about the controller to the application. The AADvance
controller has the following status processor variables:

Status Integers
Number of Locked Input Variables
Number of Locked Output Variables
Processor Module A Temperature
Processor Module B Temperature
Processor Module C Temperature

Status Booleans
System Health
System Health Reset
Dongle Detected (Voted)
Processor Module A Online
Processor Module B Online
Processor Module C Online
Processor Module A Health
Processor Module B Health
Processor Module C Health
Processor Module A 24v1 Power Feed Health
Processor Module B 24v1 Power Feed Health
Processor Module C 24v1 Power Feed Health
Processor Module A 24v2 Power Feed Health
Processor Module B 24v2 Power Feed Health
Processor Module C 24v2 Power Feed Health

AADvance Workbench 399


Processor Module A Ready
Processor Module B Ready
Processor Module C Ready
Processor Module A NVRAM Battery Health
Processor Module B NVRAM Battery Health
Processor Module C NVRAM Battery Health

400 AADvance 2.1 - Equipment View


Status Integers

The following status integers supply data about the controller to the application:

Number of Locked Input Variables

Direction Input to the application from the controller


Type Word
Values 0 to 65,535
Wiring %IW1.0.0
Description Reports the quantity of input variables having been locked by the user. The top
limit of 65,535 represents the capacity of the variable; the real limit is the number
of variables in the application.

Number of Locked Output Variables

Direction Input to the application from the controller


Type Word
Values 0 to 65,535
Wiring %IW1.0.1
Description Reports the quantity of output variables having been locked by the user. The top
limit of 65,535 represents the capacity of the variable; the real limit is the number
of variables in the application.

Processor Module A Temperature

Direction Input to the application from the controller


Type Word
Values 0 to 65,535
Wiring %IW1.0.2
Description Reports the temperature, in degrees Celsius, of a specific slot on the 9110
processor module. Set to 0 (zero) if no processor module is present.

AADvance Workbench 401


Processor Module B Temperature

Direction Input to the application from the controller


Type Word
Values 0 to 65,535
Wiring %IW1.0.3
Description Reports the temperature, in degrees Celsius, of a specific slot on the 9110
processor module. Set to 0 (zero) if no processor module is present.

Processor Module C Temperature

Direction Input to the application from the controller


Type Word
Values 0 to 65,535
Wiring %IW1.0.4
Description Reports the temperature, in degrees Celsius, of a specific slot on the 9110
processor module. Set to 0 (zero) if no processor module is present.

402 AADvance 2.1 - Equipment View


Status Booleans

The following status booleans supply data about the controller to the application:

System Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - All installed processor and I/O modules are healthy and the Set
System Health Alarm variable is FALSE (See Control Booleans). The
System Healthy LED of the processor module is green.

FALSE - One or more of the installed processors or I/O modules are


reporting a module health problem or the Set System Health Alarm
variable is TRUE (See Control Booleans). The System Healthy LED of the
processor module is red.
Wiring %IX1.2.0

Note: After a fault, you can reset the Set System Health Alarm in a system containing at least
one healthy processor or I/O module in a module group.

System Health Reset

Direction Input to the application from the controller


Type Boolean
Values TRUE - The fault reset button on a 9110 processor module was pressed in an
earlier cycle.

FALSE - No fault reset button is active.


The default value is FALSE.

AADvance Workbench 403


Wiring %IX1.2.1
Description Reports that the fault reset button on a processor module was pressed. The System
Health Reset is triggered by pressing the button, but the value does not change to
TRUE until the start of the next application cycle. The value remains TRUE for
the cycle and then reverts to FALSE even if the button was pressed throughout the
cycle.

Dongle Detected (Voted)

Direction Input to the application from the controller


Type Boolean
Values TRUE - One or more 9110 processor modules detects that the program
enable key is inserted in the KEY connector of the 9100 processor base unit.

FALSE - The processor modules are unable to detect a program enable key.
Wiring %IX1.2.2
Description Reports the presence or absence of a program enable key.

Processor Module A Online

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is online

FALSE - The processor module is offline


The default value is TRUE.
Wiring %IX1.2.5
Description Reports that a processor module in a duplex or triplex redundant configuration is
present and is communicating through the inter-processor link to one or both of its
peers. Reports that a simplex processor module is present.

404 AADvance 2.1 - Equipment View


Processor Module B Online

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is online

FALSE - The processor module is offline


The default value is TRUE.
Wiring %IX1.2.6
Description Reports that a processor module in a duplex or triplex redundant configuration is
present and is communicating through the inter-processor link to one or both of its
peers. Reports that a simplex processor module is present.

Processor Module C Online

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is online

FALSE - The processor module is offline


The default value is TRUE.
Wiring %IX1.2.7
Description Reports that a processor module in a duplex or triplex redundant configuration is
present and is communicating through the inter-processor link to one or both of its
peers. Reports that a simplex processor module is present.

Processor Module A Health

Direction Input to the application from the controller


Type Boolean

AADvance Workbench 405


Values TRUE - The 9110 processor module in the given slot is healthy and the
Healthy LED indicator is green.

FALSE - The processor module is faulty and the Healthy LED indicator is
red.
Wiring %IX1.2.8
Description Reports the health status of a processor module.

Processor Module B Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is healthy and the
Healthy LED indicator is green.

FALSE - The processor module is faulty and the Healthy LED indicator is
red.
Wiring %IX1.2.9
Description Reports the health status of a processor module.

Processor Module C Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is healthy and the
Healthy LED indicator is green.

FALSE - The processor module is faulty and the Healthy LED indicator is
red.
Wiring %IX1.2.10
Description Reports the health status of a processor module.

406 AADvance 2.1 - Equipment View


Processor Module A 24v1 Power Feed Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The power feed voltage is within specifications (18 to 32 Vdc).

FALSE - The power feed is outside specifications.


Wiring %IX1.2.11
Description Reports the health of power feed 1 (nominal 24 Vdc) in the given slot of the 9110
processor module.

Processor Module B 24v1 Power Feed Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The power feed voltage is within specifications (18 to 32 Vdc).

FALSE - The power feed is outside specifications.


Wiring %IX1.2.12
Description Reports the health of power feed 1 (nominal 24 Vdc) in the given slot of the 9110
processor module.

Processor Module C 24v1 Power Feed Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The power feed voltage is within specifications (18 to 32 Vdc).

FALSE - The power feed is outside specifications.


Wiring %IX1.2.13
Description Reports the health of power feed 1 (nominal 24 Vdc) in the given slot of the 9110
processor module.

AADvance Workbench 407


Processor Module A 24v2 Power Feed Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The power feed voltage is within specifications (18 to 32 Vdc).

FALSE - The power feed is outside specifications.


Wiring %IX1.2.14
Description Reports the health of power feed 2 (nominal 24 Vdc) in the given slot of the 9110
processor module.

Processor Module B 24v2 Power Feed Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The power feed voltage is within specifications (18 to 32 Vdc).

FALSE - The power feed is outside specifications.


Wiring %IX1.2.15
Description Reports the health of power feed 2 (nominal 24 Vdc) in the given slot of the 9110
processor module.

Processor Module C 24v2 Power Feed Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The power feed voltage is within specifications (18 to 32 Vdc).

FALSE - The power feed is outside specifications.


Wiring %IX1.2.16
Description Reports the health of power feed 2 (nominal 24 Vdc) in the given slot of the 9110
processor module.

408 AADvance 2.1 - Equipment View


Processor Module A Ready

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is synchronized.

FALSE - The processor module is out of synchronization or missing.


Wiring %IX1.2.17
Description Reports that a processor module in a duplex or triplex redundant configuration is
present and is synchronized with one or both of its peers. Reports that a simplex
processor module is present.

Processor Module B Ready

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is synchronized.

FALSE - The processor module is out of synchronization or missing.


Wiring %IX1.2.18
Description Reports that a processor module in a duplex or triplex redundant configuration is
present and is synchronized with one or both of its peers. Reports that a simplex
processor module is present.

Processor Module C Ready

Direction Input to the application from the controller


Type Boolean
Values TRUE - The 9110 processor module in the given slot is synchronized.

FALSE - The processor module is out of synchronization or missing.


Wiring %IX1.2.19
Description Reports that a processor module in a duplex or triplex redundant configuration is
present and is synchronized with one or both of its peers. Reports that a simplex
processor module is present.

AADvance Workbench 409


Processor Module A NVRAM Battery Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The back-up battery in the given slot of the 9110 processor module
is present and the voltage is within satisfactory limits.

FALSE - The voltage of the back-up battery is low or the battery is missing.
Wiring %IX1.2.26
Description Reports the health status of the back-up battery in a processor module. The battery
voltage is verified during start up and then every 24 hours.

Processor Module B NVRAM Battery Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The back-up battery in the given slot of the 9110 processor module
is present and the voltage is within satisfactory limits.

FALSE - The voltage of the back-up battery is low or the battery is missing.
Wiring %IX1.2.27
Description Reports the health status of the back-up battery in a processor module. The battery
voltage is verified during start up and then every 24 hours.

Processor Module C NVRAM Battery Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - The back-up battery in the given slot of the 9110 processor module
is present and the voltage is within satisfactory limits.

FALSE - The voltage of the back-up battery is low or the battery is missing.
Wiring %IX1.2.28
Description Reports the health status of the back-up battery in a processor module. The battery
voltage is verified during start up and then every 24 hours.

410 AADvance 2.1 - Equipment View


Control Processor Variables

Control processor variables enable the application to send data to the controller. The
AADvance controller has the following control processor variables:

Control Integers
AUX LED Color
Allow Remote Fault Reset MSB
Allow Remote Fault Reset LSB

Control Booleans
Unlock All Locked Variables
Set System Health Alarm
HART Pass-Through
Perform Remote Fault Reset
Perform Remote Fault Join

AADvance Workbench 411


Control Integers

The following control integer lets the application send instructions to the controller:

AUX LED Color

Direction Output from the application to the controller


Type Word
Values 0 = off

1 = red

2 = green

3 = amber
The default value is 0
Wiring %QW1.1.0
Description Sets the state of the Aux LED indicator on all 9110 processor modules.

Allow Remote Fault Reset MSB (Most Significant Bits)

Direction Output from the application to the controller


Type WORD
Values Possible values range from 0 to 65535.
Wiring %QW1.1.1
Description Used in combination with Allow Remote Fault Reset LSB, enables remotely
resetting a processor or enables joining a processor to a running system. For a
successful remote fault reset or join, the value entered for the Remote Fault Reset
must match the combined values set for the control integers Allow Remote Fault
Reset MSB and Allow Remote Fault Reset LMB. As well, the control booleans
Perform Remote Fault Reset and Perform Remote Fault Join must be set to TRUE.

412 AADvance 2.1 - Equipment View


Allow Remote Fault Reset LSB (Least Significant Bits)

Direction Output from the application to the controller


Type WORD
Values Possible values range from 0 to 65535.
Wiring %QW1.1.2
Description Used in combination with Allow Remote Fault Reset MSB, enables remotely
resetting a processor or enables joining a processor to a running system. For a
successful remote fault reset or join, the value entered for the Remote Fault Reset
must match the combined values set for the control integers Allow Remote Fault
Reset MSB and Allow Remote Fault Reset LSB. As well, the control booleans
Perform Remote Fault Reset and Perform Remote Fault Join must be set to TRUE.

AADvance Workbench 413


Control Booleans

The following control Booleans let the application send instructions to the controller:

Unlock All Locked Variables

Direction Output from the application to the controller


Type Boolean
Values TRUE - Remove all locks

FALSE - No effect
The default value is FALSE
Wiring %QX1.3.0
Description Removes all user locks on input and output variables.

Set System Health Alarm

Direction Output from the application to the controller


Type Boolean
Values TRUE - When the variable transitions from FALSE to TRUE, the system
responds as if a system level fault was found. The System Healthy LED of
the processor module is set to RED and the System Health processor
variable is set to TRUE. When the variable is TRUE, the fault is
immediately re-annunciated after pressing the Fault Reset button.

FALSE - No alarm signal is sent to the controller. After the variable


transitions from TRUE to FALSE, the System Healthy LED of the processor
module turns GREEN once the Fault Reset button is pressed.
The default value is FALSE.
Wiring %QX1.3.1
Description Sends a system health alarm signal from the application to the controller.

414 AADvance 2.1 - Equipment View


HART Pass-Through

Direction Output from the application to the controller


Type Boolean
Values TRUE - HART Pass-Through is enabled and available for an analog I/O
module.

FALSE - HART Pass-Through is disabled and unavailable.


The default value is FALSE.
Wiring %QX1.3.2
Description Starts the HART Pass-Through feature enabling HART messages on analog input
and output modules. The system allows messages on each channel both
independently and together.

Perform Remote Fault Reset

Direction Output from the application to the controller


Type Boolean
Values TRUE - Resets the faulty processors.

FALSE - Remotely resetting processors is disabled.


The default value is FALSE.
Wiring %QX1.3.3
Description When a rising edge is detected, resets the faulty processors.

Perform Remote Fault Join

Direction Output from the application to the controller


Type Boolean
Values TRUE - The processors join the running system

FALSE - Remotely joining processors to a running system is disabled.


The default value is FALSE.

AADvance Workbench 415


Wiring %QX1.3.
Description When a rising edge is detected, the processors join the running system.

416 AADvance 2.1 - Equipment View


RTC Processor Variables and the Real Time Clock

RTC processor variables manage information regarding the real time clock. The AADvance
controller has the following RTC processor variables:

RTC Status Variables: Year, Month, Day of Month, Hours, Minutes, Seconds,
Milliseconds

RTC Program Variables: Year, Month, Day of Month, Hours, Minutes, Seconds,
Milliseconds

RTC Control Variables: RTC Write, RTC Read, Year, Month, Day of Month, Hours,
Minutes, Seconds, Milliseconds

Real Time Clock

The AADvance controller contains a real time clock (RTC) used to make a record of the time
and date of system events, SOE services, and log files. You can manually set the real time clock
of the processor by using RTC variables or use SNTP from the Communication View.

Important: You are strongly recommended to use SNTP to synchronize controllers so that all
time-related events, services, and logs use the same time of day.

To manually set the real time clock

You manually set the real time clock of the processor by using RTC variables.

1. From the Build menu, click Build All.

2. From the Project menu, either click Download or Update.

3. From the Online menu, click Connect.

4. Force the following RTC Control Variables to TRUE, therefore requesting IXL
restricted access: RTC Read, Year, Month, Day of Month, Hours, Minutes, Seconds, and
Milliseconds.

AADvance Workbench 417


Important: Do not force RTC Write at this point, the value should be FALSE.

The RTC Status variables now display the current date and time in the processor.

5. Set RTC Read to FALSE.

6. Double-click each RTC Program Variable (Year, Month, Day of Month, Hours,
Minutes, Seconds, and Milliseconds), specify a value, and then click Write.

7. To enable writing the new date and time to the processor, set RTC Write to TRUE and
then FALSE.

8. Lock and force the value of RTC Read to TRUE.

The RTC Status Variables now display the set date and time in the processor.

418 AADvance 2.1 - Equipment View


RTC Status Variables

The following RTC status variables supply data about the controller real-time clock to the
application:

RTC Status: Year

Direction Input to the application from the controller


Type Word
Values 2,000 to 2,399, or 0
Wiring %IW1.4.0
Description Reports the oldest value of the real-time clock (RTC) year as voted by the
presently synchronized 9110 processor modules. The value is only updated if the
RTC Control variable RTC Read is set to TRUE. If RTC Read is FALSE, the
value is 0 (zero).

RTC Status: Month

Direction Input to the application from the controller


Type Word
Values 1 to 12, or 0
Wiring %IW1.4.1
Description Reports the oldest value of the real-time clock (RTC) month as voted by the
presently synchronized 9110 processor modules. The value is only updated if the
RTC Control variable RTC Read is set to TRUE. If RTC Read is FALSE, the
value is 0 (zero).

RTC Status: Day of Month

Direction Input to the application from the controller


Type Word
Values 1 to 31, or 0

AADvance Workbench 419


Wiring %IW1.4.2
Description Reports the oldest value of the real-time clock (RTC) day of the month as voted
by the presently synchronized 9110 processor modules. The value is only
updated if the RTC Control variable RTC Read is set to TRUE. If RTC Read is
FALSE, the value is 0 (zero).

RTC Status: Hours

Direction Input to the application from the controller


Type Word
Values 0 to 23
Wiring %IW1.4.3
Description Reports the oldest value of the real-time clock (RTC) hours as voted by the
presently synchronized 9110 processor modules. The value is only updated if the
RTC Control variable RTC Read is set to TRUE. If RTC Read is FALSE, the
value is 0 (zero).

RTC Status: Minutes

Direction Input to the application from the controller


Type Word
Values 0 to 59
Wiring %IW1.4.4
Description Reports the oldest value of real-time clock (RTC) minutes as voted by the
presently synchronized 9110 processor modules. The value is only updated if the
RTC Control variable RTC Read is set to TRUE. If RTC Read is FALSE, the
value is 0 (zero).

RTC Status: Seconds

Direction Input to the application from the controller


Type Word
Values 0 to 59

420 AADvance 2.1 - Equipment View


Wiring %IW1.4.5
Description Reports the oldest value of real-time clock (RTC) seconds as voted by the
presently synchronized 9110 processor modules. The value is only updated if the
RTC Control variable RTC Read is set to TRUE. If RTC Read is FALSE, the
value is 0 (zero).

RTC Status: Milliseconds

Direction Input to the application from the controller


Type Word
Values 0 to 999
Wiring %IW1.4.6
Description Reports the oldest value of real-time clock (RTC) milliseconds as voted by the
presently synchronized 9110 processor modules. The value is only updated if the
RTC Control variable RTC Read is set to TRUE. If RTC Read is FALSE, the
value is 0 (zero).

AADvance Workbench 421


RTC Program Variables

The RTC program variables contain the information of the date and time to write to the
real-time clock. RTC program variables can only be used if the RTC Control variable RTC
Write is TRUE. The values are only written if the RTC control variable Year is TRUE. The
following RTC program variables are available for AADvance controllers:

RTC Program: Year

Direction Output from the application to the controller


Type Word
Values 2,000 to 2,399, or 0
The default value is 0 (zero)
Wiring %QW1.5.0
Description Specifies the year to write to the real-time clock when the RTC control variable
RTC Write is set to TRUE. The value is only written if the RTC control variable
Year is TRUE.

RTC Program: Month

Direction Output from the application to the controller


Type Word
Values 1 to 12, or 0
The default value is 0 (zero)
Wiring %QW1.5.1
Description Specifies the number of the month to write to the real-time clock when the RTC
control variable RTC Write is set to TRUE. The value is only written if the RTC
control variable Month is TRUE.

RTC Program: Day of Month

Direction Output from the application to the controller


Type Word

422 AADvance 2.1 - Equipment View


Values 1 to 31, or 0
The default value is 0 (zero)
Wiring %QW1.5.2
Description Specifies the day of the month to write to the real-time clock when the RTC
control variable RTC Write is set to TRUE. The value is only written if the RTC
control variable Day is TRUE.

RTC Program: Hours

Direction Output from the application to the controller


Type Word
Values 0 to 23
The default value is 0 (zero)
Wiring %QW1.5.3
Description Specifies the time of day (in hours) to write to the real-time clock when the RTC
control variable RTC Write is set to TRUE. The value is only written if the RTC
control variable Hours is TRUE.

RTC Program: Minutes

Direction Output from the application to the controller


Type Word
Values 0 to 59
The default value is 0 (zero)
Wiring %QW1.5.4
Description Specifies the time of day (in minutes) to write to the real-time clock when the RTC
control variable RTC Write is set to TRUE. The value is only written if the RTC
control variable Minutes is TRUE.

AADvance Workbench 423


RTC Program: Seconds

Direction Output from the application to the controller


Type Word
Values 0 to 59
The default value is 0 (zero)
Wiring %QW1.5.5
Description Specifies the time of day (in seconds) to write to the real-time clock when the RTC
control variable RTC Write is set to TRUE. The value is only written if the RTC
control variable Seconds is TRUE.

RTC Program: Milliseconds

Direction Output from the application to the controller


Type Word
Values 0 to 999
The default value is 0 (zero)
Wiring %QW1.5.6
Description Specifies the time of day (in milliseconds) to write to the real-time clock when the
RTC control variable RTC Write is set to TRUE. The value is only written if the
RTC control variable Milliseconds is TRUE.

424 AADvance 2.1 - Equipment View


RTC Control Variables

The following RTC control variables set and update the real-time clock:

RTC Control: RTC Write

Direction Output from the application to the controller


Type Boolean
Values TRUE - Applies new values to the real-time clock

FALSE -No effect


The default value is FALSE.
Wiring %QX1.6.0
Description Sets new values for the real-time clock. There are seven values, all specified by
the following RTC Program Variables: Year, Month, Day, Hours, Minutes,
Seconds, and Milliseconds. Each value is set only if the related RTC Control
Variable (which is a boolean, and similarly named Year, Month, Day, Hours,
Minutes, Seconds, or Milliseconds) is TRUE.

The change is started by the transition of the variable from FALSE to TRUE. If
the application holds the TRUE state until the end of the application cycle (or
longer), the application makes the change at the end of the cycle. There is no time
limit on returning the value from TRUE to FALSE after the clock is updated. If
the application returns the variable to FALSE before the end of the application
cycle, the clock is not updated.

Example

Consider the following scenario:

The date is 28th October 2008, 8 hours, 12 minutes and 35 seconds

RTC Control RTC Read is TRUE

RTC Control Year, Month, and Day of Month are TRUE

RTC Control Hours, Minutes, and Seconds are TRUE

AADvance Workbench 425


The RTC status variables are returned, and the real-time clock is set as follows:

Year = 2008

Month = 10

Day = 28

Hours = 8

Minutes = 12

Seconds = 35

RTC Control: RTC Read

Direction Output from the application to the controller


Type Boolean
Values TRUE - The controller updates the RTC status values on each application
cycle.

FALSE - The RTC status values are static (no update occurs).
The default value is FALSE
Wiring %QX1.6.1
Description Verifies if the RTC Status Variables (Year, Month, Day of Month, Hours,
Minutes, and Seconds) update in real time.

All RTC Status Variables must be set to TRUE when the RTC Read variable is set
to TRUE, otherwise the real-time clock is not updated.

RTC Control: Year

Direction Output from the application to the controller


Type Boolean

426 AADvance 2.1 - Equipment View


Values TRUE - The RTC program Year is applied by RTC Write.

FALSE - The RTC program Year is ignored.


The default value is FALSE until an initial value is specified in the application.
Wiring %QX1.6.2
Description Verifies if the value of the RTC program variable Year must be applied to the
real-time clock the next time the RTC control variable RTC Write is set to TRUE.

The RTC program variable Year is only updated if the RTC control variable RTC
Read is set to TRUE and all other RTC Control variables are set to TRUE.

RTC Control: Month

Direction Output from the application to the controller


Type Boolean
Values TRUE - The RTC program Month is applied by RTC Write.

FALSE - The RTC program Month is ignored.


The default value is FALSE until an initial value is specified in the application.
Wiring %QX1.6.3
Description Verifies if the value of the RTC program variable Month must be applied to the
real-time clock the next time the RTC control variable RTC Write is set to TRUE.

The RTC program variable Month is only updated if the RTC control variable
RTC Read is set to TRUE and all other RTC variables are set to TRUE.

RTC Control: Day of Month

Direction Output from the application to the controller


Type Boolean
Values TRUE - The RTC program Day of Month is applied by RTC Write.

FALSE - The RTC program Day of Month is ignored.


The default value is FALSE until an initial value is specified in the application.

AADvance Workbench 427


Wiring %QX1.6.4
Description Verifies if the value of the RTC program variable Day of Month must be applied
to the real-time clock the next time the RTC control variable RTC Write is set to
TRUE.

The RTC program variable Day of Month is only updated if the RTC control
variable RTC Read is set to TRUE and all other RTC Control variables are set to
TRUE.

RTC Control: Hours

Direction Output from the application to the controller


Type Boolean
Values TRUE - The RTC program Hours is applied by RTC Write.

FALSE - The RTC program Hours is ignored.


The default value is FALSE until an initial value is specified in the application.
Wiring %QX1.6.5
Description Verifies if the value of the RTC program variable Hours must be applied to the
real-time clock the next time the RTC control variable RTC Write is set to TRUE.

The RTC program variable Hours is only updated if the RTC control variable RTC
Read is set to TRUE and all other RTC Control variables are set to TRUE.

RTC Control: Minutes

Direction Output from the application to the controller


Type Boolean
Values TRUE - The RTC program Minutes is applied by RTC Write.

FALSE - The RTC program Minutes is ignored.


The default value is FALSE until an initial value is specified in the application.

428 AADvance 2.1 - Equipment View


Wiring %QX1.6.6
Description Verifies if the value of the RTC program variable Minutes must be applied to the
real-time clock the next time the RTC control variable RTC Write is set to TRUE.

The RTC program variable Minutes is only updated if the RTC control variable
RTC Read is set to TRUE and all other RTC Control variables are set to TRUE.

RTC Control: Seconds

Direction Output from the application to the controller


Type Boolean
Values TRUE - The RTC program Seconds is applied by RTC Write.

FALSE - The RTC program Seconds is ignored.


The default value is FALSE until an initial value is specified in the application.
Wiring %QX1.6.7
Description Verifies if the value of the RTC program variable Seconds must be applied to the
real-time clock the next time the RTC control variable RTC Write is set to TRUE.

The RTC program variable Seconds is only updated if the RTC control variable
RTC Read is set to TRUE and all other RTC Control Variables are set to TRUE.

RTC Control: Milliseconds

Direction Output from the application to the controller


Type Boolean
Values TRUE - RTC program Milliseconds is applied by RTC Write.

FALSE - RTC program Milliseconds is ignored.


The default value is FALSE until an initial value is specified in the application.

AADvance Workbench 429


Wiring %QX1.6.8
Description Verifies if the value of the RTC program variable Milliseconds must be applied to
the real-time clock the next time the RTC control variable RTC Write is set to
TRUE.

The RTC program variable Milliseconds is only updated if the RTC control
variable RTC Read is set to TRUE and all other RTC Control Variables are set to
TRUE.

430 AADvance 2.1 - Equipment View


Configuring the Controller I/O
You use the Equipment View to add I/O modules to controllers, mimicking the hardware
arrangement of the modules. I/O modules are available in a simplex arrangement or in a
redundant group of two or three modules. When selecting a redundant group, the Workbench
automatically assigns the modules to the free adjacent slots.

Note: In anticipation of modifications to the I/O hardware, you can add a duplex/triplex group
for a simplex arrangement or a triplex group for a duplex arrangement. If required, you can also
create a hot swap.

When Configuring the Controller, you select the required system type. You must define the
system type before adding any I/O modules. Different I/O modules are available depending on
the selected system type. When the system type is Mixed, both Standard and Eurocard I/O
modules are available.

You can perform the following tasks for I/O modules:

Add an I/O module to an empty slot

Insert an empty slot

Move an I/O module to a different slot

Remove an I/O module

Standard or Mixed System Type

The following I/O modules are available when the controller system type is Standard or Mixed:

Module Channels Termination Assemblies


9401 24Vdc Digital Input 8 9801 Digital Input TA - Simplex
Module
9802 Digital Input TA - Duplex
9803 Digital Input TA - Triplex
9402 24Vdc Digital Input 16 9801 Digital Input TA - Simplex
Module
9802 Digital Input TA - Duplex
9803 Digital Input TA - Triplex

AADvance Workbench 431


Module Channels Termination Assemblies
9431 24Vdc Analog Input 8 9831 Analog Input TA - Simplex
Module
9832 Analog Input TA - Duplex
9803 Analog Input TA - Triplex
9432 24Vdc Analog Input 16 9831 Analog Input TA - Simplex
Module
9832 Analog Input TA - Duplex
9803 Analog Input TA - Triplex
9451 24Vdc Digital Output 8 9851 Digital Output 24Vdc TA - Simplex
Module
9852 Digital Output 24Vdc TA - Duplex
9481 4-20mA Analog Output 3 9881 Analog Output TA - Simplex
Module
9882 Analog Output TA - Duplex
9482 4-20mA Analog Output 8 9881 Analog Output TA - Simplex
Module
9882 Analog Output TA - Duplex

Eurocard or Mixed System Type

The following I/O modules are available when the controller system type is Eurocard or Mixed:

Module Channels Termination Assemblies


9501 24Vdc Digital Input Module 8 9801 Digital Input TA - Simplex
9802 Digital Input TA - Duplex
9803 Digital Input TA - Triplex
9531 24Vdc Analog Input Module 8 9831 Analog Input TA - Simplex
9832 Analog Input TA - Duplex
9803 Analog Input TA - Triplex

432 AADvance 2.1 - Equipment View


Module Channels Termination Assemblies
9551 24Vdc Digital Output 8 9851 Digital Output 24Vdc TA - Simplex
Module
9852 Digital Output 24Vdc TA - Duplex
9581 4-20mA Analog Output 2 9881 Analog Output TA - Simplex
Module
9882 Analog Output TA - Duplex

To add an I/O module to a controller

Before adding an I/O module, ensure you have defined the required system type for the
controller.

1. From the Equipment View, expand the required controller and IO Bus to display the slots.

2. Right-click the required slot, and then click Assign I/O Module.
When adding duplex or triplex redundant groups, ensure sufficient free slots are
available adjacent to the required slot. You can also right-click an occupied slot and
then click Insert Empty Slot.

3. From the Select an I/O Module dialog box, select the required module and termination
assembly, then click OK.

The I/O module is added to the controller and needs to be configured.

AADvance Workbench 433


To move an I/O module to a different slot

You can move an I/O module to a different slot as long as the slot is empty. You can also move
a group of I/O modules as long as enough free slots are available.
From the Equipment View, expand the required IO bus, then click and drag the I/O
module to the required empty slot. You can alternately cut and paste the I/O module to the
required slot.

The I/O module has moved to the required slot.

To remove an I/O module


From the Equipment View, expand the IO bus, then right-click the required I/O module
and click Delete.

The slot is now empty and the channel variable is unwired.

434 AADvance 2.1 - Equipment View


Configuring I/O Modules
After adding the required I/O modules to the I/O bus of a controller, you must configure the
modules. The following are the five types of I/O modules in an AADvance controller, each
requiring different information to complete their configuration:

Digital Inputs

Analog Inputs

Digital Outputs

Analog Outputs

For all types of I/O modules, you configure the process safety time (PST) and status variable.

When configuring I/O modules, you must define the process safety time (PST). The process
safety time (PST) defines the maximum time in milliseconds that the outputs of a controller
remain in the ON state after detecting important diagnostic or application faults. When the
defined PST is exceeded, the outputs go into their specified safe states. By default, the PST is
inherited from the controller (See Configuring the Controller). You can also specify a smaller
PST for each I/O group.

When configuring an I/O module, you can use a status variable to get data from the module
such as the health, ready, online, run, and shutdown statuses. The status variable must have the
structure data type T9K_TA_GROUP_STATUS.

The following example displays the module-specific tab where you define the PST and wire
the status variable for an I/O module:

AADvance Workbench 435


T9K_TA_GROUP_STATUS

The structure type T9K_TA_GROUP_STATUS contains the following members (fields):

436 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.EXPC DINT Number of Retrieves the quantity of I/O modules
Modules Expected defined in the configuration of the group.
The possible values are 1, 2 or 3.
<tagname>.ACT DINT Number of Retrieves the quantity of I/O modules in a
Modules Online that are installed, powered, locked and
communicating over the I/O bus.
The possible values are 1, 2 or 3.
<tagname>.LOC DINT Slot location of Retrieves the number of the slot allocated to
first module in the first I/O module in a group.
group
For Eurocard systems, the possible values
are 1 to 18. For Standard or Mixed systems,
the possible values are 1 to 24.

Note: The I/O bus number is not specified.


<tagname>.GH BOOL Group Health Retrieves the general health status of all I/O
FALSE if any modules in a group.
module in fault
TRUE - All modules are healthy

FALSE - One or more modules in the


group is online and reporting a fault
<tagname>.AONL BOOL A Module Online Retrieves the online status of module A
Status
TRUE - The I/O module is installed,
powered, locked, and is
communicating over the I/O bus

FALSE - The I/O module is unable to


communicate over the I/O bus.

AADvance Workbench 437


Identifier Type Description Remarks
<tagname>.AHLY BOOL A Module Health Retrieves the general health of module A
Status
TRUE - The module is online and has
no faults

FALSE - The module is either offline


or reporting a fault
<tagname>.ARDY BOOL A Module Ready Retrieves the ready status of module A.
Status
TRUE - The module is online and
ready to send channel values

FALSE - The module is either offline


or not ready to send channel values
<tagname>.ARUN BOOL A Module Run Retrieves the run status of module A
Status
TRUE - The module is online and
reporting channel values or requires
manual intervention by pressing the
Fault Reset button before values can
be reported.

FALSE - The module is either offline


or online but is not reporting channel
values.
<tagname>.ASDN BOOL A Module Retrieves the shutdown status of module A
Shutdown Status
TRUE - You must press the Fault
Reset button before the module can
send values

FALSE - No action required

438 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.APOS DINT A Module Position Retrieves the slot number of module A
For Eurocard systems, the possible values
are 1 to 18. For Standard or Mixed systems,
the possible values are 1 to 24.

Note: The I/O bus number is not specified.


<tagname>.BONL BOOL B Module Online Retrieves the online status of module B
Status
TRUE - The I/O module is installed,
powered, locked, and is
communicating over the I/O bus

FALSE - The I/O module is unable to


communicate over the I/O bus.
<tagname>.BHLY BOOL B Module Health Retrieves the general health of module B
Status
TRUE - The module is online and has
no faults

FALSE - The module is either offline


or reporting a fault
<tagname>.BRDY BOOL B Module Ready Retrieves the ready status of module B
Status
TRUE - The module is online and
ready to send channel values

FALSE - The module is either offline


or not ready to send channel values

AADvance Workbench 439


Identifier Type Description Remarks
<tagname>.BRUN BOOL B Module Run Retrieves the run status of module B
Status
TRUE - The module is online and
reporting channel values or requires
manual intervention by pressing the
Fault Reset button before values can
be reported.

FALSE - The module is either offline


or online but is not reporting channel
values.
<tagname>.BSDN BOOL B Module Retrieves the shutdown status of module B
Shutdown Status
TRUE - You must press the Fault
Reset button before the module can
send values

FALSE - No action required


<tagname>.BPOS DINT B Module Position Retrieves the slot number of module B
For Eurocard systems, the possible values
are 1 to 18. For Standard or Mixed systems,
the possible values are 1 to 24.

Note: The I/O bus number is not specified.


<tagname>.CONL BOOL C Module Online Retrieves the online status of module C
Status
TRUE - The I/O module is installed,
powered, locked, and is
communicating over the I/O bus

FALSE - The I/O module is unable to


communicate over the I/O bus.

440 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.CHLY BOOL C Module Health Retrieves the general health of module C
Status
TRUE - The module is online and has
no faults

FALSE - The module is either offline


or reporting a fault
<tagname>.CRDY BOOL C Module Ready Retrieves the ready status of module C
Status
TRUE - The module is online and
ready to send channel values

FALSE - The module is either offline


or not ready to send channel values
<tagname>.CRUN BOOL C Module Run Retrieves the run status of module C
Status
TRUE - The module is online and
reporting channel values or requires
manual intervention by pressing the
Fault Reset button before values can
be reported.

FALSE - The module is either offline


or online but is not reporting channel
values.

AADvance Workbench 441


Identifier Type Description Remarks
<tagname>.CSDN BOOL C Module Retrieves the shutdown status of module C
Shutdown Status
TRUE - You must press the Fault
Reset button before the module can
send values

FALSE - No action required


<tagname>.CPOS DINT C Module Position Retrieves the slot number of module C
For Eurocard systems, the possible values
are 1 to 18. For Standard or Mixed systems,
the possible values are 1 to 24.

Note: The I/O bus number is not specified.

Note: The first module in a termination assembly is defined as A, the second as B, and the third
as C. The T9K_TA_GROUP_STATUS structure type always includes the fields for modules
A, B, and C even if the termination assembly only contains a simplex or duplex arrangement.

To configure the process safety time for an I/O module

By default, the PST value is inherited from the controller, but you can set a smaller PST for I/O
groups.

1. From the Equipment View, expand the IO bus and double-click the required I/O module.

The Equipment property page is displayed.

2. From the Equipment property page, in the module-specific tab, clear the Inherit option.

3. In the Process Safety Time field, type the required value ranging between 20 ms and
60000 ms. The value must be smaller than the PST set for the controller.

The process safety time for the I/O module is updated.

To wire a status variable to an I/O module

Status variables must have the T9K_TA_GROUP_STATUS structure type.

442 AADvance 2.1 - Equipment View


1. In the Dictionary, declare a variable with the following properties:
Data Type: T9K_TA_GROUP_STATUS
Direction: VarInput

2. In the Equipment View, expand the IO bus and double-click the required I/O module.

The Equipment property page is displayed.

3. From the property page, in the module-specific tab, click in the Status Variable
field.

The Variable Selector is displayed.

4. In the Variable Selector, select the required variable and then click OK.

The status variable is wired to the I/O module. When online, the controller gets the health,
ready, online, run, and shutdown statuses for the I/O module or group.

AADvance Workbench 443


Series 9000 Structure Data Types

The AADvance contains two types of variables structures when wiring to I/O channels: full
and compact. When wiring variables to I/O channels, you declare variables using the full or
compact structure data types applicable to the I/O module. You can also only wire the first
element by declaring a variable of the required data type. For example, if you only want to wire
the first element of the 9431 24Vdc AI channel, you must declare a variable of the REAL data
type.

When wiring a variable having the full or compact structure type, the AADvance Workbench
creates a set of variable structure members having the same <tagname>. The variable members
wired to the I/O channel are dependent on the chosen structure type. The syntax for a structure
member variable is <tagname>.XX, where <tagname> represents the name of the variable and
XX represents the structure member. For example, <tagname>.DI is a boolean reporting the
digital input state for a channel.

The following structure data types are used for wiring I/O variables to I/O channels:

Structure Type Definition


T9K_DI_FULL Series 9000 digital input channel
T9K_DI_COMPACT Series 9000 digital input channel
T9K_AI_FULL Series 9000 analog input channel
T9K_AI_COMPACT Series 9000 analog input channel
T9K_AI_HART Series 9000 HART data for an analog input
channel
T9K_AI_HART_FULL Series 9000 HART data for an analog input
channel
T9K_DO_FULL Series 9000 digital output channel
T9K_DO_COMPACT Series 9000 digital output channel
T9K_AO_FULL Series 9000 analog output channel
T9K_AO_COMPACT Series 9000 analog output channel

444 AADvance 2.1 - Equipment View


Digital Inputs

For digital input modules, you configure the following information:

Process Safety Time (see Configuring I/O Modules)

Status Variable (see Configuring I/O Modules)

Channels

Threshold Values

AADvance Workbench 445


Channels for Digital Inputs

You can use the following structure types when wiring channels for digital inputs:

T9K_DI_COMPACT

T9K_DI_FULL

If you only want to wire the first element of a digital input channel, you declare a variable using
the BOOL data type. The element retrieves the input module state.

The T9K_DI_FULL structure type reports state values, including the faulted state, for digital
input channels.

You wire channel variables so the controller receives the reported input values for the channels.

T9K_DI_COMPACT

Description Identifier Type Remarks


Input State <tagname>.DI BOOL TRUE - Input voltage is above threshold T6
FALSE - Input voltage is below threshold T5
Line Fault <tagname>.LF BOOL TRUE - Input voltage is above threshold T8;
between T5 and T4; or below T1
FALSE - Input voltage is between thresholds T2 and
T3; or between T6 and T7
Discrepancy <tagname>.DIS BOOL TRUE - A discrepancy in voltage larger than 20%
exists between the channels of a duplex or triplex
redundant configuration

446 AADvance 2.1 - Equipment View


T9K_DI_FULL

Description Identifier Type Remarks


Input State <tagname>.DI BOOL TRUE - Input voltage is above threshold T6
FALSE - Input voltage is below threshold T5
Line Fault <tagname>.LF BOOL TRUE - Input voltage is above threshold T8;
between T5 and T4; or below T1
FALSE - Input voltage is between thresholds T2 and
T3; or between T6 and T7
Discrepancy <tagname>.DIS BOOL TRUE - A discrepancy in voltage larger than 8% (of
24 V) exists between the channels of a duplex or
triplex redundant configuration
Channel Fault <tagname>.CF BOOL TRUE - Module diagnostics detect a fault in the
channel electronics or firmware (state = 7)
Voltage <tagname>.V UINT Reports the channel voltage in units of millivolts
with an accuracy of ± 500 mV.
State <tagname>.STA USINT Reports one of the following state value for the
channel:
1 = Open circuit
2 = De-energized (off)
3 = Indeterminate
4 = Energized (on)
5 = Short circuit
6 = Over voltage
7 = Faulted

Note: T1-T8 refers to the Threshold Values for Digital Inputs.

AADvance Workbench 447


Faulted State Value for Digital Inputs

A digital input channel is faulted when the channel is unable to report a voltage within a safety
accuracy specification of 10% of the full scale of the 24 Vdc supply (2.4 V). When a state is
faulted, the state value is 7. When a faulted state is reported, the following "safe" values are
reported by the other channel variables:

Input State = FALSE

Line Fault = TRUE

Discrepancy = TRUE

Channel Fault = TRUE

Voltage = 0 mV

To wire a channel variable to a digital input

You wire variables to digital input channels to enable the application to use the input.

1. From the Equipment View, double-click the required digital input module.

The Equipment property page is displayed with the module-specific tab as well as the
Channels and Thresholds tabs.

2. From the Equipment property page, click the Channels tab. The channels are displayed.

448 AADvance 2.1 - Equipment View


3. Locate the required channel, and in the Wire column click .

The Variable Selector is displayed.

4. In the Variable Selector, select the required variable and then click OK.

The digital input channel is wired.

AADvance Workbench 449


Threshold Values for Digital Inputs

The channel state and line fault status for the module are determined by comparing the channel
input voltage with a set of threshold values. You can use the default threshold values or define
custom values. When defining threshold values for the input module, each channel inherits the
threshold values. You can also define individual threshold values for each digital input
channel.

An indeterminate region is defined between the closed and open regions to detect marginal
faults in either the sensor or external wiring. To prevent chatter, the AADvance controller
provides hysteresis on the thresholds for increasing and decreasing values. The AADvance
Workbench updates the reporting values during each application cycle. The following displays
the typical (default) threshold values (T#), state values (STA), digital input statuses (DI), and
line fault statuses for a digital input module:

450 AADvance 2.1 - Equipment View


Default Threshold Values

The following default threshold values for digital inputs are for a standard (online monitored)
24 Vdc digital input channel:

AADvance Workbench 451


To define the custom threshold values for a digital input module

You can set custom threshold values for a digital input module. The channels of the digital
input module inherit the custom threshold values. You can also define custom threshold values
for individual channels.

1. From the Equipment View, double-click the required digital input module.

The Equipment property page is displayed with the module-specific tab as well as the
Channels and Thresholds tabs.

452 AADvance 2.1 - Equipment View


2. From the Equipment property page, click the Thresholds tab. The default threshold
values are displayed.

3. Select the Use Custom Thresholds option, then in the threshold fields, type the required
values.

The digital input channels inherit the custom threshold values from the module.

To define custom threshold values for individual channels

1. From the Equipment View, expand the digital input module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab and Thresholds
tab.

2. From the Equipment property page, click the Thresholds tab. The inherited threshold
values are displayed.

3. Select the Use Custom Thresholds option, then in the threshold fields, type the required
values.

The channel has custom threshold values.

To restore the default threshold values for a digital input module


In the Equipment property page Thresholds tab, clear the Use Custom Thresholds
option.

The default threshold values are restored.

AADvance Workbench 453


Analog Inputs

For analog input modules, you configure the following information:

Process Safety Time (see Configuring I/O Modules)

Status Variable (see Configuring I/O Modules)

Channels

HART

HART Pass-Through

Threshold Values

454 AADvance 2.1 - Equipment View


Channels for Analog Inputs

You can use the following structure types when wiring channels for analog inputs:

T9K_AI_COMPACT

T9K_AI_FULL

If you only want to wire the first element of an analog input channel, you declare a variable
using the REAL data type. The element retrieves a floating-point value representing 4 to 20
mA.

The structure types contain additional information about the input, such as the discrepancy
status. The T9K_AI_FULL structure type also reports state values, including the faulted state,
for analog input channels.

You wire channel variables so the controller receives the reported input values for the channels.

T9K_AI_COMPACT

Description Identifier Type Remarks


Process Value <tagname>.PV REAL A scaled, floating-point value representing the
(PV) analog loop current.
The default scaling factor is 0 to 100%,
representing 4 to 20 mA.
Raw Count <tagname>.CNT INT A count representing the current on the channel in
units of 1/256 mA.

0 represents 0 mA

5,120 represents 20 mA
Accuracy is within ± 13 counts, equivalent to ±
0.05 mA
Discrepancy <tagname>.DIS BOOL TRUE - A discrepancy in current larger than 2%
exists between the channels of a duplex or triplex
redundant configuration.

AADvance Workbench 455


T9K_AI_FULL

Description Identifier Type Remarks


Process Value <tagname>.PV REAL A scaled, floating-point value representing the
analog loop current.
The default scaling factor is 0 to 100%, representing
4 to 20 mA.
Raw Count <tagname>.CNT INT A count representing the current on the channel in
units of 1/256 mA.

0 represents 0 mA

5,120 represents 20 mA
Accuracy is within ± 13 counts, equivalent to ± 0.05
mA
Line Fault <tagname>.LF BOOL TRUE - The state value is 1, 5, 6 or 7
FALSE - The state value is 2, 3 or 4
Discrepancy <tagname>.DIS BOOL TRUE - A discrepancy in current larger than 2%
exists between the channels of a duplex or triplex
redundant configuration.
Channel Fault <tagname>.CF BOOL TRUE - Module diagnostics detect a fault in the
channel electronics or firmware (state = 7)
State <tagname>.STA USINT Reports one of the following state values for the
channel:
1 = Open circuit
2 = Transmitter fault (low)
3 = Normal
4 = Transmitter fault (high)
5 = Short circuit
6 = Over range
7 = Faulted

456 AADvance 2.1 - Equipment View


Faulted State Value for Analog inputs

An analog input channel is faulted when the channel is unable to report a count within a safety
accuracy specification of 1% of the full scale measurement range of 5,120 (51 counts, 0.2 mA).
When a state is faulted, the state value is 7. When a faulted state is reported, the following
"safe" values are reported by the other channel variables:

Process Value = A calculated value based on a Count value of 0

Line Fault = TRUE

Discrepancy = TRUE

Channel Fault = TRUE

Count = 0

To wire a channel variable to an analog input

You wire variables to analog input channels to enable the application to use the input.

1. From the Equipment View, expand the analog input module, and double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab as well as the
HART and Thresholds tabs.

2. From the Equipment property page, click the Channel-specific tab.

3. In the Channel Variable field, click .

The Variable Selector is displayed.

4. In the Variable Selector, select the required variable and then click OK.

The analog input channel is wired.

AADvance Workbench 457


5. In the Raw fields, set the Low and High counts for the values received from the field
elements.

6. In the Engineering fields, set the Low and High scaling factor in the range of 0% to
100%.

Example

Raw Count Engineering Value (%) Process Value (mA)


1,024 0 4
3,072 50 12
5,120 100 20

458 AADvance 2.1 - Equipment View


HART for Analog Inputs

Highway Addressable Remote Transducer (HART) is an open protocol for process control
instrumentation. HART combines digital signals with analog signals to supply control and
status data for field devices. The AADvance controller supports the use of HART on each
analog input and output channel. The AADvance controller also supports HART
Pass-Through. The application can use HART data to monitor and respond to device conditions
and to supply diagnostic information such as data comparison and error reporting. The HART
protocol increases the level of safety system diagnostics.

If using HART in a safety system, follow these precautionary guidelines:

Do not use HART variables as the primary initiator for a Safety Instrumented
Function (SIF). The HART protocol does not satisfy the required safety
integrity levels for Safety Instrumented Functions.

Make sure to disable HART for field devices having an unlocked


configuration. This prevents the use of HART from changing a device
configuration.

Ensure the custom data for the device (the data given in response to HART
command 3) is used in accordance with the recommendations of the
manufacturer.

When enabling HART on an AADvance controller, you must ensure the HART field devices
support the HART commands 0 (read unique ID) and 3 (read current and four dynamic
variables). The commands are used for communication between the AADvance controller and
the HART field devices. The analog input and output modules use the HART command 3 to
collect data from the field devices as specified by Revision 5 of the HART specification.

To enable monitoring HART field device information, you wire a HART variable to the
required channels of analog input and output modules. HART variables must be declared using
the following structure types:

T9K_AI_HART

T9K_AI_HART_FULL

In the AADvance Workbench, the T9K_AI_HART_FULL structure type is used for HART
Pass-Through communication.

AADvance Workbench 459


The HART structure types supply the following information:

Loop current in milliamps (mA)

Process measurement in engineering units

Errors on HART communication seen by the field device

Status of the field device

Time since the most recent update, in milliseconds (ms)

You can use the loop current variable for diagnostic checks in the application, comparing the
value of the variable with the value on the 4 to 20 mA loop, and reacting if there is a
discrepancy. You can also monitor the status of the field device and use this to report diagnostic
errors and manual configuration changes.

Important: The update rate for HART data from field devices is slower than the update rate
for the 4 to 20 mA analog signal itself. HART data can take a maximum of 4 seconds to update,
depending on the device type and configuration.

T9K_AI_HART

The T9K_AI_HART structure type is used when declaring HART variables.

Identifier Type Description Remarks


<tagname>.I REAL Current Loop current in mA
<tagname>.V1 REAL First Variable First loop current variable
<tagname>.U1 BYTE First Variable First loop current variable units code
Units Code
<tagname>.V2 REAL Second Variable Second loop current variable
<tagname>.U2 BYTE Second Variable Second loop current variable units code
Units Code
<tagname>.V3 REAL Third Variable Third loop current variable
<tagname>.U3 BYTE Third Variable Third loop current variable units code
Units Code
<tagname>.V4 REAL Fourth Variable Fourth loop current variable

460 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.U4 BYTE Fourth Variable Fourth loop current variable units code
Units Code
<tagname>.COMMS BOOL Communication HART communication status
Status
TRUE - Communication OK
FALSE - Communication stopped
<tagname>.DEVICE BYTE Device Status Field device status:
Bit 7 - Field device malfunction
Bit 6 - Configuration changed
Bit 5 - Cold start
Bit 4 - More status available
Bit 3 - Analog output current fixed
Bit 2 - Analog output saturated
Bit 1 - Second, third, or fourth variable
out of limits
Bit 0 - First variable out of limits

T9K_AI_HART_FULL

The T9K_AI_HART_FULL structure type is used for HART Pass-Through communication:

Identifier Type Description Remarks


<tagname>.I REAL Current Loop current in mA
<tagname>.V1 REAL First Variable First loop current variable
<tagname>.U1 BYTE First Variable First loop current variable units code
Units Code
<tagname>.V2 REAL Second Second loop current variable
Variable

AADvance Workbench 461


Identifier Type Description Remarks
<tagname>.U2 BYTE Second Second loop current variable units
Variable Units code
Code
<tagname>.V3 REAL Third Variable Third loop current variable
<tagname>.U3 BYTE Third Variable Third loop current variable units code
Units Code
<tagname>.V4 REAL Fourth Variable Fourth loop current variable
<tagname>.U4 BYTE Fourth Variable Fourth loop current variable units code
Units Code
<tagname>.COMMS BOOL Communication HART communication status
Status
TRUE - Communication OK
FALSE - Communication stopped
<tagname>.DEVICE BYTE Device Status Field device status:
Bit 7 - Field device malfunction
Bit 6 - Configuration changed
Bit 5 - Cold start
Bit 4 - More status available
Bit 3 - Analog output current fixed
Bit 2 - Analog output saturated
Bit 1 - Second, third, or fourth variable
out of limits
Bit 0 - First variable out of limits

462 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.ELAPSED DINT Elapsed Time Elapsed time (ms) since last
Since Update non-Pass-Through communication.
This parameter is reset to zero when
data is received.
<tagname>.PASSTHROUGH BOOL Pass-Through HART Pass-Through communication
Communication status:
in Progress
TRUE: Communication OK
FALSE: Communication stopped

To configure HART for monitoring an analog input field device

To monitor a field device, you must configure an analog channel to use HART by wiring a
variable having the T9K_AI_HART structure type. You must enable HART on each channel
to use the HART protocol.

1. In the dictionary, declare a HART variable having the structure type T9K_AI_HART.

2. From the Equipment View, expand the analog input module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab as well as the
HART and Thresholds tabs.

3. In the Equipment property page, click the HART tab.

4. Select the Enable HART on this Channel property.

AADvance Workbench 463


5. In the HART Variable field, click .

The Variable Selector is displayed.

6. In the Variable Selector, select the required variable and then click OK.

The analog input channel is configured to use the HART protocol.

464 AADvance 2.1 - Equipment View


HART Pass-Through for Analog Inputs

The HART Pass-Through feature enables using an external asset management system to
manage HART compatible field devices connected to an AADvance controller.

HART Pass-Through uses the Device Type Manager (DTM) standard, defined by the HART
Communication Foundation, to enable using any asset management system having the generic
'Frame' standard. Examples of compatible tools are the Fieldcare application by
Endress+Hauser and the FactoryTalk AssetCentre by Rockwell Automation.

To use HART Pass-Through, you must install the AADvance HART DTM software on the
computer running the asset management system. You can then enable or disable the HART
Pass-Through capability of the controller. You declare HART variables to monitor HART
Pass-Through data for analog input and output channels.

When using HART Pass-Through in a safety system, follow these precautionary


guidelines:

Ensure HART Pass-Through is only enabled under control of the application.

Ensure HART Pass-Through is enabled only when necessary.

Configure the application to start an alarm if HART Pass-Through is enabled


on any safety-critical channel of any module.

HART Pass-Through has the following features:

Pass-Through support for HART standards 5, 6, and 7

Dedicated Ethernet port for HART Pass-Through communication

Compatible with the AADvance DTM supplied by Rockwell Automation

Note: HART Pass-Through should not be used on a safety application loop but is considered
non-interfering on the SIL 3 loop. Also, note that HART Pass-Through data is unmonitored.
The HART feature in AADvance provides a controller capability to pass through requests and
responses.

To use HART Pass-Through in the AADvance Workbench, you must perform the following:

Declare a variable having the T9K_AI_HART_FULL structure type

AADvance Workbench 465


Declare a CIP Produce variable (See Communication View)

Declare a control processor variable for HART Pass-Through (See Control Booleans)

Enable HART on an analog input channel

On an enabled channel, wire a HART variable

Install the AADvance HART DTM software

Enable HART Pass-Through at the controller level

Attention: HART Pass-Through has the following limitation for the maximum
size of a HART message:

For an analog input module, the maximum message size is 0x5F (plus
between 5 and x14 bytes preamble) for the command to remote HART
device and 0x5F for a response (including up to 14 bytes for the preamble).

The following is a typical arrangement of a system using HART Pass-Through:

466 AADvance 2.1 - Equipment View


AADvance Workbench 467
You set up the application to get status data for individual analog channels. The following
members of the T9K_AI_HART_FULL structure type supply data:

<tagname>.ELAPSED (DINT), displays the time in milliseconds since the most recent
valid non-Pass-Through communication. The value of this element resets to 0 (zero)
when the application passes new HART data on the channel.

<tagname>.PASSTHROUGH (BOOL), displays when the channel is carrying HART


Pass-Through data.

The application can use these members to choose when to permit HART Pass-Through
communications.

To configure HART for Pass-Through communication monitoring

You configure an analog input channel to supply HART and use Pass-Through communication
monitoring. You must wire a variable having the T9K_AI_HART_FULL structure type to the
required channels. You must enable HART on each channel to use HART Pass-Through.

1. In the dictionary, declare a HART variable having the structure type


T9K_AI_HART_FULL.

2. From the Equipment View, expand the analog input module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab as well as the
HART and Thresholds tabs.

3. In the Equipment property page, click the HART tab.

4. Select the Enable HART on this Channel property.

468 AADvance 2.1 - Equipment View


5. In the HART Variable field, click .

The Variable Selector is displayed.

6. In the Variable Selector, select the required variable having the T9K_AI_HART_FULL
type, and then click OK.

The analog input channel is configured to use HART protocol and HART Pass-Through.

To install the AADvance HART DTM software

For AADvance systems, the AADvance HART DTM is the device type manager for the HART
Pass-Through feature. You must install the software on the Windows computer running the
asset management system. The AADvance HART DTM is accessible from the RA Download
Center.

AADvance Workbench 469


1. Uninstall the existing version of the DTM installed on your Workstation.

2. Restart the system.

3. Locate and install the file named AADvance DTM 1.xxx Setup.exe.

4. Once the installation is complete, restart the system.

The AADvance HART DTM is installed.

To enable HART Pass-Through in the controller

To use HART Pass-Through, you must define at least one CIP Produce variable in the
Workbench. To activate the CIP stack, you must have CIP produce and consume variables.

1. In the dictionary, create a variable having the following properties:


Name: HART_CONTROL
Data type: BOOL
Direction: VarOutput

The HART_CONTROL variable is used to enable and disable HART Pass-Through.

2. In the Equipment View, double-click the controller requiring HART Pass-Through.

The Equipment property page is displayed with the Processor, Status, Control, and RTC
tabs.

3. In the property page, click the Control tab.

4. In the HART Pass-Through row, click .

The Variable Selector is displayed.

5. In the Variable Selector, select the HART_CONTROL variable, and then click OK.

The HART_CONTROL variable is wired to the processor control variable.

470 AADvance 2.1 - Equipment View


To use FactoryTalk AssetCentre with an analog input module

The following is an example displaying how to configure FactoryTalk AssetCentre to use the
HART Pass-Through feature with analog input and output modules.

1. From the FactoryTalk AssetCentre, in the Tools menu, click DTM Catalog.

2. In the DTM Catalog dialog box, click Scan Now.

All device type managers are scanned and automatically updated.

3. Uninstall the existing version of the DTM installed on your computer and then restart the
system.

4. In the DTM Networks dialog box, right-click the Host computer item at the top of the tree
view, and then click Add DTM.

AADvance Workbench 471


5. Select EtherNet/IP Gateway, and then click OK.

The tree structure under Host computer is displayed.

6. Right-click on 1 below Ethernet/IP Gateway, and then click Add DTM.

7. Select T9432IH, and rename it AIM [T9432IH]

The tree structure below Ethernet/IP Gateway is displayed.

472 AADvance 2.1 - Equipment View


8. Right-click AIM [T9432IH], and then click Configuration.

9. Enter the IP address for the AADvance controller and the slot number for the analog
input module, and then click Next.

10. Right-click AIM [T9432], and then click Scan network.

11. In the Select Communication Channel dialog box, select all of the channels, and then
click OK.

All the input channels on the AADvance controller are now set up for the HART Pass-Through
functionality.

AADvance Workbench 473


Threshold Values for Analog Inputs

The channel state and line fault status for the module are determined by comparing the channel
input current with a set of threshold values. You can use the default threshold values or define
custom values. When defining threshold values for the input module, each channel inherits the
threshold values. You can also define individual threshold values for each analog input
channel.

Important: When the system is operational, threshold values can only be changed using an
online update.

To prevent chatter, the AADvance controller provides hysteresis on the thresholds for
increasing and decreasing values The AADvance Workbench updates the reporting values
during each application cycle. The following displays the typical (default) threshold values
(T#), state values (STA), and line fault statuses for an analog input module:

474 AADvance 2.1 - Equipment View


Default Threshold Values

The default threshold values for analog inputs are for a standard (online monitored) 24 Vdc
analog input channel. The values agree with the lower limit and higher limits for an analog
signal detailed in the NAMUR NE43 standard. The following are the default values:

AADvance Workbench 475


To define the custom threshold values for an analog input module

You can set custom threshold values for an analog input module. The channels of the analog
input module inherit the custom threshold values. You can also define custom threshold values
for individual channels.

1. From the Equipment View, double-click the required analog input module.

The Equipment property page is displayed with the Module-specific tab as well as the
Channels, HART, and Thresholds tabs.

476 AADvance 2.1 - Equipment View


2. From the Equipment property page, click the Thresholds tab. The default threshold
values are displayed.

3. Select the Use Custom Thresholds option, then in the threshold fields, type the required
values.

The digital input channels inherit the custom threshold values from the module.

To define custom threshold values for individual channels

1. From the Equipment View, expand the digital input module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific, HART, and
Thresholds tabs.

2. From the Equipment property page, click the Thresholds tab. The inherited threshold
values are displayed.

3. Select the Use Custom Thresholds option, then in the threshold fields, type the required
values.

The channel has custom threshold values.

To restore the default threshold values for a digital input module


In the Equipment property page Thresholds tab, clear the Use Custom Thresholds
option.

The default threshold values are restored.

AADvance Workbench 477


Digital Outputs

For digital output modules, you configure the following information:

Process Safety Time (see Configuring I/O Modules)

Status Variable (see Configuring I/O Modules)

Channels

Advanced Settings

Variables

478 AADvance 2.1 - Equipment View


Channels for Digital Outputs

You can use the following structure types when wiring channels for digital outputs:

T9K_DO_COMPACT

T9K_DO_FULL

The structure types provide data about the output such as the line fault and discrepancy
statuses.

If you only want to wire the first element of a digital output channel, you declare a variable
using the BOOL data type.

You can also set the Advanced settings for individual digital output channels.

Important: The controller writes to the digital outputs once during each application cycle and
the digital output variables are updated once during each application cycle.

T9K_DO_COMPACT

Identifier Type Description Remarks


<tagname>.DOP BOOL Command The output demand to pass to the output channel
State
Set to TRUE to energize

Set to FALSE to de-energize


<tagname>.LF BOOL Line fault TRUE - The field supply is missing, the load is
disconnected, or a short circuit is detected.
<tagname>.DIS BOOL Discrepancy TRUE - A discrepancy in current larger than 1%
exists between the channels of two modules in a
redundant configuration. Discrepancy can only be
reported TRUE when two modules are active in a
group.

AADvance Workbench 479


T9K_DO_FULL

Identifier Type Description Remarks


<tagname>.DOP BOOL Command The output demand to pass to the output channel
State
Set to TRUE to energize

Set to FALSE to de-energize


<tagname>.LF BOOL Line fault TRUE - The field supply is missing, the load is
disconnected, or a short circuit is detected.
<tagname>.DIS BOOL Discrepancy TRUE - A discrepancy in current larger than 1%
exists between the channels of two modules in a
redundant configuration. Discrepancy can only be
reported TRUE when two modules are active in a
group.
<tagname>.CF BOOL Channel Fault TRUE - Module diagnostics identify a fault in the
channel electronics or firmware (state = 7)
<tagname>.V UINT Voltage Reports the channel voltage at the output
terminals, in units of millivolts within an accuracy
of ± 500 mV. The voltage structure member is
unable to report values below 0 mV.

480 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.I INT Current Reports the current for the channel in milliamps
within an accuracy of ± 2 mA and ± 10% of
measurement.
<tagname>.STA USINT State Reports a state value for the channel:
1 = No vfield, the field supply voltage is at or
below 18 V. The reported voltage (<tagname>.V)
is 0 mV.
2 = De-energized (off), the command state is
FALSE and the channel is de-energized.
3 = No load, the controller is unable to identify a
load connected to the channel field wiring or the
load is below the required minimum channel load
of 10 mA when the command state is TRUE.
4 = Energized (on), The command state is TRUE
and the channel is energized.
5 = Short circuit, the controller has detected a short
circuit condition, irrespective of the channel drive
state.
6 = Field fault, an external source is driving the
channel to an energized state or a voltage is larger
than 18 Vdc, irrespective of the channel drive
state.
7 = Faulted

Faulted State Value for Digital Outputs

A digital output channel is faulted when normal operations or diagnostic tests find a known
fault condition. When a channel is faulted, the state reports the value 7, and the other variables
report the following 'safe' values:

Line Fault = TRUE

Discrepancy = TRUE

AADvance Workbench 481


Channel Fault = TRUE

Voltage = 0 mV

Current = 0 mA

Protection for Digital Outputs

The AADvance controller has three mechanisms to protect digital output channels:

Inrush current protection

Short circuit protection for energized channels

Short circuit protection for de-energized channels

The controller tolerates inrush currents so the digital outputs can energize capacitive loads
without causing the controller to report a short circuit. The following displays the
characteristics of the maximum load currents the controller tolerates when a digital output is
energized. If the load current enters the region above the curve on the graph, the controller
applies inrush current protection.

482 AADvance 2.1 - Equipment View


After allowing for inrush, the controller engages short circuit protection for an energized
channel when the loop current reaches 2 A.

Short circuit detection on an energized channel is immediate and the channel is


de-energized. The controller reports the condition until the short circuit is cleared.

When the short circuit is removed, the channel re-energizes. The short circuit report is
then cleared by pressing the fault reset button on the 9110 processor module or by setting
the command state to FALSE.

The controller verifies de-energized digital output channels for possible short circuits.
Periodically, the controller partially turns on each de-energized output in turn and measures the
loop current. If the loop current shows a loop resistance of less than approximately 10 Ω, the
controller reports a short circuit.

AADvance Workbench 483


To wire a channel variable to a digital output

You wire variables to digital output channels to enable the application to use the output.

1. From the Equipment View, double-click the required digital output module.

The Equipment property page is displayed with the module-specific tab as well as the
Channels and Variables tabs.

2. From the Equipment property page, click the Channels tab. The channels are displayed.

3. Locate the required channel, and in the Wire column click .

The Variable Selector is displayed.

4. In the Variable Selector, select the required variable and then click OK.

The digital output channel is wired.

484 AADvance 2.1 - Equipment View


Advanced Settings for Digital Output Channels

You can configure the following advanced settings for individual digital output channels:

Shutdown State

Disable Line Test

Shutdown State

The Shutdown State defines how the output behaves when the following occurs to the parent
9451 digital output module:

The module suffers a loss of communications with the processor

A failure in the module causes the module to go into shutdown mode

Disable Line Test

You can enable or disable the line test in the AADvance Workbench. The 9451 digital output
module performs a test (Disable Line Test) for a no load condition on each output. A no load
condition occurs when the controller is unable to locate a load connected to the field wiring or
the load current is below 20 mA when the output command state is TRUE. You must disable
the line test if you want to connect a low load to an output or if the output is unused and you
prefer not to fit a dummy load.

When the line test is enabled, the module reports a no load condition by setting the state
variable (<tagname>.STA) to the value 3 and by setting the channel LED to amber. After
disabling the line test, and assuming there are no other faults present, the state variable
indicates the value 2 or 4 (depending on the command state value) and the channel LED is off
or green instead of amber.

Important: If you disable the line test, there are other scenarios, such as no field voltage, that
set the channel LED to amber.

AADvance Workbench 485


To configure the shutdown state and disable line test

1. From the Equipment View, expand the digital output module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific and Advanced tabs.

2. In the property page, click the Advanced tab.

3. Select the Use Advanced Settings property.

4. Set the Shutdown state to one of the following options:


Off - Disables the output when the module is in the shutdown state
Hold Last State - Forces the output to stay in the most recent state during a module
shutdown.
Default - Not used by the application

Important: To maintain the safety rating of the system, when using Hold Last State for a
safety-related output, you must restore the communications in less than the MTTR or use other
compensating measures during a module failure.

5. Set the Disable Line Test to Yes or No.

The advanced settings are configured for the digital output channel.

486 AADvance 2.1 - Equipment View


Variables for Digital Outputs

The 9451 digital output module provides the following status variables available to the
application:

Status Booleans
Group Field Power Health

Field Power Status Integers


Group Field Power Current
A Module Field Power Voltage 1
A Module Field Power Voltage 2
B Module Field Power Voltage 1
B Module Field Power Voltage 2

AADvance Workbench 487


To wire a status variable to a digital output module

1. In the Equipment View, double-click the required digital output module.

The Equipment property page is displayed with the Module-specific, Channels, and
Variables tabs.

2. In the Equipment property page, click the Variables tab.

3. From the Variables tab, locate the required status variable, and in the Wire column click
.

The Variable Selector is displayed.

4. From the Variable Selector, select the required variable and click OK.

The status variable is wired.

To unwire a processor variable

1. From the Equipment View, double-click the required digital output module.

2. In the Equipment property page, click the Variables tab.

3. From the Variables tab, locate the wired variable, and in the Unwire column click .

The status variable is unwired.

488 AADvance 2.1 - Equipment View


Status Booleans

The following status boolean provides data to the application about the field power supplies to
a group of digital output modules:

Group Field Power Health

Direction Input to the application from the controller


Type Boolean
Values TRUE - All field power supplies for all active digital output modules in the
group are in the range of 18 V to 32 Vdc.
FALSE - One or more field power supplies to an active module is less than
18 Vdc or more than 32 Vdc.
Wiring %IX115.9.0
Description Provides a top level indication of the health of field power supplies to active
digital output modules.

Important: The controller incorporates a 0.5 V hysteresis on these thresholds to prevent


chatter. The controller declares a fault when a supply falls below 18 V but does not clear the
fault until the supply rises to 18.5 V. Similarly the controller declares a fault when a supply
exceeds 32 V but does not clear the fault until the supply falls below 31.5 V.

AADvance Workbench 489


Field Power Status Integers

The following field power status integers provides data to the application about the field power
supplies to a group of digital output modules:

Group Field Power Current

Direction Input to the application from the controller


Type DINT
Values 0 to 8,000 mA or larger (limited by the capacity of the DINT variable)
Description Reports the total current drawn from the field power supply by the active digital
output modules in a group. Accuracy is ± 10%.

A Module Field Power Voltage 1

Direction Input to the application from the controller


Type DINT
Values 0 to 48,000 mV or larger (limited by the capacity of the DINT variable)
Description Reports the voltage from the field power supply for the specified module and
field power input. Accuracy is ± 500 mV.

A Module Field Power Voltage 2

Direction Input to the application from the controller


Type DINT
Values 0 to 48,000 mV or larger (limited by the capacity of the DINT variable)
Description Reports the voltage from the field power supply for the specified module and
field power input. Accuracy is ± 500 mV.

490 AADvance 2.1 - Equipment View


B Module Field Power Voltage 1

Direction Input to the application from the controller


Type DINT
Values 0 to 48,000 mV or larger (limited by the capacity of the DINT variable)
Description Reports the voltage from the field power supply for the specified module and
field power input. Accuracy is ± 500 mV.

B Module Field Power Voltage 2

Direction Input to the application from the controller


Type DINT
Values 0 to 48,000 mV or larger (limited by the capacity of the DINT variable)
Description Reports the voltage from the field power supply for the specified module and
field power input. Accuracy is ± 500 mV.

AADvance Workbench 491


Analog Outputs

For analog output modules, you configure the following information:

Process Safety Time (see Configuring I/O Modules)

Status Variable (see Configuring I/O Modules)

Channels

Advanced Settings

HART

HART Pass-Through

492 AADvance 2.1 - Equipment View


Channels for Analog Outputs

You can use the following structure types when wiring channels for analog outputs:

T9K_AO_COMPACT

T9K_AO_FULL

If you only want to wire the first element of an analog output channel, you declare a variable
using the REAL data type. This variable retrieves the command state.

The structure types provide data about the output such as the line fault and discrepancy
statuses.

The controller writes to the analog outputs once during each application cycle. The analog
output variables are also updated once during each application cycle.

T9K_AO_COMPACT

Description Identifier Type Remarks


Command <tagname>.CV REAL The demanded current. A scaled, floating-point
Value value showing the analog loop current.
The default scaling factor is 0 to 100%,
representing 4 to 20 mA.
Line Fault <tagname>.LF BOOL TRUE - One of the following:

The field supply is missing

The load is disconnected

Unable to meet the commanded output current

The wiring polarity is reversed

Channel fault (states 1,3,5,6,7).


Discrepancy <tagname>.DIS BOOL TRUE - The measured current and commanded
current differ by more than the fail-safe guard band

AADvance Workbench 493


T9K_AO_FULL

Description Identifier Type Remarks


Command <tagname>.CV REAL The demanded current. A scaled, floating-point
Value value showing the analog loop current.
The default scaling factor is 0 to 100%,
representing 4 to 20 mA.
Line Fault <tagname>.LF BOOL TRUE - One of the following:

The field supply is missing

The load is disconnected

Unable to meet the commanded output current

The wiring polarity is reversed

Channel fault (states 1,3,5,6,7)


Discrepancy <tagname>.DIS BOOL TRUE - The measured current and commanded
current differ by more than the fail-safe guard band.
Channel Fault <tagname>.CF BOOL TRUE - Module diagnostics detect a fault in the
channel electronics or firmware (state = 7)
Voltage <tagname>.V INT Reports the channel voltage at the output terminals,
in units of millivolts and within an accuracy of ±
500 mV.

494 AADvance 2.1 - Equipment View


Description Identifier Type Remarks
Raw Count <tagname>.CNT INT Reports the current for the channel in raw units
scaled 256 per mA, from 0 to 24 mA (0 to 6,144).
State <tagname>.STA USINT Reports a state value for the channel:
1 = No vfield, the field supply voltage is at or below
18 Vdc and the commanded current is less than 0.4
mA for the channel.

Important: When the state value is 1, the field


voltage (<tagname>.V) is 0 mV.
2 = De-energized (off), the raw count value is less
than 102 (0.4 mA).
3 = No load or open circuit, the controller is unable
to identify a load connected to the channel field
wiring, or is unable to detect the loop voltage. A no
load occurs when the commanded current is more
than 0.4 mA, the raw count value is less than 51
(0.2 mA), and the measured voltage is less than
1000 mV.
4 = Energized (on), the raw count value is 102 or
greater (>=0.4 mA).
5 = Compliance fault, There is insufficient loop
voltage available to sustain the commanded output
current to within the safety accuracy specification
(i.e. 1% full scale or 0.2 mA) and the commanded
current is more than 102 counts (0.4 mA).
6 = Reverse polarity, the measured voltage is less
than -1000 mV (< -1 Vdc).
7 = Faulted

AADvance Workbench 495


Faulted State for Analog Outputs

An analog output channel is faulted when normal operation or diagnostic tests find a known
fault condition. When a channel is faulted, the state reports the value 7, and the other variables
report the following 'safe' values:

Line Fault = TRUE

Discrepancy = TRUE

Channel Fault = TRUE

Voltage = 0 mV

Raw Count = 0 mA

To wire a channel variable to an analog output

You wire variables to analog output channels to enable the application to use the output.

1. From the Equipment View, expand the analog output module, and double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab as well as the
HART and Advanced tabs.

2. From the Equipment property page, click the Channel-specific tab.

3. In the Channel Variable field, click .

The Variable Selector is displayed.

4. In the Variable Selector, select the required variable and then click OK.

The analog output channel is wired.

496 AADvance 2.1 - Equipment View


5. In the Raw fields, set the Low and High counts for the values received from the field
elements.

6. In the Engineering fields, set the Low and High scaling factor in the range of 0% to
100%.

Example

Raw Count Engineering Value (%) Process Value (mA)


1,024 0 4
3,072 50 12
5,120 100 20

AADvance Workbench 497


Advanced Settings for Analog Output Channels

You can configure the following advanced settings for individual analog output channels:

Shutdown State

Custom Shutdown Value

Fail-Safe Guard Band

You can configure the advanced shutdown state for an analog output channel. The shutdown
state defines how the output behaves when its parent 9481 or 9482 analog output module goes
into shutdown mode due to a loss of communications with the processor or a failure in the
module.

To configure the advanced settings for analog output channels

1. From the Equipment View, expand the analog output module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific, HART, and
Advanced tabs.

2. In the property page, click the Advanced tab.

3. Select the Use Advanced Settings property.

498 AADvance 2.1 - Equipment View


4. Set the Shutdown State to one of the following options:
Off - Disables (de-energizes) the output when the module is in the shutdown state
Hold Last State - Forces the output to stay in the most recent current during a
module shutdown.
Custom - During a module shutdown, forces the output to go to the value set in the
Custom Shutdown Value property.

Important: To maintain the safety rating of the system, when using Hold Last State for a
safety-related output, you must restore the communications in less than the MTTR or use other
compensating measures during a module failure.

5. When setting the Shutdown State to Custom, you must set the Custom Shutdown Value
to a value of current using the same scaling as the command value (<tagname>.CV).
The default scaling factor is 0 to 100%, representing 4 to 20 mA
The default value is -25.00

6. Set the Fail-Safe Guard Band. This property defines the threshold for the discrepancy
alarm between the command value (<tagname>.CV) and Count (<tagname>.CNT). The
discrepancy alarm is reported by the structure member <tagname>.DIS. The Fail-Safe
Guard Band can be set to the following values:
0 to 100% of full scale 20 mA (1% = 0.2 mA)
The default value is 1%

The advanced settings are configured for the analog output channel.

AADvance Workbench 499


HART for Analog Outputs

Highway Addressable Remote Transducer (HART) is an open protocol for process control
instrumentation. HART combines digital signals with analog signals to supply control and
status data for field devices. The AADvance controller supports the use of HART on each
analog input and output channel. The AADvance controller also supports HART
Pass-Through. The application can use HART data to monitor and respond to device conditions
and to supply diagnostic information such as data comparison and error reporting. The HART
protocol increases the level of safety system diagnostics.

If using HART in a safety system, follow these precautionary guidelines:

Do not use HART variables as the primary initiator for a Safety Instrumented
Function (SIF). The HART protocol does not satisfy the required safety
integrity levels for Safety Instrumented Functions.

Make sure to disable HART for field devices having an unlocked


configuration. This prevents the use of HART from changing a device
configuration.

Ensure the custom data for the device (the data given in response to HART
command 3) is used in accordance with the recommendations of the
manufacturer.

When enabling HART on an AADvance controller, you must ensure the HART field devices
support the HART commands 0 (read unique ID) and 3 (read current and four dynamic
variables). The commands are used for communication between the AADvance controller and
the HART field devices. The analog input and output modules use the HART command 3 to
collect data from the field devices as specified by Revision 5 of the HART specification.

To enable monitoring HART field device information, you wire a HART variable to the
required channels of analog input and output modules. HART variables must be declared using
the following structure types:

T9K_AI_HART

T9K_AI_HART_FULL

In the AADvance Workbench, the T9K_AI_HART_FULL structure type is used for HART
Pass-Through communication.

500 AADvance 2.1 - Equipment View


The HART structure types supply the following information:

Loop current in milliamps (mA)

Process measurement in engineering units

Errors on HART communication seen by the field device

Status of the field device

Time since the most recent update, in milliseconds (ms)

You can use the loop current variable for diagnostic checks in the application, comparing the
value of the variable with the value on the 4 to 20 mA loop, and reacting if there is a
discrepancy. You can also monitor the status of the field device and use this to report diagnostic
errors and manual configuration changes.

Important: The update rate for HART data from field devices is slower than the update rate
for the 4 to 20 mA analog signal itself. HART data can take a maximum of 4 seconds to update,
depending on the device type and configuration.

T9K_AI_HART

The T9K_AI_HART structure type is used when declaring HART variables.

Identifier Type Description Remarks


<tagname>.I REAL Current Loop current in mA
<tagname>.V1 REAL First Variable First loop current variable
<tagname>.U1 BYTE First Variable First loop current variable units code
Units Code
<tagname>.V2 REAL Second Variable Second loop current variable
<tagname>.U2 BYTE Second Variable Second loop current variable units code
Units Code
<tagname>.V3 REAL Third Variable Third loop current variable
<tagname>.U3 BYTE Third Variable Third loop current variable units code
Units Code
<tagname>.V4 REAL Fourth Variable Fourth loop current variable

AADvance Workbench 501


Identifier Type Description Remarks
<tagname>.U4 BYTE Fourth Variable Fourth loop current variable units code
Units Code
<tagname>.COMMS BOOL Communication HART communication status
Status
TRUE - Communication OK
FALSE - Communication stopped
<tagname>.DEVICE BYTE Device Status Field device status:
Bit 7 - Field device malfunction
Bit 6 - Configuration changed
Bit 5 - Cold start
Bit 4 - More status available
Bit 3 - Analog output current fixed
Bit 2 - Analog output saturated
Bit 1 - Second, third, or fourth variable
out of limits
Bit 0 - First variable out of limits

T9K_AI_HART_FULL

The T9K_AI_HART_FULL structure type is used for HART Pass-Through communication:

Identifier Type Description Remarks


<tagname>.I REAL Current Loop current in mA
<tagname>.V1 REAL First Variable First loop current variable
<tagname>.U1 BYTE First Variable First loop current variable units code
Units Code
<tagname>.V2 REAL Second Second loop current variable
Variable

502 AADvance 2.1 - Equipment View


Identifier Type Description Remarks
<tagname>.U2 BYTE Second Second loop current variable units
Variable Units code
Code
<tagname>.V3 REAL Third Variable Third loop current variable
<tagname>.U3 BYTE Third Variable Third loop current variable units code
Units Code
<tagname>.V4 REAL Fourth Variable Fourth loop current variable
<tagname>.U4 BYTE Fourth Variable Fourth loop current variable units code
Units Code
<tagname>.COMMS BOOL Communication HART communication status
Status
TRUE - Communication OK
FALSE - Communication stopped
<tagname>.DEVICE BYTE Device Status Field device status:
Bit 7 - Field device malfunction
Bit 6 - Configuration changed
Bit 5 - Cold start
Bit 4 - More status available
Bit 3 - Analog output current fixed
Bit 2 - Analog output saturated
Bit 1 - Second, third, or fourth variable
out of limits
Bit 0 - First variable out of limits

AADvance Workbench 503


Identifier Type Description Remarks
<tagname>.ELAPSED DINT Elapsed Time Elapsed time (ms) since last
Since Update non-Pass-Through communication.
This parameter is reset to zero when
data is received.
<tagname>.PASSTHROUGH BOOL Pass-Through HART Pass-Through communication
Communication status:
in Progress
TRUE: Communication OK
FALSE: Communication stopped

To configure HART for monitoring an analog output field device

To monitor a field device, you must configure an analog channel to use HART by wiring a
variable having the T9K_AI_HART structure type. You must enable HART on each channel
to use the HART protocol.

1. In the dictionary, declare a HART variable having the structure type T9K_AI_HART.

2. From the Equipment View, expand the analog output module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab as well as the
HART and Advanced tabs.

3. In the Equipment property page, click the HART tab.

4. Select the Enable HART on this Channel property.

504 AADvance 2.1 - Equipment View


5. In the HART Variable field, click .

The Variable Selector is displayed.

6. In the Variable Selector, select the required variable and then click OK.

The analog output channel is configured to use the HART protocol.

AADvance Workbench 505


HART Pass-Through for Analog Outputs

The HART Pass-Through feature enables using an external asset management system to
manage HART compatible field devices connected to an AADvance controller.

HART Pass-Through uses the Device Type Manager (DTM) standard, defined by the HART
Communication Foundation, to enable using any asset management system having the generic
'Frame' standard. Examples of compatible tools are the Fieldcare application by
Endress+Hauser and the FactoryTalk AssetCentre by Rockwell Automation.

To use HART Pass-Through, you must install the AADvance HART DTM software on the
computer running the asset management system. You can then enable or disable the HART
Pass-Through capability of the controller. You declare HART variables to monitor HART
Pass-Through data for analog input and output channels.

When using HART Pass-Through in a safety system, follow these precautionary


guidelines:

Ensure HART Pass-Through is only enabled under control of the application.

Ensure HART Pass-Through is enabled only when necessary.

Configure the application to start an alarm if HART Pass-Through is enabled


on any safety-critical channel of any module.

HART Pass-Through has the following features:

Pass-Through support for HART standards 5, 6, and 7

Dedicated Ethernet port for HART Pass-Through communication

Compatible with the AADvance DTM supplied by Rockwell Automation

Note: HART Pass-Through should not be used on a safety application loop but is considered
non-interfering on the SIL 3 loop. Also, note that HART Pass-Through data is unmonitored.
The HART feature in AADvance provides a controller capability to pass through requests and
responses.

To use HART Pass-Through in the AADvance Workbench, you must perform the following:

Declare a variable having the T9K_AI_HART_FULL structure type

506 AADvance 2.1 - Equipment View


Declare a CIP Produce variable (See Communication View)

Declare a control processor variable for HART Pass-Through (See Control Booleans)

Enable HART on an analog output channel

On an enabled channel, wire a HART variable

Install the AADvance HART DTM software

Enable HART Pass-Through at the controller level

Attention: HART Pass-Through has the following limitation for the maximum
size of a HART message:

For an analog output module, the limits are 0x31 bytes for the command
(plus between 5 and x14 bytes preamble) and 0x63 bytes for a response
(including up to 0x14 bytes for the preamble).

The following is a typical arrangement of a system using HART Pass-Through:

AADvance Workbench 507


508 AADvance 2.1 - Equipment View
You can set up the application to get status data for individual analog channels. The following
members of the T9K_AI_HART_FULL structure type supply data:

<tagname>.ELAPSED (DINT), displays the time in milliseconds since the most recent
valid non-Pass-Through communication. The value of this element resets to 0 (zero)
when the application passes new HART data on the channel.

<tagname>.PASSTHROUGH (BOOL), displays when the channel is carrying HART


Pass-Through data.

The application can use these members to choose when to permit HART Pass-Through
communications.

To configure HART for Pass-Through communication monitoring

You configure an analog output channel to supply HART and use Pass-Through
communication monitoring. You must wire a variable having the T9K_AI_HART_FULL
structure type to the required channels. You must enable HART on each channel to use HART
Pass-Through.

1. In the dictionary, declare a HART variable having the structure type


T9K_AI_HART_FULL.

2. From the Equipment View, expand the analog output module and then double-click the
required channel.

The Equipment property page is displayed with the Channel-specific tab as well as the
HART and Advanced tabs.

3. In the Equipment property page, click the HART tab.

4. Select the Enable HART on this Channel property.

AADvance Workbench 509


5. In the HART Variable field, click .

The Variable Selector is displayed.

6. In the Variable Selector, select the required variable having the T9K_AI_HART_FULL
type, and then click OK.

The analog output channel is configured to use HART protocol and HART Pass-Through.

510 AADvance 2.1 - Equipment View


To install the AADvance HART DTM software

For AADvance systems, the AADvance HART DTM is the device type manager for the HART
Pass-Through feature. You must install the software on the Windows computer running the
asset management system. The AADvance HART DTM is accessible from the RA Download
Center.

1. Uninstall the existing version of the DTM installed on your Workstation.

2. Restart the system.

3. Locate and install the file named AADvance DTM 1.xxx Setup.exe.

4. Once the installation is complete, restart the system.

The AADvance HART DTM is installed.

To enable HART Pass-Through in the controller

To use HART Pass-Through, you must define at least one CIP Produce variable in the
Workbench. To activate the CIP stack, you must have CIP produce and consume variables.

1. In the dictionary, create a variable having the following properties:


Name: HART_CONTROL
Data type: BOOL
Direction: VarOutput

The HART_CONTROL variable is used to enable and disable HART Pass-Through.

2. In the Equipment View, double-click the controller requiring HART Pass-Through.

The Equipment property page is displayed with the Processor, Status, Control, and RTC
tabs.

3. In the property page, click the Control tab.

4. In the HART Pass-Through row, click .

The Variable Selector is displayed.

AADvance Workbench 511


5. In the Variable Selector, select the HART_CONTROL variable, and then click OK.

The HART_CONTROL variable is wired to the processor control variable.

To use FactoryTalk AssetCentre with an analog input module

The following is an example displaying how to configure FactoryTalk AssetCentre to use the
HART Pass-Through feature with analog input and output modules.

1. From the FactoryTalk AssetCentre, in the Tools menu, click DTM Catalog.

2. In the DTM Catalog dialog box, click Scan Now.

All device type managers are scanned and automatically updated.

512 AADvance 2.1 - Equipment View


3. Uninstall the existing version of the DTM installed on your computer and then restart the
system.

4. In the DTM Networks dialog box, right-click the Host computer item at the top of the tree
view, and then click Add DTM.

5. Select EtherNet/IP Gateway, and then click OK.

The tree structure under Host computer is displayed.

AADvance Workbench 513


6. Right-click on 1 below Ethernet/IP Gateway, and then click Add DTM.

7. Select T9432IH, and rename it AIM [T9432IH]

The tree structure below Ethernet/IP Gateway is displayed.

8. Right-click AIM [T9432IH], and then click Configuration.

9. Enter the IP address for the AADvance controller and the slot number for the analog
output module, and then click Next.

10. Right-click AIM [T9432], and then click Scan network.

11. In the Select Communication Channel dialog box, select all of the channels, and then
click OK.

All the output channels on the AADvance controller are now set up for the HART
Pass-Through functionality.

514 AADvance 2.1 - Equipment View


System Security
The AADvance system uses Ethernet networks, potentially exposing the system to accidental
or malicious infection or attack. To protect the system, you must configure the following:

Network Firewall

Windows Firewall

To ensure the system is secure, perform the following general security steps:

The AADvance system must not be connected to a network with open


unsecured access to the internet.

A router firewall must be active on the workstation, preventing access to the


unused Ethernet ports on each communication interface.

An up-to-date anti-virus software must be installed on the workstation.

Important: You may need to temporarily disable firewalls when using the
AADvance Discover tool.

The workstation must be password protected and locked when unattended.

The AADvance Workbench must be password protected.

The application must be password protected if the program enable key is not
used on the system.

Note: Since AADvance serial networks are closed, local, and have limited protocol
functionality, they are immune to external attacks (apart from deliberate local sabotage).

Threat Analysis

You must perform a system threat analysis and mitigate all high risk threats before
commissioning the system.

AADvance Workbench 515


File Location and Extensions

AADvance creates and uses the *.aadsln and *.aadproj for extensions for projects. The default
location where product-managed files are saved is the following:

%USERPROFILE%\Documents\AADvance 2.1\Projects\ProjectName\*.aadsln

%USERPROFILE%\Documents\AADvance
2.1\Projects\ProjectName\ProjectName\*.aadproj

Services Dependency

AADvance requires the following services. To reduce security risks on Windows platforms,
disable unnecessary services.
Service / Location Dependant Service Dependant
Executable Name Name Service Location
AADvanceWB.exe %PROGRAMFILES(X86)%\ Microsoft Remote N/A
Rockwell Procedure Call (RPC)
Automation\AADvance
2.1\ACP
AADOPCSV.exe %PROGRAMFILES(X86)%\ Microsoft Remote N/A
Rockwell Procedure Call (RPC)
Automation\AADvance
2.1\CAM
AADvance\AADvance
Gateway

516 AADvance 2.1 - System Security


Network Firewall
When the network used by the AADvance system is connected to another network, the
connections must pass through the firewall. The following communication ports are supported
by AADvance:

Protocol Port Number Availability Purpose


TCP 502 When configured MODBUS slave
TCP 1132 Always available AADvance, application downloads,
debug, SOE, etc.
TCP 10001-10006 Always available Transparent Comms Interface (serial
tunneling)
TCP 44818 Always available CIP produce and consume
TCP 55555 Always available Telnet (diagnostic interface)
UDP 123 Always available SNTP
UDP 1123, 1124 Always available IXL bindings
UDP 2010 Always available Discovery and configuration protocol
(DCP, Rockwell Automation)
UDP 2222 When configured CIP produce and consume I/Os
UDP 5000 Always available Peer-to-Peer
UDP 44818 Always available CIP produce and consume

When the Always available ports are not configured or unused, they are open to unauthorized
access. Perform the following actions to protect network ports:

If the network used by the AADvance system is connected to another network, the
connection must pass through the firewall to protect the AADvance system from
potential threats from other networks.

Configure the firewall to block all communication ports. If required, you can enable a
specific port to a device needing to communicate with other devices on other networks.

The SNCP port must only be allowed to pass through the firewall if the Windows PCs
running the AADvance Workbench are on a separate network.

AADvance Workbench 517


The variable bindings port must only be allowed to pass through the firewall if the
AADvance controller is communicating with another AADvance controller on a separate
network.

The other communication ports (such as MODBUS and SNTP), must only be allowed to
pass through the firewall if the AADvance controller or Windows PC communicates with
other devices on other networks.

518 AADvance 2.1 - System Security


Windows Firewall
You must activate and configure the Windows firewall on your workstation to allow
connections through the ports used to communicate with the AADvance controller. You can
configure other ports for the following scenarios:

You may need to allow the workstations to access the Windows Updates, time
synchronization, and anti-virus updates.

The Windows workstation may run additional software (such as HMI or data logging),
therefore requiring the ports to pass through the firewall.

Note: Refer to the manufacturer’s manual for instructions about firewall settings.

AADvance Workbench 519


520 AADvance 2.1 - System Security
AADvance Discover
You use AADvance Discover to set the IP address for the physical controller. You must
configure the resource number and IP address when assembling a new AADvance controller
or installing a new 9100 processor base unit. You can also configure Ethernet forwarding if
required. The AADvance Discover tool uses a discovery and configuration protocol (DCP) to
scan the broadcast domain for AADvance controllers. The tool then displays a list of
AADvance controllers and their statuses. You can refresh the list of controllers.

From AADvance Discover, you can access the Controller Configuration dialog box, enabling
the configuration of the Resource Number, IP Address, Subnet Mask, Gateway, and Gateway
Port values to be stored in a physical controller. For Locked Controllers, you can only view this
information. You can also use the Controller Configuration dialog box to save and load
controller configurations.

AADvance Workbench 521


AADvance Discover Features

You can perform the following tasks when using AADvance Discover:

Configure the IP Address, Subnet Mask, Gateway, and Gateway Port in a controller

Configure the Resource Number in a controller

Configure Ethernet forwarding in a controller

View the MAC Addresses of Ethernet ports

Save the configuration of a controller

Load the configuration into a controller

522 AADvance 2.1 - AADvance Discover


Using the AADvance 2.1 Workbench, you configure the controller to use the same IP Address
set in the physical controller.

The AADvance controller provides up to six Ethernet communication ports, two for each 9110
processor module present. Each pair of Ethernet ports is identified as En-1 and En-2 where n
indicates the processor module. The En-1 Ethernet ports are all on one network and the En-2
ports are on a second network.

Note: To avoid unexpected ARP requests, you are strongly recommended to configure IP
addresses for En-2 ports (even if they are unused).

The AADvance controller stores the IP address data in non-volatile memory in the 9100
processor base unit. The controller retains the address information when removing a processor
module since the data is independent of the 9110 modules.

You can allocate a local network IP address or use an address from the following ranges of
private networks:

10.0.0.0 to 10.255.255.255

172.16.0.0 to 172.31.255.255

192.168.0.0 to 192.168.255.255

Each controller on a local area network must have a unique IP address.

Important: The two Ethernet ports on each 9110 processor module must be on different
subnets.

You can only define one Gateway address per processor module.

Warning: Communication blocking or miss-routing by Windows (or other network devices)


can cause the AADvance Discover tool to omit displaying certain controllers. DCP
communications are unable to go through network bridges and routers. When using virtual
machines, you must use a direct bridged connection. You may need to disable firewalls
blocking access to AADvDiscover.exe.

AADvance Discover is accessible from the Windows Start menu or from the Workbench (in
the View menu).

AADvance Workbench 523


The DCP is proprietary to Rockwell Automation. The protocol uses the MAC address of the
9100 processor base unit to identify individual controllers. In AADvance Discover, the MAC
address of the base unit is displayed as the Controller ID. You can also view the MAC
addresses of the six Ethernet ports.

A controller has one of the following statuses:

Status Description
Configurable The controller is available for configuration. The following criteria are
satisfied:

AADvance Discover has established communications with the


controller

The program enable key is present

No application is loaded or an application is loaded but not running


You can set the Resource Number, IP Address, Subnet Mask, Gateway,
and Gateway Port information for this controller.
Locked AADvance Discover has established communications with the controller,
but one or more of the following criteria is not satisfied:

The program enable key is present

No application is loaded or an application is loaded but not running


You can only view the Resource Number, IP Address, Subnet Mask,
Gateway, and Gateway Port information for this controller.
No Response The controller is turned off or the communications between the computer
running AADvance Discover and the controller have failed.
Pending After making modifications to a controller available for configuration, you
Restart must restart the controller.
Before restarting the controller, you can modify the Resource Number, IP
Address, Subnet Mask, Gateway, and Gateway Port information.

You can click Refresh in the AADvance Discover tool to update the list of controllers. When
refreshing, a status bar is displayed at the bottom of the window, below the list.

524 AADvance 2.1 - AADvance Discover


The status bar displays the following messages:

Initializing, the AADvance Discover tool starts

Searching, the tool locates all the controllers connected to the network

Querying, the tool displays the resource number and status of the controllers

Ready, the information displayed in AADvance Discover is ready for use

Ethernet Forwarding

Ethernet forwarding enables the Ethernet ports of an AADvance controller to re-send Ethernet
packets intended for a third-party device along with unicast, broadcast, and multicast
messages. A device connected through the processor module gets an IP configuration through
BOOTP, DHCP, or statistically. You enable Ethernet forwarding from the Controller
Configuration dialog box. The following diagram displays Ethernet forwarding:

AADvance Workbench 525


In Ethernet forwarding, the processor module located in the first slot of a 9100 base unit
forwards the messages from port E1-1 to E1-2 and vice versa. Other processor modules fitted
in the base unit behave the same way (E2-1 to E2-2 and vice versa, E3-1 to E3-2 and vice
versa). In each instance, the second port represents an uplink to the network or to another
network (if applicable). A device connected to the second port sees all the relevant messages
passing through.

Warning: Do not bridge safety and non-safety networks. Ethernet forwarding is not designed
to link different processor modules.

526 AADvance 2.1 - AADvance Discover


Regardless of the setting for Ethernet forwarding, the processor module consumes the intended
unicast, broadcast, and multicast messages. The controller stores the setting for Ethernet
forwarding when replacing any 9110 processor modules. Corrective maintenance is unaffected
by Ethernet forwarding.

To configure the IP Address, Subnet Mask, Gateway, and Gateway Port in the Controller

You must configure the IP address when assembling a new AADvance controller or installing
a new 9100 processor base unit. Modifications occur immediately and no restart is required.

1. Note the MAC address (Controller ID) labeled on the processor base unit and then install
at least one 9110 processor module into the base.

2. Ensure the program enable key is inserted in the KEY connector on the processor base
unit.

3. From the Start menu, click All Programs, then click Rockwell Automation, then
AADvance, and then click AADvDiscover.

The AADvance Discover tool is displayed and lists the controllers available on the
network.

4. In the list, locate the controller having the MAC address previously noted and ensure the
status is Configurable.

5. Double-click the required Controller ID (MAC Address).

AADvance Workbench 527


The Controller Configuration dialog box is displayed.

6. In the IP Address, Subnet Mask, and Gateway Port fields, type the required values for
each Ethernet port.

7. In the Gateway fields, type the required values for each processor module, then click
Apply.

The AADvance Discover tool refreshes the list of controllers. The controller settings are
updated and the controller is configurable.

To configure the Resource Number in the Controller

You must configure the resource number when assembling a new AADvance controller or
installing a new 9100 processor base unit. The resource number is a type of device address, and
must also be configured in the AADvance 2.1 Workbench.

528 AADvance 2.1 - AADvance Discover


1. Note the MAC address (Controller ID) labeled on the processor base unit and then install
at least one 9110 processor module into the base.

2. Ensure the program enable key is inserted in the KEY connector on the processor base
unit.

3. From the Start menu, click All Programs, then click Rockwell Automation, then
AADvance, and then click AADvDiscover.

The AADvance Discover tool is displayed and lists the controllers available on the
network.

4. In the list, locate the controller having the MAC address previously noted and ensure the
status is Configurable.

5. Double-click the required Controller ID (MAC Address).

The Controller Configuration dialog box is displayed.

6. In the Resource Number field, type the required value, then click Apply.

The AADvance Discover tool refreshes the list of controllers. The controller status has
changed from Configurable to Pending Restart.

7. To finish applying the modification, turn off power to the physical controller, and then
restart the controller.

AADvance Workbench 529


8. In AADvance Discover, click Refresh to display the controller information. The resource
number of the controller was updated and the status is now Configurable.

Important: You must also configure the Resource Number in the Workbench.

To configure Ethernet forwarding in the controller

By default, Ethernet forwarding is disabled for new controllers.

1. Ensure the program enable key is inserted in the KEY connector on the processor base
unit.

2. Stop the physical controller.

3. From AADvance Discover, locate the required controller and ensure the status is
Configurable.

4. Double-click the required Controller ID (MAC Address).

5. From the Controller Configuration dialog box, select or clear Enable Ethernet
Forwarding, then click Apply.

6. Remove the program enable key and start the controller.

The setting for Ethernet forwarding is now updated in the controller.

To view the MAC addresses of Ethernet ports

You can view the MAC addresses for the six Ethernet ports in a controller.

1. From AADvance Discover, double-click the required Controller ID (MAC Address).

2. From the Controller Configuration dialog box, click View MAC addresses....

The six MAC addresses are displayed for the controller.

To save the configuration of a controller

You can save the configuration of a controller in a text file.

530 AADvance 2.1 - AADvance Discover


1. In the AADvance Discover tool, double-click the required Controller ID (MAC Address).

2. In the Controller Configuration dialog box, type the required configuration information,
and then click Save.

3. In the Save configuration file as... dialog box, specify a name and save location, then
click Save.

AADvance Workbench 531


To load a configuration file into a controller

You can only load configurations into controllers having a Configurable status.

1. In the AADvance Discover tool, double-click the required Controller ID (MAC Address).

2. In the Controller Configuration dialog box, click Load.

532 AADvance 2.1 - AADvance Discover


3. In the Select configuration file to load dialog box, browse to select the file to load into the
controller, and then click Open.

4. In the Controller Configuration dialog box, click Apply.

The AADvance Discover tool refreshes the list of controllers.

To configure the IP Address of the Workbench controller

To connect the AADvance Workbench project to the physical controller, you must define the
IP addresses set for the controller in the project. You can also add comments to IP Address
definitions.

1. From the Workbench, open or create the required project.

2. From the View menu, click Communication View.

AADvance Workbench 533


3. In the Communication View, right-click Ethernet, and then click Open.

The Communication property page is displayed with the six Ethernet Ports.

4. In the Communication property page, type the IP Address for each required port.

Note: Ports that are Not Configured can be configured individually by selecting the required
port in the Communication View.

To configure the resource number of the Workbench controller

You must also configure the resource number in the Workbench when assembling a new
AADvance controller or installing a new 9100 processor base unit. The resource number is a
type of device address.

1. From the Workbench, open or create the required project.

2. From the View menu, click Application View.

3. In the Application View, right-click the required controller, and click Properties.

The Properties Window is displayed.

4. From the Properties Window, in the Number property, type the same resource number
defined in AADvance Discover.

534 AADvance 2.1 - AADvance Discover


Generating Documentation
While in design mode, you can generate documentation for projects, controllers, POUs,
variables, and library elements. The output format of the documentation is Microsoft Word®
2010 (*.docx). Generating documentation enables viewing the project information for a
specific time. You can also search and edit the generated documentation.

Note: You need to have Microsoft Word® 2010 (or more recent) or another .docx application
installed to properly view, search, and edit the generated documentation.

The Generate Documentation dialog box is separated into three panes: Document Options,
Sections, and TOC Preview. Selections made in a pane affect what is displayed in the following
pane (from left to right). Therefore, changes made in the Document Options pane affects the
Sections pane and changes made in the Sections pane affects what is displayed in the TOC
Preview pane.

AADvance Workbench 535


In the Document Options pane you can set the following options:

Option Description Possible Values


Sections Template The template in XML format DefaultTemplate or a user-defined
defining the Sections to be *.xml template. The default value is
generated in the documentation DefaultTemplate.
as well as their hierarchy. The
selected Sections Template
affects the items displayed in the
Sections and TOC Preview
panes.
The templates are located in the
following directory:
%USERPROFILE%\AppData\L
ocal\Rockwell
Automation\AADvance
2.1\ACP\Templates\DocumentG
enerator
Orientation The orientation of the page Portrait or Landscape. The default value
is Landscape.
Page size The size of the page Letter, Legal, Statement, Executive, A3,
A4, A5, B4 (JIS), B5 (JIS), 11x17,
Envelope #10, Envelope DL, Envelope
C5, Envelope B5, Envelope Monarch,
Japanese Postcard, A6, Double Japan
Postcard Rotated, Executive (JIS),
Oficio 8.5x13, 12x18, 8k 273x394 mm,
16k 197x273 mm, or Custom. The
default value is Legal.
Margins The left, right, top, and bottom Narrow, Normal, Moderate, or Custom.
margins for the page The custom margins range from 0
inches to the maximum size of the page.
The default value is Narrow.

536 AADvance 2.1 - Generating Documentation


Option Description Possible Values
Microsoft Word® The Microsoft Word® template IsagrafFooter.dotx,
Template in *.dotx format used to define Isagraf_NoHeader.dotx, or a
the layout for the title page, user-defined *.dotx template. The
table of contents, and tables. default template is IsagrafFooter.dotx.
The templates are located in the
following directory:
%USERPROFILE%\AppData\L
ocal\Rockwell
Automation\AADvance
2.1\ACP\Templates\DocumentG
enerator
Diagram Scaling The scaling for all diagrams 25%, 50%, 75%, 100%, 125%, 150%,
displayed in the generated 175%, 200%, 300%, 400%, 500%, Fit
documentation. to Page, or Custom. When selecting the
Custom scaling, a spin box appears
enabling the user to select the scaling
value. The default value is 100%.
Link Type The type of links in the None, Only Bookmarked, Cross
documentation. Reference, or Hyperlink. The default
value is Hyperlink.
Comment Style How comments are displayed in // comment, /* comment */, or
the documentation. This option (* comment *). The default value is /*
does not affect how comments comment */.
are displayed in graphical POU
diagrams.

Selecting a Sections Template in the Document Options pane modifies the items listed in the
Sections pane. The Title Page and Table of contents items are always available for selection in
the Sections pane. The button displays the Variable Settings dialog box and is used to
specify how you want the variables to be sorted in the generated documentation. You can sort
variables by Name, Comment, Alias, Data Type, Wiring, Attribute, Dimension, Initial Value,
Direction, or String Size in ascending or descending order.

The items selected in the Sections pane modifies the items displayed in the tree view of the
TOC Preview pane. You can also select or clear items in the TOC Preview pane. The final
selection in the TOC Preview pane displays what will be generated in the documentation.

AADvance Workbench 537


The items displayed in the Sections and TOC Preview panes also depend on the element
selected in the Workbench when using the Generate Documentation command. For example if
a POU is selected, only associated sections (local variables and the POU diagram) are
displayed in the Generate Documentation dialog box. When the project is selected in the
Application View, all sections (project, global variables, defined words, structures, arrays,
targets, etc) are displayed in the dialog box. If the Document Generator is unable to find an
associated element, the Generate Documentation command does not appear in the File menu.

The Document Generator retains the selections made in the three panes for each element across
project sessions. You can reset the pane selections by clicking Default Settings.

Users can create their own custom templates for the Sections Templates (*.xml) and Microsoft
Word® templates (*.dotx). When creating a custom XML template, you must use the
following syntax:

Section Description
TitlePageSection The title page
TOCPageSection The table of contents
SolutionSection The title of the solution name
ProjectSection The title of the project name
ArraysSection The table displaying arrays
StructuresSection The table displaying structures
DefinedWordsSection The table displaying defined words
ConfigurationSection The title of the controller name as well as the table
displaying network links
ProgramSection The title of the program name
POUContentSection The POU diagrams
VariableSection The tables for local and global variables. Also displays
the extended attributes for global variables.
IOWiringSection The I\O wiring table
TargetSection The table displaying the targets
BindingSection The table displaying the bindings

538 AADvance 2.1 - Generating Documentation


When creating a custom Microsoft Word® template (*.dotx), you can modify how sections are
displayed, but you must retain the following styles and table styles defined by Microsoft Word
or the workbench:

Style Description
Heading 1 How Header 1 is displayed in the documentation.
Heading 2 How Header 2 is displayed in the documentation.
Heading 3 How Header 3 is displayed in the documentation.
Heading 4 How Header 4 is displayed in the documentation.
Heading 5 How Header 5 is displayed in the documentation.
Heading 6 How Header 6 is displayed in the documentation.
Heading 7 How Header 7 is displayed in the documentation.
Heading 8 How Header 8 is displayed in the documentation.
Heading 9 How Header 9 is displayed in the documentation.
Alias How the Alias section is displayed in the documentation.
Comment How comments are displayed in the documentation.
Table Style Description
IOWiring The tables displaying information for I/O wiring and targets.
NormalStyle The tables displaying information for bindings.
VariableTableStyle The tables displaying information for variables, arrays, structures, and
defined words.

To generate documentation

You can only generate documentation while in design mode.

1. In the Application View, select the element (project, controller, POU, library element,
etc.) for which to generate documentation.

2. From the File menu, click Generate Documentation.

3. Specify the required options, and then click Generate.

The Save As dialog box is displayed.

AADvance Workbench 539


4. In the Save As dialog box, specify the file name and save location, then click Save.
 A progress bar shall appear over the Generate Documentation dialog box displaying
the generation progress. The user can click Cancel to abort the document generation
process. Any files created during the generation process are deleted.

Once generation is complete, the docx application displays the documentation.

540 AADvance 2.1 - Generating Documentation


FBD Language
The Functional Block Diagram (FBD) is a graphic language enabling programmers to build
complex procedures by taking existing functions from the standard library, function section, or
function block section.

In FBD containers, you can also include LD elements such as coils, contacts, jumps, labels, and
returns. However, in contrast to LD elements usage in LD containers where these elements
follow strict graphical positioning regulations, LD elements within FBD container are
independent of these regulations.

AADvance Workbench 541


FBD Diagram Main Format
FBD diagrams describe a process between input variables and output variables. A process is
described as a set of elementary blocks. Input and output variables are connected to blocks by
connection lines. Outputs of blocks can also be connected to inputs of other blocks.

Function Block

Inputs Outputs

An entire process represented by an FBD program is built using the available variables,
operators, functions, and function blocks. Each block has either a fixed or defined number of
input and output connection points. A block is represented by a single rectangle. The inputs are
connected on its left border. The outputs are connected on its right border. An elementary block
performs a single function between its inputs and its outputs. The name of the function to be
performed by the block is written inside its rectangle shape. Each input or output of a block is
labeled and has a well defined type.

Function Name

Inputs Output

542 AADvance 2.1 - FBD Language


Input variables of an FBD program must be connected to input connection points of blocks.
The type of each variable must be the same as the type expected for the associated input. An
input for FBD diagram can be a literal, any internal or input variable, an output variable, or a
block output.

Output variables of an FBD program must be connected to output connection points of blocks.
The type of each variable must be the same as the type expected for the associated block output.
An output for FBD diagram can be any internal or output variable, or the name of the function
(for functions only). When an output is the name of the currently edited function, it represents
the assignment of the return value for the function (returned to the calling program).

Input and output variables, inputs and outputs of the blocks are wired together with connection
lines, or links. Single lines can be used to connect two logical points of a diagram:

An input variable and an input of a block

An output of a block and an input of another block

An output of a block and an output variable

The connection is oriented, meaning that the line carries associated data from left to right. The
left and right ends of the connection line must be of the same data type.

Multiple right connections, also called divergences can be used to broadcast information from
their left end to each of the right ends. All ends of the connections must be of the same data
type.

AADvance Workbench 543


Execution Order of FBD Programs
The execution order of an FBD diagram is the order in which the compiler executes the
elements making up a program. You can display the order of execution in the form of
numerical tags for the following elements: coils, instances of function blocks, and variables
where a value is assigned in the program. You can perform this task from the menu bar, the
toolbar, or using the keyboard shortcut (Ctrl+W).

For the execution order of a program, a block is any object in the diagram, a network is a group
of blocks linked together, and the position of a block is based on its top-left corner. For function
blocks, the instance name is included in the bounding box and considered the top-left corner
when defining the execution order. The following rules apply to the execution order of the
program:

Elements are executed from top to bottom, then left to right.

All inputs must be resolved, i.e., known, for an element in order to assign its outputs. A
constant or unassigned variable is considered resolved. When the inputs of two or more
elements are resolved at the same time, the decision for the execution is based on the
position of the element (top to bottom, then left to right).

The order of execution is assigned from 1 to n following the order in which the assignable
elements are found.

When analyzing the execution order for the following network, the compiler proceeds through
the elements as indicated:

1. The compiler immediately locates the topmost element FB1_1 in the diagram and notices
that only the first two inputs of three inputs are resolved.

2. To resolve the third input of element FB1_1, the compiler considers TON_1 where all
inputs are resolved and assigns the first tag (1) for the execution order, since this block is
the first to be resolved.

3. Since resolving TON_1 enables resolving all inputs for FB1_1, the compiler assigns the
next tag (2) to FB1_1.

4. Because FB1_1 is resolved, the compiler starts assigning tags to the FB1_1 outputs
which is not yet done for TON_1.

544 AADvance 2.1 - FBD Language


5. Since varBoolOut2 is the top-leftmost of the FB1_1 outputs, the compiler assigns the
third tag (3) and assigns the fourth tag (4) to the FB2_1 block.

6. While FB1_1 is completely resolved, the compiler proceeds to resolving the FB2_1
outputs.

7. The compiler assigns the fifth tag (5) to varDintOut1 since this output is the topmost of
those to resolve, then the sixth tag (6) to varBoolOut1.

8. The compiler assigns the next and final tag (7) to varTimeOut1.

To display the execution order in an FBD diagram


From the Format menu, click Execution Order.

Numerical tags in the individual elements display the execution order.

AADvance Workbench 545


Debugging FBD Programs
When debugging FBD programs, you can monitor the output values of variables. These values
are displayed using color, numeric, or textual values according to their data type:

Output values of boolean type are displayed using color. The output value color continues
to the next input. When the output value is unavailable, boolean elements remain black.
The default colors are red when True and blue when False. You can customize the colors
used for boolean items.

Output values of SINT, USINT, BYTE, INT, UINT, WORD, DINT, UDINT, DWORD,
LINT, ULINT, LWORD, REAL, LREAL, TIME, DATE, and STRING type are displayed
as a numeric or textual value in the variable. When the output is a structure type, the
displayed value is the selected member.

For structure-type variables, you can display one simple-type field.

When the output value for a numeric or textual value is unavailable, WAIT is displayed in the
output label. Values are also displayed in the corresponding dictionary instance.

546 AADvance 2.1 - FBD Language


FBD Elements
When programming in FBD, you place elements in the workspace by dragging them from the
Toolbox into the language container. For FBD POUs, the following elements are available:

Blocks

Variables

Vertical Bars

Labels

Jumps

Returns

Rungs

Left Power Rails

Right Power Rails

Coils

Contacts

Regions

Comments

For links between FBD elements, you can set the property Is Negation to TRUE to place a
negation at the end of a link. You can also indicate whether to display an arrow at the end of a
link by enabling the property Is Arrow. The Line Style property specifies the style of the link
where the possible values are solid, dash, dot, dash-dot, and dash-dot-dot. The Line Type
property specifies the type of line used for links.The normal line type has squared corners and
overlapping link intersections. The rounded line type has rounded corners and overlapping link
intersections. The rounded with jump line type has rounded corners and link intersections are
jumped over.

AADvance Workbench 547


For variables connected to variable, coil, and contact elements, you can add these to existing
variables groups from the language container by right-clicking the variable, pointing to Add to
Variable Group, then clicking the required group.

548 AADvance 2.1 - FBD Language


Blocks

Block elements can be operators, functions, or function blocks. You connect block inputs and
outputs to variables, contacts or coils, or other block inputs and outputs. You insert block
elements in language containers.

Functions and function blocks are represented by a box displaying the name of the function,
function block, or operator, and the parameter short names. For function blocks, the instance
name is displayed in italics.

For functions, the return parameter is the only output. For function blocks, multiple return
parameters can provide multiple outputs. The return parameter of a function has the same name
as the function. The return parameters of a function block can have any name.

You can define the parameters of POUs for multiple controllers by navigating the tabs for
individual controllers displayed in the parameter view.

Using loops with functions or operators may yield unpredictable results since these types of
blocks use temporary variables generated by the FBD editor. For predictable results, you are
recommended to assign variables in loops. The following example displays an FBD diagram
having a loop resulting in an unpredictable result. When a variable is added in the loop, the
result becomes predictable.

Note: Since instances of function blocks are defined in the library, the FBD editor does not
generate temporary variables.

AADvance Workbench 549


Unpredictable Result Predictable Result

You can resize blocks elements.

To access the parameter view

The parameter view is available from function or function block instances located in the
Application View.

1. In the Application View, right-click the required function or function block instance in
the controller library, and then click Parameters.

The Parameters view is displayed.

2. To define the parameters of a function or function block, select the block, then enter the
required information in the fields provided.

To insert a block element

1. From the Toolbox, drag the block element into the language container.

The Block Selector is displayed.

2. In the Block Selector, select the required function block, and then click OK. You can sort
the block list according to the columns by setting these in ascending or descending order.

The selected block is displayed in the language container.

550 AADvance 2.1 - FBD Language


Variables

To connect a new symbol to an existing one (another variable, a block input, or a block output)
in the workspace, keep the mouse button depressed (the cursor becomes a "ghost" symbol) and
drag the element until its connecting line on the left (or right) overlaps an existing connecting
point. When the mouse is released, the new symbol is automatically created and linked.

Drag to place the existing element: Release the mouse button. The variable is
automatically connected:

You replace existing variables in POUs by double-clicking them to access the Variable Selector
or single-clicking them to select from a drop-down combo box containing the global and local
variables. Also, you can single-click a variable, then type a literal value in the text box
provided. When inserting literal values that being with a letter or an underscore, enclose these
in single quotes as follows: 'abc'.

Select a variable from the drop-down combo Type a literal value in the text box:
box:

When selecting items such as local variables, controller variables, system variables, and
defined words from the drop-down combo box, typing characters in the text box focuses on the
possible items. You can focus on listed items by typing letters, digits, and specific special
characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^, _, `, |, and ~.

AADvance Workbench 551


For input and output variables, you can choose to display comments entered in the dictionary.
From the View menu, you can access the Properties window where you can define the
Comment Position property.

You can resize variables displayed in the workspace.

To insert a variable

1. From the Toolbox, drag the variable element into the language container.

The Variable Selector is displayed.

2. In the Variable Selector, select the required variable, then click OK.

The variable is displayed in the language container.

552 AADvance 2.1 - FBD Language


Vertical Bars

Vertical bars are graphic components of FBD programs enables closing multiple parallel links.
More than one horizontal links on the left side of a vertical bar are connected to one link on the
right side. The Boolean state of the right end is the logical OR between all the left extremities.

To insert a vertical bar


From the Toolbox, drag the vertical bar element into the language container.

The vertical bar is displayed in the language container.

AADvance Workbench 553


Labels

Labels can be placed anywhere in an FBD diagram. They are used as a target for Jump
instructions, to change the execution order of the diagram. Labels are not connected to other
elements.

Place Labels on the left of the diagram in order to increase diagram readability.

Labels are used to control the execution of the diagram. No other object may be connected on
the right of a label symbol.

If the connection line on the left of the jump symbol has the Boolean state TRUE, the execution
of the program directly jumps to after the corresponding label symbol.

Example

To insert a label

1. From the Toolbox, drag the label element into the language container.

2. In the language container, click inside the label, and then type a label name in the space
provided.

The label is displayed in the language container.

554 AADvance 2.1 - FBD Language


AADvance Workbench 555
Jumps

A Jump symbol must be linked to a Boolean point. When this Boolean (left) connection is
TRUE, the execution of the diagram Jumps directly to the target Label.

Jumps are used to control the execution of the diagram. No other object may be connected on
the right of a jump symbol.

Warning: Inserting backward jumps in the diagram may block the PLC loop.

If the connection line on the left of the jump symbol has the Boolean state TRUE, the execution
of the program directly jumps to after the corresponding label symbol.

Example

To insert a jump to a label

Before inserting jumps, define one or more labels within the program.

1. From the Toolbox, drag the jump element into the language container.

2. In the language container, click the jump element, then select the required label name
from the drop-down combo box.

556 AADvance 2.1 - FBD Language


The jump is displayed in the language container with the required label name.

AADvance Workbench 557


Returns

If the connection line (to the left of the Return element) has the Boolean state TRUE, the
Program ends - no further part of the diagram is executed.

No connection can be put on the right of a RETURN element.

The Return element must be connected to a Boolean output connection point of a block. The
element represents a Conditional End of the program: if the output of the box connected to the
Return element has the Boolean value TRUE, the end (remaining part) of the diagram is not
executed.

Example

(* ST equivalence: *)
If auto_mode OR alarm Then
Return;
End_if;
bo67 := (bi10 AND bi23) OR x_cmd;

To insert a return
From the Toolbox, drag the return element into the language container.

The return is displayed in the language container.

558 AADvance 2.1 - FBD Language


Rungs

Rungs are graphic components of FBD programs and represent a group of circuit elements
leading to the activation of a coil. Dragging the rung element into the workspace inserts a
left power rail linked to a right power rail. Also, the rung contains a direct contact and a direct
coil. Error symbols ( ) indicate that the direct contact and direct coil are undefined.

To insert a rung
From the Toolbox, drag the rung element into the language container.

The rung is displayed in the language container.

AADvance Workbench 559


Left Power Rails

Left Power Rails are graphic components of FBD programs that represent the left boundary of
a rung. Any horizontal link connected to a left power rail has the boolean state TRUE.

You can link left power rails to right power rails as well as many FBD and LD elements,
including variables, blocks, jumps, returns, vertical bars, coils, and contacts.

To insert a left power rail


From the Toolbox, drag the left power rail element into the language container.

The left power rail is displayed in the language container.

560 AADvance 2.1 - FBD Language


Right Power Rails

Right Power Rails are graphic components of FBD programs that represent the right boundary
of a rung.

You can link right power rails to left power rails as well as many FBD and LD elements,
including variables, blocks, vertical bars, coils, and contacts.

To insert a right power rail


From the Toolbox, drag the right power rail element into the language container.

The right power rail is displayed in the language container.

AADvance Workbench 561


Coils

Coils are graphic components of LD programs that you can use in FBD programs representing
the assignment of Boolean outputs. A coil represents an action. It must be connected on the left
to a Boolean symbol, such as a contact or the Boolean output of a block.

The following types of coils are available from the FBD stencil:

Direct Coil

Reverse Coil

Set Coil

Reset Coil

You can change the type of a coil at anytime following its insertion.

When inserting coils in POUs, you assign variables using the Variable Selector. Names of
assigned variables are displayed above the coil elements within POUs. You replace existing
variables by double-clicking the variable names to access the Variable Selector or by
single-clicking variable names to select from drop-down combo boxes containing the global
and local variables. Also, you can single-click existing variables, then type literal values in the
text boxes provided. When inserting literal values that begin with a letter or an underscore,
enclose the variable name in single quotes as follows: 'abc'.

Select a variable from the Type a literal value in the text box:
drop-down combo box:

562 AADvance 2.1 - FBD Language


To insert a coil

You can insert coils from the Toolbox.

1. From the Toolbox, drag the required coil type into the language container and place it on
the rung.

The Variable Selector is displayed.

2. In the Variable Selector, select the required variable, then click OK.

The coil element and its associated variable name are displayed in the language container.

To change the type of a coil

In the language container, select the coil, and then select the required type in the Modifier
property of the Properties window.

AADvance Workbench 563


Direct Coil

Direct Coils enable a Boolean output of a connection line Boolean state.

Left Right
Connection Connection

The associated variable is assigned with the Boolean state of the left connection. The state of
the left connection is propagated into the right connection. The right connection can be
connected to the right vertical power rail.

The associated name can be the name of the program (for functions only). This corresponds to
the assignment of the return value of the function.

Example

(* ST Equivalence: *)
output1 := input1;
output2 := input1;

564 AADvance 2.1 - FBD Language


Reverse Coil

Reverse coils enable a Boolean output according to the Boolean negation of a connection line
state.

Left Right
Connection Connection

The associated variable is assigned with the Boolean negation of the state of the left
connection. The state of the left connection is propagated into the right connection. The right
connection can be connected to the right vertical power rail.

The associated name can be the name of the program (for functions only). This corresponds to
the assignment of the return value of the function.

Example

(* ST Equivalence: *)
output1 := NOT (input1);
output2 := input1;

AADvance Workbench 565


Set Coil

Set coils enable a Boolean output of a connection line Boolean state.

Left Right
Connection Connection

The associated variable is set to TRUE when the boolean state of the left connection becomes
TRUE. The output variable keeps this value until an inverse order is made by a "RESET" coil.
For information on variables, see page 441. The state of the left connection is propagated into
the right connection. The right connection can be connected to the right vertical power rail.

Example

(* ST Equivalence: *)
IF input1 THEN
output1 := TRUE;
END_IF;
IF input2 THEN
output1 := FALSE;
END_IF;

566 AADvance 2.1 - FBD Language


Reset Coil

Reset coils enable Boolean output of a connection line Boolean state.

Left Right
Connection Connection

The associated variable is reset to FALSE when the Boolean state of the left connection
becomes TRUE. The output variable keeps this value until an inverse order is made by a "SET"
coil. The state of the left connection is propagated into the right connection. The right
connection can be connected to the right vertical power rail.

Example

(* ST Equivalence: *)
IF input1 THEN
output1 := TRUE;
END_IF;
IF input2 THEN
output1 := FALSE;
END_IF;

AADvance Workbench 567


Contacts

Contacts are graphic components of LD diagrams that you can use in FBD programs.
Depending on the type of contact, it represents the value or function of an input or internal
variable.

The following contact types are available from the FBD stencil:

Direct Contact

Reverse Contact

Pulse Rising Edge Contact

Pulse Falling Edge Contact

You can change the type of a contact at any time following its insertion.

When inserting contacts in POUs, you assign variables using the Variable Selector. Names of
assigned variables are displayed above the contact elements within POUs. You replace existing
variables by double-clicking the variable names to access the Variable Selector or by
single-clicking variable names to select from drop-down combo boxes containing the global
and local variables. Also, you can single-click existing variables, then type literal values in the
text boxes provided. When inserting literal values beginning with a letter or an underscore,
enclose the variable name in single quotes as follows: 'abc'.

Select a variable from the Type a literal value in the text


drop-down combo box: box:

568 AADvance 2.1 - FBD Language


To insert a contact

You can insert contacts from the Toolbox.

1. From the Toolbox, drag the required contact type into the language container and place it
on the rung.

2. From the Variable Selector, select the required variable, then click OK.

The contact and its associated variable name are displayed in the language container.

To insert a parallel contact

1. From the Toolbox, drag a contact element into the language container while placing it
parallel to the existing contact.

The Variable Selector is displayed.

2. In the Variable Selector, select the required variable, then click OK.

3. Drag the left and right connections to the respective connection points on the rung.

The contact and its associated variable name are displayed on the branch.

To change the type of a contact

In the language container, select the contact, then select the required type in the Modifier
property of the Properties window.

AADvance Workbench 569


Direct Contact

Direct contacts enable a Boolean operation between a connection line state and a Boolean
variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is the logical AND between the state
of the left connection line and the value of the variable associated with the contact.

Example

(* ST Equivalence: *)
output1 := input1 AND input2;

570 AADvance 2.1 - FBD Language


Reverse Contact

Reverse contacts enable a Boolean operation between a connection line state and the Boolean
negation of a Boolean variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is the logical AND between the state
of the left connection line and the Boolean negation of the value of the variable associated with
the contact.

Example

(* ST Equivalence: *)
output1 := NOT (input1) AND NOT (input2);

AADvance Workbench 571


Pulse Rising Edge Contact

Pulse rising edge (positive) contacts enable a Boolean operation between a connection line
state and the rising edge of a Boolean variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is set to TRUE when the state of the
connection line on the left is TRUE, and the state of the associated variable rises from FALSE
to TRUE. The state is reset to FALSE in all other cases.

Example

(* ST Equivalence: *)
output1 := input1 AND (input2 AND NOT (input2prev));
(* input2prev is the value of input2 at the previous cycle *)

572 AADvance 2.1 - FBD Language


Pulse Falling Edge Contact

Pulse falling edge (negative) contacts enable a Boolean operation between a connection line
state and the falling edge of a Boolean variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is set to TRUE when the state of the
connection line on the left is TRUE, and the state of the associated variable falls from TRUE
to FALSE. The state is reset to FALSE in all other cases.

Example

(* ST Equivalence: *)
output1 := input1 AND (NOT (input2) AND input2prev);
(* input2prev is the value of input2 at the previous cycle *)

AADvance Workbench 573


Regions

Regions delineate and group together areas of an FBD POU. A region consists of a header and
a delineated zone grouping together elements.The header section enables entering free-format
text. After entering text in the header, click elsewhere in the region to exit editing mode. When
moving the location of a region in the language container, you can also move all the content
grouped within. You can resize regions.

To insert a region

From the Toolbox, drag the region element into the language container.

The region element is displayed in the language container.

To move a region

1. In the language container, left-click the top right corner of the region element and hold
the mouse button.

2. Drag the region element to the required location and release the mouse button.

The region and the elements contained inside have moved location in the language container.
Execution Order of FBD Programs

574 AADvance 2.1 - FBD Language


Comments

Comments are free format text inserted anywhere in the FBD POU, for documentation
purposes only.

After entering text, click elsewhere in the workspace to 'validate' the comment.

You can expand and collapse comment elements displayed in the workspace by clicking the
maximize and minimize buttons. You can also resize comments.

Minimize Maximize

To insert a comment

You can apply text formatting options including bold, italic, underline, strikethrough, and
justify using the Format menu. You can also defined the foreground color.

1. From the Toolbox, drag the comment element into the language container.

2. In the language container, double-click the comment, then type the required text within
the space provided.

The comment is displayed in the language container.

AADvance Workbench 575


FBD Keyboard Shortcuts
The following keyboard shortcuts are available for use with the FBD language. Some shortcuts
do not apply or may differ while debugging.

Ctrl+A Selects all elements (not available while debugging)


Ctrl+C Copies the selected elements to the clipboard (not available while
debugging)
Ctrl+V Pastes elements saved on the clipboard to the insertion point (not avail-
able while debugging)
Ctrl+X Cuts the selected elements to the clipboard (not available while debug-
ging)
Ctrl+Y Redoes the previous command (not available while debugging)
Ctrl+Z Undoes the previous command (not available while debugging)
Shift+Ctrl+Alt+G Enables/disables the grid in the language container
Shift+Alt+Enter Toggles between full-screen and windowed modes
Ctrl+R Toggles between Auto-Input and Manual-Input. Auto-Input automati-
cally opens the Block Selector and Variable Selector (not available
while debugging).
Ctrl+B Bolds selected comment text (not available while debugging)
Ctrl+I Italicizes selected comment text (not available while debugging)
Ctrl+U Underlines selected comment text (not available while debugging)
Enter When a function block is selected, opens the Block Selector (not
available while debugging).
When a variable is selected, opens the Variable Selector (not available
while debugging).
When a comment is selected, starts editing it (not available while
debugging).
Ctrl+Enter When a variable is selected, opens the drop-down list of available
variables (not available while debugging).
When editing a comment, confirms the text (not available while
debugging).
Ctrl+- Decreases the magnification

576 AADvance 2.1 - FBD Language


Ctrl+= Increases the magnification
Ctrl+0 100% magnification
Ctrl+1 Inserts a variable (not available while debugging)
Ctrl+2 Inserts a function block (not available while debugging)
Ctrl+3 Inserts a comment (not available while debugging)
Shift+Up Arrow Reduces the height of the selected element (not available while
debugging)
Shift+Down Arrow Increases the height of the selected element (not available while
debugging)
Shift+Left Arrow Reduces the width of the selected element (not available while
debugging)
Shift+Right Arrow Increases the width of the selected element (not available while
debugging)
Ctrl+Up Arrow Moves the selection to the next element located higher in the diagram
without keeping the previous element selected (not available while
debugging)
Ctrl+Down Arrow Moves the selection to the next element located lower in the diagram
without keeping the previous element selected (not available while
debugging)
Ctrl+Left Arrow Moves the selection to the next element located to the left in the
diagram without keeping the previous element selected (not available
while debugging)
Ctrl+Right Arrow Moves the selection to the next element located to the right in the
diagram without keeping the previous element selected (not available
while debugging)
Alt+Shift+Up Arrow When a function block is selected, navigates up the different inputs and
outputs (not available while debugging)
Alt+Shift+Down When a function block is selected, navigates down the different inputs
Arrow and outputs (not available while debugging)
Alt+Shift+Left When a function block is selected, navigates left across the different
Arrow inputs and outputs (not available while debugging)
Alt+Shift+Right When a function block is selected, navigates right across the different
Arrow inputs and outputs (not available while debugging)

AADvance Workbench 577


Ctrl+Page Up Jumps to the top of the language container
Ctrl+Page Down Jumps to the bottom of the language container
Alt+Up Arrow Scrolls up
Alt+Down Arrow Scrolls down
Alt+Left Arrow Scrolls left
Alt+Right Arrow Scrolls right
Up Arrow Moves selected elements up the language container. While debugging,
scrolls up.
Down Arrow Moves selected elements down the language container. While
debugging, scrolls down.
Left Arrow Moves selected elements left across the language container. While
debugging, scrolls left.
Right Arrow Moves selected elements right across the language container. While
debugging, scrolls right.
Delete Removes the selected elements (not available while debugging)
Ctrl+D Only available in debug mode for the date data type. When the Write
Logical Value dialog box is open, enters the current date.
Ctrl+W Displays the execution order of elements within the diagram (not
available while debugging)

578 AADvance 2.1 - FBD Language


LD Language
Ladder Diagram (LD) is a graphic representation of Boolean equations, combining contacts
(input arguments) with coils (output results). The LD language enables the description of tests
and modifications of Boolean data by placing graphic symbols into the program chart. LD
graphic symbols are organized within the chart as an electric contact diagram. Thus, the term
"ladder" coming from the concept of rungs connected to vertical power rails at both ends where
each rung represents an individual circuit.

AADvance Workbench 579


You can adjust editor and view settings for individual or all Ladder Diagrams. When working
in a Ladder Diagram, you set the properties for the diagram from the Container properties in
the Properties window. You set the properties for all Ladder Diagrams using the options
available from the Tools menu. Some of the available properties include the following:

background and gradient colors for operators, functions, and function blocks

displaying the grid as well as the height and width of grid cells, in pixels

the height and width of elements, in grid cells. Basic elements are blocks without inputs
or outputs, coils, and contacts. For blocks, each input and output adds a basic element
dimension. For example, note the contact using the default settings of one grid cell high
by four grid cells wide. The following block uses a basic element width for the inputs,
another for the block, and another for the outputs. The block uses a basic element height
for the EN/ENO level, another for the first input and the output, and another for the
second input.

the font type, size, style, and color applied to the text displayed in elements

various options such as displaying comments and labels, aligning coils, and setting the colors
for variables, labels, comments, power rails, and rung headers

580 AADvance 2.1 - LD Language


Debugging LD Programs
When debugging LD programs, you can monitor the output values of variables. These values
are displayed using color, numeric, or textual values according to their data type:

Output values of boolean type are displayed using color. The output value color continues
to the next input. When the output value is unavailable, boolean elements remain black.
The default colors are red when True and blue when False. You can customize the colors
used for boolean items.

Output values of SINT, USINT, BYTE, INT, UINT, WORD, DINT, UDINT, DWORD,
LINT, ULINT, LWORD, REAL, LREAL, TIME, DATE, and STRING type are displayed
as a numeric or textual value in the element. When the output is a structure type, the
displayed value is the selected member.

For structure-type variables, you can display one simple-type field.

When the output value for a numeric or textual value is unavailable, WAIT is displayed in the
output label. Transitional elements such as Pulse rising edge (positive) contacts, having an
unstable state, remain black. Values are also displayed in the corresponding dictionary
instance.

AADvance Workbench 581


While simulating an application, you can debug LD programs using step-by-step execution.
You enable step-by-step execution by generating debug information for individual POUs.
When debug information is generated for LD programs, the controller automatically switches
to step-by-step execution when the application encounters a breakpoint. You instantiate
step-by-step execution by setting breakpoints to rungs. When debugging, the application stops
when it encounters a breakpoint. At this time, the controller is in the DEBUGGING state and
you can choose to perform one of the following operations:

Note: For more details on possible operations during simulation, refer to the Simulating an
Application section.

Step into the next rung, executing the next rung then stepping into the subsequent rung.
When the next rung includes a call to a function, stepping continues in the called function
then returns to the next rung in the POU.

Step over the next rung, executing the current rung then stepping to the next rung

In the language editor, breakpoints appear as red circles to the left of the rung. When a
breakpoint is encountered, a yellow arrow is displayed beside the breakpoint and the next rung
is highlighted in yellow.

When stepping passes beyond the last rung of a POU, the arrow points downward.

While debugging, you can toggle the Boolean logical value of a selected contact, coil, or
function block input.

To generate debug information for an LD POU

Generate debug information for LD POUs enables step-by-step debugging within the POU.

582 AADvance 2.1 - LD Language


1. In the Application View, select the LD POU for which to generate debug information.

2. In the Properties window for the POU, set Generate Debug Info to True.

To set breakpoints in an LD POU

1. In the Properties window for the POU, set Generate Debug Info to True.

2. Select the rung or rungs requiring breakpoints, right-click in the rung area, and then click
Add Breakpoint.

Breakpoints are displayed as red circles to the left of rungs.

To remove breakpoints

Select the rung or rungs requiring the removal of breakpoints, right-click in the rung area,
and then click Remove Breakpoint.

The breakpoints are removed from the selected rungs.

To step into the next rung

Only available for simulation.

From the Target Execution toolbar, click (or press F11).

The POU executes the current rung then steps into the next one and stepping continues in any
called function before returning to the next rung of the POU.

To step over the next rung

Only available for simulation.

From the Target Execution toolbar, click (or press F10).

The POU executes the current rung then steps to the next one.

AADvance Workbench 583


To toggle the logical value of a contact, coil, or block input

Select the required element, then right-click Toggle Boolean Value (or press Ctrl+T).

584 AADvance 2.1 - LD Language


LD Elements
When editing an LD POU, you can place elements in a language container by dragging them
from the LD toolbox or from a contextual menu accessed by right-clicking. An element is
inserted at the current position in the diagram. When inserting subsequent elements, these are
placed to the right of the selected element on the rung, then onto the next rung. For LD POUs,
the following elements are available:

Rungs

Blocks

Coils

Contacts

Jumps

Returns

Branches

While dragging rungs and elements from either the toolbox or within a diagram, the language
editor displays the possible drop points. Drop points are displayed as plus signs in a black
circle. For rungs, the possible drop points are displayed between the rung handles on the left.
For elements, the possible drop points are displayed on the rung.

For variables connected to block, coil, and contact elements, you can add these to existing
variables groups from the language container by right-clicking the variable, pointing to Add to
Variable Group, then clicking the required group.

AADvance Workbench 585


Drop points between rung handles while dragging a rung in a diagram

Drop points on a rung while dragging elements over the rung

586 AADvance 2.1 - LD Language


Rungs

Rungs are graphic components of LD programs and represent a group of circuit elements
leading to the activation of a coil. Rungs have labels for identification within a diagram. Labels
along with jumps enable controlling the execution of a diagram. The label and jump must have
the same name. When the connection on the left of the jump element has the TRUE Boolean
state, the diagram execution proceeds at the label element. Comments are free format text
inserted above the rung, for documentation purposes only. To the left of a rung, a handle
indicates the position within a diagram and enables repositioning by dragging and dropping.

While dragging rungs from either the toolbox or within a diagram, the language editor displays
the possible drop points. Drop points are displayed as plus signs in a black circle. For rungs,
the possible drop points are displayed between the rung handles on the left.

Drop points between rung handles while dragging a rung in a diagram

AADvance Workbench 587


To insert a rung

You can insert rungs from the Toolbox, contextual menus, or using keyboard shortcuts. While
inserting or dragging a block, drop points indicate the possible locations where the block can
be placed on a rung.
From the Toolbox, drag the rung element into the language container where a drop point is
displayed.

The rung is displayed in the language container.

To drag a rung in a diagram

When dragging rungs, the possible drop points are displayed between the handles on the left.

1. To reposition a rung within a diagram, select the rung handle while holding down the left
mouse button.

The rung handle indicates the rung position on the left.

2. Drag the rung to the required position in the diagram where a drop point is displayed.

To define the label for a rung

You can define labels using the space to the left of the rung.

1. Right-click a rung, then click Add Label.

2. In the upper left-hand corner, click in the text area beside the gray square and type the
required label text.

588 AADvance 2.1 - LD Language


To define the comment for a rung

You place comments in the space above the rung. After entering text, click elsewhere in the
workspace to 'validate' the comment. Text formating options including bold, italic, underline,
strikethrough, and justify, are available from the Format menu. Using the Format menu, you
can also defined the foreground color.

In the language container, click the rectangular space above the rung, then type the
required text.

AADvance Workbench 589


Blocks

In a language container, you connect blocks to Boolean lines. Blocks can be operators,
functions, or function blocks. Boolean inputs and outputs are not always contained within
blocks. Boolean inputs connecting blocks to rungs are always executed each cycle. Boolean
outputs connecting blocks to rungs control the remaining rung power flow. When inserting
blocks in a diagram, the EN and ENO parameters are added to some block interfaces. You can
also force the inclusion of the EN and ENO parameters for blocks having either one Boolean
input, one Boolean output, or no Boolean input and output. You activate the Enable EN/ENO
and Display Instance Names options from the Ladder Diagram options.

For functions and function blocks, you set the value of return parameters using coils. The return
parameter of a function has the same name as the function. The return parameters of a function
block can have any name.

When working with different controllers, you can define parameters of POUs for multiple
controllers by navigating the tabs for individual controllers displayed in the Parameters view.

You insert blocks from the LD stencil in the Toolbox. You can set the type of a block using the
Block Selector at any time following insertion. When you set the type of block, variables are
automatically displayed and are connected to the inputs and outputs of the block.

You replace input and output variables by double-clicking them to access the Variable Selector
or single-clicking them to select from a drop-down combo box containing the global and local
variables. Also, you can single-click a variable, then type a literal value in the text box
provided. When inserting literal values that being with a letter or an underscore, enclose the
variable name in single quotes as follows: 'abc'.

590 AADvance 2.1 - LD Language


Select a variable from the drop-down Type a literal value in the text box:
combo box:

When selecting items such as local variables, controller variables, system variables, and
defined words from the drop-down combo box, typing characters in the text box focuses on the
possible items. You can focus on listed items by typing letters, digits, and specific special
characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^, _, `, |, and ~.

EN Input

For operators, functions, and function blocks where the first input is not a Boolean data type,
another input called EN is automatically inserted at the first position since the first input is
always connected to the rung. The block is executed only when the EN input is TRUE. The
following example shows a comparison operator and its equivalent code expressed in ST.

IF rung_state THEN
o1:= (value1 > value 2);
ELSE
o1:= FALSE;
END_IF;
(* continue rung with o1 state *)

AADvance Workbench 591


ENO Output

For operators, functions, and function blocks where the first output is not a Boolean data type,
another output called ENO is automatically inserted at the first position since the first output is
always connected to the rung. The ENO output always has the same state as the first input of
the block. The following example shows the AVERAGE function block and its equivalent code
expressed in ST.

AVERAGE(rung_state, Signal, 100);


OutSignal := AVERAGE.XOUT;
ENO := rung_state;
(* continue rung with eno state *)

EN and ENO Parameters

In some cases, both EN and ENO parameters are required. The following example shows an
arithmetic operator and its equivalent code expressed in ST.

IF rung_state THEN
result := (value1 + value2);
END_IF;
ENO := rung_state;

(* continue rung with eno state *)

While dragging blocks from either the toolbox or within a diagram, the language editor
displays the possible drop points. Drop points are displayed as plus signs in a black circle. For
elements, the possible drop points are displayed on the rung.

592 AADvance 2.1 - LD Language


Drop points on a rung while dragging elements over the rung

To access the Parameters view

The Parameters view is available from function or function block instances located in the
Application View.

1. In the Application View, right-click the required function or function block instance in
the controller library, and then click Parameters.

The Parameters view is displayed.

2. To define the parameters of a function or function block, enter the required information in
the Parameters view.

To insert a block

You can insert blocks from the Toolbox, contextual menus, or using keyboard shortcuts. While
inserting or dragging a block, drop points indicate the possible locations where the block can
be placed on a rung.

1. From the Toolbox, drag the block element into the language container and place it on the
rung where a drop point is displayed.

The Block Selector is displayed.

2. In the Block Selector, locate the required block. You can sort the block list according to
the columns by setting these in ascending or descending order.
 To force the inclusion of the EN/ENO parameters, select Enable EN/ENO.

3. Click OK.

AADvance Workbench 593


The selected block is displayed on the rung.

To insert a parallel block

While inserting or dragging an element, drop points indicate the possible locations where the
element can be placed on a rung.

1. From the Toolbox, drag the branch element onto the existing block in the language
container.

2. To place a block element on the branch, do the following:

a) From the Toolbox, drag the block element into the language container, placing it on
the branch.
The Block Selector is displayed.

b) In the Block Selector, locate the required block. You can sort the block list according
to the columns by setting these in ascending or descending order.
 To force the inclusion of the EN/ENO parameters, select Enable EN/ENO.

c) Click OK.

The selected block is displayed on the branch.

To drag a block

When dragging blocks, the possible drop points on a rung are displayed while moving over the
rung.
To reposition a block within the diagram, select the block while holding down the left
mouse button, then drag the block to the required location on a rung where a drop point is
displayed.

594 AADvance 2.1 - LD Language


Coils

Coils are graphic components of LD programs and represent the assignment of Boolean
outputs. In an LD program, a coil represents an action. It must be connected on the left to a
Boolean symbol, such as a contact or the Boolean output of a block.

The following types of coils are available from the LD stencil:

Direct Coil

Reverse Coil

Pulse Rising Edge Coil

Pulse Falling Edge Coil

Set Coil

Reset Coil

You can change the type of a coil at anytime following its insertion. When inserting coils in
POUs, you assign variables using the Variable Selector. Names of assigned variables are
displayed above the coil elements within POUs. You replace existing variables by
double-clicking the variable names to access the Variable Selector or by single-clicking
variable names to select from drop-down combo boxes containing the global and local
variables. Also, you can single-click existing variables, then type literal values in the text boxes
provided. When inserting literal values beginning with a letter or an underscore, enclose the
variable name in single quotes as follows: 'abc'.

Select a variable from the drop-down combo Type a literal value in the text box:
box:

AADvance Workbench 595


When selecting items such as local variables, controller variables, system variables, and
defined words from the drop-down combo box, typing characters in the text box focuses on the
possible items. You can focus on listed items by typing letters, digits, and specific special
characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^, _, `, |, and ~.

You can align the coils of all rungs making up diagrams to improve readability.

While dragging coils from either the toolbox or within a diagram, the language editor displays
the possible drop points. Drop points are displayed as plus signs in a black circle. For elements,
the possible drop points are displayed on the rung. For instance, since a rung can only have one
coil on the right, the editor does not display possibilities when dragging another coil onto the
rung. However, if a parallel branch is placed around the coil, the editor displays a possible
location for another coil on the branch.

Drop points on a rung while dragging elements over the rung

To insert a coil

You can insert coils from the Toolbox, contextual menus, or using keyboard shortcuts. While
inserting or dragging a coil, drop points indicate the possible locations where the coil can be
placed on a rung.

1. From the Toolbox, drag the required coil type into the language container and place it on
the rung where a drop point is displayed.

The Variable Selector is displayed.

2. In the Variable Selector, select the required variable, then click OK.

The coil element and its associated variable name are displayed on the rung.

596 AADvance 2.1 - LD Language


To insert a parallel coil

While inserting or dragging an element, drop points indicate the possible locations where the
element can be placed on a rung.

1. From the Toolbox, drag the branch element onto the existing coil in the language
container.

2. From the Toolbox, drag the desired coil type onto the branch.

The Variable Selector is displayed.

3. In the Variable Selector, select the required variable, then click OK.

The coil element and its associated variable name are displayed on the branch.

To change the type of a coil


In the language container, select the coil, and then press the space bar.

To align all coils in a diagram

1. Right-click in the language container, and then click Properties.

2. In the Properties window, set the Coil Alignment property to True.

AADvance Workbench 597


Direct Coil

Direct coils enable a Boolean output of a connection line Boolean state.

Left Right
Connection Connection

The associated variable is assigned with the Boolean state of the left connection. The state of
the left connection is propagated into the right connection. The right connection can be
connected to the right vertical power rail.

The associated name can be the name of the program (for functions only). This corresponds to
the assignment of the return value of the function.

Example

(* ST Equivalence: *)
output1 := input1;
output2 := input1;

598 AADvance 2.1 - LD Language


Reverse Coil

Reverse coils enable a Boolean output according to the Boolean negation of a connection line
state.

Left Right
Connection Connection

The associated variable is assigned with the Boolean negation of the state of the left
connection. The state of the left connection is propagated into the right connection. The right
connection can be connected to the right vertical power rail.

The associated name can be the name of the program (for functions only). This corresponds to
the assignment of the return value of the function.

Example

(* ST Equivalence: *)
output1 := NOT (input1);
output2 := input1;

AADvance Workbench 599


Pulse Rising Edge Coil

Pulse rising edge coils or "Positive" coils enable Boolean output of a connection line Boolean
state.

Left Right
Connection Connection

The associated variable is set to TRUE when the Boolean state of the left connection rises from
FALSE to TRUE. The output variable resets to FALSE in all other cases. The state of the left
connection is propagated into the right connection. The right connection can be connected to
the right vertical power rail.

Example

(* ST Equivalence: *)
IF (input1 and NOT(input1prev)) THEN
output1 := TRUE;
ELSE
output1 := FALSE;
END_IF;

(* input1prev is the value of input1 at the previous cycle *)

600 AADvance 2.1 - LD Language


Pulse Falling Edge Coil

Pulse falling edge coils or "Negative" coils enable Boolean output of a connection line Boolean
state.

Left Right
Connection Connection

The associated variable is set to TRUE when the Boolean state of the left connection falls from
TRUE to FALSE. The output variable resets to FALSE in all other cases. The state of the left
connection is propagated into the right connection. The right connection can be connected to
the right vertical power rail.

Example

(* ST Equivalence: *)
IF (NOT(input1) and input1prev) THEN
output1 := TRUE;
ELSE
output1 := FALSE;
END_IF;

(* input1prev is the value of input1 at the previous cycle *)

AADvance Workbench 601


Set Coil

Set coils enable a Boolean output of a connection line Boolean state.

Left Right
Connection Connection

The associated variable is set to TRUE when the boolean state of the left connection becomes
TRUE. The output variable keeps this value until an inverse order is made by a "RESET" coil.
For information on variables, see page 441. The state of the left connection is propagated into
the right connection. The right connection can be connected to the right vertical power rail.

Example

(* ST Equivalence: *)
IF input1 THEN
output1 := TRUE;
END_IF;
IF input2 THEN
output1 := FALSE;
END_IF;

602 AADvance 2.1 - LD Language


Reset Coil

Reset coils enable Boolean output of a connection line Boolean state.

Left Right
Connection Connection

The associated variable is reset to FALSE when the Boolean state of the left connection
becomes TRUE. The output variable keeps this value until an inverse order is made by a "SET"
coil. The state of the left connection is propagated into the right connection. The right
connection can be connected to the right vertical power rail.

Example

(* ST Equivalence: *)
IF input1 THEN
output1 := TRUE;
END_IF;
IF input2 THEN
output1 := FALSE;
END_IF;

AADvance Workbench 603


Contacts

Contacts are graphic components of LD diagrams. Depending on the type of contact, it


represents the value or function of an input or internal variable.

The following contact types are available from the LD stencil:

Direct Contact

Reverse Contact

Pulse Rising Edge Contact

Pulse Falling Edge Contact

You can change the type of a contact at any time following its insertion.

When inserting contacts in POUs, you assign variables using the Variable Selector. Names of
assigned variables are displayed above the contact elements within POUs. You replace existing
variables by double-clicking the variable names to access the Variable Selector or by
single-clicking variable names to select from drop-down combo boxes containing the global
and local variables. Also, you can single-click existing variables, then type literal values in the
text boxes provided. When inserting literal values beginning with a letter or an underscore,
enclose the variable name in single quotes as follows: 'abc'.

Select a variable from the drop-down combo Type a literal value in the text box:
box:

604 AADvance 2.1 - LD Language


When selecting items such as local variables, controller variables, system variables, and
defined words from the drop-down combo box, typing characters in the text box focuses on the
possible items. You can focus on listed items by typing letters, digits, and specific special
characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^, _, `, |, and ~.

While dragging contacts from either the toolbox or within a diagram, the language editor
displays the possible drop points. Drop points are displayed as plus signs in a black circle. For
elements, the possible drop points are displayed on the rung.

Drop points on a rung while dragging elements over the rung

To insert a contact

You can insert contacts from the Toolbox, contextual menus, or using keyboard shortcuts.
While inserting or dragging a contact, drop points indicate the possible locations where the
contact can be placed on a rung.

1. From the Toolbox, drag the required contact type into the language container and place it
on the rung where a drop point is displayed.

The Variable Selector is displayed.

2. In the Variable Selector, select the required variable, then click OK.

The contact and its associated variable name are displayed on the rung.

To insert a parallel contact

While inserting or dragging an element, drop points indicate the possible locations where the
element can be placed on a rung.

AADvance Workbench 605


1. From the Toolbox, drag the branch element into the language container, placing it on the
existing contact.

2. From the Toolbox, drag a contact element into the language container, placing it on the
branch.

The Variable Selector is displayed.

3. In the Variable Selector, select the required variable, and then click OK.

The contact and its associated variable name are displayed on the branch.

To drag a contact

When dragging contacts, the possible drop points on a rung are displayed while moving over
the rung.
To reposition a contact within the diagram, select the contact while holding down the left
mouse button, then drag the contact to the required location on a rung where a drop point
is displayed.

To change the type of a contact


In the language container, select the contact, and then press the space bar.

606 AADvance 2.1 - LD Language


Direct Contact

Direct contacts enable a Boolean operation between a connection line state and a Boolean
variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is the logical AND between the state
of the left connection line and the value of the variable associated with the contact.

Example

(* ST Equivalence: *)
output1 := input1 AND input2;

AADvance Workbench 607


Reverse Contact

Reverse contacts enable a Boolean operation between a connection line state and the Boolean
negation of a Boolean variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is the logical AND between the state
of the left connection line and the Boolean negation of the value of the variable associated with
the contact.

Example

(* ST Equivalence: *)
output1 := NOT (input1) AND NOT (input2);

608 AADvance 2.1 - LD Language


Pulse Rising Edge Contact

Pulse rising edge (positive) contacts enable a Boolean operation between a connection line
state and the rising edge of a Boolean variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is set to TRUE when the state of the
connection line on the left is TRUE, and the state of the associated variable rises from FALSE
to TRUE. The state is reset to FALSE in all other cases.

Example

(* ST Equivalence: *)
output1 := input1 AND (input2 AND NOT (input2prev));
(* input2prev is the value of input2 at the previous cycle *)

AADvance Workbench 609


Pulse Falling Edge Contact

Pulse falling edge (negative) contacts enable a Boolean operation between a connection line
state and the falling edge of a Boolean variable.

Left Right
Connection Connection

The state of the connection line on the right of the contact is set to TRUE when the state of the
connection line on the left is TRUE, and the state of the associated variable falls from TRUE
to FALSE. The state is reset to FALSE in all other cases.

Example

(* ST Equivalence: *)
output1 := input1 AND (NOT (input2) AND input2prev);
(* input2prev is the value of input2 at the previous cycle *)

610 AADvance 2.1 - LD Language


Jumps

Conditional and unconditional jump elements enable controlling the execution of diagrams.
You cannot place connections to the right of a jump element. When the connection on the left
of the jump element has the TRUE Boolean state, the diagram execution proceeds at the label.
The label and jump must have the same name. The following diagram shows a jump in the
parallel branch on the first rung.

Warning: Inserting backward jumps in the diagram may block the PLC loop.

AADvance Workbench 611


While dragging jumps from either the toolbox or within a diagram, the language editor displays
the possible drop points. Drop points are displayed as plus signs in a black circle. For elements,
the possible drop points are displayed on the rung. For instance, since a rung can only have one
jump, the editor does not display possibilities when dragging another jump onto the rung.
However, if a parallel branches are placed on a rung, the editor displays possible locations for
jumps on the rung and on all branches.

Drop points on a rung while dragging elements over the rung

To insert a jump

Before inserting jumps, define one or more labels within the program. You can insert jumps
from the Toolbox, contextual menus, or using keyboard shortcuts. While inserting or dragging
a jump, drop points indicate the possible locations where the jump can be placed on a rung.

1. From the Toolbox, drag the jump element into the language container and place it on the
rung where a drop point is displayed.

2. In the language container, click the jump element, then select the required label name
from the drop-down combo box.

The jump is displayed on the rung with the required label name.

To drag a jump

When dragging jumps, the possible drop points on a rung are displayed while moving over the
rung.
To reposition a jump within the diagram, select the jump while holding down the left
mouse button, then drag the jump to the required location on a rung where a drop point is
displayed.

AADvance Workbench 613


Returns

You can use RETURN elements as outputs representing a conditional end of a diagram. You
cannot place connections to the right of a RETURN element.

When the left connection line has the TRUE Boolean state, the diagram ends without executing
the equations located on the next lines of the diagram.

When the LD diagram is a function, its name is associated with an output coil to set the return
value (returned to the calling diagram).

While dragging Return elements from either the toolbox or within a diagram, the language
editor displays the possible drop points. Drop points are displayed as plus signs in a black
circle. For elements, the possible drop points are displayed on the rung. For instance, since a
rung can only have one Return, the editor does not display possibilities when dragging another
Return onto the rung. However, if a parallel branch is placed around the Return, the editor
displays a possible location for another Return on the branch.

Drop points on a rung while dragging elements over the rung

614 AADvance 2.1 - LD Language


Example

(* ST Equivalence: *)
If Not (manual_mode) Then RETURN; End_if;
result := (input1 OR input3) AND input2;

To insert a return

You can insert returns from the Toolbox, contextual menus, or using keyboard shortcuts. While
inserting or dragging a Return element, drop points indicate the possible locations where the
contact can be placed on a rung.
From the Toolbox, drag the return element into the language container, placing it on the
rung where a drop point is displayed.

The return element is displayed on the rung.

To drag a Return element

When dragging Return elements, the possible drop points on a rung are displayed while
moving over the rung.
To reposition a Return element within the diagram, select the Return element while
holding down the left mouse button, then drag the Return element to the required location
on a rung where a drop point is displayed.

AADvance Workbench 615


Branches

Branches create alternative routing for connections. You can add parallel branches to elements
on a rung. Parallel branch structures are displayed with connections upon clicking a rung.

To perform operations such as cutting, copying, pasting, and deleting branches, you can select
a single branch or all branches from a parallel structure. When selecting a single branch, you
click the connection on the left or right extremity of the branch. The branch connection is
highlighted and the branch is outlined. When selecting all branches, you click any of the
vertical lines joining the branch connections on the left or right extremity of the branches. The
branch arm is highlighted and all branches in the structure are outlined.

Single Branch Selection All Branches Selection

While dragging branches from either the toolbox or within a diagram, the language editor
displays the possible drop points. Drop points are displayed as plus signs in a black circle. For
elements, the possible drop points are displayed on the rung.

Drop points on a rung while dragging elements over the rung

616 AADvance 2.1 - LD Language


To insert a branch

You can insert branches from the Toolbox, contextual menus, or using keyboard shortcuts.
While inserting or dragging a branch, drop points indicate the possible locations where the
branch can be placed on a rung.

From the Toolbox, drag the branch element into the language container and place in on
the rung where a drop point is displayed.

A parallel branch is displayed.

To drag a branch

When dragging branches, the possible drop points on a rung are displayed while moving over
the rung.
To reposition a branch within the diagram, select the branch while holding down the left
mouse button, then drag the branch to the required location on a rung where a drop point
is displayed.

AADvance Workbench 617


Selecting LD Elements
In LD POUs, you can select individual or multiple LD elements to perform management tasks
such as cutting, copying, pasting, and deleting. You select multiple elements by holding down
Ctrl while clicking the left mouse button or by dragging to enclose.

When selecting elements, you can only select elements having the same level on a rung; you
cannot select elements from different rungs. Upon clicking a rung, parallel branch structures
are displayed with connections. The following diagram shows the selection of two contacts and
a parallel branch structure on a rung. These three elements are at the same level while the
individual parallel branches are sub-elements of the branch structure.

For branches, you can select a single branch or all branches from a structure. When selecting
a single branch, you click the connection on the left or right extremity of the branch. The
connection for the selected branch is highlighted and the branch is outlined. When selecting all
branches, you click any of the vertical lines joining the branch connections on the left or right
extremity of the branches. The branch arm is highlighted and all branches in the structure are
outlined.

618 AADvance 2.1 - LD Language


Single Branch Selection All Branches Selection

To select elements

You can select individual or multiple elements using the mouse or keyboard shortcuts. When
selecting branches, you can either select a single branch or all branches from a structure. You
can only select elements of the same level on the same rung.

1. To select a single element, click the element on the rung.

2. To select multiple elements, click each of the required elements while holding down the
Ctrl key.

3. To select a single branch from a parallel branch structure, click the connection on the left
or right extremity of the branch.

The branch connection is highlighted and the branch is outlined.

4. To select all branches from a parallel branch structure, click any of the vertical lines
joining the branch connections on the left or right extremity of the branches.

The branch arm is highlighted and all branches are outlined.

AADvance Workbench 619


LD Keyboard Shortcuts
Using keyboard shortcuts in LD POUs, you can perform many editing operations and navigate
the elements making up a diagram. When navigating an LD diagram, the arrow keys enable
moving up and down and left and right from rung to rung and from element to element. You
enable navigating in a diagram by clicking in the language container.

The following keyboard shortcuts are available for use with the LD language. Some shortcuts
do not apply or may differ while debugging.

Ctrl+A Selects all rungs (not available while debugging)


Ctrl+C Copies the selected elements to the clipboard (not available while
debugging)
Ctrl+V Pastes elements saved on the clipboard to the insertion point (not
available while debugging)
Ctrl+X Cuts the selected elements to the clipboard (not available while
debugging)
Ctrl+Y Redoes the previous command (not available while debugging)
Ctrl+Z Undoes the previous command (not available while debugging)
Shift+Ctrl+Alt+G Enables/disables the grid in rungs (only available when the Display Grid
property is set to True)
Shift+Alt+Enter Toggles between full-screen and windowed modes
Ctrl+R Toggles between Auto-Input and Manual-Input. Auto-Input
automatically opens the Block Selector and Variable Selector (not
available while debugging).
Ctrl+B Bolds selected comment text (not available while debugging)
Ctrl+I Italicizes selected comment text (not available while debugging)
Ctrl+U Underlines selected comment text (not available while debugging)
Enter Calls the Variable/Block selector depending on the selected element (not
available while debugging)
F9 Toggles between setting or removing a breakpoint on a selected rung
(available when Generate Debug Info is True). If more than one rung is
selected, only sets a breakpoint on the first selected rung.

620 AADvance 2.1 - LD Language


Space Bar For coils or contacts, toggles between the available types (not available
while debugging)
Ctrl+0 Inserts a rung below a selected rung. When no rung is selected, a rung is
added at the end of the rung list (not available while debugging).
Ctrl+Alt+0 Inserts a rung above a selected rung. When no rung is selected, a rung is
added at the end of the rung list (not available while debugging).
Ctrl+ 1 Inserts a branch after a selected element (not available while debugging)
Ctrl+Alt+ 1 Inserts a branch before a selected element (not available while
debugging)
Ctrl+2 Inserts a block after a selected element. When a branch is selected, a
block is inserted on the branch (not available while debugging).
Ctrl+Alt+2 Inserts a block before a selected element. When a branch is selected, a
block is inserted on the branch (not available while debugging).
Ctrl+3 Inserts a contact after a selected element. When a branch is selected, a
contact is inserted on the branch (not available while debugging).
Ctrl+Alt+3 Inserts a contact before a selected element. When a branch is selected, a
contact is inserted on the branch (not available while debugging).
Ctrl+4 When a rung or the last element on a rung is selected, inserts a coil at the
end of the rung. When the last element selected on a rung is a branch, a
coil is inserted on the branch (not available while debugging).
Ctrl+5 When a rung or the last element on a rung is selected, inserts a jump at
the end of the rung. When the last element selected on a rung is a
branch, a jump is inserted on the branch (not available while
debugging).
Ctrl+6 When a rung or the last element on a rung is selected, inserts a return at
the end of the rung. When the last element selected on a rung is a
branch, a return is inserted on the branch (not available while
debugging).
Ctrl+7 When an element is selected, surrounds the element with a branch (not
available while debugging).
Page Up Jumps to the top of the language container
Page Down Jumps to the bottom of the language container
Ctrl+Page Up Jumps to the top of the language container

AADvance Workbench 621


Ctrl+Page Down Jumps to the bottom of the language container
Shift+Page Up Jumps to the leftmost edge of the language container
Shift+Page Down Jumps to the rightmost edge of the language container
Ctrl+Up Arrow Slowly scrolls up.
Ctrl+Down Arrow Slowly scrolls down.
Ctrl+Left Arrow Slowly scrolls left.
Ctrl+Right Arrow Slowly scrolls right.
Up Arrow Moves up the elements.
Down Arrow Moves down the elements.
Left Arrow Moves to the left across the elements.
Right Arrow Moves to the right across the elements.
Alt+Up Arrow Selects the previous rung. When no element or rung is selected, selects
the last rung.
Alt+Down Arrow Selects the next rung. When no element or rung is selected, selects the
first rung.
Alt+Left Arrow Selects the rung of the selected element. When no element is selected,
selects the first rung.
Alt+Right Arrow Selects the rung of the selected element. When no element is selected,
selects the first rung.
Home When a rung is selected, selects the first element.
End When a rung is selected, selects the last element.
Ctrl+Home Selects the first element on the first rung. When the first rung contains
no elements, selects the rung.
Ctrl+End Selects the last element on the last rung. When the last rung contains no
elements, selects the rung.
Shift+Up Arrow Scrolls up
Shift+Down Arrow Scrolls down
Shift+Left Arrow Scrolls left
Shift+Right Arrow Scrolls right
Delete Removes a selected rung or element (not available while debugging)

622 AADvance 2.1 - LD Language


Ctrl+D When in design mode, edits the comment of the selected rung.
When in debug mode, for the date data type, enters the current date
when the Write Logical Value dialog box is displayed.
Ctrl+T Only available in debug mode for the Boolean data type. Toggles the
logical value of a selected contact, coil, or block input.

AADvance Workbench 623


624 AADvance 2.1 - LD Language
ST Language
ST (Structured Text) is a high level structured language designed for automation processes.
This language is mainly used to implement complex procedures that cannot be easily expressed
with graphic languages. ST language is also used for the description of the actions within the
Steps and conditions attached to the Transitions of the SFC or the Actions.

AADvance Workbench 625


ST Main Syntax
An ST program is a list of ST statements. Each statement ends with a semi-colon (";")
separator. Names used in the source code (variable identifiers, constants, language
keywords...) are separated with inactive separators (space character, end of line or tab stops) or
by active separators, which have a well defined significance (for example, the ">" separator
indicates a "greater than" comparison.

Comments enable the inclusion of non-executed information throughout code. You can insert
comments anywhere in an ST program. Comments can run multiple lines and must begin with
"(*" and end with "*)". You cannot use interleave comments, i.e., comments within comments.

When typing statements, a drop-down combo box automatically lists the available items such
as identifiers, operators, functions, and function blocks. The listed items are filtered by typing
letters, digits, and specific special characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^, _,
`, |, and ~.

The following are basic types of ST statements:

assignment statement (variable := expression;)

function call

function block call

selection statements (IF, THEN, ELSE, CASE...)

iteration statements (FOR, WHILE, REPEAT...)

control statements (RETURN, EXIT...)

special statements for links with other languages

When entering ST syntax, basic coding is black while other items are displayed using
customizable colors. The default colors for ST elements are the following:

Comments are green

The Editor background is white

Identifiers are black

626 AADvance 2.1 - ST Language


Numbers are firebrick

Operators are black

POUs are blueviolet

Punctuation marks are black

Reserved words are fuchsia

Strings of text are gray

Inactive separators between active separators, literals, and identifiers increase ST program
legibility. ST inactive separators are the following: space (blank), tabs and end of line. You can
place end of lines anywhere in a program. The following rules apply to using inactive
separators:

Write one statement on one line

Use tabs to indent complex statements

Insert comments to increase legibility of lines or paragraphs

Examples

Low Readability
imax := max_ite; cond := X12;
if not(cond (* alarm *)
then return; end_if;
for i (* index *) := 1 to max_ite
do if i <> 2 then Spcall();
end_if; end_for;
(* no effect if alarm *)

AADvance Workbench 627


High Readability
(* imax : number of iterations *)
(* i: FOR statement index *)
(* cond: process validity *)
imax := max_ite;
cond := X12;
if not (cond) then
return;
end_if;
(* process loop *)
for i := 1 to max_ite do
if i <> 2 then
Spcall ();
end_if;
end_for;

To customize the default display settings for ST programs

1. From the Tools menu, click Options.

2. From the Options dialog box, expand IEC Languages, and then click Structured Text
(ST).

3. Expand the respective category, customize the required setting, and then click OK.

The customized settings are now the default values for ST programs.

To customize the display settings for the current ST program

1. From the View menu, click Properties Window.

The Properties Window is displayed.

2. Select the ST Container.

628 AADvance 2.1 - ST Language


3. From the Properties Window you can:

 Customize the font for the required item by clicking . The Font dialog box is
displayed allowing for customization of the font, text size, bold, italic, strikeout, and
underline styles.
 Customize the text color for the required items. The possible colors are custom, web,
and system colors.

The customized settings only affect the current ST program.

AADvance Workbench 629


Expressions and Parentheses
ST expressions combine ST operators and variable or constant operands. For each single
expression (combining operands with one ST operator), the type of the operands must be the
same. This single expression has the same data type as its operands, and can be used in a more
complex expression. For example:

(boo_var1 AND boo_var2) has BOOL type


not (boo_var1) has BOOL type
(sin (3.14) + 0.72) has REAL type
(t#1s23 + 1.78) is an invalid expression

Parentheses are used to isolate sub parts of an expression and to explicitly order the priority of
operations. When no parentheses are given for a complex expression, the operation sequence
is implicitly given by the default priority between ST operators. For example:

2+3*6 equals 2+18=20 because multiplication operator has a higher priority


(2 + 3) * 6 equals 5*6=30 priority is given by parenthesis

630 AADvance 2.1 - ST Language


Calling Functions
The ST programming language enables calling functions. Function calls can be used in any
expression.

Name: name of the called function written in IEC 61131-3 language or in "C"
Meaning: calls ST, LD, or FBD functions or a "C" function and gets its return value
Syntax: <variable> := <funct> (<par1>, ... <parN> );
Operands: The type of return value and calling parameters must follow the interface
defined for the function.
Return value: value returned by the function

When setting the value of the return parameter in the body of a function, assign the return
parameter using the same name as the function:
FunctionName := <expression>;

Example

Example1: IEC 61131-3 function call


(* Main ST program *)
(* gets an integer value and converts it into a limited time value *)
ana_timeprog := SPlimit ( tprog_cmd );
appl_timer := ANY_TO_TIME (ana_timeprog * 100);
(* Called FBD function named 'SPlimit' *)

Example2: "C" function call – same syntax as for IEC 61131-3 function calls
(* Functions used in complex expressions: min, max, right, mlen and
left are standard "C" functions *)
limited_value := min (16, max (0, input_value) );
rol_msg := right (message, mlen (message) - 1) + left (message, 1);

AADvance Workbench 631


Calling Function Blocks
The ST programming language enables calling function blocks. Function block calls can be
used in any expression.

Name: name of the function block instance


Meaning: calls a function block from the standard library or from the user's library
and accesses its return parameters
Syntax: (* call of the function block *)
<blockname> ( <p1>, <p2> ... );
(* gets its return parameters *)
<result> := <blockname>. <ret_param1>;
...
<result> := <blockname>. <ret_paramN>;
Operands: parameters are expressions which match the type of the parameters
specified for that function block
Return value: See Syntax to get the return parameters.

When setting the value of the return parameter in the body of a function block, assign the return
parameter using its name concatenated with the function block name:
FunctionBlockName.OutputParaName := <expression>;

Example
(* ST program calling a function block *)
(* declare the instance of the block in the dictionary: *)
(* trigb1 : block R_TRIG - rising edge detection *)
(* Function block activation from ST language *)
trigb1 (b1);
(* return parameters access *)
If (trigb1.Q) Then nb_edge := nb_edge + 1; End_if;

632 AADvance 2.1 - ST Language


Debugging ST Programs
While simulating an application, you can enable step-by-step execution by generating debug
information for individual POUs. When debug information is generated for ST programs, the
controller automatically switches to step-by-step execution when the application encounters a
breakpoint. You instantiate step-by-step execution by setting breakpoints to lines of code. In
the language editor, breakpoints appear as red circles to the left of the line of code and the line
is highlighted in red.

Note: For more details on possible operations during simulation, refer to the Simulating an
Application section.

When debugging, the application stops when it encounters a breakpoint. At this time, the
controller is in the DEBUGGING state and you can choose to perform one of the following
operations:

Step into the next line of code, executing the next line of code then stepping into the
subsequent line of code. When the next line of code includes a call to a function, stepping
continues in the called function then returns to the next line of code in the POU.

Step over the next line of code, executing the current line of code then stepping to the
next line of code

When a breakpoint is encountered, a yellow arrow is displayed beside the breakpoint and the
next line of code is highlighted in pink.

When stepping passes beyond the last line of code of a POU, the arrow points downward.

To generate debug information for an ST POU

Generate debug information for ST POUs enables step-by-step debugging within the POU.

1. In the Application View, select the ST POU for which to generate debug information.

2. In the Properties for the POU, set Generate Debug Info to True.

AADvance Workbench 633


To set a breakpoint in an ST POU
Right-click in the margin to the left of the line of code on which to add a breakpoint, then
click Add/Remove Breakpoint.

A breakpoint is displayed as a red dot to the left of the line of code.

To remove a breakpoint
Right-click in the area to the left of the line of code having a breakpoint to remove, then
click Add/Remove Breakpoint.

The breakpoint is removed from the line of code.

To step into the next line of code

From the Target Execution toolbar, click (or press F11).

The POU executes the current line of code then steps into the next one and stepping continues
in any called function before returning to the next line of the POU.

To step over the next line of code

From the Target Execution toolbar, click (or press F10).

The POU executes the current line of code then steps to the next one.

634 AADvance 2.1 - ST Language


ST Basic Elements and Statements
The basic elements and statements of the ST language are the following:

Assignments

CASE Statement

EXIT Statement

FOR Statement

IF-THEN-ELSIF-ELSE-END_IF Statement

REPEAT Statement

RETURN Statement

WHILE Statement

For variables in the syntax, you can add these to existing variables groups from the language
container by right-clicking the variable, pointing to Add to Variable Group, then clicking the
required group.

AADvance Workbench 635


Assignments

Name: :=
Meaning: Assigns a variable to an expression
Syntax: <variable> := <any_expression> ;
Operands: Variable must be an internal or output variable and the expression must have
the same type

The expression can be a call to a function.

Example
(* ST program with assignments *)
(* variable <<= variable *)
bo23 := bo10;
(* Variable <<= expression *)
bo56 := bx34 OR alrm100 & (level >= over_value);
result := (100 * input_value) / scale;
(* assignment with function call *)
limited_value := min (16, max (0, input_value) );

To insert an Assignment

In the language container, type :=.

636 AADvance 2.1 - ST Language


CASE Statement

Name: CASE ... OF ... ELSE ... END_CASE


Meaning: executes one of several lists of ST statements
selection is made according to an integer expression
Syntax: CASE <integer_expression> OF
<value> : <statements> ;
<value> , <value> : <statements> ;
...
ELSE
<statements> ;
END_CASE;

CASE values must be integer constant expressions. Several values, separated by commas, can
lead to the same list of statements. The ELSE statement is optional.

Example
(* ST program using CASE statement *)
CASE error_code OF
255: err_msg := 'Division by zero';
fatal_error := TRUE;
1: err_msg := 'Overflow';
2, 3: err_msg := 'Bad sign';
ELSE
err_msg := 'Unknown error';
END_CASE;

To insert a CASE
From the Toolbox, drag the CASE element into the language container.

AADvance Workbench 637


EXIT Statement

Name: EXIT
Meaning: exit from a FOR, WHILE or REPEAT iteration statement
Syntax: EXIT;

The EXIT is commonly used within an IF statement, inside a FOR, WHILE or REPEAT block.

Example
(* ST program using EXIT statement *)
(* this program searches for a character in a string *)
length := mlen (message);
found := NO;
FOR index := 1 TO length BY 1 DO
code := ascii (message, index);
IF (code = searched_char) THEN
found := YES;
EXIT;
END_IF;
END_FOR;

To insert an EXIT

In the language container, type EXIT.

638 AADvance 2.1 - ST Language


FOR Statement

Name: FOR ... TO ... BY ... DO ... END_FOR


Meaning: executes a limited number of iterations, using an integer index variable
Syntax: FOR <index> := <mini> TO <maxi> BY <step> DO
<statement> ;
<statement> ;
END_FOR;
Operands: index: internal integer variable increased at each loop
mini: initial value for index (before first loop)
maxi: maximum allowed value for index
step: index increment at each loop

The [ BY step ] statement is optional. If not specified, the increment step is 1

Warning: Because the virtual machine is a synchronous system, input variables are not
refreshed during FOR iterations.

This is the "WHILE" equivalent of a FOR statement:


index := mini;
while (index <= maxi) do
<statement> ;
<statement> ;
index := index + step;
end_while;

Example
(* ST program using FOR statement *)
(* this program extracts the digit characters of a string *)
length := mlen (message);
target := ''; (* empty string *)
FOR index := 1 TO length BY 1 DO
code := ascii (message, index);
IF (code >= 48) & (code <= 57) THEN
target := target + char (code);
END_IF;
END_FOR;

AADvance Workbench 639


To insert a FOR
From the Toolbox, drag the FOR element into the language container.

640 AADvance 2.1 - ST Language


IF-THEN-ELSIF-ELSE-END_IF Statement

Name: IF ... THEN ... ELSIF ... THEN ... ELSE ... END_IF
Meaning: executes one of several lists of ST statements
selection is made according to the value of a Boolean expression
Syntax: IF <Boolean_expression> THEN
<statement> ;
<statement> ;
...
ELSIF <Boolean_expression> THEN
<statement> ;
<statement> ;
...
ELSE
<statement> ;
<statement> ;
...
END_IF;

The ELSE and ELSIF statements are optional. If the ELSE statement is not written, no
instruction is executed when the condition is FALSE. You can use the ELSIF statement more
than once. The ELSE statement, if used, must appear only once at the end of the ‘IF, ELSIF...’
sequence.

AADvance evaluates complete Boolean expressions. For instance, evaluating the following
line of code, where i represents the array index having a definition of 2..10, causes a run-time
error upon reaching the second part where it applies the value 1 as the array index.
IF i >= 2 and i <= 10 and Array1[i] > 5 THEN

You can avoid this type of error by using the following code:
IF i >= 2 and i <= 10 THEN
IF Array1[i] THEN

Example
(* ST program using IF statement *)

AADvance Workbench 641


IF manual AND not (alarm) THEN
level := manual_level;
bx126 := bi12 OR bi45;
ELSIF over_mode THEN
level := max_level;
ELSE
level := (lv16 * 100) / scale;
END_IF;
(* IF structure without ELSE *)
If overflow THEN
alarm_level := true;
END_IF;

To insert an IF-THEN-ELSIF-ELSE-END_IF

From the Toolbox, drag the IF THEN ELSE element into the language container.

642 AADvance 2.1 - ST Language


REPEAT Statement

Name: REPEAT ... UNTIL ... END_REPEAT


Meaning: iteration structure for a group of ST statements
the "continue" condition is evaluated AFTER any iteration
Syntax: REPEAT
<statement> ;
<statement> ;
...
UNTIL <Boolean_condition>
END_REPEAT ;

Warning: Because the virtual machine is a synchronous system, input variables are not
refreshed during REPEAT iterations. The change of state of an input variable cannot be used
to describe the ending condition of a REPEAT statement.

Example
(* ST program using REPEAT statement *)
(* this program uses specific "C" functions to read characters *)
(* on a serial port *)
str := ''; (* empty string *)
nbchar := 0;
IF ComIsReady ( ) THEN
REPEAT
str := str + ComGetChar ( );
nbchar := nbchar + 1;
UNTIL ( (nbchar >= 16) OR NOT (ComIsReady ( )) )
END_REPEAT;
END_IF;

To insert a REPEAT
From the Toolbox, drag the REPEAT element into the language container.

AADvance Workbench 643


RETURN Statement

Name: RETURN
Meaning: terminates the execution of the current program
Syntax: RETURN ;
Operands: (none)

In an SFC action block, the RETURN statement indicates the end of the execution of that block
only.

Example

(* FBD specification of the program: programmable counter *)

(* ST implementation of the program, using RETURN statement *)


If NOT (CU) then
Q := false;
CV := 0;
RETURN; (* terminates the program *)
end_if;
if RESET then
CV := 0;
else
if (CV < PV) then
CV := CV + 1;
end_if;
end_if;
Q := (CV >= PV);

644 AADvance 2.1 - ST Language


To insert a RETURN

In the language container, type RETURN.

AADvance Workbench 645


WHILE Statement

Name: WHILE ... DO ... END_WHILE


Meaning: iteration structure for a group of ST statements
the "continue" condition is evaluated BEFORE any iteration
Syntax: WHILE <Boolean_expression> DO
<statement> ;
<statement> ;
...
END_WHILE ;

Warning: Since the virtual machine is a synchronous system, input variables are not refreshed
during WHILE iterations. The change of state of an input variable cannot be used to describe
the condition of a WHILE statement.

Example
(* ST program using WHILE statement *)
(* this program uses specific "C" functions to read characters *)
(* on a serial port *)
str := ''; (* empty string *)
nbchar := 0;
WHILE ((nbchar < 16) & ComIsReady ( )) DO
str := str + ComGetChar ( );
nbchar := nbchar + 1;
END_WHILE;

To insert a WHILE
From the Toolbox, drag the WHILE element into the language container.

646 AADvance 2.1 - ST Language


ST Extensions
The following statements and functions are available to control the execution of SFC child
programs. You can use these within action blocks written in ST for SFC steps.

GSTART Starts an SFC program or function block


GFREEZE Freezes an SFC program
GKILL Terminates an SFC program
GSTATUS Gets the current status of an SFC program
GRST Restarts a frozen SFC program or function block

Warning: These functions are not part of the IEC 61131-3 standard.

Simple equivalents for the GSTART and GKILL statements are available using the following
syntax in an SFC step:

child_name with the S qualifier (* equivalent to GSTART(child_name); *)

child_name with the R qualifier (* equivalent to GKILL(child_name); *)

The following fields enable accessing the status of an SFC step or child (from its parent):

StepName.x Boolean value that represents the activity of the Step


StepName.t time elapsed since the last activation of the step: activity duration
("StepName" represents the name of the SFC step)
ChildName.__S1.x Boolean value that represents the activity of the child
ChildName.__S1.t time elapsed since the last activation of the step: activity duration
("ChildName" represents the name of the SFC child)

AADvance Workbench 647


GSTART Statement in SFC Action

Name: GSTART
Meaning: Starts an SFC child program or function block by placing a token into
each of its initial steps. The abbreviated syntax is equivalent to an
SFC Child action block having the S qualifier. The extended syntax
only applies to SFC child function blocks.
Syntax: GSTART ( <child_name> );
or
GSTART ( <child_name,step_name,input1,input2,...inputn> )
where
child_name represents the name of the SFC child POU
step_name represents the name of the active step. step_name must be
preceded by two underscore characters (e.g., __S1)
input1,input2,...inputn indicate the values of the input parameters of
the SFC child POU
Operands: the specified SFC program must be a child of the one in which the
statement is written
Return value: (none)

Children of the child program are not automatically started by the GSTART statement.

Since GSTART is not part of the IEC 61131-3 standard, it is preferable to use the S qualifier
attached to the child name.

648 AADvance 2.1 - ST Language


Example

To insert a GSTART

In the language container, type GSTART.

AADvance Workbench 649


GFREEZE Statement in SFC Action

Name: GFREEZE
Meaning: freezes a child SFC (program or function block); suspends its execution. The
suspended SFC POU can then be restarted using the GRST statement.
Syntax: GFREEZE ( <child_name> );
where
child_name represents the name of the SFC child POU
Operands: the specified SFC program must be a child of the one in which the statement
is written
Return value: (none)

Children of the child program are automatically frozen along with the specified program.

GFREEZE is not part of the IEC 61131-3 standard.

650 AADvance 2.1 - ST Language


Example

To insert a GFREEZE

In the language container, type GFREEZE.

AADvance Workbench 651


GKILL Statement in SFC Action

Name: GKILL
Meaning: Terminates a child SFC program by removing the Tokens currently existing
in its Steps. The syntax is equivalent to an SFC Child action block having the
R qualifier.
Syntax: GKILL ( <child_name> );
where
child_name represents the name of the SFC child POU
Operands: the specified SFC program must be a child of the one in which the statement
is written
Return value: (none)

Children of the child program are automatically terminated with the specified program.

Since GKILL is not part of the IEC 61131-3 standard, it is preferable to use the R qualifier
attached to the child name.

652 AADvance 2.1 - ST Language


Example

To insert a GKILL

In the language container, Type GKILL.

AADvance Workbench 653


GSTATUS Statement in SFC Action

Name: GSTATUS
Meaning: returns the current status of an SFC program
Syntax: <var> := GSTATUS ( <child_name> );
where
child_name represents the name of the SFC child POU
Operands: the specified SFC program must be a child of the one in which the statement
is written
Return value: 0 = Program is inactive (terminated)
1 = Program is active (started)
2 = Program is frozen

GSTATUS is not part of the IEC 61131-3 standard.

654 AADvance 2.1 - ST Language


Example

To insert a GSTATUS

In the language container, type GSTATUS.

AADvance Workbench 655


GRST Statement in SFC Action

Name: GRST
Meaning: restarts a child SFC program frozen by the GFREEZE statement: all the
Tokens removed by GFREEZE are restored. The extended syntax only
applies to SFC child function blocks.
Syntax: GRST ( <child_name> );
or
GRST ( <child_name,input1,input2,...inputn> );
where
child_name represents the name of the SFC child POU
input1,input2,...inputn indicate the value of the input parameter of the SFC
child POU
Operands: the specified SFC program must be a child of the one in which the statement
is written
Return value: (none)

The GRST statement automatically restarts children of the child program.

GRST is not part of the IEC 61131-3 standard.

656 AADvance 2.1 - ST Language


Example

To insert a GRST

In the language container, Type GRST.

AADvance Workbench 657


ST Keyboard Shortcuts
The following keyboard shortcuts are available for use with the ST language. Some shortcuts
do not apply or may differ while debugging.
.

Ctrl+A Selects the entire document (not available while debugging)


Ctrl+C Copies the selected text to the clipboard (not available while
debugging)
Ctrl+Insert Copies the selected text to the clipboard (not available while
debugging)
Ctrl+V Pastes text saved on the clipboard to the insertion point (not
available while debugging)
Shift+Insert Pastes text saved on the clipboard to the insertion point (not
available while debugging)
Ctrl+X Cuts the selected text to the clipboard (not available while
debugging)
Shift+Delete Cuts the selected text to the clipboard (not available while
debugging)
Ctrl+L Cuts the current line to the clipboard (not available while
debugging)
Ctrl+Z Undoes the previous command (not available while
debugging)
Ctrl+Y Redoes the previous command (not available while
debugging)
Ctrl+Shift+Z Redoes the previous command (not available while
debugging)
Shift+Alt+Enter Toggles between full-screen and windowed modes
Insert Toggles between the overwrite/insert typing mode
Shift+Enter Inserts a line break. While debugging, when the insertion point
is on a variable, it opens the Write Logical Value dialog box.
Ctrl+Enter Inserts a line above the current line. While debugging, when
the insertion point is on a variable, it opens the Write Logical
Value dialog box.

658 AADvance 2.1 - ST Language


Ctrl+Shift+Enter Inserts a line below the current line. While debugging, when
the insertion point is on a variable, it opens the Write Logical
Value dialog box.
Ctrl+Shift+T Transposes the current and previous word (not available while
debugging)
Ctrl+Shift+Alt+T Transposes the current and next line (not available while
debugging)
Ctrl+Space Displays a drop-down combo box listing available items such
as variables, operators, functions, and function blocks. You can
filter displayed items by typing letters, digits, and specific
special characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^,
_, `, |, and ~. (not available while debugging)
Ctrl+Shift+Space Displays a drop-down combo box listing available items such
as variables, operators, functions, and function blocks. You can
filter displayed items by typing letters, digits, and specific
special characters: !, #, $, %, &, \, *, +, -, ,/ <, :, =, >, ?, @, \, ^,
_, `, |, and ~. (not available while debugging)
Ctrl+Shift+U Changes the selected text into uppercase (not available while
debugging)
Ctrl+U Changes the selected text into lowercase (not available while
debugging)
Up Arrow Moves up lines and characters
Down Arrow Moves down lines and characters
Left Arrow Moves left across lines and characters
Right Arrow Moves right across lines and characters
Ctrl+Left Arrow Moves to the previous statement or word
Ctrl+Right Arrow Moves to the next statement or word
Home Jumps to the start of the line
End Jumps to the end of the line
Ctrl+Home Jumps to the start of the document
Ctrl+End Jumps to the end of the document
Page Up Jumps to the top of the visible code

AADvance Workbench 659


Page Down Jumps to the bottom of the visible code
Ctrl+Page Up Jumps to the top of the visible code
Ctrl+Page Down Jumps to the bottom of the visible code
Ctrl+Up Arrow Scrolls up
Ctrl+Down Arrow Scrolls down
Shift+Up Arrow Selects up
Shift+Down Arrow Selects down
Shift+Left Arrow Selects left
Shift+Right Arrow Selects right
Ctrl+Shift+Left Arrow Selects to the previous statement or word
Ctrl+Shift+Right Arrow Selects to the next statement or word
Shift+Home Selects from the insertion point until the start of the line
Shift+End Selects from the insertion point until the end of the line
Ctrl+Shift+Home Selects from the insertion point until the start of the document
Ctrl+Shift+End Selects from the insertion point until the end of the document
Shift+Page Up Selects from the insertion point until the top of the visible code
Shift+Page Down Selects from the insertion point until the end of the visible
code
Ctrl+Shift+Page Up Selects from the insertion point until the top of the visible code
Ctrl+Shift+Page Down Selects from the insertion point until the end of the visible
code
Ctrl+Shift+W Selects the next word
Shift+Alt+Up Arrow Selects the current and previous lines
Shift+Alt+Down Arrow Selects the current and next lines
Shift+Alt+Left Arrow Selects left on the current line
Shift+Alt+Right Arrow Selects right on the current line
Ctrl+Shift+Alt+Left Arrow Selects available columns in lines of code from the left to right
Ctrl+Shift+Alt+Right Arrow Selects available columns in lines of code from the right to left
Escape Deselects the selected text
Ctrl+I Opens the Variable Selector. While debugging, opens the
Variable Monitoring dialog box.
Ctrl+Shift+I Opens the Variable Selector. While debugging, opens the
Variable Monitoring dialog box.
Ctrl+R Opens the Block Selector. When the insertion point is on a
variable during debugging, it is selected.
Ctrl+Alt+R Opens the Block Selector. When the insertion point is on a
variable during debugging, it is selected.
Ctrl+Shift+Alt+R Opens the Block Selector. When the insertion point is on a
variable during debugging, it is selected.
Delete Removes the character on the right (not available while
debugging)
Ctrl+Shift+L Removes the current line (not available while debugging)
Ctrl+Delete Removes the next word in the current line (not available while
debugging)
Ctrl+Backspace Removes the previous word in the current line (not available
while debugging)
Backspace Removes the character on the left (not available while
debugging)
Shift+Backspace Removes the character on the left (not available while
debugging)

AADvance Workbench 661


662 AADvance 2.1 - ST Language
SFC Language
The SFC language is a graphic language used to describe operations of a sequential process.
This language uses a simple graphic representation for the different steps of a process, and
conditions that enable the change of active steps. An SFC program is entered by using the
graphical SFC editor. The SFC (Sequential Function Chart) Editor is launched automatically
when an SFC program is opened from the Workbench or when an SFC program is edited.

SFC is the core of the IEC 61131-3 standard. The other languages usually describe the actions
within the steps and the logical conditions for the transitions. The SFC editor allows the user
to enter complete SFC programs. It combines graphic and text editing capabilities, thus
allowing the entry of both the SFC chart, and the corresponding actions and conditions.

The SFC programming language is not supported for safety related applications.

AADvance Workbench 663


SFC Main Format
An SFC program is a graphic set of steps and transitions, linked together using oriented links.
Divergences and convergences represent multiple connection links from 1 to n and n to 1
respectively. The basic graphic rules of SFC are the following:

SFC programs must have at least one initial step

A step must follow a transition

A transition must follow a step

SFC programs describe sequential operations, where the time variable explicitly synchronizes
basic operations. These are called sequential programs. Programs before and after SFC
programs describe cyclic operations and are not time-dependent. These are called cyclic
programs. Main sequential programs (at the top of the hierarchy) are executed according to the
SFC dynamic behavior. Cyclic programs are systematically executed at the beginning of each
run time cycle. In Programs sections, sequential programs are grouped together.

Main sequential programs are described with the SFC language; Cyclic programs cannot be
described with the SFC language. Any SFC program can have one or more SFC child
programs.

Functions and function blocks can be called from actions or conditions of SFC programs.

SFC programs and SFC child programs have dynamic behavior limits which are set at the
controller level. These dynamic behavior limits determine the amount of memory, allocated by
a target at initialization time, designated to manage SFC dynamic behavior (i.e. token moving).
The amount of allocated memory is calculated as a linear relation with the number of SFC
POUs:
Alloc Mem (bytes) = N * NbElmt * sizeof(typVa)
NbElmt = GainFactor * NbOfSFC + OffsetFactor

Where:

664 AADvance 2.1 - SFC Language


N = 5 (constant linked to SFC engine design)
NbElmt = The maximum number of transitions that can be valid for each executed cycle, i.e.,
transitions with at least one of their previous steps being active.
typVa = 16 bits in the medium memory model (32 bits in the large memory model)
GainFactor and OffsetFactor = the linear parameters of the linear relation
NbOfSFC = the number of SFC POUs in the project

Factor of dynamic behavior limits determining the amount of memory, allocated by a target at
initialization time, designated to manage token moving. The amount of allocated memory is
calculated as a linear relation with the number of SFC POUs:

Alloc Mem (bytes) = N * NbElmt * sizeof(typVa)

NbElmt = GainFactor * NbOfSFC + OffsetFactor

The following points offer a simplified and more approximate definition of the allocated
memory:

The maximum number of steps that can be active

The maximum number of actions (N, P1 or P0 action linked to the step) that can be
executed

When the available memory is insufficient at a specific moment for a target where check mode
(ITGTDEF_SFCEVOCHECK defined in dsys0def.h) is generated, the target kernel generates
a warning. This warning signals an SFC token moving error or an action execution error and
the controller is set to ERROR mode, i.e., cycles are no longer executed or kernel behavior may
become unpredictable.

For SFC function blocks and SFC child function blocks, each has a maximum number of
tokens which is set in the properties of the block.

SFC function block instances, as their SFC child blocks, have a maximum number of tokens,
unlike SFC programs whose dynamic behavior limits are set at the controller level.

AADvance Workbench 665


SFC Execution Behavior
The SFC execution behavior consists of three stages: initial situation (start), code execution,
and end. Each virtual machine cycle consists of determining all clearable transitions and
executing their active steps. Execution ends upon reaching unclearable transitions or the end
of the control chart.

Within the execution cycle, the dynamic behaviors of the SFC language are the following:

Initial situation

The Initial Situation is characterized by the initial steps which are, by definition, in the active
state at the beginning of the operation. At least one initial step must be present in each SFC
program.

Clearing of a transition

A transition has three properties: enabled/disabled, active/inactive, and


clearable/non-clearable. A transition is enabled when all immediately preceding steps linked
to its corresponding transition symbol are active, otherwise, the transition is disabled. A
transition is active if its condition is True.

A transition is clearable if it is enabled and active at the same time. When a transition is
clearable, the steps immediately preceding it become inactive and those immediately following
it become active. When transitions follow a divergence, multiple transitions may become
clearable. However, the only transition that is cleared is the one having the highest priority

Changing of state of active steps

The clearing of a transition simultaneously leads to the active state of the immediately
following steps and to the inactive state of the immediately preceding steps. The code within a
step is only executed if the step is active.

Simultaneous clearing of transitions

All transitions (of all SFC programs) that can be cleared (enabled and active), are
simultaneously cleared.

666 AADvance 2.1 - SFC Language


However, for transitions following divergences, the only transition that is cleared is the one
having the highest priority among those that are enabled and active.

End

The End is characterized by reaching the end of clearable transitions or the end of the control
chart.

AADvance Workbench 667


SFC Program Hierarchy
The system enables the description of the vertical structure of SFC programs. SFC programs
are organized in a hierarchical-tree structure. Each SFC program can control (start,
terminate,...) other SFC programs. Such programs are called children of the SFC program
which controls them. SFC programs are linked together into a main hierarchy tree, using a
"parent - child" relationship:

The basic rules implied by the hierarchy structure are:


Parent Program

Child Program

SFC programs having no parent are called "main" SFC programs

Within a controller there are certain restrictions on the relative positions of programs within
the hierarchy:

All SFC programs must be adjacent within the hierarchy.

SFC Child must use the same language as their parent.

Main SFC programs are activated by the system when the application starts

A program can have several child programs

A child of a program can only have one parent

A child program can only be controlled by its parent

A program cannot control the children of one of its own children

The basic actions that a parent SFC program can take to control its child program are:

668 AADvance 2.1 - SFC Language


Child SFC POUs
Start (GSTART) Starts the child program: activates each of its initial steps.
Children of this child program are not automatically started.
Terminate (GKILL) Terminates the child program by deactivating each of its active
steps. All the children of the child program are also terminated.
Freeze (GFREEZE) Deactivates each of the active steps of the program, and
memorizes them so the program can be restarted. All the
children of the child program are also frozen.
Restart (GRST) Restarts a frozen SFC program by reactivating all the
suspended steps. Children of the program are not automatically
restarted.
Get status (GSTATUS Gets the current status (active, inactive or frozen) of a child
program.

Any SFC POU may control other SFC POUs. Such low level units are called child SFC POUs.
A child SFC POU is a parallel unit that can be started, terminated, frozen, or restarted by its
parent. The parent POU and child POU must both be described with the SFC language. A child
SFC POU can have local variables.

When a parent POU starts a child SFC, it puts an SFC token (activates) into each initial step of
the child. This command is described with the GSTART statement or with the name of the
child with the S qualifier. When a parent POU terminates a child SFC, it clears all the tokens
existing in the steps of the child. Such a command is described with the GKILL statement or
with the name of the child and the R qualifier. When a parent POU starts a child, the parent
continues its execution.

When a parent POU freezes a child SFC, it clears all the tokens existing in the child, and keeps
their position in memory. Such a command is described with the GFREEZE statement. When
a parent POU restarts a frozen child SFC, it restores all the tokens cleared when the child was
frozen. Such a command is described with the GRST statement.

Child SFC function block instances, as for their SFC function block parents, have a maximum
number of tokens, unlike SFC programs whose dynamic behavior limits are set at the controller
level. You specify the tokens limit for an SFC function block in its settings properties.

AADvance Workbench 669


When using an SFC function block with an SFC child, you can access, for read-only purposes,
the local values of the child from its parent by entering the child’s name and the parameter in
an action or transition’s code. For example, to access the Local1 parameter of an SFC child
named FB_Child, in an action or transition defined for the SFC function block parent, you
would write the following syntax:

FB_Child.Local1

To add a Child SFC POU


In the Application View, right-click an existing SFC POU, and then click Add SFC
Child.

To move a child SFC POU

You can drag and drop SFC POUs within the Programs or Function Blocks sections to change
their position in the tree structure. When you move an SFC POU having children, the children
follow their parent. You can also move a child SFC POU to a different main SFC POU or to a
different hierarchy level. Note that you can only drag child SFC POUs to hierarchical levels
already containing an SFC child.
In the Application View, drag the SFC POU to the required position and hierarchy level.

670 AADvance 2.1 - SFC Language


Debugging SFC Programs
When debugging SFC programs, you can visually follow the execution of the individual steps.
Steps are colored red while active. You can also place SFC breakpoints on SFC steps or
transitions. When a breakpoint is encountered, the controller switches to the BREAK state.
This mode is equivalent to the cycle-to-cycle mode. Then to pass the breakpoint, you can
choose either to execute one cycle or to switch to real-time mode. When a controller is in the
BREAK state and step-by-step execution is activated for other POUs within the controller, you
can also step to the first line of the first POU of the controller for which debug information is
generated.

Note: You cannot set or remove SFC breakpoints while a controller is in the STEPPING state.

For steps, two types of breakpoints are available:

Breakpoint on Step Activation

Breakpoint on Step Deactivation

Breakpoints appear as red circles with a white checkmark displayed on the left part of the step
or transition. For steps, breakpoints on activation are displayed at the top corner while
breakpoints on deactivation are displayed at the bottom corner.

To set a breakpoint command on a step or transition

You set breakpoints onto steps and transitions. For steps, you can apply a breakpoint on
activation or a breakpoint on deactivation.
Right-click on the step or transition, and then click the required breakpoint command.

Once the breakpoint is reached, you can execute one cycle or switch to real-time mode to
continue execution.

To remove breakpoints from steps or transitions

You remove breakpoints from steps and transitions.


Right-click the step or transition, and then click Remove Breakpoint.

AADvance Workbench 671


Breakpoint on Step Activation

When the step goes from the inactive (no token) to the active (token) state, then breakpoint
mode is set for the next cycle. The current cycle goes on executing normally. In particular
around the step where the breakpoint is placed, before breakpoint mode is really set:

All P0 actions, linked to all previous steps that become inactive, are executed.

All P1 – S – R – N actions, linked to the step that becomes active, are executed.

The following illustrates cycle execution when a breakpoint on step activation is encountered.

To set a breakpoint on step activation


Right-click the step, and then click Set Breakpoint on Activation.

672 AADvance 2.1 - SFC Language


Breakpoint on Step Deactivation

When the step goes from the active (token) to the inactive (no token) state, then breakpoint
mode is set for the next cycle. Current cycle goes on executing normally. In particular around
the step where the breakpoint is placed, before breakpoint mode is really set:

All P0 actions, linked to the step that becomes inactive, are executed.

All P1 – S – R – N actions, linked to all successor steps that become active, are executed.

The following illustrates cycle execution when a breakpoint on step de-activation is


encountered.

The behaviors of setting a breakpoint on step activation is the same as step de-activation. These
are both available to avoid setting multiple breakpoints as shown below.

Note: On a given step, you cannot set both a breakpoint on step activation and a breakpoint on
step de-activation.

AADvance Workbench 673


To set a breakpoint on step deactivation
Right-click the step, and then click Set Breakpoint on Deactivation.

674 AADvance 2.1 - SFC Language


Breakpoint on Transition

When a transition becomes clearable (transition is valid i.e. all previous steps are active, and
its receptivity is true) then breakpoint mode is set for the next cycle. The current cycle goes on
executing normally except that the transition is not cleared and therefore related tokens are not
moved.

The following illustrates cycles execution when a breakpoint on transition is encountered.

To set a breakpoint on a transition


Right-click the transition, and then click Set Breakpoint.

AADvance Workbench 675


Transition Clearing Forcing

You can force the clearing of a transition while in simulation whether all previous steps are
active or not. The tokens are moved and the actions are executed the same as with usual
transition clearings.

Tokens of all predecessor steps are removed and tokens of all successor steps are created. All
P0 actions linked to predecessor steps and P1 - S - R - N actions linked to successor steps are
executed.

The following illustrates cycle execution when forcing transition clearing:

Warning: Clearing a transition may cause abnormal behavior of your chart since several
tokens may be created.

To clear a transition
While in simulation mode, right-click the transition and then click Clear Transition.

676 AADvance 2.1 - SFC Language


SFC Elements
When working in SFC programs, you can insert the following elements. A program always has
an initial step.

Steps

Transitions

Sequence Controls

Jumps to Steps

When inserting steps and transitions, these are assigned a default naming convention including
numbering. For steps, the default naming is Sn where S indicates a step and n indicates the
numbering for the step. For transitions, the default naming is Tn where T indicates a transition
and n indicates the numbering for the transition. You can rename steps and transitions.
However, when renaming steps and transitions using the default naming convention and
changing only the numbering, you can renumber these elements to a numbering scheme
starting from top to bottom, then from left to right.

AADvance Workbench 677


Before Renumbering After Renumbering

To renumber steps and transitions

Renumbering ignores steps and transitions using a naming convention other than the default
Sn for steps and Tn for transitions.

1. Open the SFC program for which to renumber the steps and transitions.

2. From the Tools menu, point to Multi-language Editor, and then click Renumber Steps
and Transitions.

678 AADvance 2.1 - SFC Language


Steps

SFC programs contain initial steps and steps. Intial steps express the initial situation of an SFC
program. Whereas, steps are placed throughout an SFC program. An SFC program must
contain at least one initial step. Initial steps are double bordered. Initial steps and steps are
referenced by a name, written in their square symbol. This information is the level 1 of the step.

An initial step has a double bordered graphic symbol.

Initial Step

A step is represented by a single square.

Step

At run time, a token indicates that the step is active. For initial steps, a token is automatically
placed in each when the program is started.

Active Step Inactive Step

Steps have attributes. These can be used in any of the other languages.

StepName.x activity of the Step (Boolean value)


StepName.t activation duration of the Step (time value)

(where StepName is the name of the step)

AADvance Workbench 679


Activity of a step is an attribute of a step which is activiated by an SFC token.

For SFC function blocks, when reading a child active step or duration from a parent:

ChildName.__S1.x activity of the Step (Boolean value)


ChildName.__S1.t activation duration of the Step (time value)

(where ChildName is the name of the child. Note that S1 is preceded by two underscore
(_)characters)

To insert an initial step


From the Toolbox, drag the initial step element into the language container.

To insert a step
From the Toolbox, drag the step element into the language container.

680 AADvance 2.1 - SFC Language


Transitions

Transitions are represented by small horizontal bars that cross the connection link. Each
transition is referenced by a name, written next to the transition symbol. This information is
called the level 1 of the transition.

When using single divergences, the first transitions following the divergence are set in a group
to define their priority of execution. The Workbench automatically assigns the priority of
transitions in the order of creation of the divergence branch. You can specify a different priority
for a transition. The possible priority values range from 1 to 255.

To insert a transition

For transitions following divergences, you set the priorities in the Properties window for
transitions which you can access by right-clicking the transition or the title bar of the
transition's level 2.

1. From the Toolbox, drag the transition element into the language container.

2. To link the transition to an existing step, click the mouse with the cursor on the grid cell
above or below the step.

3. Specify a different priority for a transition following a divergence:

a) Right-click the transition, and then click Properties.

b) In the Properties window, set the priority to the required value, and then click OK.

AADvance Workbench 681


Sequence Controls

Sequence controls are divergences or convergences. These elements adjust automatically to the
context of the SFC diagram. For instance, the editor automatically inserts the type of sequence
control required according to the elements at the insertion point. Moreover, when adding a
parallel element below a sequence control, the sequence control automatically branches out to
the added element. Also, when a sequence control is placed erroneously within a diagram, the
editor displays it as red.

Selection Divergences, a multiple link from a step to multiple transitions

Selection Convergences, a multiple link from multiple transitions to a single step

Simultaneous Divergences, a multiple link from a transition to multiple steps

Simultaneous Convergences, a multiple link from multiple steps to a single transition

Divergences are multiple links from one SFC element (step or transition) to multiple SFC
symbols. Convergences are multiple connections from more than one SFC symbol to one other
symbol.

When inserting a sequence control, the type is determined logically according to the number
of SFC elements of a same type (whether multiple) located initially above then below the
control.

To insert a sequence control


From the Toolbox, drag the sequence control to the required location in the language
container.

The sequence control is displayed in the language container.

682 AADvance 2.1 - SFC Language


Selection Divergences

A selection divergence (OR) is a multiple link from one step to multiple transitions. The
selection divergence enables an active token to pass into one of a number of branches.

Conditions attached to the different transitions at the beginning of a selection divergence are
not implicitly exclusive. Exclusivity of transitions is defined by the priorities set to those
transitions following the divergence.

Selection divergences are represented by single horizontal lines.

The first transitions following a single divergence are set in a group to define their priority of
execution. The workbench automatically assigns the priority of transitions, displayed on the
left, in the order of creation of the divergence branch. You can specify a different priority for
a transition in the properties. The possible priority values range from 1 to 255.

Example

(* SFC Program with selection divergence and convergence *)

AADvance Workbench 683


684 AADvance 2.1 - SFC Language
Selection Convergences

A selection convergence (OR) is a multiple link from multiple transitions to a single step.
Selection convergences are generally used to group branches which were started using
selection divergences.

Selection convergences are represented by single horizontal lines.

AADvance Workbench 685


Simultaneous Divergences

A simultaneous divergence (AND) is a multiple link from one transition to multiple steps. A
simultaneous divergence corresponds to parallel operations of a process.

Simultaneous divergences are represented by double horizontal lines.

Example

(* SFC program with simultaneous divergence and convergence *)

686 AADvance 2.1 - SFC Language


Simultaneous Convergences

A simultaneous convergence (AND) is a multiple link from multiple steps to a single transition.
Simultaneous convergences are generally used to group branches which were started using
simultaneous divergences.

Simultaneous convergences are represented by double horizontal lines.

AADvance Workbench 687


Jumps to Steps

Jump symbols may be used to indicate a connection link from a transition to a step, without
having to draw the connection line. The jump symbol must be referenced with the name of the
destination step:

Jump to Step S1

A Jump symbol cannot represent a link from a step to a transition.

To insert a jump to a step

1. From the Toolbox, drag the jump element into the language container and place it directly
below the existing transition.

The Select Destination Step dialog box is displayed.

2. In the Select Destination Step dialog box, select the required step and then click OK.

The jump is displayed in the language container.

Example

The following charts are equivalent:

688 AADvance 2.1 - SFC Language


The following charts are equivalent. The chart on the left uses links to return
from the bottom to the top of the chart while the chart on the right uses jumps to
return to the top of the chart.

AADvance Workbench 689


Coding Action Blocks for Steps
Action blocks are operations executed when a step is active. Steps can contain multiple action
blocks of the same or different type. You add action blocks to the level 1 of a step. Depending
on the action block type, you may need to program the level 2 for the block. The level 2 of an
SFC step is the detailed description of the actions executed during the step activity. You
program level 2 code for an action block in a level 2 window, displayed to the right of the POU.
The available action block types are the following:

Boo where where the action block name is automatically associated to Boolean variable
selected from the variable selector. Possible qualifiers are Action (N), Reset (R), and
Set (S).

LD where you program an LD diagram in the level 2 window. Possible qualifiers are
Action (N), Pulse on Deactivation Action (P0), and Pulse On Activation Action (P1).

SFC where the action block name is automatically associated to the SFC child. Possible
qualifiers are Action (N), Reset (R), and Set (S).

ST where you define ST code in the level 2 window. Possible qualifiers are Action (N),
Pulse on Deactivation Action (P0), and Pulse On Activation Action (P1).

Individual SFC steps are executed in the following order:

1. Step activation - beginning when the previous transition is cleared. During this period,
defined action blocks are executed in the order of appearance.

2. Step cycle - beginning when the step becomes active and ending when the step completes
deactivation. During this period, defined action blocks are executed in the order of
appearance.

3. Step deactivation - ending when the following transition becomes active. During this
period, defined action blocks other than Boolean (Boo) action blocks having the N
qualifier are executed in the order of appearance. Boolean (Boo) action blocks are
executed after all other action blocks.

To add action blocks to steps

1. Select the step for which to define operations.

690 AADvance 2.1 - SFC Language


2. Right-click the step, point to Add, then click one of the following:
Boo Action
LD Action
SFC Action
ST Action

3. Specify the required properties for the action block from the Properties window by
clicking the action block definition on the step.

a) To rename the ST or LD action block, type the required text in the Name field.

Note: The names for Boo and SFC action blocks are automatically associated to their
respective assignation (Boolean variable or SFC child).

b) To specify the qualifier for the action block, select the required type in the Qualifier
field.

c) To include a comment, type the required text in the Comment field.

4. For a Boo action block, double-click the action block name, then from the Variable
Selector, select the variable for use in the block.

5. For an ST or LD action block, access the level 2 for the block by double-clicking the
action block name on the step, then program the required level 2 operations in the level 2
window displayed to the right of the POU.

To rearrange the order of action blocks for a step

1. On the step, select the action block to displace.

2. Right-click the action block, and then click Move Up or Move Down.

To delete an action block

1. On the step, select the action block to remove.

2. Right-click the action block, and then click Delete.

AADvance Workbench 691


Boolean Actions

Boolean (Boo) actions assign a Boolean variable to the activity of the Step. The Boolean
variable can be an output or a memory variable. The variable is assigned each time the step
activity starts or stops. The operation for Boolean actions differs for the different qualifiers:

N on a Boolean Variable assigns the step activity signal to the variable


S on a Boolean Variable sets the variable to TRUE when the step activity signal becomes
TRUE
R on a Boolean Variable resets the variable to FALSE when the step activity signal
becomes TRUE

The Boolean variable must be an OUTPUT or a MEMORY variable. The following SFC
programming leads to the indicated behavior:

692 AADvance 2.1 - SFC Language


Pulse Actions

A pulse action is a list of instructions which are executed only once at the activation of the step:
P1 qualifier, or executed only once at deactivation of the step: P0 qualifier. Instructions are
written using the ST or LD syntax.

The following shows the results of a pulse action with the P1 qualifier:

Step Activity

Execution

Example

AADvance Workbench 693


Non-Stored Actions

A non-stored (normal) action is a list of ST or LD instructions which are executed at each cycle
during the whole active period of the step. Instructions are written according to the language
syntax in use. Non-stored actions have the "N" qualifier.

The following is the results of a non-stored action:

Step Activity

Execution

Example

694 AADvance 2.1 - SFC Language


SFC Actions

An SFC action is a child SFC sequence, started or terminated according to the change of the
step activity signal. An SFC action can have the N (Non stored), S (Set), and R (Reset)
qualifiers. This is the meaning of the action on an SFC child:

N on a child starts the child sequence when the step becomes active and
terminates the child sequence when the step becomes inactive
S on a child starts the child sequence when the step becomes active
R on a child stops the child sequence when the step becomes active

The SFC sequence specified as an action must be a child SFC program of the program currently
being edited.

Example

(* SFC Program using SFC Action *)

The main SFC program is named Parent having one SFC child, called SeqMlx. The SFC
programming of the parent SFC program is the following:

AADvance Workbench 695


696 AADvance 2.1 - SFC Language
Coding Conditions for Transitions
You code conditions for the clearing of transitions by programming these in the level 2
window. Only one condition can be attached to a transition. When changing the programming
language of a transition, the code zone must be empty. When defining the properties of
conditions, you indicate a name, priority, comment (optional), and the programming language
(type). The available programming languages for transitions are LD and ST.

When no expression is attached to the Transition, the default condition is TRUE.

To code conditions for transitions

1. Select the transition for which to code a condition.

2. Right-click the transition, and then click Properties.

3. From the Properties window, specify the required properties for the transition.

a) To rename the transition, type the required text in the Name field.

b) To specify the type (programming language) for the transition condition, select the
required type in the Type field.

c) To include a comment, type the required text in the Comment field.

4. In the Level 2 window, program the required condition.

AADvance Workbench 697


Conditions Programmed in ST

The ST language can be used to describe the condition for a transition. The complete
expression must have Boolean type and may be terminated by a semi colon, according to the
following syntax:

< boolean_expression > ;

The expression may be a TRUE or FALSE constant expression, a single input or an internal
Boolean variable, or a combination of variables that leads to a Boolean value.

Example

(* SFC Program with ST programming for Transitions *)

698 AADvance 2.1 - SFC Language


Conditions Programmed in LD

The Ladder Diagram (LD) language can be used to describe the condition attached to a
transition. The initial diagram is composed of a rung.

Example

(* SFC Program with LD programming for transitions *)

AADvance Workbench 699


Calling Functions from Transitions
Any function (written in ST, LD, or FBD), or a "C" function can be called to evaluate the
condition attached to a transition, according to the following syntax in ST:

< function > ( ) ;

The value returned by the function must be Boolean and yield the resulting condition:

return value = FALSE -> condition is FALSE


return value = TRUE -> condition is TRUE

Example

(* SFC program with function call for transitions *)

The syntax of function calls for LD is indicated in the respective language section.

700 AADvance 2.1 - SFC Language


Calling Function Blocks from Transitions
It is not recommended to call a function block in an SFC condition for the following reasons:

A function block should be called at each cycle, typically in a cyclic program.

An SFC condition is evaluated only when all of its preceding steps are active (not at each
cycle)

AADvance Workbench 701


SFC Keyboard Shortcuts
The following keyboard shortcuts are available for use with the SFC language. Some shortcuts
do not apply or may differ while debugging.

Ctrl+A Selects all elements (not available while debugging)


Ctrl+C Copies the selected elements to the clipboard (not available while
debugging)
Ctrl+V Pastes elements saved on the clipboard to the insertion point (not
available while debugging)
Ctrl+X Cuts the selected elements to the clipboard (not available while
debugging)
Ctrl+Y Redoes the previous command (not available while debugging)
Ctrl+Z Undoes the previous command (not available while debugging)
Shift+Alt+Enter Toggles between full-screen and windowed modes
Ctrl+0 Inserts an initial step (not available while debugging)
Ctrl+1 Inserts a step (not available while debugging)
Ctrl+2 Inserts a transition (not available while debugging)
Ctrl+3 Inserts a sequence control (not available while debugging)
Ctrl+4 Inserts a jump (not available while debugging)
Ctrl+Shift+R Renumbers the steps and transitions using the default naming convention
(Sn and Tn)
Ctrl+Page Up Jumps to the top edge of the language container
Ctrl+Page Down Jumps to the bottom of the language container
Alt+Up Arrow Scrolls up
Alt+Down Arrow Scrolls down
Alt+Left Arrow Scrolls left
Alt+Right Arrow Scrolls right
Ctrl+Up Arrow Slowly scrolls up
Ctrl+Down Arrow Slowly scrolls down
Ctrl+Left Arrow Slowly scrolls left

702 AADvance 2.1 - SFC Language


Ctrl+Right Arrow Slowly scrolls right
Up Arrow Moves up the grid or from one selected element to the next
Down Arrow Moves down the grid or from one selected element to the next
Left Arrow Moves to the left across the grid or from one selected element to the next
Right Arrow Moves to the right across the grid or from one selected element to the next
Delete Removes the selected elements (not available while debugging)

AADvance Workbench 703


704 AADvance 2.1 - SFC Language
AADvance Workbench 705
Language Reference
The language reference includes information about the usage and limitations of various project
elements and other aspects:

Programs

Functions

Function Blocks

Execution Rules

Reserved Keywords

Variables

Directly Represented Variables

Defined Words

Data Types

AADvance Workbench 707


Programs
Programs, also known as POUs, are logical programming units describing operations between
variables of a process. Programs describe either sequential or cyclic operations. Cyclic
programs are executed at each target system cycle. Sequential programs, representing
sequential operations, are grouped together. The execution of sequential programs has a
dynamic behavior.

Programs before and after sequential programs describe cyclic operations. These are cyclic
programs which are not time-dependent. Cyclic programs are systematically executed at the
beginning of each run time cycle. Main sequential programs (at the top of the hierarchy) are
executed according to their respective dynamic behavior.

Begin Cyclic operations (FDB, LD, ST)


Sequential Sequential operations (SFC, SFC child)
End Cyclic operations (FDB, LD, ST)

Programs located at the beginning of a cycle (before sequential programs) typically describe
preliminary operations on input controllers to build high level filtered variables. Sequential
programs frequently use these variables. Programs located at the end of the cycle (after
sequential programs) typically describe security operations on the variables operated on by
sequential programs, before sending values to output controllers.

Programs are described using the available graphic or literal languages. You specify the
programming language when creating a program; you cannot change the programming
language for an existing program.

POUs defined as programs are executed on the target system respecting the order shown in the
Programs section.

You need to respect the hierarchy of programs. Programs are linked together in a hierarchical
tree. Those placed at the top of the hierarchy are activated by the system. Child-programs
(lower level of the hierarchy) are activated by their parent.

For programs within a project and dependency libraries, names are limited to 128 characters
beginning with a letter followed by letters, digits, and single underscores. The last character for
a program name must be a letter or digit; program names cannot end with an underscore
character. Names cannot be reserved words, defined words, or data types (i.e., elementary,
structures, or arrays). Names must be unique for the same type of elements within a scope.

708 AADvance 2.1 - Language Reference


Projects can contain up to 65 536 programs.

AADvance Workbench 709


Functions
Functions are POUs having one or more input parameters and one output parameter. A function
can be called by a program, a function or afunction block. A function has no instance meaning
that local data is not stored and is usually lost from one call to the other.

The execution of a function is driven by its parent program. Therefore, the execution of the
parent program is suspended until the function ends:

Any program of any section can call one or more functions. A function can have local
variables.

AADvance does not support recursivity during function calls. When a function of the
Functions section is called by itself or one of its called functions, a run-time error occurs.
Furthermore, functions do not store the local values of their local variables. Since functions are
not instantiated, these cannot call function blocks.

The interface of a function must be explicitly defined with a type and a unique name for each
of its calling (input) parameters or return (output) parameter. A function has one return
parameter. The value of the return parameter for a function differs for the various programming
languages.

POUs (programs, functions, and function blocks) within a project and dependency libraries
must have unique names within a scope. Function names and function parameter names are
limited to 128 characters beginning with a letter followed by letters, digits, and single
underscores. The last character for a function name must be a letter or digit; function names
cannot end with an underscore character. Names cannot be reserved words, defined words, or
data types (i.e., elementary, structures, or arrays).

710 AADvance 2.1 - Language Reference


Function Blocks
Function blocks are POUs having multiple input and output parameters. These are instantiated
meaning local variables of a function block are copied for each instance. When calling a
function block in a program, you actually call the instance of the block where the same code is
called but the data used is that which has been allocated to the instance. The values of the
variables of an instance are stored from one cycle to the other.

Function blocks can be called by any POU in the project. Function blocks can call functions or
other function blocks. The order in which function blocks appear within their section is not
important.

You can move or copy all function blocks to the Programs section and all but the SFC function
block to the Functions section. You can also move or copy functions and programs, written
with languages supported by function blocks, to the Functions section. When moving or
copying a program to the Function Blocks section, all local variables defined in the program
are converted to function block parameters.

The interface of a function block must be explicitly defined with a type and a unique name for
each of its calling (input) parameters or return (output) parameters. Function blocks can have
more than one output parameter. The value of a return parameter for a function block differs
for the various programming languages.

POUs (programs, functions, and function blocks) within a project and dependency libraries
must have unique names within a scope. Function block names and function block parameter
names are limited to 128 characters beginning with a letter followed by letters, digits, and
single underscores. The last character for a function block name must be a letter or digit;
function block names cannot end with an underscore character. Names cannot be reserved
words, defined words, or data types (i.e., elementary, structures, or arrays).

Each instance of IEC 61131-3 or 'C' written function corresponds to data stored in AADvance
virtual machine real time database. You cannot add new automatic instances of IEC 61131-3
function blocks or of standard 'C' function blocks with or without initial values. To enable
online changes, you need to work with function blocks declared in the Dictionary.

You cannot add any user 'C' Function Blocks.

AADvance Workbench 711


Execution Rules
The execution of a control application for a project follows eight main steps within a loop. The
duration of this loop is defined as the cycle timing for a controller.

1. Scan input variables

2. Consume bound variables

3. Execute POUs

4. Produce bound variables

5. Update output variables

6. Save retained values

7. Process IXL messages

8. Sleep until next cycle

In a case where bindings are defined, variables consumed by a controller are updated after the
inputs are scanned and the variables produced for other controllers are sent before updating
outputs.

When a cycle time is specified, a controller waits until this time has elapsed before starting the
execution of a new cycle. The POUs execution time varies depending on the size of the
application. When a cycle exceeds the specified time, the loop continues to execute the cycle
but sets an overrun flag. In such a case, the application no longer runs in real time.

When a cycle time is not specified, a controller performs all programs then restarts a new cycle
without waiting.

712 AADvance 2.1 - Language Reference


Reserved Keywords
Reserved keywords are unavailable for use as names of POUs or variables. Also, all keywords
beginning with the underscore ('_') character are internal keywords and must not be used in
textual instructions.

A ABS, ACOS, ADD, ANA, AND, AND_MASK, ANDN, ARRAY, ASIN, AT,
ATAN,
B BCD_TO_BOOL, BCD_TO_INT, BCD_TO_REAL, BCD_TO_STRING,
BCD_TO_TIME, BOO, BOOL, BOOL_TO_BCD, BOOL_TO_INT,
BOOL_TO_REAL, BOOL_TO_STRING, BOOL_TO_TIME, BY, BYTE,
C CAL, CALC, CALCN, CALN, CALNC, CASE, CONCAT, CONSTANT, COS,
D DATE, DATE_AND_TIME, DELETE, DINT, DIV, DO, DT, DWORD,
E ELSE, ELSIF, EN, END_CASE, END_FOR, END_FUNCTION, END_IF,
END_PROGRAM, END_REPEAT, END_RESOURCE, END_STRUCT,
END_TYPE, END_VAR, END_WHILE, ENO, EQ, EXIT, EXP, EXPT,
F FALSE, FIND, FOR, FUNCTION,
G GE, GFREEZE, GKILL, GRST, GSTART, GSTATUS, GT,
I IF, INSERT, INT, INT_TO_BCD, INT_TO_BOOL, INT_TO_REAL,
INT_TO_STRING, INT_TO_TIME,
J JMP, JMPC, JMPCN, JMPN, JMPNC,
L LD, LDN, LE, LEFT, LEN, LIMIT, LINT, LN, LOG, LREAL, LT, LWORD,
M MAX, MID, MIN, MOD, MOVE, MSG, MUL, MUX,
N NE, NOT,
O OF, ON, OR, OR_MASK, ORN,
P PROGRAM
R R, READ_ONLY, READ_WRITE, REAL, REAL_TO_BCD, REAL_TO_BOOL,
REAL_TO_INT, REAL_TO_STRING, REAL_TO_TIME, REPEAT, REPLACE,
RESSOURCE, RET, RETAIN, RETC, RETCN, RETN, RETNC, RETURN,
RIGHT, ROL, ROR,

AADvance Workbench 713


S S, SEL, SHL, SHR, SIN, SINT, SQRT, ST, STN, STRING, STRING_TO_BCD,
STRING_TO_BOOL, STRING_TO_INT, STRING_TO_REAL,
STRING_TO_TIME, STRUCT, SUB, SUB_DATE_DATE, SYS_ERR_READ,
SYS_ERR_TEST, SYS_INITALL, SYS_INITANA, SYS_INITBOO,
SYS_INITTMR, SYS_RESTALL, SYS_RESTANA, SYS_RESTBOO,
SYS_RESTTMR, SYS_SAVALL, SYS_SAVANA, SYS_SAVBOO,
SYS_SAVTMR, SYS_TALLOWED, SYS_TCURRENT, SYS_TMAXIMUM,
SYS_TOVERFLOW, SYS_TRESET, SYS_TWRITE, SYSTEM,
T TAN, TASK, THEN, TIME, TIME_OF_DAY, TIME_TO_BCD,
TIME_TO_BOOL, TIME_TO_INT, TIME_TO_REAL, TIME_TO_STRING,
TMR, TO, TOD, TRUE, TYPE,
U UDINT, UINT, ULINT, UNTIL, USINT,
V VAR, VAR_ACCESS, VAR_EXTERNAL, VAR_GLOBAL, VAR_IN_OUT,
VAR_INPUT, VAR_OUTPUT
W WHILE, WITH, WORD
X XOR, XOR_MASK, XORN

714 AADvance 2.1 - Language Reference


Variables
The scope of variables can be local to a program or global to a controller. Local variables are
available for use within one program only. Global variables are available for use within any
program of the controller.

Variable names are limited to 128 characters beginning with a letter or single underscore
character followed by letters, digits, and single underscore characters. The last character for a
variable name must be a letter or digit; variable names cannot end with an underscore character.
Names cannot be reserved words, defined words, or data types (i.e., elementary, structures, or
arrays). Names must be unique for the same type of elements within a scope.

All variables have an attribute and a direction. Variables can have one of the following
attributes:

Read/Write Variable which can be used for reading or writing, with an initial value
Read Read-only variable with an initial value
Write Write-only variable with an initial value

Variables can have one of the following directions. However, some variables such as time
cannot have the input or output direction. Refer to the corresponding data type for restrictions.

Var Internal variable updated by the programs


VarInput Variable connected to an input controller (refreshed by the system)
VarOutput Variable connected to an output controller

Initial values can be assigned to variables of elementary IEC 61131-3 data types. Default initial
values are 0 or FALSE. An initial value is the value of a variable when a target starts its first
cycle.

AADvance Workbench 715


Directly Represented Variables
The system enables the use of directly represented variables in the source of programs to
represent a free channel. Free channels are those not linked to a declared I/O variable. The
identifier of a directly represented variable always begins with the "%" character.

The naming conventions of a directly represented variable for a channel of a single I/O device.
"s" is the slot number of the I/O device. "c" is the number of the Channel:

%IXs.c free Channel of a Boolean input I/O device


%IBs.c free Channel of a Short integer, Unsigned short integer, or BYTE input I/O
device
%IWs.c free Channel of an Integer, Unsigned integer, or WORD input I/O device
%IDs.c free Channel of a Double integer, Unsigned double integer, Double word, or
DATE input I/O device
%ILs.c free Channel of a Long integer, Unsigned long integer, Long word, or Long real
input I/O device
%IRs.c free Channel of a Real input I/O device
%ITs.c free Channel of a Time input I/O device
%ISs.c free Channel of a String input I/O device
%QXs.c free Channel of a Boolean output I/O device
%QBs.c free Channel of a Short Integer, Unsigned short integer, or BYTE output I/O
device
%QWs.c free Channel of an Integer, Unsigned integer, or WORD output I/O device
%QDs.c free Channel of a Double integer, Unsigned double integer, Double word, or
DATE output I/O device
%QLs.c free Channel of a Long integer, Unsigned long integer, Long word, or Long real
output I/O device
%QRs.c free Channel of a Real output I/O device
%QTs.c free Channel of a Time output I/O device
%QSs.c free Channel of a String output I/O device

716 AADvance 2.1 - Language Reference


The naming conventions of a directly represented variable for a Channel of a complex device.
"s" is the slot number of the device. "b" is the index of the single I/O device within the complex
device. "c" is the number of the Channel:

%IXs.b.c free Channel of a Boolean input I/O device


%IBs.b.c free Channel of a Short Integer, Unsigned short integer, or BYTE input I/O
device
%IWs.b.c free Channel of an Integer, Unsigned integer, or WORD input I/O device
%IDs.b.c free Channel of a Double integer, Unsigned double integer, Double word, or
DATE input I/O device
%ILs.b.c free Channel of a Long integer, Unsigned long integer, Long word, or Long
real input I/O device
%IRs.b.c free Channel of an Real input I/O device
%ITs.b.c free Channel of a Time input I/O device
%ISs.b.c free Channel of a String input I/O device
%QXs.b.c free Channel of a Boolean output I/O device
%QBs.b.c free Channel of a Short Integer, Unsigned short integer, or BYTE output I/O
device
%QWs.b.c free Channel of an Integer, Unsigned integer, or WORD output I/O device
%QDs.b.c free Channel of a Double integer, Unsigned double integer, Double word, or
DATE output I/O device
%QLs.b.c free Channel of a Long integer, Unsigned long integer, Long word, or Long
real output I/O device
%QRs.b.c free Channel of a Real output I/O device
%QTs.b.c free Channel of a Time output I/O device
%QSs.b.c free Channel of a String output I/O device

Example

%QX1.6 6th channel of the I/O device #1 (boolean output)


%ID2.1.7 7th channel of the I/O device #1 in the device #2 (integer input)

AADvance Workbench 717


Defined Words
AADvance supports the use of identifier names, called defined words. When building, defined
words are replaced by the variables and expressions these represent. Defined words have a
common scope, i.e., these are available for use in any POU of any controller of a project.

For POUs, a defined word can replace literal expressions, boolean expressions, reserved
keywords or complex ST expressions.

The following are examples of defined words:

When such an equivalence is defined, its identifier is available anywhere in an ST program to


replace the attached expression. The following ST programming example uses defined words:
If OK Then
angle := PI / 2.0;
isdone := YES;
End_if;

Defined word names are limited to 128 characters beginning with a letter or single underscore
followed by letters, digits, and single underscores. The last character for a defined word name
must be a letter or digit; defined word names cannot end with an underscore character. Names
cannot be reserved words, defined words, or data types (i.e., elementary, structures, or arrays).
Names must be unique for the same type of elements within a scope.

Note the invalid definition (with strikethrough mark) in the following defined word examples:

PI is 3.14159 PI2 is 6.28318


PI2 is PI*2

718 AADvance 2.1 - Language Reference


Data Types
Any literal, expression, or variable used in a POU (written in any language) must be
characterized by a data type. Data type coherence must be followed in graphic operations and
literal statements. Data types are one of the following types:

Elementary IEC 61131-3 Types

Derived Types: Arrays

Derived Types: Structures

AADvance Workbench 719


Elementary IEC 61131-3 Types

You can program objects using the following elementary IEC 61131-3 types:

BOOL: logic (true or false) value

SINT: short integer value (8 bit)

USINT: unsigned short integer value (8 bit)

BYTE: byte value (8 bit)

INT: single integer value (16 bit)

UINT: unsigned single integer value (16 bit)

WORD: word value (16 bit)

DINT: double integer value (32 bit)

UDINT: unsigned double integer value (32 bit)

DWORD: double word value (32 bit)

LINT: long integer value (64 bit)

ULINT: unsigned long integer value (64 bit)

LWORD: long word value (64 bit)

REAL: real (floating) value (32 bit)

LREAL: long real (floating) value (64 bit)

TIME: time values less than 49d17h2m47s295ms; these value types cannot store dates
(32 bit)

DATE: date values (32 bit)

STRING: character string having a defined size, representing the maximum number of
characters the string can contain.

720 AADvance 2.1 - Language Reference


Based on the above elementary IEC 61131-3 types, you can define new user types.
Furthermore, you can define arrays or structures using elementary IEC 61131-3 types, arrays,
or other user types.

When creating a variable, a dimension can be given to define an array. The following example
shows the MyVar variable of type BOOL having a dimension defined as follows:
[1..10]

FOR i = 1 TO 10 DO
MyVar[i] := FALSE;
END_FOR;

AADvance Workbench 721


Boolean Data Type

Boolean variables (BOOL) can take one of the Boolean values: TRUE or FALSE. Boolean
variables are typically used in Boolean expressions.

For Boolean literal expressions, 2.1 targets evaluate all parts of such expressions. Whereas, the
IEC 61131-3 standard states that Boolean expressions may be evaluated only to the extent
necessary to determine the resultant value. In the following example according to the IEC
61131-3 standard, if B is zero then the first expression (B <> 0) is false and the second
expression (A/B > 0) is not performed.
if ((B <> 0) and (A/B > 0)) then
GREATER := true;
else
GREATER := false;
end_if;

Boolean literal expressions are the following:

TRUE is equivalent to the integer value 1

FALSE is equivalent to the integer value 0

"True" and "False" keywords are not case-sensitive.

722 AADvance 2.1 - Language Reference


Short Integer Data Type

Short Integer (SINT) variables are 8-bit signed integers from -128 to +127.

A bit of a short integer variable, array, structure, or the output of a function block instance can
be accessed using the following syntax:
MyVar.i

If MyVar is a short Integer.


MyVar.i is a Boolean. "i" must be a constant value from 0 to 7.

Short integer literal expressions represent signed integer (8 bit) values:

from -128 to +127

Short integer constants may be expressed with one of the following Bases. Short integer
constants must begin with a Prefix that identifies the Bases used:

Base Prefix Example


DECIMAL (none) 19
HEXADECIMAL "16#" 16#A1
OCTAL "8#" 8#27
BINARY "2#" 2#0101_0101

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

AADvance Workbench 723


Unsigned Short Integer or BYTE Data Type

Unsigned Short Integer or BYTE variables are 8-bit unsigned integers from 0 to 255.

A bit of an unsigned short integer or BYTE variable, array, structure, or the output of a function
block instance can be accessed using the following syntax:
MyVar.i

If MyVar is an unsigned short integer or BYTE.


MyVar.i is a Boolean. "i" must be a constant value from 0 to 7

Unsigned short integer and BYTE literal expressions represent unsigned integer (8 bit) values:

from 0 to 255

Short integer and BYTE constants may be expressed with one of the following Bases. These
constants must begin with a Prefix that identifies the Bases used:

Base Prefix Example


DECIMAL (none) 19
HEXADECIMAL "16#" 16#A1
OCTAL "8#" 8#27
BINARY "2#" 2#0101_0101

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

724 AADvance 2.1 - Language Reference


Integer Data Type

Integer (INT) variables are 16-bit signed integers from -32768 to 32767.

A bit of an integer variable, array, structure, or the output of a function block instance can be
accessed using the following syntax:
MyVar.i

If MyVar is an Integer.
MyVar.i is a Boolean. "i" must be a constant value from 0 to 15.Integer literal expressions
represent signed integer (16 bit) values:

from -32768 to 32767

Integer constants may be expressed with one of the following Bases. Integer constants must
begin with a Prefix that identifies the Bases used:

Base Prefix Example


DECIMAL (none) -260
HEXADECIMAL "16#" 16#FEFC
OCTAL "8#" 8#177374
BINARY "2#" 2#0101_0101_0101_0101

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

AADvance Workbench 725


Unsigned Integer or Word Data Type

Unsigned Integer or WORD variables are 16-bit unsigned integers from 0 to 65535.

A bit of an unsigned integer or WORD variable, array, structure, or the output of a function
block instance can be accessed using the following syntax:
MyVar.i

If MyVar is an unsigned integer or WORD.


MyVar.i is a Boolean. "i" must be a constant value from 0 to 15.

Unsigned integer and WORD literal expressions represent unsigned integer (16 bit) values:

from 0 to 65535

Unsigned integer and WORD constants may be expressed with one of the following Bases.
These constants must begin with a Prefix that identifies the Bases used:

Base Prefix Example


DECIMAL (none) +33000
HEXADECIMAL "16#" 16#80E8
OCTAL "8#" 8#100350
BINARY "2#" 2#0101_0101_0101_0101

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

726 AADvance 2.1 - Language Reference


Double Integer Data Type

Double Integer variables are 32-bit signed integers from -2147483648 to +2147483647.

A bit of a double integer variable, array, structure, or the output of a function block instance
can be accessed using the following syntax:
MyVar.i

If MyVar is an Integer.
MyVar.i is a Boolean. "i" must be a constant value from 0 to 31.

Double integer literal expressions represent signed double integer (32 bit) values:

from -2147483648 to +2147483647

Double integer constants may be expressed with one of the following Bases. Double integer
constants must begin with a Prefix that identifies the Bases used:

Base Prefix Example


DECIMAL (none) -908
HEXADECIMAL "16#" 16#1A2B3C4D
OCTAL "8#" 8#1756402
BINARY "2#" 2#1101_0001_0101_1101_0001_0010_1011_1001

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

AADvance Workbench 727


Unsigned Double Integer or Double Word Data Type

Unsigned Double Integer or Double Word variables are 32-bit unsigned integers from 0
to 4294967295.

A bit of an unsigned double integer or double word variable, array, structure, or the output of
a function block instance can be accessed using the following syntax:
MyVar.i

If MyVar is an unsigned double integer or double word.


MyVar.i is a Boolean. "i" must be a constant value from 0 to 31.

Unsigned double integer and Double Word literal expressions represent unsigned double
integer (32 bit) values:

from 0 to 4294967295

Double integer and double word constants may be expressed with one of the following Bases.
Double integer and double word constants must begin with a Prefix that identifies the
Bases used:

Base Prefix Example


DECIMAL (none) +908
HEXADECIMAL "16#" 16#1A2B3C4D
OCTAL "8#" 8#1756402
BINARY "2#" 2#1101_0001_0101_1101_0001_0010_1011_1001

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

728 AADvance 2.1 - Language Reference


Long Integer Data Type

Long Integer variables are 64-bit signed integers from -9223372036854775808 to


9223372036854775807.

A bit of a long integer variable, array, structure, or the output of a function block instance can
be accessed using the following syntax:
MyVar.i

If MyVar is a long integer.


MyVar.i is a Boolean. "i" must be a constant value from 0 to 63.

Long integer literal expressions represent signed long integer (64 bit) values:

from -9223372036854775808 to 9223372036854775807

Long integer constants may be expressed with one of the following Bases. Long integer
constants must begin with a Prefix that identifies the Bases used:

Base Prefix Example


DECIMAL (none) -908
HEXADECIMAL "16#" 16#1A2B3C4D
OCTAL "8#" 8#1756402
BINARY "2#" 2#1101_0001_0101_1101_0001_0010_1011_1001_
1101_0001_0101_1101_0001_0010_1011_1001

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

AADvance Workbench 729


Unsigned Long Integer or Long Word Data Type

Unsigned Long Integer or Long Word variables are 64-bit unsigned integers from 0
to 18446744073709551615.

A bit of an unsigned long integer or long word variable, array, structure, or the output of a
function block instance can be accessed using the following syntax:
MyVar.i

If MyVar is an unsigned long integer or long word.


MyVar.i is a Boolean. "i" must be a constant value from 0 to 63.

Unsigned long integer and long word literal expressions represent unsigned long integer (64
bit) values:

from 0 to 18446744073709551615

Unsigned long integer and long word constants may be expressed with one of the following
Bases. Long integer and long word constants must begin with a Prefix that identifies the
Bases used:

Base Prefix Example


DECIMAL (none) +908
HEXADECIMAL "16#" 16#1A2B3C4D
OCTAL "8#" 8#1756402
BINARY "2#" 2#1101_0001_0101_1101_0001_0010_1011_1001_
1101_0001_0101_1101_0001_0010_1011_1001

The underscore character ('_') may be used to separate groups of digits. It has no particular
significance other than to improve literal expression readability.

730 AADvance 2.1 - Language Reference


Real Data Type

Real variables are standard IEEE 32-bit floating values (single precision).

1 sign bit + 23 mantissa bits + 8 exponent bits

A real variable has six significant digits. For larger values, the maximum possible value
is ±3.402823466E+38 while for smaller values, the minimum possible value is
±1.175494351E-38. Therefore, values greater than ±3.402823466E+38 and greater than 0.0
but less than ±1.175494351E-38 are not supported. The following example shows the value
ranges including 0.0 that are supported for real variables:

Real literal expressions can be written with either Decimal or Scientific representation. The
decimal point ('.') separates the Integer and Decimal parts. The decimal point must be used to
differentiate a Real literal expression from an Integer one. The scientific representation uses
the letter 'E' to separate the mantissa part and the exponent. The exponent part of a real
scientific expression must be a signed integer value from -37 to +37. A real variable has six
significant digits.

Example

3.14159 -1.0E+12
+1.0 1.0E-15
-789.56 +1.0E-37

The expression "123" does not represent a Real literal expression. Its correct real representation
is "123.0".

AADvance Workbench 731


Long Real Data Type

Long Real variables are standard IEEE 64-bit floating values (double precision).

1 sign bit + 52 mantissa bits + 11 exponent bits

A long real variable has 15 significant digits. For larger values, the maximum possible value
is ±1.7976931348623158e+308 while for smaller values, the minimum possible value is
±2.22507385850721E-308. Therefore, values greater than ±1.7976931348623158e+308 and
greater than 0.0 but less than ±2.22507385850721E-308 are not supported. The following
example shows the value ranges including 0.0 that are supported for long real variables:

Long real literal expressions can be written with either Decimal or Scientific representation.
The decimal point ('.') separates the Integer and Decimal parts. The decimal point must be used
to differentiate a Real literal expression from an Integer one. The scientific representation uses
the letter 'E' to separate the mantissa part and the exponent. The range of a real scientific
expression must be a signed integer value from 1.7E -308 to 1.7E +308. A long real variable
has 15 significant digits.

Example

3.14159 -1.0E+12
+1.0 1.0E-15
-789.56 +1.0E-37

The expression "123" does not represent a long real literal expression. Its correct real
representation is "123.0".

732 AADvance 2.1 - Language Reference


Time Data Type

Time variables are typically used in Time expressions. A Time value represents values from 0
to 49d17h2m47s294ms. Time variables are stored in 32 bit words. The internal representation
is a positive number of milliseconds. Time variables can be used with timer function blocks
such as TOF and TON.

Time literal expressions represent time values from 0 to 49d17h2m47s294ms. The lowest
allowed unit is a millisecond. Standard time units used in literal expressions are:

Days The "d" letter must follow the number of days


Hours The "h" letter must follow the number of hours
Minutes The "m" letter must follow the number of minutes
Seconds The "s" letter must follow the number of seconds
Milliseconds The "ms" letters must follow the number of milliseconds

The time literal expression must begin with "T#" or "TIME#" prefix. Prefixes and unit letters
are not case sensitive. Some units may not appear.

When the TIME value is equal to -1 (as a DINT value), the value is considered as overflow and
invalid. For example:

IF ANY_TO_DINT(TIME1) = -1 then
(* Handle overflow *)
END_IF;

Example

T#1D1H450MS 1 day, 1 hour, 450 milliseconds


time#1H3M 1 hour, 3 minutes

The following ST code gets the current time for use in the clock portion of a date variable:
clock := any_to_time(CURRENT_ISA_DATE()); (* Gets the current time *)

AADvance Workbench 733


Date Data Type

Date variables have date values and are typically used in Date expressions. A Date value ranges
from 1970-01-01 to 2038-01-18. Date variables are stored using the 32 bit ISO 'C' time_t data
type. The internal representation is a positive number of seconds since 1970-01-01 at midnight
GMT.

Date literal expressions represent date values in the year-month-day format, separated by
hyphens. Possible date literal expressions range from 1970-01-01 to 2038-01-18 GMT.

The date literal expression must begin with "D#" or "DATE#" prefix. Prefixes and unit letters
are not case sensitive.

Example

D#2005-02-20
date#2005-02-20

734 AADvance 2.1 - Language Reference


String Data Type

String variables contain character strings. The length of the string can change during process
operations. The length of a string variable cannot exceed the capacity (maximum length)
specified when the variable is declared. String capacity is limited to 252 characters excluding
the terminating null character (0), a byte for the current length of the string, and a byte for the
maximum length of the string. When declaring string variables, the maximum number of
characters is defined in the String Size column of the Dictionary or Variable Selector.

String variables can contain any character of the standard ASCII table (ASCII code from 0
to 255). The null character (0) can exist in a character string, however, it indicates the end of
the string.

String literal expressions represent character strings. Characters must be preceded by a quote
and followed by an apostrophe. For example:

'THIS IS A MESSAGE'

Warning: A string literal expression must be expressed on one line of the program source
code. When placing single quote (') characters within a string literal, these characters must be
preceded by the dollar ($) character. In the following string literal, note the dollar character
preceding the single quote character.

'THIS IS $' A MESSAGE'

Empty string literal expressions are represented by two apostrophes, with no space or tab
character between them:

'' (* this is an empty string *)

The dollar ('$') special character, followed by other special characters, can be used in a string
literal expression to represent a non-printable character:

Sequence Meaning ASCII (hex) Example


$$ '$' character 16#24 'I paid $$5 for this'
$' apostrophe 16#27 'Enter $'Y$' for YES'
$L line feed 16#0a 'next $L line'
$R carriage return 16#0d ' llo $R He'

AADvance Workbench 735


$N new line 16#0d0a 'This is a line$N'
$P new page 16#0c 'lastline $P first line'
$T tabulation 16#09 'name$Tsize$Tdate'
$hh (*) any character 16#hh 'ABCD = $41$42$43$44'

(*) "hh" is the hexadecimal value of the ASCII code for the expressed character.

736 AADvance 2.1 - Language Reference


Derived Types: Arrays

You can define arrays of standard IEC 61131-3 types or derived types. An array has one or
more dimensions. When an array is defined, a variable can be created with this type and a
structure can have a field with this type. Array dimensions are positive DINT literal
expressions and array indexes are DINT literal expressions or variables.

Array names are limited to 128 characters beginning with a letter or single underscore followed
by letters, digits, and single underscores. The last character for an array name must be a letter
or digit; array names cannot end with an underscore character. Names cannot be reserved
words, defined words, or data types (i.e., elementary, structures, or arrays). Names must be
unique for the same type of elements within a scope.

Example

1. One-dimensional array:
MyArrayType is an array of 10 BOOL. Its dimension is defined as follows: [1..10].
MyVar is of type MyArrayType.
Ok := MyVar[4];

2. Two-dimensional array:
MyArrayType2 is an array of DINT. It has two dimensions defined as follows:
[1..10,1..3]
MyVar2 is of type MyArrayType2
MyVar2[1,2] := 100;

3. Array of an array:
MyVar3 is an array of MyArrayType; Its dimension is defined as follows [1..3]
FOR I := 1 TO 3 DO
FOR J := 1 TO 10 DO
MyVar3[I][J] := FALSE;
END_FOR;
END_FOR;

AADvance Workbench 737


Derived Types: Structures

Users can define structures using elementary IEC 61131-3 types or derived types. A structure
is composed of sub-entries called Fields. When a structure is defined, a variable can be created
with this type.

Structure names are limited to 128 characters beginning with a letter or single underscore
followed by letters, digits, and single underscores. The last character for a structure name must
be a letter or digit; structure names cannot end with an underscore character. Names cannot be
reserved words, defined words, or data types (i.e., elementary, structures, or arrays). Names
must be unique for the same type of elements within a scope.

Example

MyStruct1 is composed of:

Field1 which is BOOL


Field2 which is DINT

MyStruct2 is composed of:

Field1 which is DINT


Field2 which is BOOL
Field3 which is an array of 10 DINT
Field4 which is of type MyStruct1

MyVar of type MyStruct2 can be used as follows:

Value1 := MyVar.Field1; (* Value1 is of type DINT *)


Ok1 := MyVar.Field2; (* Ok1 is of type BOOL *)
Tab[2] := MyVar.Field3[5]; (* Tab is an array of DINT *)
Value2 := MyVar.Filed3[8]; (* Value2 is of type DINT *)
Ok2 := MyVar.Field4.Field1; (* Ok2 is of type BOOL *)

738 AADvance 2.1 - Language Reference


Operators
The following are standard operators of the IEC 61131-3 languages:

Arithmetic Operations Addition Adds two or more variables


Division Divides two variables
Multiplication Multiplies two or more variables
Subtraction Subtracts a variable from another
1 GAIN Assigns one variable into another
NEG Integer negation
Boolean Operations AND Boolean AND
OR Boolean OR
XOR Boolean exclusive OR
NOT Boolean negation
Comparators Less Than Tests if one value is less than another
Less Than or Equal Tests if one value is less than or equal to
another
Greater Than Tests if one value is greater than another
Greater Than or Equal Tests if one value is greater than or equal
to another
Equal Tests if one value is equal to another
Not Equal Tests if one value is not equal to another

AADvance Workbench 739


Data Conversion ANY_TO_BOOL Converts to Boolean
ANY_TO_SINT Converts to Short integer
ANY_TO_USINT Converts to Unsigned short integer
ANY_TO_BYTE Converts to BYTE
ANY_TO_INT Converts to Integer
ANY_TO_UINT Converts to Unsigned integer
ANY_TO_WORD Converts to WORD
ANY_TO_DINT Converts to Double integer
ANY_TO_UDINT Converts to Unsigned double integer
ANY_TO_DWORD Converts to Double WORD
ANY_TO_LINT Converts to Long integer
ANY_TO_ULINT Converts to Unsigned long integer
ANY_TO_LWORD Converts to Long WORD
ANY_TO_REAL Converts to Real
ANY_TO_LREAL Converts to Long real
ANY_TO_TIME Converts to Time
ANY_TO_DATE Converts to Date
ANY_TO_STRING Converts to String

740 AADvance 2.1 - Operators


1 GAIN

Arguments:

i1 SINT - USINT - BYTE - INT - UINT -


WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
o1 SINT - USINT - BYTE - INT - UINT - i1 and o1 must have the same format
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING

Description:

Directly links the input to output. When used with a Boolean negation, inverts the state of the
line connected to the output.

Example

(* FBD example with assignment Operators *)

(* ST equivalence: *)
ao23 := ai10;
bo100 := NOT (bi1 AND bi2);

AADvance Workbench 741


Addition

Note: The creation of additional inputs is supported.

Arguments:

(inputs) SINT - USINT - BYTE - INT - can be of any integer, real, TIME, or
UINT - WORD - DINT - UDINT - STRING format
DWORD - LINT - ULINT - (all inputs must have the same format)
LWORD - REAL - LREAL -
TIME - STRING
o1 SINT - USINT - BYTE - INT - addition of the input terms
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT -
LWORD - REAL - LREAL -
TIME - STRING

Description:

Addition of two or more integer, real, TIME, or STRING variables.

Example

(* FBD example with Addition Operators *)

742 AADvance 2.1 - Operators


(* ST equivalence: *)
ao10 := ai101 + ai102;
ao5 := (ai51 + ai52) + ai53;

AADvance Workbench 743


AND

Note: The creation of additional inputs is supported.

Arguments:

(inputs) BOOL
o1 BOOL Boolean AND of the input terms

Description:

Boolean AND between two or more terms.

Example

(* FBD example with "AND" Operators *)

(* ST equivalence: *)
bo10 := bi101 AND NOT (bi102);
bo5 := (bi51 AND bi52) AND bi53;

744 AADvance 2.1 - Operators


ANY_TO_BOOL

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 BOOL TRUE for non-zero numerical value
FALSE for zero numerical value
TRUE for 'TRUE' string
FALSE for 'FALSE' string

Description:

Converts variables to Boolean variables

Example

(* FBD example with "Convert to Boolean" Operators *)

(* ST Equivalence: *)

ares := ANY_TO_BOOL (10); (* ares is TRUE *)


tres := ANY_TO_BOOL (t#0s); (* tres is FALSE *)
mres := ANY_TO_BOOL ('FALSE'); (* mres is FALSE *)

AADvance Workbench 745


ANY_TO_BYTE

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 BYTE 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 8-bit BYTE variables

Example

(* FBD example with "Convert to BYTE" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_BYTE (true); (* bres is 1 *)


tres := ANY_TO_BYTE (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_BYTE ('0198'); (* mres is 198 *)

746 AADvance 2.1 - Operators


ANY_TO_DATE

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE -
STRING
o1 DATE date represented by i1. A value of -1
indicates an invalid date.

Description:

Converts variables to DATE variables. A 32-bit variable, providing the number of seconds
since Jan 1, 1970, based on the time_t data type.

Example

(* FBD example with "Convert to DATE" Operators *)

(* ST Equivalence: *)

ares := ANY_TO_DATE (1109110199); (* ares := d#2005-02-22 *)


rres := ANY_TO_DATE (1109110199.3); (*rres := d#2005-02-22 *)

AADvance Workbench 747


ANY_TO_DINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 DINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 32-bit double integer variables

Example

(* FBD example with "Convert to Double Integer" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_DINT (true); (* bres is 1 *)


tres := ANY_TO_DINT (t#1s46ms); (* tres is 1046 *)
mres := ANY_TO_DINT ('0198'); (* mres is 198 *)

748 AADvance 2.1 - Operators


ANY_TO_DWORD

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 DWORD 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Convert variables to 32-bit double WORD variables

Example

(* FBD example with "Convert to Double WORD" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_DWORD (true); (* bres is 1 *)


tres := ANY_TO_DWORD (t#1s46ms); (* tres is 1046 *)
mres := ANY_TO_DWORD ('0198'); (* mres is 198 *)

AADvance Workbench 749


ANY_TO_INT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 INT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 16-bit integer variables

Example

(* FBD example with "Convert to Integer" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_INT (true); (* bres is 1 *)


tres := ANY_TO_INT (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_INT ('0198'); (* mres is 198 *)

750 AADvance 2.1 - Operators


ANY_TO_LINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 LINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 64-bit long integer variables

Note: The maximum value for a REAL or LREAL input must be less than 9.2233720e+18. For
input values greater than this maximum, the output value is determined by the target type. For
Windows and Linux targets, the output value will be reset to zero when the input value is
greater than 9.2233720e+18. While for QNX targets, the output value will go into overflow.

Example

(* FBD example with "Convert to Long Integer" Operators *)

(* ST Equivalence: *)

AADvance Workbench 751


bres := ANY_TO_LINT (true); (* bres is 1 *)
tres := ANY_TO_LINT (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_LINT ('0198'); (* mres is 198 *)

752 AADvance 2.1 - Operators


ANY_TO_LREAL

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 LREAL 0.0 if i1 is FALSE / 1.0 if i1 is TRUE
number of milliseconds for a timer
equivalent number for integer

Description:

Converts any variable to a long REAL variable

Example

(* FBD example with "Convert to Long REAL" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_LREAL (true); (* bres is 1.0 *)


tres := ANY_TO_LREAL (t#1s46ms); (* tres is 1046.0 *)
ares := ANY_TO_LREAL (198); (* ares is 198.0 *)

AADvance Workbench 753


ANY_TO_LWORD

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 LWORD 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for a real
decimal number represented by a string

Description:

Converts variables to 64-bit long WORD variables.

Note: The maximum value for a REAL or LREAL input must be less than 1.8446744e+19. For
input values greater than this maximum, the output value is determined by the target type. For
Windows and Linux targets, the output value will be reset to zero when the input value is
greater than 1.8446744e+19. While for QNX targets, the output value will go into overflow.

Example

(* FBD example with "Convert to Long Word" Operators *)

(* ST Equivalence: *)

754 AADvance 2.1 - Operators


bres := ANY_TO_LWORD (true); (* bres is 1 *)
tres := ANY_TO_LWORD (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_LWORD ('0198'); (* mres is 198 *)

AADvance Workbench 755


ANY_TO_REAL

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 REAL 0.0 if i1 is FALSE / 1.0 if i1 is TRUE
number of milliseconds for a timer
equivalent number for integer

Description:

Converts variables to REAL variables

Example

(* FBD example with "Convert to Real" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_REAL (true); (* bres is 1.0 *)


tres := ANY_TO_REAL (t#1s46ms); (* tres is 1046.0 *)
ares := ANY_TO_REAL (198); (* ares is 198.0 *)

756 AADvance 2.1 - Operators


ANY_TO_SINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 SINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 8-bit short integer variables

Example

(* FBD example with "Convert to Short Integer" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_SINT (true); (* bres is 1 *)


tres := ANY_TO_SINT (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_SINT ('0198'); (* mres is 198 *)

AADvance Workbench 757


ANY_TO_STRING

Arguments:

i1 BOOL - SINT - USINT - BYTE - Any value


INT - UINT - WORD - DINT -
UDINT - DWORD - LINT -
ULINT - LWORD - REAL -
LREAL - TIME - DATE -
STRING
o1 STRING If i1 is a Boolean, 'FALSE' or 'TRUE'
If i1 is an integer or a real, decimal representation
If i1 is a TIME:
TIME time1
STRING s1
time1 :=13 ms;
s1 :=ANY_TO_STRING(time1);
(* s1 = '0s13' *)

Description:

Converts variables to STRING variables

Example

(* FBD example with "Convert to STRING" Operators *)

(* ST Equivalence: *)

758 AADvance 2.1 - Operators


bres := ANY_TO_STRING (TRUE); (* bres is 'TRUE' *)
ares := ANY_TO_STRING (125); (* ares is '125' *)

AADvance Workbench 759


ANY_TO_TIME

Arguments:

i1 BOOL - SINT - USINT - BYTE Any positive value other than a time and date format
- INT - UINT - WORD - DINT - i1 (or integer part of i1 if it is real) is the number of
UDINT - DWORD - LINT - milliseconds
ULINT - LWORD - REAL - STRING (number of milliseconds, for example, a
LREAL - TIME - DATE - value of 300032 represents 5 minutes and 32
STRING milliseconds)
o1 TIME time value represented by i1. A value of
1193h2m47s295ms indicates an invalid time.

Description:

Converts variables to TIME variables, except for TIME and DATE variables. The
SUB_DATE_DATE function enables the conversion of a DATE to TIME format.

Example

(* FBD example with "Convert to Timer" Operators *)

(* ST Equivalence: *)

ares := ANY_TO_TIME (1256); (* ares := t#1s256ms *)


rres := ANY_TO_TIME (1256.3); (* rres := t#1s256ms *)

760 AADvance 2.1 - Operators


ANY_TO_UDINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 UDINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 32-bit unsigned double integer variables

Example

(* FBD example with "Convert to Unsigned Double Integer" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_UDINT (true); (* bres is 1 *)


tres := ANY_TO_UDINT (t#1s46ms); (* tres is 1046 *)
mres := ANY_TO_UDINT ('0198'); (* mres is 198 *)

AADvance Workbench 761


ANY_TO_UINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 UINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 16-bit unsigned integer variables

Example

(* FBD example with "Convert to Unsigned Integer" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_UINT (true); (* bres is 1 *)


tres := ANY_TO_UINT (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_UINT ('0198'); (* mres is 198 *)

762 AADvance 2.1 - Operators


ANY_TO_ULINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 ULINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 64-bit unsigned long integer variable.

Note: The maximum value for a REAL or LREAL input must be less than 1.8446744e+19. For
input values greater than this maximum, the output value is determined by the target type. For
Windows and Linux targets, the output value will be reset to zero when the input value is
greater than 1.8446744e+19. While for QNX targets, the output value will go into overflow.

Example

(* FBD example with "Convert to Unsigned Long Integer" Operators *)

(* ST Equivalence: *)

AADvance Workbench 763


bres := ANY_TO_ULINT (true); (* bres is 1 *)
tres := ANY_TO_ULINT (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_ULINT ('0198'); (* mres is 198 *)

764 AADvance 2.1 - Operators


ANY_TO_USINT

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 USINT 0 if i1 is FALSE / 1 if i1 is TRUE
number of milliseconds for a timer
integer part for real
decimal number represented by a string

Description:

Converts variables to 8-bit unsigned short integer variables

Example

(* FBD example with "Convert to Unsigned Short Integer" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_USINT (true); (* bres is 1 *)


tres := ANY_TO_USINT (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_USINT ('0198'); (* mres is 198 *)

AADvance Workbench 765


ANY_TO_WORD

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Any value


UINT - WORD - DINT - UDINT -
0 if i1 is FALSE / 1 if i1 is TRUE
DWORD - LINT - ULINT - LWORD -
number of milliseconds for a timer
REAL - LREAL - TIME - DATE - STRING
integer part for real
decimal number represented by a string
o1 WORD

Description:

Converts variables to 16-bit WORD variables

Example

(* FBD example with "Convert to WORD" Operators *)

(* ST Equivalence: *)

bres := ANY_TO_WORD (true); (* bres is 1 *)


tres := ANY_TO_WORD (t#0s46ms); (* tres is 46 *)
mres := ANY_TO_WORD ('0198'); (* mres is 198 *)

766 AADvance 2.1 - Operators


Division

Arguments:

i1 SINT - USINT - BYTE - INT - UINT - WORD can be of any integer or real format
- DINT - UDINT - DWORD - LINT - ULINT - (operand)
LWORD - REAL - LREAL
i2 SINT - USINT - BYTE - INT - UINT - WORD non-zero integer or real value
- DINT - UDINT - DWORD - LINT - ULINT - (divisor)
LWORD - REAL - LREAL (i1 and i2 must have the same
format)
o1 SINT - USINT - BYTE - INT - UINT - WORD integer or real division of i1 by i2
- DINT - UDINT - DWORD - LINT - ULINT -
LWORD - REAL - LREAL

Description:

Division of two integer or real variables (the first divided by the second).

Example

(* FBD example with Division Operators *)

AADvance Workbench 767


(* ST Equivalence: *)
ao10 := ai101 / ai102;
ao5 := (ai51 / 2) / ai53;

768 AADvance 2.1 - Operators


Equal

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - Both inputs must have the same format.
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
i2 BOOL - SINT - USINT - BYTE - INT -
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 BOOL TRUE if i1 = i2

Description

For integer, REAL, TIME, DATE, and STRING variables, compares the first input to the
second to determine equality.

For TON, TP, TOF, BLINK, and StepName.t in SFC chart, equality testing of TIME variables
is not recommended.

Example

(* FBD example with "Is Equal to" Operators *)

AADvance Workbench 769


(* ST Equivalence: *)
aresult := (10 = 25); (* aresult is FALSE *)
mresult := ('ab' = 'ab'); (* mresult is TRUE *)

770 AADvance 2.1 - Operators


Greater Than

Arguments:

i1 SINT - USINT - BYTE - INT - UINT - Both inputs must have the same type
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
i2 SINT - USINT - BYTE - INT - UINT -
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
o1 BOOL TRUE if i1 > i2

Description:

For integer, REAL, TIME, DATE, and STRING variables, compares input variables to
determine whether the first is greater than the second.

Example

(* FBD example with "Greater than" Operators *)

(* ST Equivalence: *)
aresult := (10 > 25); (* aresult is FALSE *)

AADvance Workbench 771


mresult := ('ab' > 'a'); (* mresult is TRUE *)

772 AADvance 2.1 - Operators


Greater Than or Equal

Arguments:

i1 SINT - USINT - BYTE - INT - UINT - Both inputs must have the same type.
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
i2 SINT - USINT - BYTE - INT - UINT -
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
o1 BOOL TRUE if i1 >= i2

Description:

For integer, REAL, TIME, DATE, and STRING variables, compares input variables to
determine whether the first is greater than or equal to the second.

For TON, TP, TOF, BLINK, and StepName.t in SFC chart, equality testing of TIME variables
is not recommended.

Example

(* FBD example with "Greater or Equal to" Operators *)

AADvance Workbench 773


(* ST Equivalence: *)
aresult := (10 >= 25); (* aresult is FALSE *)
mresult := ('ab' >= 'ab'); (* mresult is TRUE *)

774 AADvance 2.1 - Operators


Less Than

Arguments:

i1 SINT - USINT - BYTE - INT - UINT - Both inputs must have the same type
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
i2 SINT - USINT - BYTE - INT - UINT -
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
o1 BOOL TRUE if i1i2 < i2

Description:

For integer, REAL, TIME, DATE, and STRING variables, compares input variables to
determine whether the first is less than the second.

Example

(* FBD example with "Less than" Operators *)

(* ST Equivalence: *)
aresult := (10 < 25); (* aresult is TRUE *)

AADvance Workbench 775


mresult := ('z' < 'B'); (* mresult is FALSE *)

776 AADvance 2.1 - Operators


Less Than or Equal

Arguments:

i1 SINT - USINT - BYTE - INT - UINT - Both inputs must have the same type.
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
i2 SINT - USINT - BYTE - INT - UINT -
WORD - DINT - UDINT - DWORD - LINT
- ULINT - LWORD - REAL - LREAL -
TIME - DATE - STRING
o1 BOOL TRUE if i1 <= i2

Description:

For integer, REAL, TIME, DATE, and STRING variables, compares input variables to
determine whether the first is less than or equal to the second.

For TON, TP, TOF, BLINK, and StepName.t in SFC chart, equality testing of TIME variables
is not recommended.

Example

(* FBD example with "Less or Equal to" Operators *)

AADvance Workbench 777


(* ST Equivalence: *)
aresult := (10 <= 25); (* aresult is TRUE *)
mresult := ('ab' <= 'ab'); (* mresult is TRUE *)

778 AADvance 2.1 - Operators


Multiplication

Note: The creation of additional inputs is supported.

Arguments:

(inputs) SINT - USINT - BYTE - INT - can be INTEGER or REAL


UINT - WORD - DINT - UDINT - (all inputs must have the same format)
DWORD - LINT - ULINT -
LWORD - REAL - LREAL
output SINT - USINT - BYTE - INT - multiplication of the input terms
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT -
LWORD - REAL - LREAL

Description:

Multiplication of two or more integer or real variables.

Example

(* FBD example with Multiplication Operators *)

(* ST equivalence *)

AADvance Workbench 779


ao10 := ai101 * ai102;
ao5 := (ai51 * ai52) * ai53;

780 AADvance 2.1 - Operators


NEG

Arguments:

i1 SINT - INT - DINT - LINT - REAL - Input and output must have the same
LREAL format
o1 SINT - INT - DINT - LINT - REAL -
LREAL

Description:

Converts variables to negated variables

Example

(* FBD example with Negation Operators *)

(* ST equivalence: *)
ao23 := - (ai10);
ro100 := - (ri1 + ri2);

AADvance Workbench 781


NOT

Arguments:

i1 Any Boolean variable or complex expression


o1 TRUE when i1 is FALSE
FALSE when i1 is TRUE

Description:

For Boolean expressions, converts variables to negated variables.

Example

(* FBD example with "NOT" Operator *)

(* ST equivalence: *)
bo10 := NOT bi101;

782 AADvance 2.1 - Operators


Not Equal

Arguments:

i1 BOOL - SINT - USINT - BYTE - INT - both inputs must have the same type
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
i2 BOOL - SINT - USINT - BYTE - INT -
UINT - WORD - DINT - UDINT -
DWORD - LINT - ULINT - LWORD -
REAL - LREAL - TIME - DATE - STRING
o1 BOOL TRUE if first <> second

Description:

For integer, REAL, TIME, DATE, and STRING variables, compares input variables to
determine whether the first is not equal to the second.

Example

(* FBD example with "Is Not Equal to" Operators *)

(* ST Equivalence: *)
aresult := (10 <> 25); (* aresult is TRUE *)

AADvance Workbench 783


mresult := ('ab' <> 'ab'); (* mresult is FALSE *)

784 AADvance 2.1 - Operators


OR

Note: The creation of additional inputs is supported.

Arguments:

(inputs) BOOL
output BOOL Boolean OR of the input terms

Description:

Boolean OR of two or more variables

Example

(* FBD example with "OR" Operators *)

(* ST equivalence: *)
bo10 := bi101 OR NOT (bi102);
bo5 := (bi51 OR bi52) OR bi53;

AADvance Workbench 785


Subtraction

Arguments:

i1 SINT - USINT - BYTE - INT - UINT - WORD can be of any integer, real or long
- DINT - UDINT - DWORD - LINT - ULINT - real, or TIME format
LWORD - REAL - LREAL - TIME
i2 SINT - USINT - BYTE - INT - UINT - WORD (i1 and i2 must have the same
- DINT - UDINT - DWORD - LINT - ULINT - format)
LWORD - REAL - LREAL - TIME
o1 SINT - USINT - BYTE - INT - UINT - WORD subtraction (first minus second)
- DINT - UDINT - DWORD - LINT - ULINT -
LWORD - REAL - LREAL - TIME

Description:

Subtraction of two integer, real, or TIME variables.

Example

(* FBD example with Subtraction Operators *)

(* ST equivalence: *)

786 AADvance 2.1 - Operators


ao10 := ai101 - ai102;
ao5 := (ai51 - 1) - ai53;

AADvance Workbench 787


XOR

Arguments:

i1 BOOL
i2 BOOL
o1 BOOL Boolean exclusive OR of the two input terms

Description:

Boolean exclusive OR of two variables

Example

(* FBD example with "XOR" operators *)

(* ST equivalence: *)
bo10 := bi101 XOR NOT (bi102);
bo5 := (bi51 XOR bi52) XOR bi53;

788 AADvance 2.1 - Operators


Functions
The following are the functions supported by the system:

Arithmetic ABS Absolute value of a REAL value


Operations EXPT, POW Exponent, power calculation of
REAL values
LOG Logarithm of a REAL value
MOD Modulo
SQRT Square root of a REAL value
RAND Random value
TRUNC Truncate decimal part of a REAL
value
ACOS, ASIN, ATAN Arc cosine, Arc sine, Arc tangent of
a REAL value
COS, SIN, TAN Cosine, Sine, Tangent of a REAL
value
Binary Operations AND_MASK Integer bit-to-bit AND mask
OR_MASK Integer bit-to-bit OR mask
XOR_MASK Integer bit-to-bit Exclusive OR mask
NOT_MASK Integer bit-to-bit negation
ROL, ROR Rotate Left, Rotate Right an integer
value
SHL, SHR Shift Left, Shift Right an integer
value
Boolean Operations ODD Odd parity
Data Manipulation MIN, MAX, LIMIT Minimum, Maximum, Limit
MUX4, MUX8 Multiplexer (4 or 8 entries)
SEL Binary selector

AADvance Workbench 789


String Manipulation ASCII Character -> ASCII code
CHAR ASCII code -> Character
MLEN Get string length
DELETE, INSERT Delete sub-string, Insert string
FIND, REPLACE Find sub-string, Replace sub-string
LEFT, MID, RIGHT Extract left, middle or right of a
string
Time Operations CURRENT_ISA_DATE Gets the current date
SUB_DATE_DATE Compares two dates and provides the
difference in TIME format

790 AADvance 2.1 - Functions


ABS

Arguments:

IN IN REAL Any signed real value


ABS Q REAL Absolute value (always positive)

Description:

Yields the absolute (positive) value of a REAL value.

Example

(* FBD Program using "ABS" Function *)

(* ST Equivalence: *)
over := (ABS (delta) > range);

AADvance Workbench 791


ACOS

Arguments:

IN IN REAL Must be in set [-1.0 .. +1.0]


ACOS Q REAL Arc-cosine of the input value (in set [0.0 .. PI])
= 0.0 for invalid input

Description:

Yields the Arc Cosine of a REAL value. Input and output values are in radians.

Example

(* FBD Program using "COS" and "ACOS" Functions *)

(* ST Equivalence: *)
cosine := COS (angle);
result := ACOS (cosine); (* result is equal to angle *)

792 AADvance 2.1 - Functions


AND_MASK

Arguments:

IN IN DINT Must have integer format


MSK MSK DINT Must have integer format
AND_MASK Q DINT Bit-to-bit logical AND between IN and MSK

Description:

Integer AND bit-to-bit mask.

Example

(* FBD example with AND_MASK Operators *)

(* ST Equivalence: *)
parity := AND_MASK (xvalue, 1); (* 1 if xvalue is odd *)
result := AND_MASK (16#abc, 16#f0f); (* equals 16#a0c *)

AADvance Workbench 793


ASCII

Arguments:

IN IN STRING Any non-empty string


Pos Pos DINT Position of the selected character in set [1.. len] (len is the
length of the IN string)
ASCII Code DINT Code of the selected character (in set [0 .. 255])
yields 0 is Pos is out of the string

Description:

Yields the ASCII code for characters in strings.

Example

(* FBD Program using "ASCII" Function *)

(* ST Equivalence: *)
FirstChr := ASCII (message, 1);
(* FirstChr is the ASCII code of the first character of the string *)

794 AADvance 2.1 - Functions


ASIN

Arguments:

IN IN REAL Must be in set [-1.0 .. +1.0]


ASIN Q REAL Arc-sine of the input value (in set [-PI/2 .. +PI/2])
= 0.0 for invalid input

Description:

Yields the Arc Sine of a REAL value.

Example

(* FBD Program using "SIN" and "ASIN" Functions *)

(* ST Equivalence: *)
sine := SIN (angle);
result := ASIN (sine); (* result is equal to angle *)

AADvance Workbench 795


ATAN

Arguments:

IN IN REAL Any real value


ATAN Q REAL Arc-tangent of the input value (in set [-PI/2 .. +PI/2])
= 0.0 for invalid input

Description:

Yields the Arc Tangent of a REAL value.

Example

(* FBD Program using "TAN" and "ATAN" Function *)

(* ST Equivalence: *)
tangent := TAN (angle);
result := ATAN (tangent); (* result is equal to angle*)

796 AADvance 2.1 - Functions


CHAR

Arguments:

Code Code DINT Code in set [0 .. 255]


CHAR Q STRING One character string
the character has the ASCII code given in input Code
(ASCII code is used modulo 256)

Description:

For a given ASCII code, provides a string containing one character.

Example

(* FBD Program using "CHAR" Function *)

(* ST Equivalence: *)
Display := CHAR ( value + 48 );
(* value is in set [0..9] *)
(* 48 is the ascii code of '0' *)
(* result is one character string from '0' to '9' *)

AADvance Workbench 797


COS

Arguments:

IN IN REAL Any REAL value


COS Q REAL Cosine of the input value (in set [-1.0 .. +1.0])

Description:

Yields the Cosine of a REAL value.

Example

(* FBD Program using "COS" and "ACOS" Functions *)

(* ST Equivalence: *)
cosine := COS (angle);
result := ACOS (cosine); (* result is equal to angle *)

798 AADvance 2.1 - Functions


CURRENT_ISA_DATE

Arguments:

CURRENT_ISA_DATE DATE DATE The current date

Description:

Retrieves the current date.

Example

(* FBD Program using "CURRENT_ISA_DATE" Function *)

(* ST Equivalence: *)
datResult := CURRENT_ISA_DATE();

AADvance Workbench 799


DELETE

Arguments:

IN IN STRING Any non-empty string


NbC NbC DINT Number of characters to be deleted
Pos Pos DINT Position of the first deleted character
(first character of the string has position 1)
DELETE Q STRING modified string
empty string if Pos < 1
initial string if Pos > IN string length
initial string if NbC <= 0

Description:

Deletes part of a string.

Example

(* FBD Program using "DELETE" Function *)

800 AADvance 2.1 - Functions


(* ST Equivalence: *)
complete_string := INSERT (’ABCD ’, ’EFGH’, 5); (* complete_string is
'ABCDEFGH ' *)
sub_string := DELETE (complete_string, 4, 3); (* sub_string is
'ABGH '*)

AADvance Workbench 801


EXPT

Arguments:

IN IN REAL Any signed real value


EXP EXP DINT Integer exponent
EXPT Q REAL (IN EXP)

Description:

Where 'base' is the first argument and 'exponent' is the second argument, yields the REAL
result of the following operation: (base exponent).

Example

(* FBD Program using "EXPT" Function *)

(* ST Equivalence: *)
tb_size := ANY_TO_DINT (EXPT (2.0, range) );

802 AADvance 2.1 - Functions


FIND

Arguments:

In In STRING Any string


Pat Pat STRING Any non-empty string (Pattern)
FIND Pos DINT = 0 if sub string Pat not found
= position of the first character of the first occurrence of the
sub-string Pat
(first position is 1)
this function is case sensitive

Description:

Locates and provides the position of sub-strings within strings.

Example

(* FBD Program using "FIND" Function *)

(* ST Equivalence: *)
complete_string := 'ABCD' + 'EFGH'; (* complete_string is 'ABCDEFGH '
*)

AADvance Workbench 803


found := FIND (complete_string, 'CDEF'); (* found is 3 *)

804 AADvance 2.1 - Functions


INSERT

Arguments:

IN IN STRING Initial string


Str Str STRING String to be inserted
Pos Pos DINT Position of the insertion
the insertion is done before the position
(first valid position is 1)
INSERT Q STRING Modified string
empty string if Pos <= 0
concatenation of both strings if Pos is greater than the length
of the IN string

Description:

Inserts sub-strings at user-defined positions within strings.

Example

(* FBD Program using "INSERT" Function*)

(* ST Equivalence: *)
MyName := INSERT ('Mr JONES', 'Frank ', 4);

AADvance Workbench 805


(* MyName is 'Mr Frank JONES' *)

806 AADvance 2.1 - Functions


LEFT

Arguments:

IN IN STRING Any non-empty string


NbC NbC DINT Number of characters to be extracted. This number cannot be
greater than the length of the IN string.
LEFT Q STRING Left part of the IN string (its length = NbC)
empty string if NbC <= 0
complete IN string if NbC >= IN string length

Description:

From the left end of strings, yields the number of characters defined.

Example

(* FBD Program using "LEFT" and "RIGHT" Functions *)

(* ST Equivalence: *)

AADvance Workbench 807


complete_string := INSERT (RIGHT ('12345678', 4), LEFT ('12345678', 4),
5);

(* complete_string is '56781234'

the value issued from RIGHT call is '5678'

the value issued from LEFT call is '1234'

*)

808 AADvance 2.1 - Functions


LIMIT

Arguments:

MIN MIN DINT Minimum value allowed


IN IN DINT Any signed integer value
MAX MAX DINT Maximum value allowed
LIMIT Q DINT Input value restricted to the allowed range

Description:

Restricts integer values to a given interval. Integer values between the minimum and maximum
are unchanged. Integer values greater than the maximum are replaced with the maximum
value. Integer values less than the minimum are replaced with the minimum value.

Example

(* FBD Program using "LIMIT" Function *)

(* ST Equivalence: *)
new_value := LIMIT (min_value, value, max_value);

(* bounds the value to the [min_value..max_value] set *)

AADvance Workbench 809


LOG

Arguments:

IN IN REAL Must be greater than zero


LOG Q REAL Logarithm (base 10) of the input value

Description:

Yields the logarithm (base 10) of a REAL value.

Example

(* FBD Program using "LOG" Function *)

(* ST Equivalence: *)
xpos := ABS (xval);
xlog := LOG (xpos);

810 AADvance 2.1 - Functions


MAX

Arguments:

IN1 IN1 DINT Any signed integer value


IN2 IN2 DINT (cannot be REAL)
MAX Q DINT Maximum of both input values

Description:

Yields the maximum of two integer values.

Example

(* FBD Program using "MIN" and "MAX" Function *)

(* ST Equivalence: *)
new_value := MAX (MIN (max_value, value), min_value);

(* bounds the value to the [min_value..max_value] set *)

AADvance Workbench 811


MID

Arguments:

IN IN STRING Any non-empty string


NbC NbC DINT Number of characters to extract (must be less than or equal to the
length of the IN string)
Pos Pos DINT Position of the sub-string
the sub-string first character is the one pointed to by Pos
(the first valid position is 1)
MID Q STRING Middle part of the string (its length = NbC).
When the number of characters to extract exceeds the length of
the IN string, NbC is automatically recalculated to get the
remainder of the string only. When NbC or Pos are zero or
negative numbers, an empty string is returned.

Description:

Using the position and number of characters provided, yields required parts of strings.

Example

(* FBD Program using "MID" Function *)

812 AADvance 2.1 - Functions


(* ST Equivalence: *)
sub_string := MID ('abcdefgh', 2, 4);

(* sub_string is 'de' *)

AADvance Workbench 813


MIN

Arguments:

IN1 IN1 DINT Any signed integer value


IN2 IN2 DINT (cannot be REAL)
MIN Q DINT Minimum of both input values

Description:

Yields the minimum of two integer values.

Example

(* FBD Program using "MIN" and "MAX" Function *)

(* ST Equivalence: *)
new_value := MAX (MIN (max_value, value), min_value);

(* bounds the value to the [min_value..max_value] set *)

814 AADvance 2.1 - Functions


MLEN

Arguments:

IN IN STRING Any string


MLEN NbC DINT Number of characters in the IN string

Description:

Yeilds the length of strings.

Example

(* FBD Program using "MLEN" Function *)

(* ST Equivalence: *)
nbchar := MLEN (complete_string);
If (nbchar < 3) Then Return; End_if;
prefix := LEFT (complete_string, 3);

AADvance Workbench 815


(* this program extracts the 3 characters on the left of the string and put the result in the prefix
string variable

nothing is done if the string length is less than 3 characters *)

816 AADvance 2.1 - Functions


MOD

Arguments:

IN IN DINT Any signed INTEGER value


Base Base DINT Must be greater than zero
MOD Q DINT Modulo calculation (input MOD base)
yields -1 if Base <= 0

Description:

Yields the modulo of an integer value.

Example

(* FBD Program using "MOD" Function *)

(* ST Equivalence: *)
division_result := (value / divider); (* integer division *)
rest_of_division := MOD (value, divider); (* rest of the division *)

AADvance Workbench 817


MUX4

Arguments:

SEL SEL DINT Selector integer value (must be in set [0..3])


IN1..IN4 IN1..IN4 DINT Any integer values
MUX4 Q DINT = value1 if SEL = 0
= value2 if SEL = 1
= value3 if SEL = 2
= value4 if SEL = 3
= 0 for all other values of the selector

Description:

Yields a value between four integer values.

Example

(* FBD Program using "MUX4" Function *)

818 AADvance 2.1 - Functions


(* ST Equivalence: *)
range := MUX4 (choice, 1, 10, 100, 1000);

(* select from 4 predefined ranges, for example, if choice is 1, range will be 10 *)

AADvance Workbench 819


MUX8

Arguments:

SEL SEL DINT Selector integer value (must be in set [0..7])


IN1..IN8 IN1..IN8 DINT Any integer values
MUX8 Q DINT = value1 if selector = 0
= value2 if selector = 1
...
= value8 if selector = 7
= 0 for all other values of the selector

Description:

Yields a value between eight integer values.

Example

(* FBD Program using "MUX8" Function *)

820 AADvance 2.1 - Functions


(* ST Equivalence: *)
range := MUX8 (choice, 1, 5, 10, 50, 100, 500, 1000, 5000);

(* select from 8 predefined ranges, for example, if choice is 3, range will be 50 *)

AADvance Workbench 821


NOT_MASK

Arguments:

IN IN DINT Must have integer format


NOT_MASK Q DINT Bit-to-bit negation on 32 bits of IN

Description:

Integer bit-to-bit negation mask.

Example

(* FBD example with NOT_MASK Operators *)

(*ST equivalence: *)
result := NOT_MASK (16#1234);

(* result is 16#FFFF_EDCB *)

822 AADvance 2.1 - Functions


ODD

Arguments:

IN IN DINT Any signed integer value


Odd Q BOOL TRUE if input value is odd
FALSE if input value is even

Description:

Determines the parity of an integer, yielding an odd or even result.

Example

(* FBD Program using "ODD" Function *)

(* ST Equivalence: *)
If Not (ODD (value)) Then Return; End_if;
value := value + 1;

(* makes value always even *)

AADvance Workbench 823


OR_MASK

Arguments:

IN IN DINT Must have integer format


MSK MSK DINT Must have integer format
OR_MASK Q DINT Bit-to-bit logical OR between IN and MSK

Description:

Integer OR bit-to-bit mask.

Example

(* FBD example with OR_MASK Operators *)

(* ST Equivalence: *)
parity := OR_MASK (xvalue, 1); (* makes value always odd *)
result := OR_MASK (16#abc, 16#f0f); (* equals 16#fbf *)

824 AADvance 2.1 - Functions


POW

Arguments:

IN IN REAL REAL number to be raised


EXP EXP REAL Power (exponent)
POW Q REAL (IN EXP)
1.0 if IN is not 0.0 and EXP is 0.0
0.0 if IN is 0.0 and EXP is negative
0.0 if both IN and EXP are 0.0
0.0 if IN is negative and EXP does not correspond to an integer

Description:

When the first arguement is 'base' and the second arguement is 'exponent', yields the REAL
result of the following: (base exponent). 'Exponent' is a REAL value.

Example

(* FBD Program using "POW" Function *)

(* ST Equivalence: *)
result := POW (xval, power);

AADvance Workbench 825


RAND

Arguments:

base base DINT Defines the allowed set of number


RAND Q DINT Random value in set [0..base-1]

Description:

From a defined range, yields random integer values.

Example

(* FBD Program using "RAND" function *)

(* ST Equivalence: *)
selected := MUX4 ( RAND (4), 1, 4, 8, 16 );
(*
random selection of 1 of 4 pre-defined values
the value issued of RAND call is in set [0..3],
so 'selected' issued from MUX4, will get 'randomly' the value

826 AADvance 2.1 - Functions


1 if 0 is issued from RAND,
or 4 if 1 is issued from RAND,
or 8 if 2 is issued from RAND,
or 16 if 3 is issued from RAND,
*)

AADvance Workbench 827


REPLACE

Arguments:

IN IN STRING Any string


Str Str STRING String to be inserted (to replace NbC chars)
NbC NbC DINT Number of characters to be deleted
Pos Pos DINT Position of the first modified character
(first valid position is 1)
REPLACE Q STRING Modified string:
- NbC characters are deleted at position Pos
- then substring Str is inserted at this position
yields empty string if Pos <= 0
yields strings concatenation (IN+Str) if Pos is greater
than the length of the IN string
yields initial string IN if NbC <= 0

Description:

Replaces parts of a strings with new sets of characters.

Example

Replacing a part of a string with a new set of characters.

828 AADvance 2.1 - Functions


(* ST Equivalence: *)
MyName := REPLACE ('Mr X JONES, 'Frank', 1, 4);

(* MyName is 'Mr Frank JONES' *)

AADvance Workbench 829


RIGHT

Arguments:

IN IN STRING Any non-empty string


NbC NbC DINT Number of characters to be extracted. This number cannot be
greater than the length of the IN string.
RIGHT Q STRING Right part of the string (length = NbC)
empty string if NbC <= 0
complete string if NbC >= string length

Description:

From the right ends of strings, yields the number of characters defined.

Example

(* FBD Program using "LEFT" and "RIGHT" Functions *)(* ST Equivalence: *)

complete_string := INSERT (RIGHT ('12345678', 4), LEFT ('12345678',


4),5);

830 AADvance 2.1 - Functions


(* complete_string is '56781234'

the value issued from RIGHT call is '5678'

the value issued from LEFT call is '1234'

*)

AADvance Workbench 831


ROL

Arguments:

IN IN DINT Integer value


NbR NbR DINT Number of 1-bit rotations (in set [1..31])
ROL Q DINT Left rotated value
When NbR <= 0, no change occurs.

Description:

For 32-bit integers, rotates integer bits to the left.

Example

(* FBD Program using "ROL" Function *)

(* ST Equivalence: *)
result := ROL (register, 1);
(* register = 2#0100_1101_0011_0101*)
(* result = 2#1001_1010_0110_1010*)

832 AADvance 2.1 - Functions


ROR

Arguments:

IN IN DINT Any integer value


NbR NbR DINT Number of 1 bit rotations (in set [1..31])
ROR Q DINT Right rotated value
no effect if NbR <= 0

Description:

For 32-bit integers, rotates integer bits to the right.

Example

(* FBD Program using "ROR" Function *)

(* ST Equivalence: *)
result := ROR (register, 1);

(* register = 2#0100_1101_0011_0101 *)

(* result = 2#1010_0110_1001_1010 *)

AADvance Workbench 833


SEL

Arguments:

SEL1 SEL1 BOOL Indicates the chosen value


IN1, IN2 IN1, IN2 DINT Any integer values
SEL Q DINT = IN1 if SEL is FALSE
= IN2 if SEL is TRUE

Description:

Specifies the input to use between two integer values.

Example

(* FBD Program using "SEL" Function *)

(* ST Equivalence: *)
ProCmd := SEL (AutoMode, ManuCmd, InpCmd);

(* process command selection *)

834 AADvance 2.1 - Functions


SHL

Arguments:

IN IN DINT Any integer value


NbS NbS DINT Number of 1 bit shifts (in set [1..31])
SHL Q DINT Left shifted value
no effect if NbS <= 0
0 replaces the least significant bit

Description:

For 32-bit integers, moves integers to the left and places 0 in the least significant bit.

Example

(* FBD Program using "SHL" Function *)

(* ST Equivalence: *)
result := SHL (register,1);
(* register = 2#0100_1101_0011_0101 *)
(* result = 2#1001_1010_0110_1010 *)

AADvance Workbench 835


SHR

Arguments:

IN IN DINT Any integer value


NbS NbS DINT Number of 1 bit shifts (in set [1..31])
SHR Q DINT Right shifted value
no effect if NbS <= 0
the leftmost bit is replicated if NbS >=1

Description:

Shifts the 32 bits of an integer to the right and replicates the leftmost bit (significant bit) to fill
the vacant bits.

Example

(* FBD Program using "SHR" Function *)

(* ST Equivalence: *)
result := SHR (register,1);
(* register = 2#1100_1101_0011_0101 *)

836 AADvance 2.1 - Functions


(* result = 2#1110_0110_1001_1010 *)

AADvance Workbench 837


SIN

Arguments:

IN IN REAL Any REAL value


SIN Q REAL Sine of the input value (in set [-1.0 .. +1.0])

Description:

Yields the Sine of a REAL value.

Example

(* FBD Program using "SIN" and "ASIN" Functions *)

(* ST Equivalence: *)
sine := SIN (angle);
result := ASIN (sine); (* result is equal to angle *)

838 AADvance 2.1 - Functions


SQRT

Arguments:

IN IN REAL Must be greater than or equal to zero


SQRT Q REAL Square root of the input value

Description:

Yields the square root of a REAL value.

Example

(* FBD Program using "SQRT" Function *)

(* ST Equivalence: *)
xpos := ABS (xval);
xroot := SQRT (xpos);

AADvance Workbench 839


SUB_DATE_DATE

Arguments:

DAT1 DAT1 DATE First date in a comparison


DAT2 DAT2 DATE Second date in a comparison
SUB_DATE_DATE TIME TIME Difference in TIME format between DAT1 and
DAT2. The possible date difference values range
from t#0h to t#1193h2m47s294ms inclusively.
A value of 1193h2m47s295ms indicates an error
for either of the following conditions:
- DAT1 is less than DAT2
- The difference between DAT1 and DAT2 is
greater than 1193h2m47s294ms

Description:

Compares two dates and yields the difference in TIME format.

Example

(* FBD Program using "SUB_DATE_DATE" Function *)

(* ST Equivalence: *)
timResult := SUB_DATE_DATE (datVal1, datVal2);

840 AADvance 2.1 - Functions


TAN

Arguments:

IN IN REAL Cannot be equal to PI/2 modulo PI


TAN Q REAL Tangent of the input value
= 1E+38 for invalid input

Description:

Yields the Tangent of a REAL value.

Example

(* FBD Program using "TAN" and "ATAN" Functions *)

(* ST Equivalence: *)
tangent := TAN (angle);
result := ATAN (tangent); (* result is equal to angle*)

AADvance Workbench 841


TRUNC

Arguments:

IN IN REAL Any REAL value


TRUNC Q REAL If IN>0, biggest integer less or equal to the input
If IN<0, least integer greater or equal to the input

Description:

Truncates REAL values, leaving just the integer.

Example

(* FBD Program using "TRUNC" Function *)

(* ST Equivalence: *)
result := TRUNC (+2.67) + TRUNC (-2.0891);
(* means: result := 2.0 + (-2.0) := 0.0; *)

842 AADvance 2.1 - Functions


XOR_MASK

Arguments:

IN IN DINT Must have integer format


MSK MSK DINT Must have integer format
XOR_MASK Q DINT Bit-to-bit logical Exclusive OR between IN and MSK

Description:

Integer exclusive OR bit-to-bit mask

Example

(* FBD example with XOR_MASK Operators *)

(* ST Equivalence: *)
crc32 := XOR_MASK (prevcrc, nextc);
result := XOR_MASK (16#012, 16#011); (* equals 16#003 *)

AADvance Workbench 843


844 AADvance 2.1 - Functions
Function Blocks
The workbench supports the following function blocks:

Alarms LIM_ALRM High/low limit alarm with hysteresis


Management
Boolean Operations SR Set dominant bistable
RS Reset dominant bistable
R_TRIG Rising edge detection
F_TRIG Falling edge detection
Comparators CMP Full comparison function block
Counters CTU Up counter
CTD Down counter
CTUD Up-down counter
Data Manipulation AVERAGE Running average over N samples
Process Control DERIVATE Differentiation of a real value according to time
HYSTER Boolean hysteresis on difference of reals
INTEGRAL Integration over time
STACKINT Stack of integer
Signal Generation BLINK Blinking Boolean signal
SIG_GEN Signal generator
Time Operations TON On-delay timing
TOF Off-delay timing
TP Pulse timing
Note: When new function blocks are created, these can be called from any language.

AADvance Workbench 845


AVERAGE

Arguments:

RUN BOOL TRUE=run / FALSE=reset


XIN REAL Any real variable
N DINT Application defined number of samples
XOUT REAL Running average of XIN value
Note: When setting or changing the value for N, you need to set RUN to FALSE, then set it
back to TRUE.

Description:

Stores a value at each cycle and calculates the average value of all stored values. Only the latest
N values are stored.

The maximum number of samples N is 128. When N exceeds 128, the number of samples is
truncated to 128.

When the "RUN" command is FALSE (reset mode), the output value is equal to the input
value.

Upon reaching the maximum N of stored values, the first stored value is overwritten with the
latest value.

Example

(* FBD program using the AVERAGE block: *)

846 AADvance 2.1 - Function Blocks


(* ST Equivalence: AVERAGE1 instance of AVERAGE block *)
AVERAGE1((auto_mode & store_cmd), sensor_value, 100);
ave_value := AVERAGE1.XOUT;

AADvance Workbench 847


BLINK

Arguments:

RUN BOOL Mode: TRUE=blinking / FALSE=reset the output to false


CYCLE TIME Blinking period. Possible values range from 0ms to
1193h2m47s294ms.
Q BOOL Output blinking signal

Description:

Generates a blinking signal.

Timing diagram:

848 AADvance 2.1 - Function Blocks


CMP

Arguments:

VAL1 DINT Any signed integer value


VAL2 DINT Any signed integer value
LT BOOL TRUE if val1 is less than val2
EQ BOOL TRUE if val1 is equal to val2
GT BOOL TRUE if val1 is greater than val2

Description:

Compare two values: tell if they are equal, or if the first is less or greater than the second one.

Example

(* FBD program using the CMP block *)

(* ST Equivalence: We suppose CMP1 is an instance of CMP block *)


CMP1(level, max_level);

AADvance Workbench 849


pump_cmd := CMP1.LT OR CMP1.EQ;
alarm := CMP1.GT AND NOT(manual_mode);

850 AADvance 2.1 - Function Blocks


CTD

Arguments:

CD BOOL Counting input


(down-counting when CD is a rising edge)
LOAD BOOL Load command (dominant)
(CV = PV when LOAD is TRUE)
PV DINT Programmed initial value
Q BOOL Underflow: TRUE when CV <= 0
CV DINT Counter result

Description:

Counts (integer) from a given value down to 0 1 by 1

Example

(* FBD program using the CTD block *)

(* ST Equivalence: CTD1 is an instance of block*)


CTD1(command,load_cmd,100);
underflow := CTD1.Q;

AADvance Workbench 851


result := CTD1.CV;

852 AADvance 2.1 - Function Blocks


CTU

Arguments:

CU BOOL Counting input (counting when CU is a rising edge)


RESET BOOL Reset command (dominant)
PV DINT Programmed maximum value
Q BOOL Overflow: TRUE when CV >= PV
CV DINT Counter result

Description:

Counts (integer) from 0 up to a given value 1 by 1

Example

(* FBD program using the CTU block *)

(* ST Equivalence: CTU1 is an instance of CTU block*)


CTU1(command,NOT(auto_mode),100);
overflow := CTU1.Q;
result := CTU1.CV;

AADvance Workbench 853


CTUD

Arguments:

CU BOOL Up-counting (when CU is a rising edge)


CD BOOL Down-counting (when CD is a rising edge)
RESET BOOL Reset command (dominant)
(CV = 0 when RESET is TRUE)
LOAD BOOL Load command (CV = PV when LOAD is TRUE)
PV DINT Programmed maximum value
QU BOOL Overflow: TRUE when CV >= PV
QD BOOL Underflow: TRUE when CV <= 0
CV DINT Counter result

Description:

Counts (integer) from 0 up to a given value 1 by 1 or from a given value down to 0 1 by 1

Example

(* FBD program using the CTUD block *)

854 AADvance 2.1 - Function Blocks


(* ST Equivalence: We suppose CTUD1 is an instance of block*)
CTUD1(trigger1, trigger2, reset_cmd, load_cmd,100);
full := CTUD1.QU;
empty := CTUD1.QD;
nb_elt := CTUD1.CV;

AADvance Workbench 855


DERIVATE

Arguments:

RUN BOOL Mode: TRUE=normal / FALSE=reset


XIN REAL Input: any real value
CYCLE TIME Sampling period. Possible values range from 0ms to
23h59m59s999ms.
XOUT REAL Differentiated output

Description:

Differentiation of a real value.

If the "CYCLE" parameter value is less than the cycle timing of the execution of the controller
in the target, the sampling period is forced to this cycle timing.

Example

(* FBD program using the DERIVATE block: *)

(* ST Equivalence: DERIVATE1 instance of DERIVATE block *)


DERIVATE1(manual_mode, sensor_value, t#100ms);

856 AADvance 2.1 - Function Blocks


derivated_value := DERIVATE1.XOUT;

AADvance Workbench 857


F_TRIG

Arguments:

CLK BOOL Any Boolean Variable


Q BOOL TRUE when CLK changes from TRUE to FALSE
FALSE if all other cases

Description:

Detects a falling edge of a Boolean variable

Example

(* FBD program using the F_TRIG block *)

(* ST Equivalence: We suppose F_TRIG1 is an instance of F_TRIG block *)


F_TRIG1(cmd);
nb_edge := ANY_TO_DINT(F_TRIG1.Q) + nb_edge;

858 AADvance 2.1 - Function Blocks


HYSTER

Arguments:

XIN1 REAL Any real value


XIN2 REAL To test if XIN1 has overpassed XIN2+EPS
EPS REAL Hysteresis value (must be greater than zero)
Q BOOL TRUE if XIN1 has overpassed XIN2+EPS and is not yet below
XIN2-EPS

Description:

Hysteresis on a real value for a high limit.

Example

Example of a timing diagram:

AADvance Workbench 859


INTEGRAL

Arguments:

RUN BOOL Mode: TRUE=integrate / FALSE=hold


R1 BOOL Overriding reset
XIN REAL Input: any real value
X0 REAL Initial value
CYCLE TIME Sampling period. Possible values range from 0ms to
23h59m59s999ms.
Q BOOL Not R1
XOUT REAL Integrated output

Description:

Integration of a real value.

If the "CYCLE" parameter value is less than the cycle timing of the execution of the controller
in the target, the sampling period is forced to this cycle timing.

Example

(* FBD Program using "INTEGRAL" Block: *)

860 AADvance 2.1 - Function Blocks


(* ST Equivalence: INTEGRAL1 instance of INTEGRAL block *)
INTEGRAL1(manual_mode, NOT(manual_mode), sensor_value, init_value,
t#100ms);
controlled_value := INTEGRAL1.XOUT;

AADvance Workbench 861


LIM_ALRM

Arguments:

H REAL High limit value


X REAL Input: any real value
L REAL Low limit value
EPS REAL Hysteresis value (must be greater than zero)
QH BOOL "high" alarm: TRUE if X above high limit H
Q BOOL Alarm output: TRUE if X out of limits
QL BOOL "low" alarm: TRUE if X below low limit L

Description:

Hysteresis on a real value for high and low limits.

A hysteresis is applied on high and low limits. The hysteresis delta used for either the high or
low limit is equal to the EPS parameter.

Example

Example of timing diagram:

862 AADvance 2.1 - Function Blocks


AADvance Workbench 863
R_TRIG

Arguments:

CLK BOOL Any Boolean Variable


Q BOOL TRUE when CLK rises from FALSE to TRUE
FALSE in all other cases

Description:

Detects a rising edge of a Boolean variable

Example

(* FBD program using the R_TRIG block *)

(* ST Equivalence: We suppose R_TRIG1 is an instance of the R_TRIG block *)


R_TRIG1(cmd);
nb_edge := ANY_TO_DINT(R_TRIG1.Q) + nb_edge;

864 AADvance 2.1 - Function Blocks


RS

Arguments:

SET BOOL If TRUE, sets Q1 to TRUE


RESET1 BOOL If TRUE, resets Q1 to FALSE (dominant)
Q1 BOOL Boolean memory state

Description:

Reset dominant bistable:

Set Reset1 Q1 Result Q1


0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 0

Example

(* FBD Program using the RS block *)

AADvance Workbench 865


(* ST Equivalence: We suppose RS1 is an instance of RS block *)
RS1(start_cmd, (stop_cmd OR alarm));
command := RS1.Q1;

866 AADvance 2.1 - Function Blocks


SIG_GEN

Arguments:

RUN BOOL Mode: TRUE=running / FALSE=reset to false


PERIOD TIME Duration of one sample. Possible values range from 0ms to
1193h2m47s294ms.
MAXIMUM DINT Maximum counting value
PULSE BOOL Inverted after each sample
UP DINT Up-counter, increased on each sample
END BOOL TRUE when up-counting ends
SINE REAL Sine signal (period = counting duration)

Description:

Generates various signal: blink on a boolean, a integer counter-up, and real sine wave.

When counting reaches maximum value, it restarts from 0 (zero). So END keeps the TRUE
value only during 1 PERIOD.

Timing diagram:

AADvance Workbench 867


868 AADvance 2.1 - Function Blocks
SR

Arguments:

SET1 BOOL If TRUE, sets Q1 to TRUE (dominant)


RESET BOOL If TRUE, resets Q1 to FALSE
Q1 BOOL Boolean memory state
Description:

Set dominant bistable:

Set1 Reset Q1 Result Q1


0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1

Example

(* FBD Program using the SR block *)

AADvance Workbench 869


(* ST Equivalence: We suppose SR1 is an instance of SR block *)
SR1((auto_mode & start_cmd), stop_cmd);
command := SR1.Q1;

870 AADvance 2.1 - Function Blocks


STACKINT

Arguments:

PUSH BOOL Push command (on rising edge only)


add the IN value on the top of the stack
POP BOOL Pop command (on rising edge only)
delete in the stack the last value pushed (top of the stack)
R1 BOOL Resets the stack to its empty state
IN DINT Pushed value
N DINT Application defined stack size
EMPTY BOOL TRUE if the stack is empty
OFLO BOOL Overflow: TRUE if the stack is full
OUT DINT Value at the top of the stack
OUT equals 0 when OFLO is TRUE

Description:

Manages a stack of integer values. The STACKINT function block includes a rising edge
detection for both PUSH and POP commands. The maximum size of the stack is 128. The
application defined stack size N cannot be less than 1 or greater than 128. This function
manages invalid values as follows:

if N<1, STACKINT assumes a size of 1

if N>128, STACKINT assumes a size of 128

AADvance Workbench 871


Note: The OFLO value is valid only after a reset (R1 has been set to TRUE at least once and
back to FALSE).

Example

(* FBD program using the STACKINT block: error management *)

(* ST Equivalence: We suppose STACKINT1 is an instance of STACKINT block *)


STACKINT1(err_detect, acknowledge, manual_mode, err_code, max_err);
appli_alarm := auto_mode AND NOT(STACKINT1.EMPTY);
err_alarm := STACKINT1.OFLO;
last_error := STACKINT1.OUT;

872 AADvance 2.1 - Function Blocks


TOF

Arguments:

IN BOOL If falling edge, starts increasing internal timer


If rising edge, stops and resets internal timer
PT TIME Maximum programmed time
Q BOOL If TRUE: total time is not elapsed
ET TIME Current elapsed time. Possible values range from 0ms to
1193h2m47s294ms.

Description:

Increase an internal timer up to a given value.

Timing diagram:

AADvance Workbench 873


TON

Arguments:

IN BOOL If rising edge, starts increasing internal timer


If falling edge, stops and resets internal timer
PT TIME Maximum programmed time
Q BOOL If TRUE, programmed time is elapsed
ET TIME Current elapsed time. Possible values range from 0ms to
1193h2m47s294ms.

Description:

Increase an internal timer up to a given value.

Timing diagram:

874 AADvance 2.1 - Function Blocks


TP

Arguments:

IN BOOL If rising edge, starts increasing internal timer (if not already increasing)
If FALSE and only if timer is elapsed, resets the internal timer
Any change on IN during counting has no effect.
PT TIME Maximum programmed time
Q BOOL If TRUE: timer is counting
ET TIME Current elapsed time. Possible values range from 0ms to
1193h2m47s294ms.

Description:

Increase an internal timer up to a given value.

Timing diagram:

AADvance Workbench 875


876 AADvance 2.1 - Function Blocks
Series 9000_L Function Blocks
The Series 9000_L target supports the following C function blocks:

KvbConsNetStatus

KvbProdNetStatus

MathErr

ModbusServiceStatus

SoeServiceStatus

AADvance Workbench 877


KvbConsNetStatus

Note: This function block should only be used for network diagnostics.

Arguments:

RES DINT Consumer controller number


IP STRING IP address of consumer
ERR BOOL TRUE = unknown controller, IP address is invalid, or the controller has no
configured bindings
FALSE = no error observed
STAT BOOL TRUE = healthy network link to producer IP
FALSE = link failure

Description:

From a consumer controller, obtains the status of a network link to a given producer IP address.
KvbConsNetStatus monitors incoming connections.

Example

In an application which has two controllers with identities 1 and 2, controller 1 is a producer
and has a bindings link to controller 2. Controller 1 has two network interfaces with IPs
10.44.200.1 and 192.168.3.1. Controller 2 has two network interfaces with IPs 10.44.200.2 and
192.168.3.2.

The following example shows the KvbConsNetStatus functions used in a redundant manner
verifying the error status of the network links for both controller 1 instances located at the
different IP addresses.

878 AADvance 2.1 - Series 9000_L Function Blocks


AADvance Workbench 879
KvbProdNetStatus

Note: This function block should only be used for network diagnostics.

Arguments:

RES DINT Producer controller number


IP STRING IP address of producer
ERR BOOL TRUE = unknown controller, IP address is invalid, or the controller has no
configured bindings
FALSE = no error observed
STAT BOOL TRUE = healthy network link to consumer IP
FALSE = link failure

Description:

From a producer controller, obtains the status of a network link to a given consumer IP address.
KvbProdNetStatus monitors outgoing connections.

Example

In an application which has two controllers with identities 1 and 2, controller 1 is a producer
and has a bindings link to controller 2. Controller 1 has two network interfaces with IPs
10.44.200.1 and 192.168.3.1. Controller 2 has two network interfaces with IPs 10.44.200.2 and
192.168.3.2.

880 AADvance 2.1 - Series 9000_L Function Blocks


The following example shows the KvbProdNetStatus functions used in a redundant manner
verifying the error status of the network links for both controller 2 instances located at the
different IP addresses:

AADvance Workbench 881


MathErr

Arguments:

RST BOOL TRUE = clears the math status after it is read


FALSE = preserves math status after it is read
ERR WORD Current math error status
0 = no error
1 = divide by zero occured

Description:

Obtains and enables clearing the mathematical error status lasted reported by the TIC
interpreter

Example

In the following example, if the value of `DintOp2' is zero, MathErr() returns 1 and clears the
math error status.

(* ST example using MathErr() function. *)


DintResult := DintOp1 / DintOp2;
MathError := MathErr(TRUE);

(* Equivalent FBD *)

882 AADvance 2.1 - Series 9000_L Function Blocks


ModbusServiceStatus

The ModbusServiceStatus C function block provides the status of the Modbus service. This
function block has the following input:

RST BOOL TRUE resets all status values to zero

This function block has the following outputs:

INTS INT The internal status


SSTS INT The status of the Modbus service
ERR STRING(64) The description of the error
RCV UDINT The total number of received messages
RCVE UDINT The number of messages received with an error
REP UDINT The total number of messages replied to
REPE UDINT The number of messages replied to with an error
FUNC USINT The Modbus function of the last message
ADDR UDINT The Base Modbus address of the last message
CNT UINT The Modbus data count of the last message

AADvance Workbench 883


SoeServiceStatus

The SoeServiceStatus C function block provides the status of the SOE service. This function
block has the following input:

RST BOOL TRUE resets all status values to zero

This function block has the following outputs:

SSTS INT The status of the SOE server


ERR STRING (64) The description of the error
EVCT UDINT The number of events
EVMX UDINT The maximum number of events in the log
RESN UINT The number of the controller
COND USINT The event condition
VA UDINT SOE variable VA
RFVA UDINT Reference variable VA
RFVL STRING(32) Reference variable value
TMHI UDINT Event timestamp (High 32 bits)
TMLO UDINT Event timestamp (Low 32 bits)

884 AADvance 2.1 - Series 9000_L Function Blocks


The timestamp is the number of milliseconds since January 1, 1900.

AADvance Workbench 885


886 AADvance 2.1 - Series 9000_L Function Blocks
Glossary
The Glossary contains terms used in AADvance and their definitions.

AADvance A set of software components and services through which


plug-ins communicate.
Access Control The use of password-protection to control access to projects,
controllers, programs, libraries, and targets.
Accuracy The degree to which the result of a measurement conforms to
the correct value.
Action A collection of operations to perform whose execution differs
for each programming language.
In SFC, an action can be on a Boolean variable or a child SFC,
or a collection of operations (written in ST or LD) to perform
with an associated SFC step. The action is executed when the
Step (SFC) is active.
Actuator A device, such as a valve or pump, causing an electrical,
mechanical, or pneumatic action to occur in a plant
component.
Add-in Also known as a plug-in, a utility, driver, or other software
added to a primary application. In the Visual Studio Integrated
Development Environment (IDE), an add-in is an
Automation-based application that extends the capabilities of
the IDE.
Address Optional hexadecimal address freely defined for each variable
or controller. This address can be used by an external
application to access the value of the variable when the
application is executed by the AADvance controller.
Alias The property of a variable indicating a short name for the
variable. For graphical programs, aliases indicate the
parameters in functions and function blocks.
Application Builder An integrated development environment used to build control
applications, i.e. the Workbench.

AADvance Workbench 887


Application View A view with a tree-like structure enabling the management of
items such as controllers, programs, functions, function
blocks, dictionaries, and libraries.
Arbitration A mechanism for deciding which controller, device, module,
or peer has control.
Architecture Organizational structure of a computing system describing the
functional relationship between the board level, device level,
and system level components.
Array Set of elements of the same type referenced by one or more
indexes enclosed in square brackets and separated by commas.
The index is an integer. Examples: tabi[2] or tabij[2,4].
Asynchronous Data communications term describing a serial transmission
protocol. A start signal is sent before each byte or character
and a stop signal is sent after each byte or character.
See also Synchronous
Attribute The property of a variable indicating whether a variable is
read-only, write-only, or read and write.
Base Unit One of two designs making the supporting parts of an
AADvance controller.
See also I/O Base Unit and Processor Base Unit (9100)
Battery Alarm Alarm signal indicating back-up battery voltage is low or not
present.
Battery Backup Internal battery powering the internal Real Time Clock (RTC)
and a portion of the volatile memory (RAM) when the power
is off.
Binding Bindings are links, i.e., access paths, between variables located
in different controllers. From a controller, bindings are defined
as having a producer variable sending values to a consumer
variable. The system updates the values in the consumer to
match the values in the producer.
See also SNCP
Boo Action A Boolean variable where the value corresponds to Step
activity (0=inactive and 1=active). Possible qualifiers are
Action (N), Reset (R), and Set (S).
See also Action

888 AADvance 2.1 - Glossary


Boolean (BOOL) Basic type that can be used to define a variable, a parameter or
an I/O module. A boolean can be TRUE (1) or FALSE (0).
Breakpoint A mark placed by the user at particular locations within the
code. While simulating, the application stops when it
encounters a breakpoint. Breakpoint implementation varies for
each programming language.
Build Configuration A way to store multiple versions of project properties. Build
configurations are modifiable. Note that configuration is in the
sense of settings.
BYTE Unsigned integer 8-bit format. Basic type that can be used to
define a variable, a parameter, or an I/O module.
C Function Function written with the "C" language, called from POUs, in
a synchronous manner.
C Language High level literal language used to access particularities of the
target system. C language can be used to program C functions,
function blocks, and conversion functions.
Cell Elementary area of the graphic matrix for graphic languages or
for the Dictionary.
CFB Indicates a C function block
CFU Indicates a C function
Channel A channel of an I/O module represents a hardware I/O point. A
channel is either an input or output. To enable use in POUs,
variables including directly represented variables are
connected to channels.
Check In Sending the contents of AADvance elements including
projects, I/O modules, controllers, and POUs for storage in a
version control database. Checked-in elements can be
recovered at a later time.
Child A program which is activated by its parent. The child program
has only one parent. Only the parent can start or stop child
program. A parent can have more than one child.

AADvance Workbench 889


CIP Common Industrial Protocol. A communications protocol for
use with the Logix controller family and supported by the
AADvance controller. AADvance controllers use the protocol
to send data to and from Logix controllers using a
consume/producer model. CIP can also be used to
communicate data between AADvance controllers.
Clearing a Transition The forcing of the clearing of a transition whether the latter is
valid or not (i.e all previous steps are active or not). Tokens are
moved and actions are executed as for a usual transition
clearing. All tokens existing in the preceding steps are
removed. A token is created in each of the following steps.
CMG Short name for the Configuration Manager
Coil In IEC 61131-3, a graphic component representing the
assignment of an output or an internal variable.
In Modbus, a discrete output value.
Common Scope Scope of a declaration applying to all POUs within a Project.
(Only defined words and types can have common scope).
Communication View A view with a tree-like structure enabling the management of
communication options for the equipment series.
Compiler Verification A software utility that validates a compiled application by
Tool (CVT) looking for errors introduced by the Workbench or compiler.
Condition A boolean expression attached to an SFC Transition. In case of
an SFC transition, the transition cannot be cleared when its
condition is false.
Configuration A grouping of the application and settings specified for an
AADvance controller.
See also Controller
Configuration Manager (ConfigurationManager.exe) The executable file providing
communication services between AADvance and the target.
Responsible for launching, killing, and giving the status of
running virtual machines.
Connected Mode See Online Mode
Connection The link between networks and Controllers.

890 AADvance 2.1 - Glossary


Constant Expression Literal expression used to describe a constant value.
Consumer The consuming controller requests the tag from the producing
controller.
See also Producer
Consumer Status Variables that enable the management of binding errors at the
Variable consumer level.
Contact Depending on the type of contact, a graphic component
representing the value or function of an input or an internal
variable.
Contextual Menu Menu that is displayed under the mouse cursor by
right-clicking the mouse.
Continuous Mode Where the Safety Instrumented Function in the safety system
continually maintains the process in a safe condition.
Controller A programmable logic controller made up of one or more
programs.
See also Target.
Controller Management Provides the communication infrastructure with the Run-time
Engine.
Controller System One or more controllers, along with their power sources,
communication networks, and workstations.
Controller Variable A variable whose scope is global to the project.
See also Global Scope
Convergence Multiple connection link from multiple SFC symbols (steps or
transitions) to a single symbol. Convergences can be selection
or simultaneous. A selection convergence (OR) is a multiple
link from multiple transitions to the same step. A simultaneous
convergence (AND) is a multiple link from multiple steps to
the same transition.
Conversion Filter attached to an input or output variable. The conversion is
automatically applied each time the input variable is read or
the output variable is refreshed.
Conversion Function "C" written Function which describes a conversion. Such a
conversion can be attached to any input or output, integer or
real variable.

AADvance Workbench 891


Coverage The percentage of faults detected by automated diagnostics.
CRC Cyclic redundancy checking
Cross Reference Browser A tool that finds all references to variables, i.e., cross
references, defined in the POUs of a project. The browser
provides a total view of the declared variables in the programs
of the project and where these are used.
CSV File Format (Comma Separated Values) A delimited data format having
each piece of information separated by commas and each line
ending with a carriage return. The CSV file format can be used
for importing or exporting variables data.
Cycle The virtual machine executes the programs of a controller as a
cycle. All programs of the controller are executed following
the order defined by the user, from the first program to the last
and again and again. Before the execution of the first program,
inputs are read. After the execution of the last program, the
outputs are refreshed.
Cycle Timing The amount of time given to each cycle. If a cycle is
completed within the cycle timing period, the system waits
until this period has elapsed before starting a new cycle. The
cycle consists of scanning the physical inputs of the process to
drive, executing the POUs of the controller, then updating
physical outputs. The cycle time can differ for each cycle
when no cycle timing is specified. When the cycle timing is
shorter, the virtual machine waits until this time has elapsed.
When the cycle time is longer, the virtual machine
immediately scans the inputs but signals with the "overflow"
that the programmed time has been exceeded. When the
trigger cycles property is false or the cycle time is 0, the virtual
machine does not wait to start a new cycle.
Cycle-to-cycle Mode Execution mode of a controller where cycles are executed one
by one, according to the orders given by the user during
debugging. Another execution mode for controllers is
real-time mode.
Cyclic Program A time independent program that is executed during each
cycle.

892 AADvance 2.1 - Glossary


Database The collection of definitions making up a AADvance project.
The version control feature stores checked-in information in a
separate database.
DATE The format of a date is year-month-day, separated by hyphens.
Basic type that can be used to define a Variable, a Parameter
(POU) or a Controller.
Debug Information For use when simulating using the step-by-step mode. Debug
information includes information which tracks stepping
between POUs and called functions.
Debugging Also known as simulating, the process of detecting defects in a
project that includes setting and clear breakpoint, step-by-step
debugging, and cycle-to-cycle debugging.
Declared Array A user-defined array defined as a data type. See also
Undeclared Array
Declared Instance (of a A function block having assigned instances, i.e., declared in
function block) the dictionary.
Defined Word Word that is an expression. This word can be used in POUs. At
compiling time the word is replaced by the expression. A
defined word can not use a defined word.
Dependency (for Dependencies indicate the variables affecting or affected by a
variables) given variable. From the cross reference browser, you can
access the dependencies view of individual variables.
Backward dependencies indicate the variables that affect a
given variable. Forward dependencies indicate the variables
that are affected by a given variable.
Dependency (on a The state where a project uses, i.e., depends, on functions or
library) function blocks defined in a library.
Design (mode) An editing mode during which the Application Builder is not
connected to the runtime module.
Device See Target, Target Device, Field Device
Dictionary The view displaying the variables, function and function block
parameters, types, and defined words used in the programs of a
Project.

AADvance Workbench 893


Dimension The size (number of elements) of an array. For example:
[1..3,1..10] - represents a two-dimensional array containing a
total of 30 elements.
Direction Variables and I/O modules have a direction. For the property
of a variable, direction indicates whether a variable is an input,
output, or internal. The direction of an I/O module can be input
or output.
Directly Represented A variable is generally declared before its use in one POU.
Variable Inputs and outputs can be used without any declaration
respecting a defined syntax. It corresponds to direct
represented variables. Example: %QX1.6, %ID8.2
Discrepancy A condition existing when one or more elements disagree.
Divergence Multiple connection link from a single SFC symbol (steps or
transitions) to multiple SFC symbols. Divergences can be
selection or simultaneous. A selection divergence (OR) is a
multiple link from one step to many transitions. A
simultaneous divergence (AND) is a multiple link from one
transition to many steps.
Double Integer (DINT) Signed double integer 32-bit format. Basic type that can be
used to define a variable, a Parameter (POU) or a Controller.
Double Word (DWORD) Unsigned double word 32-bit format. Basic type that can be
used to define a variable, a Parameter (POU) or a Controller.
Driver See Network Driver.
Duplex Module A processor or one I/O module belonging to a pair of modules
arranged in a parallel configuration. The parallel arrangement
enables two paths for command signals and I/O data and
increases their fault tolerance.
See also Redundancy
Dynamic Behavior Continuous and sequential execution of the steps and
operations of a program during an execution cycle.
Edge See Falling Edge, Rising Edge.
ETCP (ETCP.exe) AADvance network driver that uses the TCP / IP
stack.

894 AADvance 2.1 - Glossary


Eurocard I/O Module A Eurocard I/O Module is a Eurocard sized Printed Circuit
Board (PCB) without a casing. The I/O module is available
with or without a front panel.
Execution Mode The mode in which a project is executed: real-time,
cycle-to-cycle, and step-by-step.
Expression Set of operators and identifiers.
Fail-safe The ability to go to into a predetermined state when a specified
malfunction occurs.
Falling Edge A falling edge of a boolean variable corresponds to a change
from TRUE (1) to FALSE (0).
Fault Reset Button The action push switch on the front panel of the 9110
processor module.
Fault Tolerance Built-in capability of a system to provide continued correct
execution of assigned functions in the presence of a limited
number of hardware and software faults.
Fault Tolerant The ability of a system to accept the presence of one arbitrary
fault while continuing to operate correctly.
FBD Function Block Diagram. Programming language.
Field Device Equipment, such as field wiring, sensors, final control
elements, and operator interface devices, hard-wired to the
field side of I/O terminals.
Field Power Status A DINT variable giving status data about the field power
supplies for the Digital Output Module.
Function POU which has input parameters and one output parameter. A
function can be called by a program, a function or a function
block. A function has no instance. It means that local data are
not stored, and are generally lost from one call to the other.
Function Block POU which has input and output parameters and works on
internal data (parameters). A program can call an instance of a
function block. A function block instance cannot be called by a
function (no internal data for a function). A function block can
call another function block (instantiation mechanism is
extended to the function blocks called).

AADvance Workbench 895


Functional Safety The ability of a system to perform the actions required to
maintain a safe state for procedures and the related equipment.
Global Scope Scope of a declaration applying to all POUs of one controller.
HART Highway Addressable Remote Transducer. An open protocol
for process control instrumentation combining digital signals
with analog signals and giving control and status data for field
controllers.
Healthy A module status indicating the health of the module. The
indicator is GREEN when the module is healthy and RED
when there is an error.
Hidden Parameter Input parameters of a function block that are not displayed in
programs.
Hierarchy Architecture of a project, divided into several POUs. The
hierarchy tree represents the links between parent programs
and children programs.
See also Parent Program.
Hot Swap See Live Insertion
I/O Base Unit A backplane assembly holding one, two, or three I/O modules
and their related termination assemblies in an AADvance
controller. The I/O Base Unit routes I/O data, power source,
and command signals to and from the I/O modules.
I/O Bus A group of conductors carrying I/O data and command signals
between the processor and I/O modules.
I/O Channel An I/O communication path between the field sensor or
element and an I/O module. A channel is either an input or
output.
See Channel
I/O Module An AADvance module containing interfaces for inputs from
field sensors and generating outputs from field elements. The
module is connected to the field through termination
assemblies and to the processor module across I/O Bus
connections.

896 AADvance 2.1 - Glossary


I/O Variable Variable connected to a channel of an I/O module. An array
can be connected to an I/O module if all elements are
connected to contiguous channels, the type of the array must
be the same type as the I/O module.
I/O Wiring Definition of the links between the variables of the Project and
the channels of the I/O modules existing on the Target system.
Identifier Unique word used to represent a variable or a constant
expression in the programming.
IEC 61131-3 An international standard defining programming languages,
electrical parameters, and environmental conditions for PLCs.
IEC 61508 An international standard for functional safety encompassing
the hardware and software aspects of electrical, electronic, and
programmable electronic systems.
IEC 61511 An international standard for functional safety and safety
instrumented functions encompassing the hardware and
software aspects of electrical, electronic, and programmable
electronic systems.
IFB Indicates an IEC 61131 function block
IFU Indicates an IEC 61131 function
Indicator The state of a device can change to provide data
Initial Situation Set of the initial steps which represents the context of the
program when it is started.
Initial Step A Step that is activated when the program starts.
Initial Value Value which has a variable when the virtual machine
(application) starts the execution of the controller. The initial
value of a variable can be the default value, a value given by
the user when the variable is defined or the value of the
retained variable after the virtual machine has stopped.
Input Direction of a variable or an I/O module. An input variable is
connected to an input channel of an input module.
The data passed to the Workbench from an AADvance
controller.
See also Output

AADvance Workbench 897


Input Parameter Input argument of a function or a function block. These
parameters can only be read by function or function block. A
parameter is characterized by a type.
Instance (of a Function Copy of the internal data of a function block which persists
Block) from one call to the other. This word is used, by extension, to
say that a program calls a function block instance and not the
function block itself.
Instruction An elementary operation of a program, entered on one line of
text.
Integer (INT) Signed integer 16-bit format. Basic type that can be used to
define a variable, a Parameter (POU) or a Controller.
Internal Attribute of a variable, which is not linked to an I/O module.
Such a variable is called an internal variable (var).
ISaRSI (IsaRSI.exe) Enhanced serial port driver. The network driver
that provides communication with AADvance on a serial port.
Similar to ETCP.
ITA Indicates an array
ITS Indicates a structure
IXLSma Server (IxlSmaServer.exe) Provides service for performing IXL read
operations, using the HSD driver with the SMA method. This
method is independent from the virtual machine cycle and is
thus faster.
Jump For SFC POUs, a graphic component representing a link from
a Transition to a Step (SFC). The graphic symbol of a jump is
an arrow, identified with the reference of the destination step.
For FBD and LD POUs, jumps along with labels are used to
control the execution of a program.
Key Connector The receptacle, a 9-way "D" type socket on the 9100 processor
base unit for the program enable key.
Keyword Reserved identifier of the language.
Label The identifier for an instruction within a program. Labels can
also be used for jump operations.

898 AADvance 2.1 - Glossary


Language Container A workspace enabling the development of graphic or textual
POUs programmed using one of the available programming
languages. Individual language containers can only use one
programming language. When editing a container, the toolbox
displays the corresponding elements for the specific
programming language. The multi-language editor (MLGE)
enables the creation of language containers.
LD Ladder Diagram. Programming language.
LD Action An action where you program an LD diagram in the level 2
window of and SFC program. Possible qualifiers are Action
(N), Reset (R), Set (S), Pulse on Deactivation, and Pulse on
Activation.
See also Action
Level 1 of the SFC Main description of an SFC program. Level 1 groups the chart
(steps and transitions), and the attached comments.
Level 2 of the SFC Detailed description of an SFC program. It is the description of
the actions within the steps, and the boolean conditions
attached to the transitions. Level 2 programming for SFC
elements can be developed with ST or LD or call an SFC child.
Library Special projects made up of controllers in which you define
functions and function blocks for reuse throughout AADvance
projects. Libraries also enable you to modularize projects and
to isolate functions and function blocks so that these can be
validated separately.
Link A graphic component connecting elements in a diagram.
Literal A lexical unit that directly represents a value.
Live Insertion The removal and reinsertion of an electronic module into a
system while the system remains powered. Removal and
reinsertion causes no electrical harm to the system.
Local scope Scope of a declaration applying to only one POU.
Locked I/O Input or output variable, disconnected logically from the
corresponding I/O module, by a "lock" command sent by the
user from the debugger.

AADvance Workbench 899


Long Integer (LINT) Signed integer 64-bit format. Basic type that can be used to
define a variable, a Parameter (POU) or a Controller.
Long Real (LREAL) Type of a variable, stored in a floating IEEE single precision
64-bit format. Basic type that can be used to define a variable,
a Parameter (POU) or a Controller.
Long Word (LWORD) Unsigned long word 64-bit format. Basic type that can be used
to define a variable, a Parameter (POU) or a Controller.
Maximum time Time of the longest cycle since the Virtual Machine has started
the execution of the programs of a controller.
Memory for Retain Run-time setting for a controller indicating the location where
retained values are stored (the required syntax depends on the
implementation).
Message See STRING.
MLGE Multi-language Editor.
Modbus An industry communications protocol, developed by Modicon,
used during communication with external controllers.
Monitoring A process by which the user views virtual machine running
states, target capability, network card status and various online
statistics in a read-only format.
MSI Windows installers (.msi) used to install applications and files
typically used by the end user of the application.
Network The term network is used in different contexts:
- The means of communication between controllers and their
clients.
- For the execution order of graphic programs, a sequence of
connected blocks.
Network Driver "C" code which makes the interface between the Target
network layer and the network.

900 AADvance 2.1 - Glossary


Network Names Network names can have up to 32 characters.
Network names must begin with a letter character followed by
letters, digits, and underscores.
Network names must be unique within the project.
Logical representation of physical network connections
between controllers. Controllers can have multiple networks.
The Workbench network is used by the Workbench for
downloading, debugging, and online changes. Controllers can
have only one connection to the Workbench network.
Non-stored Action A list of statements, executed at each Target cycle, when the
corresponding step is active.
OEM Original Equipment Manufacturer
OEM Parameter Parameters attached to an I/O module. A parameter is
characterized by a type. An OEM parameter is defined by the
designer of the controller. It can be a constant, or a variable
parameter entered by the user during the I/O connection.
Online Mode Mode in which the Application Builder is connected to a target
enabling target management and monitoring. The application
code is executed.
See also Simulation Mode
OPC Object Linking and Embedding for Process Control. A series
of standards specifications supporting open connectivity.
Operator Basic logical operation such as arithmetic, boolean,
comparator, and data conversion.
Output Direction of a variable or an I/O module. An output variable is
connected to an output channel of an output module.
The data passed from the Workbench to the AADvance
controller.
See also Input
Output Parameter Output argument of a function or function block. These
parameters can only be written by a function or function block.
A function has only one output parameter. A parameter is
characterized by a type.

AADvance Workbench 901


Overflow Integer value which corresponds to the number of times the
cycle time has been exceeded. Always 0, if cycle time is 0.
Package The Target Definition Builder enables OEMs to provide
packages containing the drivers of several I/O modules and/or
"C" functions and function blocks available for a specific
target.
Parameter (POU) See Input Parameter, Output Parameter, OEM Parameter, and
Hidden Parameter
Parent Program For SFC, program which controls other programs, called its
children.
See also Child.
Peer-to-Peer One or more Ethernet networks connecting a series of
AADvance or Trusted controllers together enabling
application data to pass between them.
Ping In Modbus communications, sending the diagnostic query data
command over a link and then receiving a a reply ensuring the
link is healthy and the slave can communicate with the master.
No process data is transfered or modified.
Platform Builder Defines, configures and generates the source code making of
the runtime engine. The target will have the proper source
code, the PLC definition will be use by the application builder
to limit or add features, and to generate a report containing a
description of the final product contents. Custom functions,
function blocks, extended data types, field bus drivers, and
comments can be added with the platform builder.
PLC Programmable Logic Controller
Plug-in A module or package integrated into a bigger platform that
enables the extension of the application.
POU Program Organization Unit: set of instructions that are
programs, functions or function blocks.
Power Rail Main left and right vertical rails at the extremities of a ladder
diagram.

902 AADvance 2.1 - Glossary


Processor Base Unit A backplane assembly holding all the processor modules in an
(9100) AADvance controller. The base unit has interfaces for the
power source, Serial and Ethernet communications, the
program security connector, and the Earthing connector.
Processor Module The application execution engine of the AADvance controller,
housed in a self-contained and standardized physical
enclosure.
Producer A controller producing a tag to one or more consumers
requesting one.
Program See POU. A program belongs to a controller. It is executed by
the Virtual Machine, depending on its location (order) in the
controller.
Program Enable Key A security device permitting access to the application in an
AADvance controller.
Project Set of controllers and links between their programs.
Project Updater A program allowing to convert projects developed using
previous versions for use within the latest version. Each time
you upgrade to a newer version, you need to update projects.
PROPI PROPI is an interface enabling you to send commands directly
to AADvance via a custom application. For instance, you
could use the PROPI interface when using AADvance in the
background.
Protocol A set of communication rules used by controllers.
PST Process Safety Time. The process safety time, for the
equipment in use, is the length of time a dangerous condition
can be present before a hazardous event occurs without the
protection of a safety system.
Pulse Action A list of statements executed only once when the
corresponding step is activated.
Qualifier Determines the way the action of a step is executed. The
qualifier can be N, S, R, P0 or P1.
Real Type of a variable, stored in a floating IEEE single precision
32-bit format. Basic type that can be used to define a variable,
a Parameter (POU) or a Controller.

AADvance Workbench 903


Real-time Mode The run time normal execution mode of a controller where
target cycles are triggered by the cycle timing. Another
execution mode for controllers is cycle-to-cycle mode.
Redundancy The use of two or more controllers, each carrying out the same
function, to improve reliability or availability.
Redundant Group A group containing the same type of I/O modules arranged in
parallel for a group of I/O channels. This configuration
increases fault tolerance for I/O data.
Retain Attribute of a variable. The value of a retain variable is saved
by the Virtual Machine at each cycle. The value stored is
restored if the Virtual Machine stops and restarts.
Return Graphic component of a program representing the conditional
end of a program.
Return Parameter See Output Parameter.
Rising Edge A rising edge of a Boolean variable corresponds to a change
from FALSE (0) to TRUE (1).
RTC Internal Real Time Clock
RTU Remote Terminal Unit. The Modbus protocol supported by the
AADvance controller for Modbus communications over serial
links including the ability to multi-drop to multiple slave
devices.
Run-time Engine Solves application logic and drive I/O points. This portable
engine features modular architecture.
Run-time Error Application error detected by the Target system at run time.
Rung Graphic component of a program representing a group of
circuit elements leading to the activation of a coil in an
LD diagram.
Safe State A condition permitting the execution of a process demand. The
safe state is usually applied after the detection of a fault
condition, ensuring the effect of the fault enables rather than
disables a process demand.

904 AADvance 2.1 - Glossary


Safety Accuracy The accuracy of an analog signal guaranteed to have no
dangerous faults. The signal is declared faulty when drifting
outside the safety range.
Safety Critical State A faulted condition preventing the execution of a process
demand.
Scope See Global Scope, Common Scope, Local scope.
Section Program, function and function block sections are where are
localized POU of a controller. POUs located in the Program
section are executed by the Virtual Machine.
Security State The indication of the level of access control that is applied to a
controller, a POU, or a target.
Selection List Also known as a 'combo-box'.
When a selection list is provided for a particular cell, clicking
on its right part (down arrow), displays the available choices.
To make a selection, perform one of the following operations:
- click on the item (use the scroll bar first if the required choice
is not visible)
- move in the list using the cursor keys and press Enter
- type the first letter (if more than one item starts with this
letter, press the letter again to select the next occurrence).
Separator Special character (or group of characters) used to separate the
identifiers in a literal language.
Sequential Program A program that is executed according to the dynamic behavior
of the programming language and SFC languages, and where
the time variable explicitly synchronizes operations.
Server Part of the target that receives requests from IXL to retrieve
information about the controller run by the Virtual Machine.
SFB Indicates a function block
SFC Sequential Function Chart. Programming language.
SFC Action An action with an associated SFC child program. Possible
qualifiers are Action (N), Reset (R), Set (S), Pulse on
Activation Action (P1), and Pulse on Deactivation Action
(P0).
See also Action

AADvance Workbench 905


SFU Indicates a function
Shape The spatial form or appearance of an object.
Short Integer (SINT) Signed integer 8-bit format. Basic type that can be used to
define a Variable, a Parameter (POU) or a Controller.
SIF Safety Instrumented Function. Process control performing
specified functions to maintain a safe state for a process when
detecting unacceptable or dangerous process conditions.
SIL Safety Integrity Level. One of four possible levels, defined in
IEC 61508 and IEC 61511, for specifying the performance
requirements of the safety functions allocated to a
safety-related system. SIL4 has the highest level of safety
integrity while SIL1 has the lowest. For an installation to get a
specific SIL rating, all equipment must meet the defined
requirements.
Simplex Module A processor or I/O module in a single configuration suitable
for non-safety to low demand SIL2 requirements.
Simulation Mode Mode in which virtual machines execute the code of individual
controllers and the Windows platform performs aspects such
as POU execution.
See Debugging
SIT Indicates a Standard IEC 61131 type.
Slice One of the three processor modules inserted on the processor
base unit. The slices can be referred to as Ethernet/serial ports,
as A, B, C, or as 1, 2, 3.
SNCP Safety Network Control Protocol. A safety protocol enabling
AADvance controllers to exchange data. SNCP is a SIL3
certified protocol providing a safety layer for Ethernet
networks.
SNTP Simple Network Time Protocol. A protocol synchronizing the
real time clocks of AADvance controllers, computer systems,
and other devices over Ethernet networks.
Spurious Trip Rate The rate at which an unexpected shutdown occurs due to errors
in the system or environment.

906 AADvance 2.1 - Glossary


ST Structured Text. Programming language.
Standard IEC 61131-3 Boolean (Bool), Short Integer (SINT), Unsigned Short Integer
Types (USINT), BYTE, Integer (INT), Unsigned Integer (UINT),
WORD, Double Integer (DINT), Unsigned Double Integer
(UDINT), Double Word (DWORD), Long Integer (LINT),
Unsigned Long Integer (ULINT), Long Word (LWORD),
Real, Long Real (LREAL), TIME, DATE, STRING.
See also Type.
Statement Basic ST complete operation.
Status Booleans Boolean variable giving the status information about a signal,
process, action, or component. A boolean can be TRUE (1) or
FALSE (0).
Stencil A group of shapes.
Step A basic graphic component of the SFC language representing
a steady situation of the process. A step is referenced by a
name. The activity of a step is used to control the execution of
the corresponding actions.
See also Action.
Step-by-step Mode A mode used while debugging POUs where you set
breakpoints at specific lines of code or rungs causing the
application to stop when reached.
STRING Character string. Basic type that can be used to define a
Variable, a Parameter (POU) or a Controller.
Structure Corresponds to a type which has previously been specified to
be a data structure, i.e. a type consisting of a collection of
named elements (or fields). Each field can be a basic type, a
basic structured type, a structure or an array. A field of a
variable with a structure type is accessible using the following
syntax: VarName.a, VarName.b[3], VarName.c.d
Sub-program A program called by a Parent Program. A sub-program is also
called a Child program. To call sub-programs written in
another language, use a function. A function can be called by
any POU.

AADvance Workbench 907


Symbol Table The file corresponding to the variables and function blocks
defined for a controller. This file is downloaded onto the
target. The symbol table is set to one of two formats: complete
table or reduced table. The complete table contains all defined
variables, whereas, the reduced symbol table only contains the
names of variables having a defined Address cell.
Symbols Monitoring When debugging or simulating, code required to enable
Information graphically displaying the output values of functions and
operators in graphical programs.
Synchronous Data communications term describing a serial transmission
protocol. A pre-arranged number of bits is expected to be sent
across a line each second. To synchronize the sending and
receiving machines, a clocking signal is sent by the
transmitting computer. Synchronous communications do not
use start and stop bits.
See also Asynchronous
System Healthy Processor module status indicator giving the overall system
health. The indicator is GREEN when no faults are detected
and RED when a system, module, or channel fault is detected
in a controller.
System Variable System variables hold the current values of all system
variables for a controller. You can read from or write to system
variables. These variables are defined in the dsys0def.h file.
For example, the current cycle time is a system variable that
can only be read by a program.
TA Termination Assembly
Target The hardware platform onto which you download an
application. Includes characteristics such as the memory
model and variable types.
See also Controller.
Target Definition Builder The Target Definition Builder enables the description of
targets (main definition and options of the embedded
software), complex data types (such as defined in IEC
languages), "C" functions, function blocks and conversion
functions, and I/O modules or network drivers for IXL
communication.

908 AADvance 2.1 - Glossary


Target Device The physical AADvance controller onto which you download
an application.
See also Controller, Target
Target Management Operations that control the application of a target including
downloading, uploading, starting, stopping, and performing
updates.
TCP Transmission Control Protocol. A set of rules used by
applications requiring guaranteed delivery of a stream of bytes
from one controller to another, usually located
elsewhere.Modbus communications over Ethernet use TCP.
TIC Code Target Independent Code produced by the AADvance
compiler for execution on virtual machines.
Timer (TIME) Unit of a timer is the millisecond. Basic type that can be used
to define a Variable, a Parameter (POU) or a Controller.
TMR Triple Modular Redundant. A fault tolerant arrangement in
which three systems (modules) complete a process and the
result is determined by a voting system to provide one output.
See also Triplicated Module
Token (SFC) Graphical marker used to show the active steps of an SFC
program.
Tool Window A standard Microsoft Windows control that enables
application creation and editing.
Toolbox The utility containing the elements and shapes available for
language containers. The available elements differ for the
individual programming languages.
Top Level Program Program put at the top of the hierarchy tree. A top level
program is activated by the system.
See also Parent Program
Transition A basic graphic component representing the condition
between different steps. A transition is referenced by a name.
A boolean condition is attached to each transition.
Trigger Cycles Controller property indicating whether a controller cycle
executes according to a defined cycle timing.

AADvance Workbench 909


Triplicated Module One of three processors or I/O modules arranged in parallel
configuration. The parallel arrangement enables three paths for
command signals and I/O data and increases their fault
tolerance.
Type Data types are defined for many items in AADvance projects:
- variables
- function or function block parameters
- I/O module
See also Standard IEC 61131 Types, User Types.
Undeclared Array An undeclared array is defined as a variable in a dictionary
instance. See also Declared Array
Unsigned Double Integer Unsigned double integer 32-bit format. Basic type that can be
(UDINT) used to define a variable, a Parameter (POU) or a Controller.
Unsigned Integer (UINT) Unsigned integer 16-bit format. Basic type that can be used to
define a variable, a Parameter (POU) or a Controller.
Unsigned Long Integer Unsigned integer 64-bit format. Basic type that can be used to
(ULINT) define a variable, a Parameter (POU) or a Controller.
Unsigned Short Integer Unsigned integer 8-bit format. Basic type that can be used to
(USINT) define a Variable, a Parameter (POU) or a Controller.
User Data User Data are any data of any format (file, list of values) which
have to be merged with the generated code of the controller in
order to download them into the target PLC. Such data are not
directly operated by the Virtual Machine and is commonly
dedicated to other software installed on the target PLC.
User Types Types that the user can define using basic types or other user
types. User types can be arrays or structures.
User-Defined Function A custom function block. You create user-defined function
Block blocks in the Function Blocks section for a controller.
Validity of a Transition Attribute of a Transition. A transition is validated (or enabled)
when all the preceding steps are active.
Variable Unique identifier of elementary data which is used in the
programs of a Project.

910 AADvance 2.1 - Glossary


Variable Group Grouping of variables enabling managing and logically sorting
these within a controller. Variable groups are displayed in the
dictionary’s variables tree.
Variable Name A unique identifier, defined in AADvance, for a storage
location containing information used in exchanges between
controllers.
Version Control A tool that manages the changing versions of AADvance
elements including projects, I/O modules, controllers, and
POUs by saving them to a version control database. Saving
these elements to a control database enables you to retrieve
older versions of the elements at a later time.
Virtual Machine (IsaVM.exe) The instantiation of a controller on a Target
executing the previously downloaded application.
Voting System A redundant system (m out of n) requiring at least m of the n
channels to be in agreement before the system can take action.
Wiring The property of a variable indicating the I/O channel to which
the variable is wired.
WORD Unsigned word 16-bit format. Basic type that can be used to
define a variable, a Parameter (POU) or a Controller.
Workstation A communication pathway to external systems and third party
tools connected across the field bus.
Write Protected The indication of whether the variable can be written.
Available for coils and holding registers. The default value is
FALSE.

AADvance Workbench 911


912 AADvance 2.1 - Glossary
Licensing
AADvance enables the creation of virtual machines running on hardware components, called
targets.

AADvance is available for use with three types of software licenses:

Demo License, delivered with the product and available for testing the product. This is a
30-day trial of the fully operational version of AADvance.

Single Controller License, obtained by manually activating an unlicensed version of the


product. The Single Controller License is a fully operational version of the product
enabling the creation of projects containing one controller. Existing projects having more
that one controller cannot be opened with this licensed version of the product.

Full License, obtained by manually activating an unlicensed version of the product. The
Full License is a fully operational version of the product enabling the creation of projects
containing multiple controllers.

The obtained license is specific to a computer. The Single Controller or Full license persists
through all uninstall and reinstall operations. To move the license to another computer, contact
the support team to remove the license and then re-authorize it on a different computer.

To obtain an authorized Single Controller or Full license

After the Demo License has expired, you must obtain a Single Controller or Full license to
continue using the AADvance Workbench.

1. From the Help menu, click License Info.

The licensing information for the AADvance 2.1 Workbench is displayed along with
three User Codes.

2. Send an e-mail containing the required license type and all three User Codes to the
support team:
keymaster@ra.rockwell.com

3. The support team will email you back Registration Keys 1 and 2.

AADvance Workbench 913


4. Insert the registration keys in their respective fields and click Validate.

Note that the User Codes may have changed since they were last displayed; the
Registration Keys returned by the support team will be invalid. You must request new
Registration Keys by sending the displayed User Codes.

The AADvance Workbench is licensed.

To remove an authorized license

1. From the Help menu, click License Info.

The licensing for the AADvance 2.1 Workbench is displayed along with three User
Codes.

2. Send an email containing all three user codes to the support team:
keymaster@ra.rockwell.com

3. The support team will email you back Registration Keys 1 and 2.

4. Insert the registration keys in their respective fields and click Validate.

A confirmation code appears.

5. Send an email containing the confirmation code to the support team:


keymaster@ra.rockwell.com

The AADvance Workbench is no longer licensed.

914 AADvance 2.1 - Licensing


Index

access control, setting passwords for elements


Symbols 212
accessing
- operator 786 licensing 913
* operator 779 projects 28
/ operator 767 repositories 28
+ operator 742 repository projects 28
< operator 775 toolbox, the 51
<= operator 777 values of system variables for controllers
<> operator 783 250
= operator 769 ACOS function 792
> operator 771 action blocks
>= operator 773 coding for SFC steps 690
deleting 690
activating
licensing 913
Numerics active files, navigating and managing 113
1 gain operator 741 active POU documents, zooming the contents of
104
add
I/O module 431
A add-ins
defining behavior for loading 99
aadvance discover 521
manager, accessing the 99
AADvance, tools and windows in 5
adding
AADvDiscover 521
controllers to projects 184
ABS function 791
dependencies variables to the spy list 43

AADvance Workbench 915


elements and libraries in the application view ANY_TO_ULINT operator 763
287 ANY_TO_USINT operator 765
function blocks 198 ANY_TO_WORD operator 766
functions 194 application
programs to controllers 191 clearing from controllers 238
addition operator 742 application view, managing elements in the 287
advanced settings applications
custom shutdown value 498 monitoring variable values while connected
disable line test 485 or simulating 249
fail-safe guard band 498 running, online 228
shutdown state 485, 498 simulating 244
alarms management, LIM_ALRM function block archiving
862 projects 28
analog inputs 454 archiving projects for version control 26
channels 455 arithmetic operations
faulted state 455 1gain operator 741
HART Pass-Through 465 ABS function 791
analog outputs 492 ACOS function 792
advanced settings 498 addition operator 742
channels 493 ASIN function 795
faulted state 493 ATAN function 796
HART Pass-Through 506 COS function 798
analoginputs division operator 767
threshold values 474 EXPT function 802
AND operator 744 LOG function 810
AND, simultaneous convergences 687 MOD function 817
AND_MASK function 793 multiplication operator 779
ANY_TO_BOOL operator 745 NEG operator 781
ANY_TO_BYTE operator 746 POW function 825
ANY_TO_DATE operator 747 RAND function 826
ANY_TO_DINT operator 748 SIN function 838
ANY_TO_DWORD operator 749 SQRT function 839
ANY_TO_INT operator 750 subtraction operator 786
ANY_TO_LINT operator 751 TAN function 841
ANY_TO_LREAL operator 753 TRUNC function 842
ANY_TO_LWORD operator 754 arranging tool and document windows 109
ANY_TO_REAL operator 756 arrays
ANY_TO_SINT operator 757 basic or derived types of 737
ANY_TO_STRING operator 758 creating 265
ANY_TO_TIME operator 760 defining from the parameters view 737
ANY_TO_UDINT operator 761 deleting 265
ANY_TO_UINT operator 762 editing 265

916 AADvance 2.1 - Index


filtering in the grid 265 inserting from the block library 13
sorting in the grid 265 inserting in function block diagrams 549
arrays grid, customizing color options for 152 parallel, inserting 590
ASCII function 794 setting type of 590
ASIN function 795 BOOL
assignment, ST basic statement 636 data type 722
ATAN function 796 variables and literal expressions 722
attributes, variables 715 boolean
auto hide tool windows 109 action in steps in SFC 692
aux 39 boolean operations
AVERAGE function block 846 AND operator 744
F_TRIG function block 858
NOT operator 782
ODD function 823
B OR operator 785
battery alarm 394 R_TRIG function block 864
binary operations RS function block 865
AND_MASK function 793 SR function block 869
NOT_MASK function 822 XOR operator 788
OR_MASK function 824 branches
ROL function 832 for LD 616
ROR function 833 inserting 616
SHL function 835 breakpoints
SHR function 836 setting and removing, in SFC 671
XOR_MASK function 843 setting on step activation (SFC) 672
bindings setting on step deactivation (SFC) 673
communication port 517 setting on transition (SFC) 675
defining 342 types of, for SFC 671
links between controllers 348 browser, cross reference 283
variable, mapping 354 building
BLINK function block 848 projects 224
block library 13 buttons
setting display options for 150 modifying for for toolbar commands 117
block selector BYTE
displaying parameters in the 70 data type 724
filtering and sorting 67 variables and literal expressions 724
blocks
EN and ENO parameters 590
EN output 590 C
ENO output 590
for LD 590 calling
inserting 590 function blocks 711

AADvance Workbench 917


function blocks from transitions in SFC 701 changing types of in LD 595
functions 710 direct type in FBD 564
functions from transitions 700 direct type in LD 598
CASE, OF, ELSE, END_CASE, ST basic inserting in FBD 562
statements 637 inserting in LD 595
channels parallel, inserting in FBD 562
analog outputs 493 parallel, inserting in LD 595
CHAR function 797 pulse falling edge (positive) 601
checking in elements to version control 19 pulse rising edge (positive) 600
checking out elements from version control 21 reset in FBD 567
checking out, undoing for elements from version reset in LD 603
control 22 reverse type in FBD 565
child of an SFC program 668 reverse type in LD 599
child SFC POUs 669 set in FBD 566
CIP set in LD 602
communication port 517 usage and available types for FBD 562
consume links 362 usage and available types for LD 595
consumer variables 364 colors
produce link 359 arrays grid, options for the 152
producer variables 360 defined words grid, options for the 153
using over Ethernet/IP 357 dictionary, options for the 154
cleaning parameters grid, options for the 155
setting the option for 148 structures grid, options for the 156
cleaning projects 227 variable groups view, options for 157
clearing variable selector, options for the 158
applications from controllers 238 columns
transitions 676 arranging, filtering, and sorting in the spy list
client 89
configuring controllers as SNTP 333 commands
client and server modifying images for 117
configuring controllers as SNTP 339 comments
CMP function block 849 defining in LD 587
code format menu options for text (FBD) 575
generating 223 format menu options for text (LD) 587
verifying compilation of 81 inserting in FB diagrams 575
code generation, methods of 223 communication ports 517
coding communication view 291
conditions for transitions in SFC 697 communications
coding action blocks for SFC steps 690 workbench and OPC 322
coherency of controller code 229 comparators
coils CMP function block 849
changing types of in FBD 562 comparison operations

918 AADvance 2.1 - Index


equal operator 769 parallel, inserting in LD 604
greater than operator 771 pulse falling edge (positive) in FBD 573
greater than or equal operator 773 pulse falling edge (positive) in LD 610
less than operator 775 pulse rising edge (positive) in FBD 572
less than or equal operator 777 pulse rising edge (positive) in LD 609
not equal operator 783 reverse in FBD 571
compiler verification 81 reverse in LD 608
conditions usage and available types in FBD of 568
coding for SFC transitions 697 usage and available types of in LD 604
configuring control
controllers as SNTP client 333 archiving and restoring projects for version
controllers as SNTP client and server 339 26
controllers as SNTP server 336 checking in elements to version 19
ethernet forwarding 521 checking out elements from version 21
HART for analog inputs 459 getting latest versions of elements from
HART for analog outputs 500 version 24
HART for Pass-Through communication labeling elements for version 25
(AI) 465 managing repositories for version control 15
HART for Pass-Through communication managing version 15
(AO) 506 publishing libraries to version 30
I/O modules 435 refreshing the control status for 35
network firewall 517 reviewing pending checkins, version 23
process safety time 435 status of elements for version 15
PST 435 undoing check outs of elements from version
resource number 521 22
serial ports 329 viewing and retrieving from history, version
serial tunneling 340 33
connected control booleans 411, 414
monitoring variable values while 249 control integers 411, 412
connecting AUX LED color 412
controllers, with 239 control processor variables 411
connection, viewing and unlocking locked control variables 397
variables 49 controller 394
consume links, CIP 362 variables, global for a 202
contacts controllers
changing type of 568 accessing values for system variables 250
changing type of in LD 604 adding to projects 184
direct in FBD 570 clearing an application 238
direct in LD 607 configuring as SNTP client 333
inserting 568 configuring as SNTP client and server 339
inserting in LD 604 configuring as SNTP server 336
parallel, inserting 568 configuring serial tunneling 340

AADvance Workbench 919


connecting, locking, and unlocking 239 cyclic operations 708
disconnecting from 243 cyclic programs, SFC 664
links between for bindings 348
managing in projects 184
modifying cycle timing for 241
pausing during simulation 246 D
performing updates for 230 data blocks 376
running applications online 228 data variables 386
simulating running applications 244 data conversion
starting 236 ANY_TO_BOOL operator 745
stopping 236 ANY_TO_BYTE operator 746
controllers, accessing status information for 37 ANY_TO_DATE operator 747
conventions and limitations 254 ANY_TO_DINT operator 748
COS function 798 ANY_TO_DWORD operator 749
counters ANY_TO_INT operator 750
CTD function block 851 ANY_TO_LINT operator 751
CTU function block 853 ANY_TO_LREAL operator 753
CTUD function block 854 ANY_TO_LWORD operator 754
creating ANY_TO_REAL operator 756
arrays 265 ANY_TO_SINT operator 757
defined words 271 ANY_TO_STRING operator 758
passwords for elements 212 ANY_TO_TIME operator 760
passwords for targets 215 ANY_TO_UDINT operator 761
projects 180 ANY_TO_UINT operator 762
structures 268 ANY_TO_ULINT operator 763
toolbars 116 ANY_TO_USINT operator 765
variables 274 ANY_TO_WORD operator 766
variables using quick declaration 281 data manipulation
cross reference browser AVERAGE function block 846
accessing 283 LIMIT function 809
toolbar 283 MAX function 811
CTD function block 851 MIN function 814
CTU function block 853 MUX4 function 818
CTUD function block 854 MUX8 function 820
CURRENT_ISA_DATE function 799 SEL function 834
custom shutdown value 498 data types 444
customizing BOOL 722
dictionary instance grid, a 263 BYTE 724
error list, the 107 DATE 734
toolbars 115 DINT 727
cycle timing DWORD 728
modifying for controllers 241 INT 725

920 AADvance 2.1 - Index


LINT 729 action blocks 690
LREAL 732 arrays 265
LWORD 730 controllers from projects 184
REAL 731 defined words 271
SINT 723 elements 8
specifying numerical display of, when elements in the application view 287
monitoring 149 function blocks 198
STRING 735 functions 194
TIME 733 passwords for elements 212
types of 719 passwords for targets 215
UDINT 728 programs from controllers 191
UINT 726 structures 268
ULINT 730 variables 274
USINT 724 dependencies, viewing for variables 43
WORD 726 DERIVATE function block 856
data variables 386 derived types
DATE arrays 737
data type 734 structures 738
variables and literal expressions 734 description window, accessing instances of the
DCP 177
communication port 517 development environment
debug mode, starting and stopping debugging 633 tabs and windows options in the 144
debugging development environment, navigating in the 113
debug information, generating for ST POUs device type manager 465, 506
633 diagram format
debug mode 633 main, FBD 542
LD programs 581 dictionary
SFC programs 671 accessing instances for dependencies
ST programs 633 variables 43
stepping in code 581 accessing instances of the 263
stepping into code 581 arranging columns in the 263
declared instances, creating and inserting 67 arrays grid of the 265
default file system paths 262 customizing color options for 154
defined words 718 defined words grid, the 271
managing, in the grid 271 setting display colors in the 263
sorting and filtering, in the grid 271 structures grid 268
defined words grid, customizing color options for variables grid of the 274
153 digital inputs 445
defining channels 446
peer list 374 faulted state 446
DELETE function 800 threshold values 450
deleting digital outputs 478

AADvance Workbench 921


advanced settings 485
channels 479 E
faulted state 479
protection 479 editing
variables 487 arrays 265
DINT defined words 271
data type 727 passwords for elements 212
variables and literal expressions 727 passwords for targets 215
direct structures 268
coils in FBD 564 variables 274
coils in LD 598 elementary IEC 61131 types, available for
contacts in FBD 570 programming 720
contacts in LD 607 elements
direction, variables 715 available for LD containers 585
directly represented variables 716 basic, for ST 635
disable line test 485 initial steps and steps in SFC 679
disconnecting jumps in SFC 688
controllers, from 243 managing in language containers 8
display mode, block library 150 managing in the application view 287
display settings selection convergences in SFC 685
FBD diagrams 160 selection divergences in SFC 683
LD diagrams 164 sequence controls in SFC 682
SFC diagrams 167 SFC programs 677
ST diagrams 171 simultaneous convergences in SFC 687
division operator 767 simultaneous divergences in SFC 686
docking tool and document windows 109 transitions 681
document options 535 used in FBD 547
document overview, zooming in the workspace 7 enabling
document windows, arranging 109 HART Pass-Through in the controller 465,
documentat generator 535 506
documentation environment options, modifying 136
generating 535 environment settings
dongle detected 403 managing 121
downloading, code to targets 229 equal operator 769
dragging equipment view 391
variables from the dictionary 274 error list
DTM 465, 506 displaying the 107
DWORD hiding, resizing, and arranging columns in
data type 728 the 107
variables and literal expressions 728 sorting errors in the 107
dynamic behavior for SFC POUs 664 using the 107
errors

922 AADvance 2.1 - Index


generated during syntax verification 226 contacts, usage and available types of 568
ethernet 1 39 debugging 546
ethernet 2 39 direct coils 564
Ethernet ports, defining 294 direct contacts 570
eurocard 394 elements 547
execution behavior, SFC language 666 execution order 544
execution control jumps to labels, inserting 556
cycle timing 712 labels,inserting 554
steps for 712 left power rails, inserting 560
updating variables 712 main diagram format 542
execution, of functions 710 pulse falling edge (negative) contacts 573
execution rules, for controller cycles 712 pulse rising edge (positive) contacts 572
EXIT, ST basic statement 638 reset coils 567
exporting returns, inserting 558
environment settings 122 reverse coils 565
variables 217 reverse contacts 571
expressions right power rails, inserting 561
finding using 76 rungs, inserting 559
in ST programs 630 set coils 566
replacing using 78 variables, inserting 551
EXPT function 802 vertical bars, inserting 553
extensions in ST (structured text) 647 file system paths, default 262
external tools filtering
adding 101 arrays in the grid 265
defining working directories and shortcuts blocks list, the 67
for 101 defined words 271
handling arguements using 101 structures in the grid 268
variables 274
find and replace
possible operations for 75
F find and replace utility, the
F_TRIG function block 858 defining display settings for 138
FactoryTalk AssetCentre 465, 506 FIND function 803
fail-safe guard band 498 finding
faulted status, controller 37 strings or expressions 76
FBD (Function Block Diagram) wildcards or regular expressions, using 76
customizing display settings for 160 focus box, zooming in the workspace 7
regions, inserting 574 FOR, TO, BY, DO, END_FOR, ST basic
FBD (function block diagram) statement 639
blocks, inserting 549 force 39
coils, usage and available types of 562 forcing
comments, inserting 575 clearing transitions 676

AADvance Workbench 923


format menu ACOS 792
formatting text in FBD comments 575 adding 194
full screen, expanding the workspace 7 AND_MASK 793
function block diagram (FBD), programming ASCII 794
language 541 ASIN 795
function blocks ATAN 796
adding 198 calling 710
AVERAGE 846 calling from ST programs 631
BLINK 848 calling from transitions 700
calling 711 CHAR 797
calling from ST programs 632 COS 798
calling from transitions 701 CURRENT_ISA_DATE 799
CMP 849 DELETE 800
creating declared instances of 67 deleting 194
CTD 851 execution of 710
CTU 853 EXPT 802
CTUD 854 FIND 803
deleting 198 INSERT 805
DERIVATE 856 LEFT 807
F_TRIG 858 LIMIT 809
HYSTER 859 LOG 810
inserting in FB diagrams 549 MAX 811
INTEGRAL 860 MID 812
KvbConsNetStatus 878 MIN 814
KvbProdNetStatus 880 MLEN 815
LIM_ALRM 862 MOD 817
Matherr 882 MUX4 818
ModbusServiceStatus 883 MUX8 820
naming and parameters for 711 naming and parameters 710
R_TRIG 864 NOT_MASK 822
renaming 198 ODD 823
RS 865 OR_MASK 824
SIG_GEN 867 POW 825
SoeServiceStatus 884 RAND 826
SR 869 renaming 194
STACKINT 871 REPLACE 828
summary of 845 RIGHT 830
TOF 873 ROL 832
TON 874 ROR 833
TP 875 SEL 834
functions SHL 835
ABS 791 SHR 836

924 AADvance 2.1 - Index


SIN 838 hardware redundancy 391
SQRT 839 HART 459, 500
SUB_DATE_DATE 840 HART passthrough 414
summary of 789 healthy 39
TAN 841 healthy status, controller 37
TRUNC 842 hierarchy of programs 708
XOR_MASK 843 history
viewing for elements in version control 33
HYSTER function block 859

G
gateway 521 I
generate documentation 535
generating identifiers, using defined words as 718
documentation 535 IEC languages, customizing display options for
generating documentation 535 159
getting latest versions of elements 24 IF, THEN, ELSE, ELSIF, END_IF, ST basic
GFREEZE statement 650 statements 641
GKILL statement 652 importing
glossary of terms 887 environment settings 125
gotolink io_modules 894 projects from previous versions 180
graphic languages variables 217
in programs 708 initial steps
SFC (sequential function chart) 663 inserting in SFC 679
greater than operator 771 input voting 391
greater than or equal operator 773 insert empty slot 431
grids INSERT function 805
spy list 89 inserting
grids, setting color options for 151 blocks from the block library 13
groups blocks in function block diagrams 549
controller variables, for 202 comments (FBD elements) 575
GRST statement 656 elements, blocks, and identifiers 8
GSTART statement 648 initial steps and steps in SFC 679
GSTATUS statement 654 jumps in SFC 688
jumps to labels (FBD elements) 556
labels (FBD elements) 554
left power rails (FBD elements) 560
H regions (FBD elements) 574
hardware equipment returns (FBD elements) 558
clearing applications from 238 right power rails (FBD elements) 561
connecting with 239 rungs (FBD elements) 559
disconnecting from 243 sequence controls in SFC 682

AADvance Workbench 925


transitions 681
variables (FBD elements) 551 L
vertical bars (FBD elements) 553
installing labeling elements for version control 25
AADvance HART DTM 465, 506 labels
instances, declared 67 defining in LD 587
INT inserting in FB diagrams 554
data type 725 language containers, editing the contents of 8
variables and literal expressions 725 language editor
INTEGRAL function block 860 tasks using the 7
IP address 521 latest version of elements, getting 24
LD (Ladder Diagram)
customizing display settings for 164
selecting LD elements 618
J LD (ladder diagram)
jumps blocks 590
for LD diagrams 611 branches 616
in SFC programs 688 coils, usage and available types of 595
inserting in FB diagrams 556 comments 587
ladder diagrams, inserting 611 conditions for transitions in SFC 699
contacts, usage and available types of 604
debugging 581
direct coils 598
K direct contacts 607
jumps 611
keyboard shortcuts labels 587
accessing windows 132 pulse falling edge (negative) coils 601
defining for external tools 101 pulse falling edge (negative) contacts 610
development environment 132 pulse rising edge (positive) coils 600
FBD language 576 pulse rising edge (positive) contacts 609
getting help 132 reset coils 603
LD language 620 return statements 614
managing 140 reverse coils 599
navigating in the development environment reverse contacts 608
132 rungs, inserting 587
saving and closing 132 set coils 602
SFC language 702 LD containers, available elements for 585
ST language 658 LEFT function 807
keywords, list of reserved 713 left power rails, inserting in FB diagrams 560
KvbConsNetStatus function block 878 less than operator 775
KvbProdNetStatus function block 880 less than or equal operator 777
libraries

926 AADvance 2.1 - Index


creating, for use with projects 204 locked variables, viewing and unlocking while
effect of target types on 204 connected 49
publishing to version control 30 locking controllers 239
templates available for 204 LOG function 810
library LREAL
block, setting display mode 150 data type 732
library, block 13 variables and literal expressions 732
licensing LWORD
activating and removing 913 data type 730
LIM_ALRM function block 862 variables and literal expressions 730
LIMIT function 809
links
between controllers for bindings 348
LINT M
data type 729 MAC address 521
variables and literal expressions 729 manager, add-ins
literal expressions defining behavior for loading 99
BOOL 722 managing
BYTE 724 block library, the 13
DATE 734 controllers in projects 184
DINT 727 elements using version control 15
DWORD 728 environment settings 121
INT 725 keyboard shortcuts 140
LINT 729 toolbox, the 51
LREAL 732 manipulating
LWORD 730 toolbox, the 51
REAL 731 manually setting the real time clock 417
SINT 723 mapping
STRING 735 CIP consumer variables 364
TIME 733 CIP producer variables 360
UDINT 728 OPC variables 323
UINT 726 SOE variables 326
ULINT 730 variable bindings 354
USINT 724 master, defining Modbus 304
WORD 726 master slave, defining Modbus 310
literal languages, in programs 708 Matherr function block 882
literal values 60 MAX function 811
local variables and parameters MID function 812
managing for user-defined blocks 71 MIN function 814
locked variables mixed 394
enabling prompts when monitoring 149 MLEN function 815
MOD function 817

AADvance Workbench 927


Modbus newlink system_security 515
communication port for the slave 517 non-stored action in steps in SFC 694
master, defining 304 not equal operator 783
master slave, defining 310 NOT operator 782
slave, defining 302 NOT_MASK function 822
ModbusServiceStatus function block 883 number of locked input variables 401
mode number of locked output variables 401
setting block library display 150 numerical display settings, when monitoring 149
monitoring
options for prompts and variables 149
monitoring values of variables, connected or
simulating 249 O
move ODD function 823
I/O module 431 offline grid settings for spy lists 174
moving elements in language containers 8 online
multicast 366, 374 connecting,locking, and unlocking
multiplication operator 779 controllers 239
MUX4 function 818 disconnecting from controllers 243
MUX8 function 820 modifying cycle timing for controllers 241
online applications
monitoring variable values of 249
N running 228
online grid settings for spy lists 174
naming OPC communications 322
conventions 254 OPC variables, mapping 323
limitations 254 opening
naming conventions projects 210, 211
defined words 718 operators
directly represented variables 716 1 gain 741
function blocks 711 addition 742
functions 710 AND 744
variables 715 ANY_TO_BOOL 745
navigating, between active files 113 ANY_TO_BYTE 746
NEG operator 781 ANY_TO_DATE 747
network firewall 517 ANY_TO_DINT 748
network ID 369 ANY_TO_DWORD 749
network interface 370 ANY_TO_INT 750
network share 28 ANY_TO_LINT 751
newlink defining_the_quality_of_service 388 ANY_TO_LREAL 753
newlink ANY_TO_LWORD 754
managing_variables_from_the_variable_select ANY_TO_REAL 756
or 59 ANY_TO_SINT 757

928 AADvance 2.1 - Index


ANY_TO_STRING 758
ANY_TO_TIME 760 P
ANY_TO_UDINT 761
ANY_TO_UINT 762 P2P 366
ANY_TO_ULINT 763 parallel branches for LD diagrams 616
ANY_TO_USINT 765 parameter view
ANY_TO_WORD 766 accessing 549, 590
division 767 parameters
equal 769 defining arraysfrom the list 737
greater than 771 defining for FB diagrams 549
greater than or equal 773 defining in LD using the parameter view 590
less than 775 for function blocks 711
less than or equal 777 of functions 710
multiplication 779 parameters and local variables
NEG 781 managing for user-defined blocks 71
NOT 782 parameters, displaying when selecting blocks 70
not equal 783 parameters grid, customizing color options for
OR 785 155
subtraction 786 parent of an SFC program 668
summary of 739 parentheses in ST programs 630
XOR 788 password
options creating, deleting, for elements 212
behavior at startup 143 creating, deleting, for targets 215
grids, accessing 151 password protected 515
IEC languages, customizing display settings pausing projects and controllers during simulation
for 159 246
projects, default locations and behaviors 146 peer ID 369
saving settings files 139 peer list 374
setting block library display mode 150 peer-to-peer 366
tabs and windows in the development communication port 517
environment 144 configuring data blocks 376
workbench environment, accessing for the configuring network ID 369
136 configuring peer ID 369
OR operator 785 configuring subnet ID 369, 370
OR_MASK function 824 data variables 386
output voting 391 enable controller 370
output window master/slave 370
reviewing status messages and managing pending checkins, reviewing 23
contents of 105 ports
defining Ethernet 294
serial, configuring 329
POUs

AADvance Workbench 929


inserting from the block library 13 opening 210, 211
POW function 825 pausing during simulation 246
priority 388 rebuilding 224
of applications 388 setting the option for cleaning 148
process control properties window
DERIVATE function block 856 accessing the 47
HYSTER function block 859 editing in the 47
INTEGRAL function block 860 toolbar 47
STACKINT function block 871 protecting
process safety time 394 network ports 517
processor module 24v1 power feed health 403 PST 394
processor module 24v2 power feed health 403 publishing libraries to version control 30
processor module health 403 pulse
processor module NVRAM battery health 403 action in steps in SFC 693
processor module online 403 pulse falling edge (negative)
processor module ready 403 coils 601
processor module temperature 401 contacts in FBD 573
processor variables contacts in LD 610
control 397, 411 pulse rising edge (positive)
RTC 397 coils 600
status 397, 399 contacts in FBD 572
produce link, CIP 359 contacts in LD 609
programs
adding to controllers 191
deleting from controllers 191
hierarchy of 708 Q
languages used in 708 QoS 388
naming conventions for 708 quality of service 388
renaming 191 quick declaration 60
sequential and cyclic operations in 708 quick declaration, creating variables using 281
verifying syntax for 226
project architecture, execution rules for cycles
712
projects R
accessing 28
building 224 R_TRIG function block 864
cleaning 227 RAND function 826
creating 180 ready 39
creating libraries for use with 204 REAL
defining default options for components 146 data type 731
downloading code to targets 229 variables and literal expressions 731
importing from previous versions 180 real time clock 417
rebuilding

930 AADvance 2.1 - Index


projects 224 for LD diagrams 614
reconnecting, to a repository after working offline for ST 644
31 inserting 614
reference, cross 283 return symbols, inserting in FB diagrams 558
refresh timeout 370 reverse
refreshing coils in FBD 565
control status for version control, the 35 coils in LD 599
regions contacts in FBD 571
inserting in FB diagrams 574 contacts in LD 608
remove reviewing pending checkins for version control
I/O module 431 23
removing RIGHT function 830
licensing 913 right power rails, inserting in FB diagrams 561
renaming ROL function 832
controllers 184 ROR function 833
elements in application view 287 rows
function blocks 198 variable groups view, customizing display in
functions 194 157
programs 191 RS function block 865
REPEAT, UNTIL, END_REPEAT, ST basic RSLogix 5000 357
statements 643 rtc control
REPLACE function 828 day of month 425
replacing hours 425
strings or expressions 78 milliseconds 425
wildcards or regular expressions, using 78 minutes 425
repositories month 425
defining for version control 18 rtc read 425
transferring 28 rtc write 425
repository seconds 425
working offline and reconnecting to a 31 year 425
reserved keywords, list of 713 rtc control variables 417, 425
reset coil in FBD 567 rtc processor variables 417
reset coil in LD 603 rtc program
resetting day of month 422
environment settings 129 hours 422
resizing elements 8 milliseconds 422
response timeout 370 minutes 422
restoring month 422
projects 28 seconds 422
restoring projects for version control 26 year 422
retrieving specific versions, version control 33 rtc program variables 417, 422
return statements rtc status

AADvance Workbench 931


day of month 419 set coil in LD 602
hours 419 set system health alarm 414
milliseconds 419 setting passwords
minutes 419 for elements in the application view 212
month 419 for targets in the application view 215
seconds 419 settings
year 419 exporting environment 122
rtc status variables 417, 419 importing environment 125
RTC variables 397 managing environment 121
rules for variables 715 reverting environment 129
run 39 settings files, options for saving 139
rungs SFC (Sequential Function Chart)
inserting 587 customizing display settings for 167
inserting in FB diagrams 559 SFC (sequential function chart)
labels, defining 587 actions in steps 695
running boolean actions in steps 692
applications online, possible tasks 228 breakpoints, managing in 671
breakpoints on step activation, setting 672
breakpoints on step deactivation, setting 673
breakpoints on transition, setting 675
S calling function blocks from transitions 701
scope of variables 715 calling functions from transitions 700
searching_in_the_development_environment 112 child and parent programs in 668
SEL function 834 child POUs in 669
selecting coding action blocks for steps 690
LD elements in LD POUs 618 coding conditions for transitions 697
variables 55 coding conditions for transitions in
selecting blocks, displaying parameters when 70 structured text 698
selecting elements in language containers 8 debugging programs in 671
selection convergences in SFC programs 685 dynamic behavior and memory allocation for
selection divergences in SFC programs 683 POUs 664
sequential programs 708 elements available for programs 677
sequential programs, SFC 664 format and program types 664
serial 1 39 GFREEZE statement in actions 650
serial 2 39 GKILL statement in actions 652
serial ports, configuring 329 GRST statement in actions 656
serial tunneling GSTART statement in actions 648
communication port 517 GSTATUS statement in actions 654
serial tunneling, configuring 340 initial steps and steps 679
server jumps 688
configuring controllers as SNTP 336 language 663
set coil in FBD 566 non-stored actions in steps 694

932 AADvance 2.1 - Index


program hierarchy for POUs 668 SOE variables, mapping 326
pulse actions in steps 693 SoeServiceStatus function block 884
selection convergences in 685 sorting
selection divergences in 683 arrays in the grid 265
sequence controls, inserting 682 block library, the 13
simultaneous convergences 687 blocks list, the 67
simultaneous divergences 686 defined words 271
stages of SFC execution behavior 666 errors 107
SFC language structures in the grid 268
keyboards shortcuts for 702 variables 274
SFC programs spy list
transitions 681 accessing a 89
shared network 28 adding dependencies variables to the 43
SHL function 835 creating and saving lists 89
shortcuts, keyboard managing items in lists 89
managing 140 managing the grid 89
SHR function 836 spy lists, defining offline and online grid settings
shutdown state 485, 498 for 174
SIG_GEN function block 867 SQRT function 839
signal generation SR function block 869
BLINK function block 848 ST (Structured Text)
SIG_GEN function block 867 customizing display settings for 171
simulating ST (structured text)
applications 244 assignment basic statements for 636
simulation basic elements and statements 635
pausing projects and controllers during 246 calling function blocks from 632
simultaneous convergences in SFC programs 687 calling functions from 631
simultaneous divergences in SFC programs 686 CASE, OF, ELSE, END_CASE basic
SIN function 838 statements for 637
SINT conditions for transitions in SFC programs
data type 723 698
variables and literal expressions 723 debugging programs 633
slave, defining Modbus 302 EXIT basic statements for 638
slave transmit timeout 370 expressions and parentheses in 630
SNTP extensions for SFC child execution 647
communication port 517 FOR, TO, BY, DO, END_FOR basic
SNTP client and server, configuring controllers as statements for 639
339 IF, THEN, ELSE, ELSIF, END_IF basic
SNTP client, configuring controllers as 333 statements for 641
SNTP server, configuring controllers as 336 main syntax of programs in 626
SOE REPEAT, UNTIL, END_REPEAT basic
communication port 517 statements for 643

AADvance Workbench 933


return basic statements for 644 CHAR function 797
WHILE, DO, END_WHILE basic DELETE function 800
statements for 646 FIND function 803
STACKINT function block 871 INSERT function 805
standard 394 LEFT function 807
starting MID function 812
controllers 236 MLEN function 815
startup options 143 REPLACE function 828
statements, basic, for ST 635 RIGHT function 830
status strings
controller connections, of 239 finding 76
elements using version control, of 15 replacing 78
status booleans 399, 403 structure
group field power health 489 data types 444
status information, accessing for controllers 37 structures
status integers 399 basic or derived types 738
status messages, reviewing in the output window managing items in the grid 268
105 sorting and filtering the grid 268
status variables 397 structures grid, customizing color options for 156
stencil SUB_DATE_DATE function 840
coils types available for FBD 562 subnet ID 369, 370
coils types available for LD 595 subnet mask 521
contact elements available for LD diagrams subtraction operator 786
568, 604 syntax
rungs, inserting in LD 587 verifying for programs 226
stepping syntax of ST programs 626
in code 581 system health 403
into code 581 system health reset 403
steps system healthy 39
boolean actions in SFC 692 system paths for files, default 262
coding action blocks for 690 system security 515
inserting in SFC 679 network firewall 515, 517
non-stored actions in SFC 694 Windows firewall 515, 519
pulse actions in SFC 693 system type 394
SFC actions 695 eurocard 394, 431
stopping mixed 394, 431
controllers 236 standard 394, 431
STRING system variables 250
data type 735 system variables, accessing for controllers 250
variables and literal expressions 735
string manipulation
ASCII function 794

934 AADvance 2.1 - Index


TON function block 874
T tool windows, arranging 109
toolbars
T9K_AI_COMPACT 444, 455 creating 116
T9K_AI_FULL 444, 455 cross reference browser 283
T9K_AI_HART 444, 459, 500 customizing 115
T9K_AI_HART_FULL 444, 459, 500 modifying images for commands in 117
T9K_AO_COMPACT 444, 493 output window, for the 105
T9K_AO_FULL 444, 493 properties window, for the 47
T9K_DI_COMPACT 444, 446 spy list 89
T9K_DI_FULL 444, 446 zooming, options for 104
T9K_DO_COMPACT 444, 479 toolbox
T9K_DO_FULL 444, 479 accessing the 51
T9K_TA_GROUP_STATUS 435 managing the 51
tabs and windows, development environment manipulating the 51
options for 144 tools
TAN function 841 adding external 101
targets defining keyboard shortcuts for external
access control, setting password protection tools 101
215 ToS 388
downloading code to 229 TP function block 875
performing updates to 230 transferring
type of, effect on libraries 204 repositories 28
TCP negotiation 388 transition
telnet clearing 676
communication port 517 transitions
terms, glossary of 887 attaching selection convergences in SFC 685
threshold values coding conditions for, in SFC 697
analog inputs 474 in SFC programs 681
digital inputs 450 inserting 681
TIME LD programming for conditions of 699
data type 733 programming for conditions in LD 699
variables and literal expressions 733 programming for conditions in ST 698
time operations ST programming for conditions in SFC 698
CURRENT_ISA_DATE function 799 transport layer ports 517
SUB_DATE_DATE function 840 TRUNC function 842
TOF function block 873 tunneling
TON function block 874 serial, configuring 340
TP function block 875 types
timing arrays 737
modifying cycle for controllers 241 available elementary IEC 61131 types 720
TOF function block 873 structures 738

AADvance Workbench 935


customizing color options for 158
U deleting variables 59, 65
editing variables 59, 64
UDINT variables
data type 728 attributes and directions for 715
variables and literal expressions 728 BOOL 722
UINT BYTE 724
data type 726 creating 60
variables and literal expressions 726 creating using quick declaration 281
ULINT cutting, copying, pasting 274
data type 730 DATE 734
variables and literal expressions 730 defining, importing, and exporting 202
undoing check outs of elements from version deleting 65
control 22 DINT 727
unlock all locked variables 414 directly represented 716
unlocking controllers 239 DWORD 728
unlocking variables editing 64
enabling prompts when monitoring 149 exporting 217
unlocking variables, while connected 49 importing 217
unwiring inserting in FB diagrams 551
processor variables 397 INT 725
updates, performing to targets 230 LINT 729
user types, defining 720 LREAL 732
using FactoryTalk AssetCentre with analog inputs LWORD 730
465 managing 59
using FactoryTalk AssetCentre with analog managing, in the dictionary 274
outputs 506 mapping for bindings 354
USINT OPC, mapping 323
data type 724 REAL 731
variables and literal expressions 724 rules for 715
scope of 715
selecting 55
SINT 723
V SOE, mapping 326
variable groups sorting and filtering 274
managing for controllers 202 STRING 735
variable groups view system, accessing values of 250
customizing color options for 157 TIME 733
variable selector 55 UDINT 728
accessing the 55 UINT 726
creating multiple variables 60 ULINT 730
creating variables 59, 60 USINT 724

936 AADvance 2.1 - Index


viewing and unlocking locked 49 arranging windows 109
WORD 726 Windows firewall 519
variables dependencies, viewing 43 wiring
variables grid 55 channel variable to a digital input 446
verification, compiler 81 channel variable to a digital output 479
verifying channel variable to an analog input 455
program syntax 226 channel variable to an analog output 493
version control processor variables 397
archiving and restoring projects for 26 status variable 435
checking in elements to 19 status variable to a digital output 487
checking out elements from 21 WORD
defining repositories for 18 data type 726
getting latest versions of elements 24 variables and literal expressions 726
labeling elements for 25 workbench communications 322
managing elements in 15 Workbench, development process with the 179
publishing libraries to 30 workbench environment, modifying options 136
refreshing the control status for 35 working offline and reconnecting to a repository
reviewing pending checkins 23 31
undoing check outs of elements from 22 workspace
viewing and retrieving from history 33 expanding to full-screen view 7
working offline and reconnecting to a zoom within the 7
repository 31
vertical bars, inserting in FBD 553
viewing
dependencies of variables 43 X
history of elements, the 33 XOR operator 788
locked variables while connected 49 XOR_MASK function 843
views
communication 291

Z
W zoom
contents of active POUs 104
warning status, controller 37
WHILE, DO, END_WHILE, ST basic statements
646
wildcards
finding with 76
replacing with 78
window
output, the 105
windows

AADvance Workbench 937


938 AADvance 2.1 - Index

You might also like