Академический Документы
Профессиональный Документы
Культура Документы
TABLE OF CONTENTS
Chapter 8 Hardware and Task configuration................................................................................................................................. 8-1
8.1 General Information ............................................................................................................................................................. 8-3
8.1.1 Description .................................................................................................................................................................... 8-3
8.1.2 Objectives...................................................................................................................................................................... 8-3
8.1.3 Reference Documentation............................................................................................................................................. 8-3
8.1.4 Limits............................................................................................................................................................................. 8-3
8.1.5 Steps to go ..................................................................................................................................................................... 8-3
8.2 Controller.............................................................................................................................................................................. 8-5
8.2.1 General .......................................................................................................................................................................... 8-5
8.2.2 Handling ........................................................................................................................................................................ 8-5
8.2.3 Controller Settings ........................................................................................................................................................ 8-6
8.3 Task ...................................................................................................................................................................................... 8-9
8.3.1 General .......................................................................................................................................................................... 8-9
8.3.2 Create Task.................................................................................................................................................................... 8-9
8.3.3 Delete Task.................................................................................................................................................................. 8-10
8.3.4 Copy / Paste a Task..................................................................................................................................................... 8-10
8.3.5 Connect a Task............................................................................................................................................................ 8-11
8.3.6 Settings ........................................................................................................................................................................ 8-12
8.3.7 Allocation .................................................................................................................................................................... 8-14
8.4 Hardware handling ............................................................................................................................................................. 8-16
8.4.1 General ........................................................................................................................................................................ 8-16
8.4.2 Create Hardware Unit ................................................................................................................................................. 8-16
8.4.3 Delete Hardware ......................................................................................................................................................... 8-17
8.4.4 Copy and Paste Hardware Unit................................................................................................................................... 8-18
8.4.5 Hardware Unit Settings............................................................................................................................................... 8-19
8.4.6 I/O Boards ................................................................................................................................................................... 8-20
8.5 I/O Handling....................................................................................................................................................................... 8-22
8.5.1 General ........................................................................................................................................................................ 8-22
8.5.2 Datatypes for I/O......................................................................................................................................................... 8-22
8.5.3 I/O Allocation.............................................................................................................................................................. 8-24
8.5.4 Parametrizing I/O........................................................................................................................................................ 8-25
8.5.5 Forcing I/O .................................................................................................................................................................. 8-26
8.6 Soft Controller.................................................................................................................................................................... 8-27
8.6.1 General ........................................................................................................................................................................ 8-27
8.6.2 Start Soft Controller.................................................................................................................................................... 8-27
8.6.3 Assign Soft Controller in CBM .................................................................................................................................. 8-27
8.6.4 IP-Address Soft Controller ......................................................................................................................................... 8-28
8-1
8-2
8.1.2 Objectives
On completion of this chapter you will be able to:
Create a new controller for a project and deal with the settings
Create a new hardware unit for a controller and deal with the settings
8.1.4 Limits
8.1.5 Steps to go
1. Create a new AC800M controller
2. Set the System Identity for the controller
3. Set the Ethernet IP-Address for the controller
4. Create / Modify the tasks
5. Create a new hardware unit for the controller (e.g. PM864)
8-3
8-4
8.2 Controller
8.2.1 General
The Controllers folder in the Control Builder contains the physical controller(s) used
in the project. For each controller you can configure the Access Variables, the
Hardware and the Tasks. The application(s) connected to each controller are placed in
the Application(s) folder.
8.2.2 Handling
8.2.2.1 Create Controller
1. Right mouse click onto Controllers and select New Controller
Right
click
Left
click
2. Left mouse click onto AC800M
3. The New Controller dialog box is displayed. Type in the new controller name
and click onto the OK button.
8-5
Right
click
Left
click
Primary network:
172.16.0.151
Secondary Network:
Subnet Mask:
255.255.252.0
8-6
2. The System Identity dialog box is displayed. Type in the IP address and click
onto the OK button.
display of information about the applications and system software, with their
versions, in remote systems,
You will get access to Remote System Information from a controller by a right mouse
click onto a controller and left mouse click onto Remote System...
8-7
Menu Item
Function
8-8
8.3 Task
8.3.1 General
In the Project explorer of the Control Builder you will find three default programs,
labeled Program1 connected to the task Fast, Program2 connected to the task
Normal and Program3 connected to the task Slow. The programs, containing the
code, are not executed unless a "work scheduler" - a task - is connected and serves as
an "engine" running the code in the controller.
2. The New Task dialog box is displayed. Type in the task name and click onto
the OK button.
8-9
8-10
2. Right mouse click onto Tasks folder and left mouse click onto Paste.
The task with all settings, connections and properties is copied.
Application
Control Module
Program
Function Block
If you connect a task to an application, then all the POUs of this application (Control
Modules, Programs and Function Blocks) are running in this task.
Connecting an application POU (e.g. Program) to a different task as the application
belongs to, then this POU is disconnecting from the application task and runs in its
assigned task.
A task can only execute POUs in one, and only one, application. Hence, POUs from
different applications can not be connected to the same task.
Before you are able to connect a task to a POU, first of all you have to assign the
application to the controller. Do this by opening the Context Menu for the Connected
Applications folder of a controller and selecting the application from the list.
8-11
For connecting a task please open the Context Menu for the
Function Block object and select the entry Properties Task Connection
Control Module object and select the entry Properties Task Connection
8.3.6 Settings
The three most important task parameters that can be set to optimize program
execution are:
Priority
Interval time
Offset
8.3.6.1 Priority
There are six levels of priority:
Time Critical Highest, High, Normal, Low and Lowest, numbered from 0 to 5.
The tasks are executed according to their priority where the time-critical task has the
highest priority.
A task with higher priority may interrupt any task with lower priority, but a task
cannot interrupt another task with the same priority.
There can only be one time-critical task. Such a task may interrupt the execution at
any point, while other tasks may only interrupt execution at defined points.
8-12
8.3.6.3 Offset
The periodic execution of tasks implies that all tasks will sooner or later be scheduled
to execute at the same time. When tasks are scheduled to execute at the same time, the
task with the highest priority will be executed first. If tasks have the same priority the
task with the shortest interval time will be executed first.
POU execution has higher priority than other functions, such as communication. These
functions are performed in the gaps between the executions of different tasks. If
several tasks with long execution times are executed immediately, one after the other,
the time gaps are few but long.
Offset is a mechanism that can be used to avoid unexpected delays in execution when
tasks are scheduled to execute at the same time.
The next two pictures display the execution of two tasks with the same priority with
interval times of 50 ms and 100 ms. When both tasks have a 0 ms offset, the execution
start time of task 2 is delayed, and the actual interval time for task 2 is influenced by
variations in the execution time of task 1.
No offset. The two tasks have the same priority, but different interval times (50 and
100 ms).
8-13
Offset is set on task 2. The two tasks have the same priority, but different interval
times (50 and 100 ms) and are thus executed at the requested times.
To set the offset please open the property dialog for a task (e.g. Normal) and insert the
value in ms into the offset field.
8.3.7 Allocation
To assign a task to applications, programs or functions the application has to be
allocated to a controller.
In general, it is recommended that one application be assigned to one controller.
There are some advantages in doing this, such as:
The application and the controller may have the same names
8-14
1. Right mouse click onto Connected Applications folder and left mouse click
onto Connect Application
2. Click the list box to display available applications. Select an application in the
dialog box displayed ( Appl_Tank1 ). Click OK.
8-15
8-16
3. Select a position for the hardware unit in the dialog box displayed. The first
available position is chosen by default. If another position is desired, click the
list box to display available positions. Click OK.
8-17
8-18
2. Right mouse click onto 11,ModuleBus folder and left mouse click onto Paste.
The I/O board with all settings, connections and properties is copied.
8-19
1. Right mouse click onto PM860/TP830 and left mouse click onto Editor
2. In the hardware editor window select a tap and type in the parameter
8-20
3. Select a position for the I/O unit in the dialog box displayed. The first
available position is chosen by default. If another position is desired, click the
list box to display available positions. Click OK.
8-21
8.5.2.1 BoolIO
A variable of type BoolIO can be connected to a digital input or output channel. The
datatype is defined by the system and has the following components:
Name
8-22
Data type
Description
Value
Bool
IOValue
Bool
Forced
Bool
8.5.2.2 RealIO
You can use the RealIO data type for variables connected to I/O. The Value, IOValue,
Forced and Status components are given by the system to the application. The
Inverted, Max, Min, Unit and Fraction components are given by the user of the
application to the system in the Scaling tab. The data type has the following
components.
Name
Data type
Description
Value
Real
IOValue
Real
Forced
Bool
Status
Dint
Parameters
SignalPar
Measuring range
Data type
Description
Max
Real
Min
Real
Inverted
Bool
Fraction
Dint
Unit
string
8.5.2.3 DintIO
The data type dint IO has the following components.
Name
Data type
Description
Value
Dint
IOValue
Dint
Forced
Bool
8-23
8.5.2.4 DwordIO
The data type dint IO has the following components.
Name
Data type
Description
Value
Dword
IOValue
Dword
Forced
Bool
Right
click
Left
click
8-24
2. Select the Variable parameter field for Input 1 and click the Insert Path
from Tree button (or CTRL+T). This displays a tree control from which
you can select the application and then the variable you need.
8-25
8-26
8-27
In the logfile the IP-address from the Soft Controller computer is shown (in this
example the network address is 10.1.182.37:2 ).
8-28
IPAddr
To simulate the AC 800M controller in the Soft Controller you have to set the System
Identity to the Soft Controller IP-Address.
8-29
8-30