• No results found

Describe a Typical Control Logic Statement

MasterLogic Programming Languages Describe a Typical Control Logic Statement MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

24

Introduction

• Control logic can be implemented using – Ladder Diagrams

– Structured Text

– Sequential Function Charts

• Programs added as a sub-routine written in Ladder Diagram or Structured Text

• Example: How to implement a PID Control Loop using Ladder Diagrams and Function Blocks

13

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

25

PID Control LOOP

• Proportional-Integral-Derivative (PID) Control is implemented in the ML200R CPU as a LOOP

– A LOOP is a collection of the following Objects:

• A sensor detecting the current state of an object to control (PV) • A control operation (PID Control)

• A driver to drive the object according to the output (Control Signal)

• A maximum of 256 loops (32 LOOPS in 8 BLOCKS) can be created in the ML200R CPU PV SV (SP) MV MV(PV) User User PID Operation MV_Manual DA Conversion Module AD Conversion Module Object Control Driver Sense Manual Auto CPU (Process sensor)

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

26

PID Closed Loop - Example

• Use a single Proportional- Integration-Derivative (PID) Block to control the system

– Input from a Water Level sensor connected to an Analog Input Module (2MLF-AV8A)

• Input configured at Base-01, Slot-1, Channel-3

– Output to a Pump connected to an Analog Output Module (2MLF-DV4A)

• Output configured at Base- 01, Slot-3, Channel-2

2MLF-AV8A

2MLF-DV4A

Control System

MasterLogic Programming Languages Describe a Typical Control Logic Statement

14

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

27

Analog Input Module Settings

• I/O Parameter Setting dialog box is invoked from the Project Window

– Input and Output Modules to be used for PID control in the Program are configured in the I/O Parameter Setting dialog box

Add Analog Input and Analog Output Modules at Base 01

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

28

Analog Input/Output Module Setting

• Channel-3 of the Analog Input Module is enabled and the channel parameters are configured

• Channel-2 of the Analog Output Module is enabled and the channel parameters are configured

Analog Input Module settings Analog Output Module settings Enable channel and configure channel settings

15

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

29

Add Information to Global Variables

• Global Variables contain information for Special Modules

– Once Global Variables are defined in a SoftMaster Project, they can be used in different programs defined in the project

• Analog Input and Analog Output modules belong to the Special Module List

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

30

Global Variables

• If changes are made to the parameters which are part of the Global Variables, the changed parameters are overwritten

• No user-defined data in the Global Variables is deleted

MasterLogic Programming Languages Describe a Typical Control Logic Statement

16

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

31

Copy Global Variables to Local Variables

• PID Configuration requires all Analog parameters to be available in the Local Variables of a Ladder Program

– Copy all variables from the Global Variables list to the Local Variables list • Right-click on Local Variable and select ‘Add External Variable…’ • Click ‘Select All’ and Click ‘OK’

Global Variables list

Local Variables List

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

32

Add PID Function Block

• Add a PID Function Block to the program

View Function Information Select the List Type of ‘Function

Block’

Enter Instance Name Enter the Name

PIDRUN and click ‘Search’

Select the Category ‘Control/Detection’

Click OK

17

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

33

Add PID Function Block (Contd.)

• Assign a Variable Name and select the type as Local Variable. Click OK

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

34

Add Move Function Blocks

• Similarly add two MOVE Function Blocks to the program

– The Move Function Block moves data connected to an ‘IN’ Parameter to an ‘Out’ Parameter

– In this example, the MOVE Function is used to transfer physical IO values to Loop Inputs-Outputs

MasterLogic Programming Languages Describe a Typical Control Logic Statement

18

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

35

Configure Block and Loop Number

• Block Number and Loop Number help to identify the PID Block in PID Monitoring

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

36

Make Connections

• Configure the Addresses / Parameters on the Function Blocks

Connect ‘OUT’ of the Move Function Block to the PV of

the PID Block Connect ‘IN’ of the Move

Function Block to the data variable of I/O Module 1

Channel 3

19

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

37

Make Connections

• Similarly, configure connections from the PID Block to the Move Function Block and download the program to the ML200R PLC

Input is from a channel in an Analog

Input Module Output to the PV of a PID Block

Output from the PID Block

Output is to a channel of the Analog Output

Module Add a Normally open

contact to operate the PID 1 2 3 4 6

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

38

Monitor PID Operation

Select the Block0 and Loop0 PID Block

Change the SP, Tuning Parameters, Range and other parameters from the

Setting View

• Open a PID Monitoring window in SoftMaster from Monitor  PID Monitoring

PID Trend

MasterLogic Programming Languages Describe a Typical Control Logic Statement

20

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

39

PID Parameters Memory Addresses

• PID parameters are stored in %K area in data memory – Table below lists addresses for some parameters of three loops

Parameter Loop

PV OP SP Proportional

Gain

Integral time Derivative time

Block 0 Loop 0 _PID0_00PV (Address: %KW38) _PID0_00MV (Address: %KW40) _PID0_00SV (Address: %KW24) _PID0_00K_p (Address: %KD13) _PID0_00T_i (Address: %KD14) _PID0_00T_d (Address: %KD15) Block 1 Loop 2 _PID1_02PV (Address: %KW1152) _PID1_02MV (Address: %KW1154) _PID1_02SV (Address: %KW1138) _PID1_02K_p (Address: %KD70) _PID1_02T_i (Address: %KD71) _PID1_02T_d (Address: %K72) Block 2 Loop 4 _PID2_04PV (Address: %KW2266) _PID2_04MV (Address: %KW2268) _PID2_04SV (Address: %KW2252) _PID2_04K_p (Address: %KD1127) _PID2_04T_i (Address: %KD1128) _PID2_04T_d (Address: %K1129) In Global Variables page on Flag tab select Flag type as

PID Memory addresses for all parameters for all 256 PID loops are

listed

MasterLogic Programming Languages Describe a Typical Control Logic Statement

Honeywell

Honeywell Confidential Copyright © 2012 Honeywell International Inc.

4/25/2012

40

This page intentionally left blank

4/25/2012 Copyright © 2012 Honeywell International Inc. 1 HPS Automation College written permission required to distribute

Honeywell Confidential and Proprietary