Training Tm210tre.25-Eng
Training Tm210tre.25-Eng
Training Tm210tre.25-Eng
TM210
Requirements
Hardware: None
1. INTRODUCTION 4
1.1 Objectives 5
2. INSTALLATION 6
2.1 Installation procedures 6
2.2 Licensing 9
2.3 Directory structure 13
6. VARIABLES 38
6.1 Scope of variables and constants 38
6.2 Data types 39
6.3 Declaring variables and constants 40
6.4 Arrays 45
7. INITIALIZATION 46
8. PROGRAMMING LANGUAGES 48
8.1 Overview 48
8.2 Possibilities 50
9. SUMMARY 53
1. INTRODUCTION
Automation Studio is a programming environment used with the
automation components from B&R. It provides the user with several
different programming languages and editors as well as numerous
diagnostics tools.
This training module will use examples – with the aid of the extensive
Automation Studio help system – to demonstrate how to use the great
many tools available in Automation Studio™. In addition, we will also
provide information about installing and registering Automation Studio.
1.1 Objectives
You will learn how to work with Automation Studio by putting together a
typical project.
You will master data types and variables as well as their declaration.
Fig. 2 Overview
2. INSTALLATION
This part of the training module will cover the Automation Studio
installation. The following points will explain which actions are needed to
select the necessary components as well as how the software is licensed.
In the installation menu, you can select from five installation packages.
• Automation Studio:
Automation Studio and all components
• PVI Runtime :
Components for communication with the controller
• Onboard AR upgrade:
The standard operating system can be updated with this program
• AR install kits:
Installation of operating system kits
• Version changer:
If multiple Automation Studio versions are installed, this program
can be used to activate the desired version
#
Note:
Demos can be installed under the menu item "Presentations Videos" for
presenting basic functions step-by-step.
2.2 Licensing
A license code is needed to register Automation Studio. This is NOT the
B&R serial number on the Automation Studio CD.
When starting Automation Studio for the first time, you will be asked to
license your copy of the software. Automation Studio can be used for 30
days if it is not registered.
The following items can be selected after the serial number has been
entered:
The following steps must be carried out when licensing the software
manually from the homepage.
Note: If the "Invalid ID" error message is returned, then there was
something wrong with the way the B&R serial number was entered.
The following window is displayed after the B&R serial number has been
entered successfully:
Enter your system code into the "System Code" field and then click on the
Register button.
Now enter the reason for licensing and click on the (Register) button.
You will then receive the license code, which should be copied to the
clipboard.
Folder Contents
..As\gnuinst GNU compiler
..As\Library B&R standard libraries sorted according to operating system version
..As\System Operating systems
Help Complete documentation for Automation Studio in CHM format. This
help system can also be viewed by opening AS.chm.
• Main menu
The main menu in B&R Automation Studio provides access to all
available functions.
• Toolbars
The toolbars contain buttons that provide fast access to a wide
selection of commands and functions.
• Workspace
This is where the window for an open project is shown. The project
window can either be maximized to fit into this area or sized
accordingly.
• Output window
The output window is located at the bottom of the program window.
It is used to display compiler and debugger messages, etc. In
addition, it is where the search results for the "Find in Files" function
are output.
• Status bar
The status bar at the bottom of the window displays the following
information:
• Brief help about menu commands or toolbar icons
• Status of the online connection between the programming device
and the target system
• Status data for the currently active window
Give the new connection a configuration name and change the device type
to AR000_TCPIP so that your dialog box appears as follows:
The connection settings for emulation have now been completely set up.
This information does not have to be entered each time since this
connection is saved under the specified configuration name.
The Upload hardware from target option means that the current hardware
configuration is uploaded using the configured connection.
If the hardware upload is successful, you will receive the following image.
If an error occurred during the hardware upload, you will receive the
following window.
Fig. 24 Could not load hardware information from the target system
Note:
Enter a name for the object into the Name field. This name must be 8
characters or less and may not contain special characters. Then change the
type of the object to Ladder Diagram. Click on Finish to accept your entries.
The ladder diagram is created in your project, and the ladder diagram
editor is opened. The following appears:
Insert a coil by clicking on the icon. Repeat the procedure you used for
the normally open contact.
Select the icon to add a function block. All of libraries in the project are
shown.
Select show external libraries and enter "TON" for the filter (function block
for turn-on delay).
Confirm your selection with OK. You will now be requested to specify a
name for the function block.
Fig. 39: Entering a FBK name in the in the ladder diagram editor
You can now connect the normally open contact diLight to the function
block input IN and a new coil with the name doLightdly to the function
block output Q. To connect a value to the analog function block input PT ,
press the select icon and enter the time. (T#1s for one second).
To transfer the ladder diagram to the target system, click on the icon.
If there are already modules on your CPU, you will see the following
window.
Delete object from the target erases objects on the target system that
don't belong to your project.
Note:
The ladder diagram program is now running on the target system. Now you
can test the program to make sure that it's working correctly.
Now you can check whether the value changed at the input produces the
desired result at the output.
You can also use the search function in the help to find information about a
certain topic.
Task:
5.2 Structure
In Automation Studio, the hardware and software configurations are
separated into different windows. The hardware tree is located on the left-
hand side with the software tree on the right. The message window
supplements both and supports the user by providing messages.
Slot information important for addressing I/O data points is displayed in the
slot column to the right of the individual modules. A brief description of
the added module is displayed right next to that column.
The hardware tree is where I/O variables can be assigned to I/O module
channels.
Pressing the F1 key opens up the help window for the selected module.
Objects can be added and deleted in the software tree. These are
transferred to the target system when the project is transferred.
• Library
The libraries used in the project
• DBK
Project database with the declarations for
data types and variables
• PGM
Source files and compiled objects
• XXXXX.GDM
Project file that can be opened with
Fig. 50 Project structure
Automation Studio
• XXXXX.hc
Hardware configuration file for the project
• Project-specific settings and editor settings
Note:
It is helpful to close windows that are not needed (if finished editing for
quite a while).
The result is a cleaner, more efficient method of working.
6. VARIABLES
Variables are symbolic elements that are used during programming to
store values.
They represent memory positions that can be either read or written by
accessing a variable.
Using these symbolic elements allows the user to not worry so much about
memory management since this is handled by the programming task.
Constants are much like variables. The value of the constant is defined
while generating the software. Constants cannot be written during runtime.
Select the task whose declarations you want to open in the software tree.
Open up the task's declaration window with the Open - Declaration menu
item or click on the icon.
Variables can be added from the shortcut menu (New variable) or with the
Insert key (INS).
A blank text field appears where the variable name can be entered.
The different input fields can be used to modify the data type or scope of
new or existing variables as needed.
The category field allows you to choose between basic data types, user
data types, and function blocks.
The size can be defined using the Array input field (1 is the default setting)
The Attribute property can be used to specify whether you're dealing with
a variable or a constant. Constants are displayed in green by default.
Click on the icon to save the changes you have made thus far.
To open the global variable declaration window, select the CPU entry in the
software tree and proceed as you would with the task declaration window.
You need the bread types mixed and homemade. One advantage of the
structure is that you only have one variable "mixed_bread" and one
variable "homemade_bread" in your software. These variables each
contain the elements water, flour, salt and yeast.
In this example, you have three variables with the bread data type
instead of 15 individual variables.
To create data types in Automation Studio, click on the Open – Data Types
menu item. The following view then appears.
All of the data types that are in the project are displayed here.
Use the Insert New Type entry in the shortcut menu or the icon circled in
the toolbar below to add a new data type.
The Insert New Item entry in the shortcut menu or the icon circled in the
toolbar below can be used to add new data type elements to the data type.
6.4 Arrays
Arrays are variables that contain several elements with the same data type.
These elements are accessed using an index. These elements can be
declared either as basic data types (simple array) or as a user data type
(array of structures).
The array index always begins with 0. This allows the array index to receive
the value 0 (number of elements - 1) when accessing the individual
variables.
Arrays are used when variables of the same data type are needed (base
data type or structure).
7. INITIALIZATION
The initialization of data is an important topic for guaranteeing that the
application will function correctly.
There are several ways for variables to be initialized – either by the system
or by the user.
Fig. 64 Declarations
Task initialization:
If available, each task cycles through its initialization subprogram (Init-Sp)
when the system starts (this occurs before the cyclic part of the program is
executed).
This Init-Sp can contain program code that defines variable values.
Note:
The use of data objects and files is recommended for the nonvolatile
storage of data (machine parameters, recipes). Data is stored on the
Compact Flash.
8. PROGRAMMING LANGUAGES
8.1 Overview
Programs can be created in several different programming languages in
Automation Studio. It is possible to combine several programming
languages within one project.
Note:
Function blocks from B&R standard libraries can be called and used in
all programming languages.
Settings for the respective editor can be made using the tabs Editor,
Ladder, Declaration
8.2 Possibilities
It is possible to set the desired application with each programming
language. Each language has its special strengths.
LAD SFC IL ST AB C
Logic √ √ √ √ √ √
Arithmetic √ √ √ √
Decisions √ √ √ √ √
Loops √ √ √
Step sequencers √ √ √
Dyn. variables (√) √ √
Function blocks √ √ √ √ √ √
Note:
9. SUMMARY
Automation Studio makes it possible to program all of the automation
components provided by B&R.
You are now familiar with Automation Studio and have gotten to know the
Automation Studio online help system that will support you in the future
while you are working.
You know the different types of variable declarations, data types and arrays
as well as their characteristics.
Notes
*) upon request
**) see Product Catalog
TM210
Weblink
Internationalität
Kontakt (Headquarter)
Copyright – Bestellnummer
TM210TRE.25-ENG 0706
©2006 by B&R. All rights reserved.
All trademarks presented are the property of their respective company.
We reserve the right to make technical changes.