1. Intermediate

53
1 WORKBOOK PROGRAMMABLE AUTOMATION CONTRLLERS PREMIUM™ & UNITY™ PRO

Transcript of 1. Intermediate

Page 1: 1. Intermediate

1

WORKBOOK

PROGRAMMABLE AUTOMATION CONTRLLERS

PREMIUM™ & UNITY™ PRO

Page 2: 1. Intermediate

2

Document

Type:

Work book

Title: PROGRAMMABLE AUTOMATION

CONTROLLERS: PREMIUM™ & UNITY™ PRO

Date: April, 2010

Version: 2.0 Soft MS-Word

Source:

Author: Schneider Electric Vietnam Status: Final

Page 3: 1. Intermediate

3

Introduction

This document combines with High End Control PAC slide to help trainees practice

configuring, programming and understanding Unity Pro Software as well as Premium

solutions. Therefore, the practices are designed with visualization.

Contents

• Practice 1: Security Editor

• Practice 2: Project Setting

• Practice 3: Premium PLC configuration

• Practice 4: Connection PC to Premium PAC

• Practice 5: Variable configuration

• Practice 6: Application Structure

• Practice 7: LD language

• Practice 8: Structure Text Language

• Practice 9: FBD Language

• Practice 10: SFC language

• Practice 11: Premium and Ethernet network Applications

• Practice 12: Premium and CANopen network Applications

Page 4: 1. Intermediate

4

Practice 1: Security Editor

Objective After the completion of this lab, the learner will be able to:

• Control the access to the Unity Pro Software

• Create specific access profiles using the Security Editor

Before you

begin

Read each section of the Lab Exercise carefully before

responding to the instructions.

Step Action

1 Access and Start the Security Editor Software.

2 Add a new profile “Training” which you will program.

3 Edit and modify the new profile “Training” by deleting the

rights to:

• Import a Project

• Suppress the messages in the Diagnostic Viewer

• Modify the Documentation

4 Create a New User called “Student” protected by the

password “training” with Rights Level of Program.

5 Save the profile “Training” with the User “Student”.

6 Define the access rules in Unity Pro: Security active with

login required.

7 Validate the modifications

Page 5: 1. Intermediate

5

SUGGESTED SOLUTIONS

Access the

Security

Editor

Launch the Security Editor by accessing Run / Programs / Schneider

Electric / Unity Pro / Security Editor

Open the Security Editor using the name Supervisor (no password

needed by default)

Page 6: 1. Intermediate

6

Create a new

profile

Under the Profiles Tab, activate the command Add

Now that the new profile is created, it appears in the profiles list

Page 7: 1. Intermediate

7

Personalize

the new

profile

To suppress a right of access:

• Select the Access Right in the list

• Activate the command State On/Off (the right is no longer

checked)

To Save a desired operation related to a certain right of access in

the history file:

• Select the right in the list

• Activate the command Audit Yes/No (Yes appears in the Audit

column

Page 8: 1. Intermediate

8

Create a new

User

Under the Users Tab, activate the command Add

Type in the name of the new User: Student along with the password

training

Associate the

profile with

the new User

Under the Users Tab, select the User Student and the profile

Training (for the Unity Pro product) and activate by clicking Apply

Page 9: 1. Intermediate

9

Define the

rules of

access to

Unity Pro

Page 10: 1. Intermediate

10

Practice 2: Project Settings

Objective After the completion of this lab, the learner will be able to:

• Set the Parameters of a Project

Before you

begin

Read each section of the Lab Exercise carefully before

responding to the instructions.

Step Action

1 If it is not already running, start Unity Pro. Access the logic with the

name Student (and the password training)

2 Create a new Project with a :

§ TSX P57 304M Processor impossible to have Auxiliary

Tasks

§ TSX P57 554M Processor possible to have Auxiliary Tasks

Or

§ 140 CPU 534 14A/U Processor impossible to have Auxiliary

Tasks

§ 140 CPU 651 60 Processor possible to have Auxiliary Tasks

and save under the name Training in the folder

C:\Schneider_application.

3 Access the parameters of the project and validate the diagnostic

system and application.

4 Define 11 columns for the Ladder Diagram Sections without Right-

justify coil.

5 For the SFC section, allow the multiple token and uncheck the

option Allow multiple evolutions by divergence of sequence

selection.

6 Utilize the Navigator application to navigate within the project and

access all of the Editors.

Page 11: 1. Intermediate

11

SUGGESTED SOLUTIONS: PROJECT SETTINGS

Turn on

Unity Pro

Launch Unity Pro by accessing Run / Programs / Schneider Electric /

Unity Pro / Unity Pro XL

Access Unity Pro with the name Student and the password training

Page 12: 1. Intermediate

12

Create a new

project

Training with

Quantum

CPU

Select the command File/New

Select the 140 CPU 534 14A Processor and Click OK.

Save the project by selecting File/Save as

Create a Folder: C:\Schneider_application

Type in the name Training then Save

Page 13: 1. Intermediate

13

Create a new

project

Training with

Premium

CPU

Select the command File/New

Select the TSX P57 554M Processor and Click OK.

Save the project by selecting File/Save as

Create a Folder: C:\Schneider_application

Type in the name Training then Save

Page 14: 1. Intermediate

14

Modify the

Project

Parameters

Access the Project Parameters under Tools/Project settings

Select System and Application Diagnostics under the Tab Build

Define the number Ladder Logic columns under the Editors Tab

Page 15: 1. Intermediate

15

Allow the multiple token under the Language extensions Tab

Page 16: 1. Intermediate

16

Navigate

within the

Project and

the different

Editors

Page 17: 1. Intermediate

17

Practice 3: Premium PAC Configuration

Objective After the completion of this lab, the learner will be able to:

• Configure the PLC

• Configure the Local Rack

• Configure the Field Bus (FIPIO)

• Configure the Network (FIPWAY)

Before you

begin

Read each section of the Lab Exercise carefully before

responding to the instructions.

Exercise 1 Configuration of the local rack (bus X with a Premium)

Step Action

1 Access the configuration of the local rack

2 Double click on position 2 and add a module, insert a

TSX DEY 32D2K input module in this slot.

3 By dragging & dropping, insert a TSX DSY 32T2K output

module in slot 3.

4 Access the input module and configure it with the following

parameters:

• Set all the inputs to MAST task.

• Set the monitoring of the external power supply to

inactive.

5 Validate the configuration of the module.

6 Access the output module and configure it with the

following parameters:

• Set all the output channels to MAST Task

• Set the monitoring of the external power supply to

inactive.

• Set Reactivate to automatic

• Make the fallback for the first group of outputs all 0, for

the second group of outputs all 1, and maintain last

value for the other groups.

7 Validate the configuration of the module.

8 Configure the Processor:

• 2048%MW

• Reset on Cold Start

9 Validate the configuration of the module.

Exercise 2 Configuration of the Field Bus (FIPIO)

Step Action

Page 18: 1. Intermediate

18

1 Access the configuration of the FIPIO bus

2 By dragging & dropping, insert a TBX DES 1622 module

with a TBX LEP 20 communication module at address 1 of

the bus.

3 Access the TBX module and configure:

• Set all the inputs to MAST task.

4 Validate the configuration of the module.

Exercise 3 Configuration of the Network (FIPWAY)

Step Action

1 Create a FIPWAY Network with the name FIPWAY_1

2 Access the network and configure:

• Common Data: none

3 Insert a PCMCIA FIPWAY card (TSX FPP 20) in location B of

the Processor.

4 Associate this card with the network logic FIPWAY_1

previously created.

5 Validate the configuration of the Network.

6 Save the modifications made to the Project.

Page 19: 1. Intermediate

19

SUGGESTED SOLUTIONS: PREMIUM CONFIGURATION

Access the

Configuration

Editor

In the application browser, double click on 0 : X Bus to access the

configuration of the local rack or on 2 : Fipio to access the

configuration of the FIPIO Bus.

Configure the

local rack

Insert the Input Module TSX DEY 32 D2K in Slot 2 and the Output

Module TSX DSY 32 T2K in Slot 3.

Page 20: 1. Intermediate

20

Configure the

Input and

Output

Modules

Double click on the module in Slot 2 of the rack to access the

configuration parameters. Define the parameters:

• MAST Task for all groups of channels (Channel 0/8/16/24)

• Supply monitoring not checked for all the groups of channels

• Validate the configuration with Edit/Validate

Double click on the module in Slot 3 of the rack to access the

configuration parameters. Define the parameters:

• MAST Task for all groups of channels (Channel 0/8/16/24)

• Supply monitoring not checked for all the groups of channels

• Set Reactivate to automatic for all groups of channels

• Fallback mode:

• Fallback with a value of 0 for the first group of outputs

• Fallback with a value of 1 for the second group of outputs

• Maintain the last value for the other groups (Channels

16/24)

• Validate the configuration with Edit/Validate

Page 21: 1. Intermediate

21

Configure

the

Processor

Double click on the Processor module to access its configuration

parameters. Define the parameters:

• Operating mode : %Mwi Reset on cold start

• Size of global address fields : 2048 %MW

• Validate the configuration with Edit/Validate

Page 22: 1. Intermediate

22

Configure

the FIPIO

Bus

Access the FIPIO bus configuration

Insert the TBX DES 1622 module with a TBX LEP 20 communication

module at address 1 of the bus.

Double click on the TBX module to access the configuration

parameters. Define the parameters:

• MAST Task for for all channel groups (Channel 0/8)

• Validate the configuration with Edit/Validate

Page 23: 1. Intermediate

23

Create a

FIPWAY

Network

In the application browser, right click on

Communication/Networks

and activate the command New Network.

Under the Network Tab:

• Select a FIPWAY Network

• Use the name FIPWAY_1 (default name)

In the application browser, double click on network logic

FIPWAY_1 that you just created to access the configuration

parameters.

Define the parameters:

• Common Data : none

• Validate the configuration

Page 24: 1. Intermediate

24

Configure the

network card

and associate it

with the

network logic

In the application browser, double click on 0 : X bus to access the

local rack configuration

Right click on slot B of the Processor and activate the command

New/Replace submodule.

Select the TSX FPP 20 and validate with OK

Double click on slot B of the Processor to access the configuration

parameters. Define the parameters:

• Choose the channel (TSX FPP 20 / Channel 1

• Choose the function (Function : FIPWAY))

• Associate the card with the logical network (Net Link :

FIPWAY_1)

• Validate the configuration with Edit/Validate

Page 25: 1. Intermediate

25

Practice 4: Connection PC to Premium PAC

Problem: Make communication between PC and Premium PAC.

Solution:

Ø Via serial link (TSX CUSB 485)

Tools:

ü PC supported USB port

ü Cable serial link TSX CUSB 485

ü Premium PAC (TSX P573634M)

ü Unity pro programming software

Start

- Step 1: Create new project: Start up Unity pro software and choose kind of PAC that

is compatible with your PAC (TSX P573634M)

- Step 2: Configure your PAC hardware in Unity Pro that was installed on Rack.

Page 26: 1. Intermediate

26

- Step 3: Choose Rack, I/O modules, communication modules.

Rack/ Module Part Number

Rack TSX RKY 8EX

Digital Input TSX DEY 08D2

Digital Output TSX DSY 08T2

Analog Input TSX AEY 414

Analog Output TSX ASY 410

Page 27: 1. Intermediate

27

Page 28: 1. Intermediate

28

- Step 4: Create connection:

- Menu bar → Standard mode .

- Menu bar → PLC → Set Address

- Step 5: When Set Address window appeared. Choose protocol and address of PLC

as following table.

Address SYS

Media UNTLW01

- Check communication to be sure that Com port is selected suitably:

Communication parameter → Driver setting

→ UNITELWAY Driver → Configuration → Edit → Com port → Select compatible

Com port.

Page 29: 1. Intermediate

29

- Step 6: Make connection to connect PC to PLC.

- Step 7: Download your project to PLC or upload project from PLC

Page 30: 1. Intermediate

30

Ø Via Ethernet

Tools:

ü PC supported Ethernet card

ü Premium PAC (TSX P573634M)

ü Unity pro programming software

Start :

- Configure as from Step 1 to Step 5 of previous method, but you choose protocol

and address of PLC as following table in Step 5:

Address Eg: 192.168.1.12 ( depend of your

current Premium PAC IP address)

Media TCP/IP

Page 31: 1. Intermediate

31

Then next to Step 6 and Step 7.

Page 32: 1. Intermediate

32

Practice 5: Variable Configuration

Objective After the completion of this lab, the learner will be able to assign

Variables to an application including elementary variables,

structured variables, block functions, ….:

Before you

begin

Read each section of the Lab Exercise carefully before

responding to the instructions.

Exercise

Step Action

1 Access the Variables Editor

2 Create the following Elementary Variables:

• Level_1 of the type Int with the comment Tank level 1

• Lowlevel_1 of the type boolean with the comment

Alarm low tank 1

• Highlevel_1 of the type boolean with the comment

Alarm high tank 1

• Valve_1 of the type boolean with the comment Tap

level 1

• Level_2 of the type Int with the comment Tank Level 2

• Lowlevel_2 of the type boolean with the comment

Alarm low tank 2

• Highlevel_2 of the type boolean with the comment

Alarm high tank 2

• Temperature_2 of the type Int with the comment Tank

Temperature 2

• Valve_2 of the type boolean with the comment Tank

Tap 2

• Level_3 of the type Int with the comment Tank level 3

3 Create a variable Counter_1 for an elementary function

block CTU_INT.

4 • Create a structured variable Tank_2 composed of the

variables Level_2, Lowlevel_2 and Highlevel_2

previously created.

• Create an instance of the following variable Tank_2_1.

5 Assign the properties of the variable Temperature_2.

6 Sort through the variables to locate only those types

whose comments begin with “Tank” & type “Integer”

7 Personalize the variables editor to display in the order of

name, address, type, and comments. All the other columns

will not be accessed.

Page 33: 1. Intermediate

33

SUGGESTED SOLUTIONS: VARIABLES

Access the

Variables

Editor

In the application browser, launch the Variables & FB instances

then double click on Elementary Variables, Derived Variables, … to

access the variety of variables or instances of Function Blocks.

Select

Elementary

Variables

Access the Variables Editor double clicking on Elementary

Variables or check the Elementary box if the editor is already

open.

To select a variable:

• Click on the first empty location in the column Name then type

in the name of the variable (example Level_1)

• Click in the Type column, using the pull down list choose the

type of variable (example Int)

• Click in the Comment column and type in a comment

associated with the variable

Page 34: 1. Intermediate

34

Create an

instance of the

function block

CTU_INT

• Select the Tab Function Blocks

• Click on the first available location in the Name column and

type in the instance: Counter_1

• Validate with the Enter key

• Look at the global Function Library to access the Counters

Library <Library>/Base Lib/Timers&Counters/CTU_*

• The Elementary check box should be checked so that the list

of function blocks type <EFB> are part of the list shown on

the screen

• Select CTU_INT and hit the Enter key.

Page 35: 1. Intermediate

35

Create a

Structured

variable type

• Select the DDT Types Tab

• Click on the first empty location in the Name column and enter

the variable name: Tank_2

• Click on the Type column and select Struct

• Expand the variable Tank_2 to access its internal variables

• Click on the first empty Name column and enter the variable

name: Level_2

• Click on the Type column and choose INT

• Do the same for the other internal variables: Lowlevel_2 and

Highlevel_2 of the Type Bool

• Select the Structured variable Tank_2

• Analyze the variable with the command Build / Analyze

If the analysis is correct, the symbol “work in progress” disappears

Page 36: 1. Intermediate

36

Utilize a

Structured

variable

• Select the Variables Tab

• Click on the first empty location in the Name column and type in

the instance: Tank_2_1

• Double click in the Type column

• Click on the […] button

• Select the local library <Application>

• Select Tank_1 in the right side of the screen

• Validate with OK

Page 37: 1. Intermediate

37

Access the

Properties of a

Variable

• Select a Variable (for example Temperature_2)

• Access the Properties command by right clicking with the

mouse.

Page 38: 1. Intermediate

38

Utilize a Filter

to access the

Variables

• Double click on the Filter Icon (looks like a funnel)

• Check the cases Comment and Type in the Name column

• Choose the conditions associated with the columns to filter:

• Tank* for the comment

• Int for the type

• Only the variables of the type Integer with the comments

starting with “Tank” are shown. You will noticed the filter icon

will also change color.

Page 39: 1. Intermediate

39

Personalize the

Variables

Editor

• Access the command Customize Column with a right mouse

click

• Check the cases to access : Type, Comment (Name and

Address are always accessed)

• By utilizing the commands at the right side of the screen,

position the columns in this order: Name, Address, Type and

Comment

Page 40: 1. Intermediate

40

Practice 6: Application structure

Objective :

Aim of this exercise helps you to understand application structure of Premium Tasks. You

will know how to use tasks in program of PAC as well as its applications.

Exercise :

Program your application in which the value of variable1 increased by 1 every second in

Mater task, variable2 increased by 1 every second in Fast Task and variable3

increased by 1 every second in Timer Event Task.

Solution

Step 1: Create your project (Base controller : TSX P57 5634M)

- Create new section named Mastertask in Master Task and write this program

below:

Page 41: 1. Intermediate

41

Step 2: Create new Fast task with following parameter.

In Fast task, Create new Fast Task section named Fask_task1 and write the program below.

Page 42: 1. Intermediate

42

Step3:

Create new timer event Timer Event name and insert the program below into Timer0:

Time base Preset

100ms 10

Step4: Return to Master task and insert the program below to enable Timer Event

Page 43: 1. Intermediate

43

Step5: Build your application.

Step6: Make sure that your PAC operates in Simulation mode.

Step7: Download your application to PAC and debug system.

Page 44: 1. Intermediate

44

Practice 7: LD Language

Objective: Practice 7 help trainees to acquaint with Ladder language and also practice

more applications in industrial automation.

Exercise:

Write Program for bottled conveyor following algorithm:

Symbol address Comment

Start %I0.2.0

Stop %I0.2.1

System_Status %Q0.3.0

Bottle_sensor %I0.2.2

Valve_Status %Q0.3.1

Bottle_number

In this application, when we press start, conveyor will run and carry bottles. When a bottle

meets the sensor, the sensor actives, conveyor stops and also valve opens to fill liquid in

the bottle. Assume that the flow rate is a constant and the bottle will be filled in 5 seconds,

then conveyor runs again. The system will be stop when we press stop button.

Solution :

Step1: Create new project with CPU : TSX 57 3634

Page 45: 1. Intermediate

45

Step2:

Configuration for your PAC ( look at the real PAC on Segment of the Lab).

Step3:

Configure your Elementary Data Type and Function block data type

Page 46: 1. Intermediate

46

In MAST task, create new section named bottle_system and write the program bellow;

Step 4: Build your application and download it to PAC.

Step 5: Debug system.

Page 47: 1. Intermediate

47

Practice 8: ST Language

Object: : Practice 8 help trainees to acquaint with Structure Language and also practice

more applications in industrial automation.

Exercise.

Solution :

Step1: Create new section in master task named Min_To_Max_Sequency.

Step2: Add more elementary variables following table:

Name Type Address

i INT

j INT

Tem INT

Step3: Add the program below into Min_To_Max_Sequency section

Step4: Build your application and download it to your PAC.

Step5: Debugging.

Page 48: 1. Intermediate

48

Page 49: 1. Intermediate

49

Practice 9: FBD Language

Objective:

Practice 9 helps trainees to acquaint with Function Block Data Language and also practice

more applications in industrial automation.

Exercise:

- In this application, we use four motors to pump water to the pine.

Condition Action

Setting point – feedback_Pressure > 0 pa Run Motor1 (Lead_Pump)

Setting point – feedback_Pressure > 1000 pa Run Motor2 ( Pump 1)

Setting point – feedback_Pressure > 5000 pa Run Motor3 ( Pump 2)

Setting point – feedback_Pressure > 10000 pa Run Motor4 ( Pump 3)

- We have PT sensor to measure the Pressure of water, this signal is usually a

current value (4-20 ma) and assigned at %IW0.4.0 of Analog input module. The

setting point of Pressure is set by a variable (0 – 10V) associated with 0 – 25kpa

(0 – 25.000pa) and assigned at %IW0.4.1.

Page 50: 1. Intermediate

50

Solution

Step1: Define your elementary data type as the figure below:

Step2: create new section named Pump_System, language is FBD and write the program

below:

IN%IW0.4.0 OUT

.1

INT_TO_REAL1

IN1

IN22.5OUT Feedback_Pressure

.2

MUL_REAL2

IN%IW0.4.1 OUT

.3

INT_TO_REAL4

IN1

IN22.5OUT Setting_Pressure

.4

MUL_REAL5

IN1start

IN2not stopOUT enb_system

.14

AND_BOOL3

Page 51: 1. Intermediate

51

IN1Setting_Pressure

IN2Feedback_Pre...OUT

.5

SUB_REAL6

IN1

IN210000.0OUT

.6

GE_REAL7

IN1IN25000.0

OUT

.7

GE_REAL9

IN1IN21000.0

OUT

.8

GE_REAL11

IN1IN20.0

OUT

.9

GE_REAL13

IN3not Motor4_Overload

IN1

IN2enb_systemOUT motor4_run

.10

AND_BOOL8

IN3not Motor3_Overload

IN1IN2enb_system

OUT motor3_run

.11

AND_BOOL10

IN3not Motor2_Overload

IN1IN2enb_system

OUT motor2_run

.12

AND_BOOL12

IN3not Motor1_Overload

IN1IN2enb_system

OUT motor1_run

.13

AND_BOOL14

Step3: Build your application and download it to your PAC.

Step4: Create animation table and Debug your application

Page 52: 1. Intermediate

52

Practice 11: SFC Language

Objective :

Practice 9 help trainees to acquaint with Sequence Function Chart Language and also

practice more applications in industrial automation.

Exercise:

Program your application to lock the door by using Sequence Function Chart.

Solution:

Step1 : create your project and define variables as the picture below.

Create new section named lock_control and write the program below

Page 53: 1. Intermediate

53

S_1_1

first_digit

S_1_2

digit1_ok NOT digit1_ok

S_1_3

digit2_ok NOT digit2_ok

digit3_ok NOT digit3_ok

S_1_6

1

S_1_7

gohome

third_digit

second_digit

S_1_8

S_1_9

S_1_10

S_1_4

fourth_digit

S_1_5

digit4_ok

NOT digit4_ok