35
City of Orillia SCADA System PLC Programming Standard Water and Wastewater SCADA System December 20, 2018 VERSION 1.1 - Final

City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia

SCADA System PLC Programming Standard

Water and Wastewater SCADA System

December 20, 2018 VERSION 1.1 - Final

Page 2: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- i -

Table of Contents

1.0  GENERAL ............................................................................................................... 1 

1.1  PROGRAMMER REQUIREMENTS .................................................................................. 1 1.2  SUBMISSIONS ................................................................................................................. 2 

2.0  BACKGROUND ....................................................................................................... 2 

2.1  GLOSSARY ..................................................................................................................... 2 2.2  PROCESS AREA / SITE CODES ......................................................................................... 4 

2.2.1  Water Remote Site Codes ........................................................................................ 4 2.2.2  Water Treatment Center Process Areas .................................................................. 4 2.2.3  Wastewater Remote Site Codes .............................................................................. 4 2.2.4  Wastewater Treatment Center Process Areas ........................................................ 5 

3.0  HARDWARE CONFIGURATION ............................................................................... 5 

3.1  PROCESSORS .................................................................................................................. 5 3.2  PROCESSOR CONFIGURATION ...................................................................................... 5 3.3  HARDWARE CONFIGURATION ..................................................................................... 7 

4.0  SOFTWARE CONFIGURATION ................................................................................ 8 

4.1  PLC PROGRAMMING SOFTWARE ................................................................................. 8 4.2  PROGRAMMING STRUCTURE ....................................................................................... 8 

4.2.1  FILE NAMING ............................................................................................................. 8 4.2.2  RUNG DOCUMENTATION ......................................................................................... 8 4.2.3  TAG NAMES .............................................................................................................. 8 4.2.4  TASK LAYOUT ........................................................................................................... 9 

4.3  I/O MAPPING .................................................................................................................. 10 4.3.1  Digital Inputs .......................................................................................................... 10 4.3.2  Digital Outputs ....................................................................................................... 11 4.3.3  Analog Inputs ......................................................................................................... 12 4.3.4  Analog Outputs ...................................................................................................... 13 

4.4  PLC TO PLC COMMUNICATIONS ........................................................................................ 13 4.4.1  Communication Setup ............................................................................................ 13 4.4.2  Heartbeat Alarming ............................................................................................... 14 4.4.3  Communication Routine Structure ........................................................................ 16 

5.0  PROGRAMMING MODULES ................................................................................. 17 

5.1  MOTOR MODULES ...................................................................................................... 17 5.1.1  CONSTANT SPEED PUMP / MOTOR CONTROL ...................................................... 17 

5.1.1.1  PURPOSE ..................................................................................................................... 17 5.1.1.2  VARIABLES .................................................................................................................. 18 

5.1.2  VARIABLE SPEED PUMP / MOTOR CONTROL ........................................................ 19 5.1.2.1  PURPOSE ..................................................................................................................... 19 5.1.2.2  VARIABLES .................................................................................................................. 20 

5.2  VALVE MODULES ........................................................................................................ 21 5.2.1  DIGITAL VALVE CONTROL ...................................................................................... 21 

5.2.1.1  PURPOSE ..................................................................................................................... 21 5.2.1.2  VARIABLES .................................................................................................................. 22 

5.2.2  ANALOG VALVE CONTROL .................................................................................... 23 5.2.2.1  PURPOSE ..................................................................................................................... 23 5.2.2.2  VARIABLES .................................................................................................................. 24 

5.3  ANALOG MODULES..................................................................................................... 25 5.3.1  ANALOG CONTROL ................................................................................................. 26 

5.3.1.1  PURPOSE ..................................................................................................................... 26 5.3.1.2  VARIABLES .................................................................................................................. 26 

Page 3: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- ii -

5.4  CALCULATIONS ........................................................................................................... 28 5.4.1  FLOW TOTALIZATION ............................................................................................. 28 

5.4.1.1  PURPOSE ..................................................................................................................... 28 5.4.1.2  VARIABLES .................................................................................................................. 28 

5.4.2  RUNTIME ................................................................................................................. 28 5.4.2.1  PURPOSE ..................................................................................................................... 28 5.4.2.2  VARIABLES / REGISTERS .............................................................................................. 28 

5.5  AUTOMATIC CONTROL ROUTINES ............................................................................. 28 5.5.1  Duty Control ........................................................................................................... 29 5.5.2  Automatic Control .................................................................................................. 30 

6.0  WATER FILTRATION PLANT REDUNDANCY ......................................................... 31 

7.0  TEST DOCUMENTATION ...................................................................................... 31 

List of Tables

Table 1 - Constant Speed Pump/Motor Module ......................................................................... 18 Table 2 - Constant Speed Pump/Motor Module ......................................................................... 20 Table 3 - Digital Valve Module .................................................................................................... 22 Table 4 - Analog Valve Module ................................................................................................... 24 Table 5 - Analog Module ............................................................................................................. 26 Table 6 – Flow Totalization Module ........................................................................................... 28 Table 7 - Device Runtime Totalization Module .......................................................................... 28 

List of Figures Figure 1 - New Controller Setup .................................................................................................... 5Figure 2 - Change Controller Type ................................................................................................ 6 Figure 3 - Controller Selection ....................................................................................................... 6 Figure 4 - Add New I/O Module .................................................................................................... 7 Figure 5 - Module Selection ........................................................................................................... 7 Figure 6 - Task Layout .................................................................................................................... 9 Figure 7 - Sub Task Layout ............................................................................................................. 9 Figure 8 - MainRoutine Logic ...................................................................................................... 10 Figure 9 - Digital Input Mapping ................................................................................................ 11 Figure 10 - Digital Input Conditioning ....................................................................................... 11 Figure 11 - Digital Output Mapping ........................................................................................... 11 Figure 12 - Analog Input Mapping ............................................................................................. 12 Figure 13 - Analog Input Conditioning ...................................................................................... 12 Figure 14 - Analog Output .......................................................................................................... 13 Figure 15 – Read Message Configuration .................................................................................. 13 Figure 16 - Read Message Path ................................................................................................... 14 Figure 17 - Communication Heartbeat ....................................................................................... 14 Figure 18 - Communication Alarm .............................................................................................. 15 Figure 19 - Message Delay ........................................................................................................... 16 Figure 20 - Message Command ................................................................................................... 16 Figure 21 - Constant Speed Drive AOI ........................................................................................ 17 Figure 22 - Constant Speed Tags ................................................................................................. 18 Figure 23 - Variable Speed Drive AOI ......................................................................................... 19 Figure 24 - Variable Speed Tags .................................................................................................. 20 Figure 25 - Digital Valve Drive AOI ............................................................................................. 22 Figure 26 - Digital Valves Tags .................................................................................................... 22 Figure 27 - Analog Valve Drive AOI ............................................................................................ 24 Figure 28 - Analog Valve Tags ..................................................................................................... 24 Figure 29 - Analog Device AOI .................................................................................................... 26 Figure 30 - Analog Device Alarm AOI ......................................................................................... 26 

 

Page 4: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- iii -

Figure 31 - Analog Device Tags ................................................................................................... 26 Figure 32 - Auto Control Task ..................................................................................................... 29 Figure 33 - Auto Control Subroutine Calls ................................................................................. 29 Figure 34 - Duty Start Request .................................................................................................... 30  Revision History

Version By Comments Date1.0 Eramosa Engineering Inc. Draft – Initial release for review 20/06/181.1 Eramosa Engineering Inc. Final – Updated with comments 20/12/18

from the City.

Page 5: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

1.0 GENERAL The City of Orillia (The City) has standardized on the use of Rockwell Automation’s Logix family hardware. The PLCs provide the automation and control functionality within the SCADA system. The PLC Programming Standard is for consultants and contractors as a guide to programming within the City. The City’s standard was based upon the functionality within the Water Filtration Plant for standard control modules and program layout. Ultimately the programmer / system integrator is responsible for the development of all code, both standard modules as well as customized automatic control logic, to meet the intentions of any upgrade. This document describes how a PLC program shall be programmed and implemented. Included in this document is an explanation of the standard programming modules developed for use with all City Water and Wastewater Services projects. The goal is that a standard approach is followed for programming RPUs on all projects. This approach will:

i. Enable re-use of program routines; ii. Make it easier to troubleshoot programs;

iii. Provide for a shorter development cycle; iv. Provide greater flexibility to incorporate future modifications; v. Provide improved confidence in the automatic control functions; vi. Provide clarity; and,

vii. Enable consistency between projects (i.e. across plants and facilities). 1.1 PROGRAMMER REQUIREMENTS It is the programmer’s responsibility to follow the software standards and guidelines. Failure to follow these standards and guidelines will result in the City rejecting the programming and requiring the programmer to resubmit the design per the standards and guidelines at no extra cost to the City. Should there be an issue with any standard code the programmer shall raise this to the City such that it can be addressed prior to software development, testing, and implementation. In order to provide consistency and reliability, all programmable controllers must be programmed in the same format and structure, according to the City s standards. Before any programming begins, the Programmer must develop process control narratives (PCN) based on approved process narratives. PCNs are to be reviewed and approved by the City of Orillia prior to code development. Depending on the nature of the project the PCN may be developed by the design consultant and updated by the programmer upon completion. This will be addressed on a case by case basis and form part of the contract documents for upgrades defining the scope of work with respect to the PCN. The programmer shall use their own software development licenses, hardware and software procedures to produce the system programs. The City s primary requirement is that the programmer, in designing, programming and implementing the software, assures that a safe, reliable and effective program is provided in accordance with the standards and guidelines defined in this document, contract specifications, drawings, and other documents. The City of Orillia is the owner of all software developed by the Programmer and therefore owns all rights for its use and distribution. All software must be turned over to the City in an editable format upon request of the City, during commissioning, and at the conclusion of a project. Software modules which are new or require modification require written approval from the City prior to the Programmer proceeding. Any new or modified software modules must be thoroughly documented and included in the Operation and Maintenance manual. New or

- 1 -

Page 6: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

modified software modules will be incorporated in the City s standard baseline application for future deployment. In general this standard is a guide to implementing PLC programs within the City and is generally understood that the programmer is a competent and experienced programmer within the Municipal water/wastewater sector as well as familiar with the hardware and programming environment used in the City. 1.2 SUBMISSIONS The following submittals must be made to the City at the end of the project:

i. If applicable, provide all software associated with the controllers licensed in City’s name, on original storage media in original storage packaging;

ii. One softcopy of the documented project file for each PLC being programmed; iii. A comprehensive description of any custom device routines developed including

a detailed list of physical and SCADA inputs and outputs; iv. As-Built control narratives; v. As-Built I/O lists; vi. As-Built Network Architecture Drawing; vii. As Built Flow Diagrams; and, viii. As Built Process and Instrumentation Drawings.

2.0 BACKGROUND 2.1 GLOSSARY AI – Analog Input

A field input capable of reading a 4-20mA, 0-5VDC, or 0-10VDC signals to represent process values.

AO – Analog Output

A field output capable of sending a 4-20mA, 0-5VDC, or 0-10VDC signal to represent a process value.

AOI – Add On Instruction

A sub routine defined in a PLC program which can have multiple occurrences.

ControlLogix

A model of programmable logic controller (PLC) from Allen-Bradley used for control and automation.

DDE – Dynamic Data Exchange

Dynamic Data Exchange is a technology for communication between multiple applications under Microsoft Windows operating systems.

DI – Digital Input

A field input capable of reading a 24VDC, or 120VAC on or off condition.

DO – Digital Output

A field output capable of sending a 24VDC, or 120VAC on or off condition.

- 2 -

Page 7: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

FBD – Function Block Diagram

A programming language supported as part of the IEC 61131 standards which features functions blocks arranged on a grid, executed in sequential orders. Connecting network lines passes variables to and from each function blocks.

GE iFIX

A human machine interface (HMI) software used for control, and status of process.

HMI – Human Machine Interface

A human machine interface (HMI) is typically a graphic application that resides on an industrial computer, operator interface terminal, and laptop or computer tower. The application is capable of interacting with the programmable logic controller with the result of process automation, equipment control, alarming, data collection and data display. For the City of Orillia Water and Wastewater System, the HMI is specifically referring to the system wide SCADA that is operated in the main control centers using GE iFIX.

I/O – Input / Output

A physical connection point from field wiring that is terminated at the PLC.

Ladder

A routine within a PLC programmed in the Ladder Diagram language.

LD – Ladder Diagram

A programming language supported as part of the IEC 61131 standards which features rungs, contacts, coils and various program blocks.

MSG – Message Instructions

Instruction sets which when configured are responsible for sending and receiving information between PLC processors on a network.

OIT – Operator Interface Terminal

An operator interface terminal is a specific computer machine which generally only has use as a human machine interface terminal. The operator interface terminal generally takes the form of a touch screen computer, but may have a keyboard and mouse as well. For the City of Orillia Water and Wastewater System, the OIT is considered the site specific local SCADA controls installed on a GE QuickPanel touch screen. OPC – OLE for Process Control

The OPC specification is open connectivity via open standards. It defines a standard set of objects, interfaces and methods for process control and data communication ensuring interoperability.

P&ID – Process and Instrumentation Drawings

A series of drawings which show all field devices related to a given process or building. The drawing will typically feature details on what signals are read and sent to field and PLC processors.

PCN – Process Control Narrative

A document describing how system components should be configured and programmed to control and monitor a specific process, process area or facility.

- 3 -

Page 8: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

RPU or PAC or PLC – Remote Processing Unit Programmable Automation Controller or Programmable Logic Controller

A remote processing unit is a digital computer used for automation of industrial processes. Unlike general-purpose computers, the RPU/PLC/PAC is designed for multiple input and output arrangements, extended temperature ranges, immunity to electrical noise, and resistance to vibration and impact.

RSLogix5000

A programming environment software from Allen-Bradley used configure and program PLC controllers.

Rung

A single line of logic within a ladder diagram program.

UDT – User Defined Data Type

A set of sub defined tags grouped under a parent structure.

2.2 PROCESS AREA / SITE CODES Below are process area codes, and site codes for the remote station within The City’s Water and Wastewater control systems.

2.2.1 Water Remote Site Codes

i. CSPS – Champlain St. Pumping Station ii. HHRS – Harvie Hill Reservoir iii. RRRS – Rosemary Road Reservoir iv. WFP1 – Water Filtration Plant v. WODS – West Orillia Dispensing System vi. WOPS – West Orillia Well PS

2.2.2 Water Treatment Center Process Areas

i. LLP1 – Low Lift Pumping Process Area ii. CHL1 – Chemical Process Area iii. FLT1 – Filter Process Area iv. HLP1 – High Lift Process Area v. WLP1 – Well Pump Process Area

2.2.3 Wastewater Remote Site Codes

i. BAPS – Broadview Ave Pumping Station ii. BSPS – Bayview Sewage Pumping Station iii. CHPS – Champlain Sewage Pumping Station iv. CPPS – Couchiching Point Pumping Station v. CRPS – Commerce Road Pumping Station vi. FNPS – Forest Ave North Pumping Station vii. FRPS – Fittons Road West Pumping Station

viii. JSPS – John Street Pumping Station ix. JWPS – James Street Pumping Station x. SSPS – Shannon Street Pumping Station

- 4 -

Page 9: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

2.2.4 Wastewater Treatment Center Process Areas

vi. BLR1 – Blower Process Area vii. BOI1 – Boiler Process Area

viii. CHL1 – Chemical Process Area ix. DAF1 – DAF Process Area x. DGT1 – Digester Process Area xi. GEN1 – Generator Process Area xii. PCL1 – Primary Clarifier Process Area

xiii. SCL1 – Secondary Clarifier Process Area xiv. SCR1 – Screening Process Area xv. UVR1 – UV Process Area

3.0 HARDWARE CONFIGURATION 3.1 PROCESSORS 3.2 PROCESSOR CONFIGURATION In RSLogix5000, the steps to configure the processor for a project are as follows:

1. If creating a new project, configure processor as seen in Figure 1 below.

Figure 1 - New Controller Setup

- 5 -

Page 10: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

2. If modifying program, in the Controller Organizer, shown in Figure 2, right click on the controller, and select ‘Properties’.

- 6 -

Figure 2 - Change Controller Type

3. A window will popup that will give the option to select the processor from a dropdown list as seen in Figure 3.

Figure 3 - Controller Selection

Page 11: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

3.3 HARDWARE CONFIGURATION

1. When adding I/O to processor, right click on “CompactBus Local” and select “New Module” as seen in Figure 4.

- 7 -

Figure 4 - Add New I/O Module

2. When presented with the module selection, you will have options for compatible I/O for the controller as seen in Figure 5.

Figure 5 - Module Selection

Page 12: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

4.0 SOFTWARE CONFIGURATION 4.1 PLC PROGRAMMING SOFTWARE The City of Orillia Water and Wastewater Services Programming Modules are created in the Allen-Bradley RSLogix programming environment. Programmers are to confirm at the start of each project with the City to ensure that the proper version of the software is being used. The correct version of the software is required to ensure it has the full range of functionality in the system. When starting a new project, the base load program should be used for the basis of the project. The base program is the Water Filtration Plant PLC code. 4.2 PROGRAMMING STRUCTURE

4.2.1 FILE NAMING Naming of PLC Programs should use the following convention: ‘xxxx_zzzz where:

i. xxxx is Site Code; and, ii. zzzz is Process Area Code (If Applicable).

I.e. ‘WWTC_DIG’ would be for the Waste Water Treatment Center Digester process area.

4.2.2 RUNG DOCUMENTATION

i. Rungs are to be documented for the ease of diagnostic purposes; ii. A programmer’s change log is required to assist with helping to understand the date

and purpose of updates to the PLC program. This log is to show up on the very first network and is not to include commissioning modifications; and,

iii. When making edits to an PLC program, the programmer must indicate the following in the rung comments on the first relevant rung, with the newest changes on top:

a. The edits made including (detailed) descriptions of modifications; b. Name of programmer and associated company that made the edits; and, c. Date of edits.

4.2.3 TAG NAMES

i. Every tag is to have a unique descriptive tag name.

ii. The Tagging Standard is as follows:

i. Fragment 1: Process Area: If applicable, with multiple process areas controlled from a single processor. i.e. ‘DIG’ Digester, ‘SCR’ Screening

ii. Fragment 2: Device Type: This is the character equipment tag name. i.e. ‘FIT’ Flow Meter, ‘HLP’ High Lift Pump

iii. Fragment 3: Device Identification: Unique 4 digit number.

Refer to the Water Filtration Plant code for sample tag fragments.

- 8 -

Page 13: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

4.2.4 TASK LAYOUT Tasks within the Controller Organizer tree shall be organized into smaller similar routines. This reduces troubleshooting time, as each program has the same layout. Examples of grouped routines can be seen below in Figure 6.

- 9 -

Figure 6 - Task Layout

Within each task, the subtasks are created and called from a MainRoutine with the use of Jump Subroutine commands to call each routine individually. This allows the ability to specify the order of routine execution, and the ability to disable specific logic for diagnostic purposes. This can be seen below in Figure 7 & Figure 8.

Figure 7 - Sub Task Layout

Page 14: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 10 -

Figure 8 - MainRoutine Logic

This same structure is used with all tasks. Some standard routines that will occur in a program include:

i. PLC Diagnostics; ii. Input and Output Buffering; iii. Input Conditioning; iv. Alarm Handling; v. Analog Statistics; vi. Auto Control Processes; vii. Valve Position; and,

viii. Pump Drivers. 4.3 I/O Mapping Input and Output mapping is done with the use of a buffer tag. This allows the use of debounce timers, or other forms of conditional manipulation of data if it is required.

4.3.1 Digital Inputs The digital inputs are mapped from the physical input address into the respective buffer tag. As seen below in Figure 9. This buffer tag is then passed to the input conditioning to apply a debounce on the signal. This can be seen below in Figure 10. The output of the input conditioning is then the status used within the program.

Page 15: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 11 -

Figure 9 - Digital Input Mapping

Figure 10 - Digital Input Conditioning

4.3.2 Digital Outputs Digital outputs are mapped from the command from the device drivers to the physical output of the PLC card. This can be seen below in Figure 11.

Figure 11 - Digital Output Mapping

Page 16: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

4.3.3 Analog Inputs Analog inputs are mapped from the physical input into a raw value tag. This raw value is then used in an analog input buffer to limit the minimum and maximum raw value between upper and lower limits, as seen below in Figure 12. This buffered analog value is then passed to an analog input conditioning block to scale the value appropriately to be used within the program as seen below in Figure 13.

- 12 -

Figure 12 - Analog Input Mapping

Figure 13 - Analog Input Conditioning

Page 17: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

4.3.4 Analog Outputs Analog outputs will take the output of the driver, and pass it to the physical output of the PLC card as below in Figure 14.

- 13 -

Figure 14 - Analog Output

4.4 PLC to PLC Communications PLC to PLC communication may be necessary to message information between PLCs. Information that may be necessary to message across may include alarms, or interlocks between different process areas within a plant, or data from a remote site to a central PLC.

4.4.1 Communication Setup When setting up PLC to PLC communication, READ message blocks shall be used as a default form of messaging, but WRITEs may be used under certain circumstances if required. Proper configuration of the message block must be set to ensure connection. Examples of the configuration may be seen below in Figure 15 and Figure 16.

Figure 15 – Read Message Configuration

Page 18: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 14 -

Figure 16 - Read Message Path

4.4.2 Heartbeat Alarming When setting up the Data Communication routine, there are certain standards to follow to properly set up communication. Programming a Heartbeat to be sent along with data allows the ability to monitor the status between the PLCs. This can trigger an alarm if the value goes stale when networking fails. This heartbeat alarm can also be set in parallel with a “Not Done” timer if the message fails to finish in time, or with the Error from the message. The Heartbeat, and alarm can be seen below in Figure 17 and Figure 18.

Figure 17 - Communication Heartbeat

Page 19: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 15 -

Figure 18 - Communication Alarm

Page 20: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

4.4.3 Communication Routine Structure The messaging routine follows a structure to delay the message blocks so that messages stagger triggers to minimize network traffic. A counter with the appropriate number of message blocks will increment at a set interval based on a delay timer. Once a message block is on the step, it will execute, and proceed to the next message. The structure can be seen below in Figure 19 and Figure 20.

- 16 -

Figure 19 - Message Delay

Figure 20 - Message Command

Page 21: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

5.0 PROGRAMMING MODULES Each of the programming modules are outlined below with a summary for each of their purpose, variables to be used and an outline of the logic to be used. In general it is the responsibility of the programmer to map the physical I/O to the modules, map to the HMI tags / graphics / popups, etc., configure the internal timers and enable/disables, and develop the automatic control routines as required. In some instances a device in the field may not have the exact I/O to line up with the programming modules. In those cases the programmer will be required to simulate field status signals such as remote mode or running / opened / closed status signals based upon actual PLC commands for example. 5.1 MOTOR MODULES The motor modules are used with any rotating equipment including pumps, motors, fans, blowers or conveyors. If a motor module is not able to perform the desired function of the developer then additional functions should be coded in the particular device routine while still using the standard motor module. The standard modules for a motor include a constant speed pump, a variable speed pump and a chemical metering pump.

5.1.1 CONSTANT SPEED PUMP / MOTOR CONTROL 5.1.1.1 PURPOSE The Constant Speed Pump / Motor Control module is for any constant speed motor operated devices. The modules include the logic to monitor the I/O associated with the device and to handle the mode of control, start/stop requests, hardwired and virtual alarming, start counter and minimum on/off time. Various timers for starting, stopping and alarming are to be configured. It is as the City s discretion to use a single Start/Stop command digital output, or a separate Start Command and Stop command digital outputs. In the table below the separate start and stop commands are shown for information purposes. The Constant Speed Pump Driver includes various sub AOIs and UDTs. The main AOI and sub UDT and AOIs are shown below in Figure 21 and Figure 22.

- 17 -

Figure 21 - Constant Speed Drive AOI

Page 22: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 18 -

Figure 22 - Constant Speed Tags

5.1.1.2 VARIABLES Table 3 summarizes the hardwired I/O registers and virtual alarms associated with the constant speed pump module.

Description Tag NameStart Command DRV.ST_CMDStop Command DRV.SP_CMDRunning Status DCM.RUN_STSDuty Register DCM.DTY_REGLocal/Remote Status DCM.DMODE_MDIRemote Auto Mode Select DRV.AUT_HMIRemote Manual Mode Select DRV.MAN_HMIStart/Stop Request Status DCM.SYMB_MDIOperation Permissive Status DCM.OPRM_STSElapsed Runtime DCM.RUN_ETMAcknowledge Alarms ALH.ACK_HMIAll Alarms Enabled ALH.ENB_HMIFault Alarm Status DCM.FLT_ALMFault Alarm Enable ALH.FLT.ENB_HMIFault Alarm Dialer Enable ALH.FLT.END_HMIFault Latch Enable ALH.FLT.LTCH_HMIFault Reset ALH.FLT.RST_HMIFault Alarm Delay Setpoint ALH.FLT.TMN_HMIFail to Start Alarm Status DCM.STFL_ALRMFail to Start Alarm Enable ALH.STFL.ENB_HMIFail to Start Alarm Dialer Enable ALH.STFL.END_HMIFail to Start Latch Enable ALH.STFL.LTCH_HMIFail to Start Reset ALH.STFL.RST_HMIFail to Start Alarm Delay Setpoint ALH.STFL.TMN_HMIFail to Stop Alarm Status DCM.SPFL_ALRMFail to Stop Alarm Enable ALH.SPFL.ENB_HMIFail to Stop Alarm Dialer Enable ALH.SPFL.END_HMIFail to Stop Latch Enable ALH.SPFL.LTCH_HMIFail to Stop Reset ALH.SPFL.RST_HMIFail to Stop Alarm Delay Setpoint ALH.SPFL.TMN_HMIUncommanded Start Alarm Status DCM.UCST_ALRMUncommanded Start Alarm Enable ALH.UCST.ENB_HMIUncommanded Start Alarm Dialer Enable ALH.UCST.END_HMIUncommanded Start Latch Enable ALH.UCST.LTCH_HMIUncommanded Start Reset ALH.UCST.RST_HMIUncommanded Start Alarm Delay Setpoint ALH.UCST.TMN_HMI

Table 1 - Constant Speed Pump/Motor Module

Page 23: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 19 -

Description Tag NameUncommanded Stop Alarm Status DCM.UCSP_ALRMUncommanded Stop Alarm Enable ALH.UCSP.ENB_HMIUncommanded Stop Alarm Dialer Enable ALH.UCSP.END_HMIUncommanded Stop Latch Enable ALH.UCSP.LTCH_HMIUncommanded Stop Reset ALH.UCSP.RST_HMIUncommanded Stop Alarm Delay Setpoint ALH.UCSP.TMN_HMI

5.1.2 VARIABLE SPEED PUMP / MOTOR CONTROL

5.1.2.1 PURPOSE The Variable Speed Pump / Motor Control module is for constant speed motor operated devices. The modules include the logic to monitor the I/O associated with the device and to handle the mode of control, start/stop requests, hardwired and virtual alarming, start counter and minimum on/off time. Various timers for starting, stopping and alarming are to be configured. It is as the City s discretion to use a single Start/Stop command digital output, or a separate Start Command and Stop command digital outputs. In the table below the separate start and stop commands are shown for information purposes. The Variable Speed Pump Driver includes various sub AOIs and UDTs. The main AOI and sub UDT and AOIs are shown below in Figure 23 and Figure 24.

Figure 23 - Variable Speed Drive AOI

Page 24: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 20 -

Figure 24 - Variable Speed Tags

5.1.2.2 VARIABLES Table 4 summarizes the hardwired I/O registers and virtual alarms associated with the constant speed pump module. Table 2 - Constant Speed Pump/Motor Module

Description Tag NameStart Command DRV.ST_CMDStop Command DRV.SP_CMDRunning Status DCM.RUN_STSSpeed Output Command DCM.SPD_CALSpeed Feedback DCM.SPD_EGUSpeed Feedback Fault DCM.SPDFLT_ALMDuty Register DCM.DTY_REGLocal/Remote Status DCM.DMODE_MDIRemote Auto Mode Select DRV.AUT_HMIRemote Manual Mode Select DRV.MAN_HMIStart/Stop Request Status DCM.SYMB_MDIOperation Permissive Status DCM.OPRM_STSElapsed Runtime DCM.RUN_ETMAll Alarms Enabled ALH.ENB_HMIFault Alarm Status DCM.FLT_ALMFault Alarm Enable ALH.FLT.ENB_HMIFault Alarm Dialer Enable ALH.FLT.END_HMIFault Latch Enable ALH.FLT.LTCH_HMIFault Reset ALH.FLT.RST_HMIFault Alarm Delay Setpoint ALH.FLT.TMN_HMIFail to Start Alarm Status DCM.STFL_ALRMFail to Start Alarm Enable ALH.STFL.ENB_HMIFail to Start Alarm Dialer Enable ALH.STFL.END_HMIFail to Start Latch Enable ALH.STFL.LTCH_HMIFail to Start Reset ALH.STFL.RST_HMIFail to Start Alarm Delay Setpoint ALH.STFL.TMN_HMIFail to Stop Alarm Status DCM.SPFL_ALRMFail to Stop Alarm Enable ALH.SPFL.ENB_HMIFail to Stop Alarm Dialer Enable ALH.SPFL.END_HMIFail to Stop Latch Enable ALH.SPFL.LTCH_HMIFail to Stop Reset ALH.SPFL.RST_HMIFail to Stop Alarm Delay Setpoint ALH.SPFL.TMN_HMIUncommanded Start Alarm Status DCM.UCST_ALRMUncommanded Start Alarm Enable ALH.UCST.ENB_HMI

Page 25: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 21 -

Description Tag NameUncommanded Start Alarm Dialer Enable ALH.UCST.END_HMIUncommanded Start Latch Enable ALH.UCST.LTCH_HMIUncommanded Start Reset ALH.UCST.RST_HMIUncommanded Start Alarm Delay Setpoint ALH.UCST.TMN_HMIUncommanded Stop Alarm Status DCM.UCSP_ALRMUncommanded Stop Alarm Enable ALH.UCSP.ENB_HMIUncommanded Stop Alarm Dialer Enable ALH.UCSP.END_HMIUncommanded Stop Latch Enable ALH.UCSP.LTCH_HMIUncommanded Stop Reset ALH.UCSP.RST_HMIUncommanded Stop Alarm Delay Setpoint ALH.UCSP.TMN_HMI

5.2 VALVE MODULES The valve modules are for any type of valves and will function with digital (open/closed) or analog (variable position) type valves. If a valve module is not able to perform the desired functions of the developer, then the additional functions should be coded into the particular device program while still employing a valve module. The City s SCADA group is to be consulted with respect to any proposed changes to the modules, when a module is unable to meet the requirements of the software developer. These modules include all the logic to monitor the I/O associated with the valve and to handle the mode of control, open/close requests, hardwired and virtual alarming. Timers for opening, closing and alarming are to be configured by the integrator for each project and is their responsibility to do so in conjunction with the requirements of the process.

5.2.1 DIGITAL VALVE CONTROL 5.2.1.1 PURPOSE The digital valve module is for use with digital motorized valve devices and includes several hardwired and virtual alarms along with monitoring and control capability. The Digital Valve Driver includes various sub AOIs and UDTs. The main AOI and sub UDT and AOIs are shown below in Figure 25 and Figure 26.

Page 26: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 22 -

Figure 25 - Digital Valve Drive AOI

Figure 26 - Digital Valves Tags

5.2.1.2 VARIABLES The digital valve module registers are listed in Table 5.

Table 3 - Digital Valve Module

Description Tag NameOpen Command DRV.OP_REQClose Command DRV.CL_REQOpened Status DCM.OP_STSClosed Status DCM.CL_STSLocal/Remote Status DCM.DMODE_MDIRemote Auto Mode Select DRV.AUT_HMIRemote Manual Mode Select DRV.MAN_HMIOpen/Close Request Status DCM.SYMB_MDIOperation Permissive Status DCM.OPRM_STSAll Alarms Enabled ALH.ENB_HMIFault Alarm Status DCM.FLT_ALM

Page 27: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 23 -

Description Tag NameFault Alarm Enable ALH.FLT.ENB_HMIFault Alarm Dialer Enable ALH.FLT.END_HMIFault Latch Enable ALH.FLT.LTCH_HMIFault Reset ALH.FLT.RST_HMIFault Alarm Delay Setpoint ALH.FLT.TMN_HMIFail to Open Alarm Status DCM.OPFL_ALRMFail to Open Alarm Enable ALH.OPFL.ENB_HMIFail to Open Alarm Dialer Enable ALH.OPFL.END_HMIFail to Open Latch Enable ALH.OPFL.LTCH_HMIFail to Open Reset ALH.OPFL.RST_HMIFail to Open Alarm Delay Setpoint ALH.OPFL.TMN_HMIFail to Close Alarm Status DCM.CLFL_ALRMFail to Close Alarm Enable ALH.CLFL.ENB_HMIFail to Close Alarm Dialer Enable ALH.CLFL.END_HMIFail to Close Latch Enable ALH.CLFL.LTCH_HMIFail to Close Reset ALH.CLFL.RST_HMIFail to Close Alarm Delay Setpoint ALH.CLFL.TMN_HMIUncommanded Open Alarm Status DCM.UCOP_ALRMUncommanded Open Alarm Enable ALH.UCOP.ENB_HMIUncommanded Open Alarm Dialer Enable ALH.UCOP.END_HMIUncommanded Open Latch Enable ALH.UCOP.LTCH_HMIUncommanded Open Reset ALH.UCOP.RST_HMIUncommanded Open Alarm Delay Setpoint ALH.UCOP.TMN_HMIUncommanded Close Alarm Status DCM.UCCL_ALRMUncommanded Close Alarm Enable ALH.UCCL.ENB_HMIUncommanded Close Alarm Dialer Enable ALH.UCCL.END_HMIUncommanded Close Latch Enable ALH.UCCL.LTCH_HMIUncommanded Close Reset ALH.UCCL.RST_HMIUncommanded Close Alarm Delay Setpoint ALH.UCCL.TMN_HMI

5.2.2 ANALOG VALVE CONTROL

5.2.2.1 PURPOSE The analog valve module is for use with analog motorized valve devices and includes several hardwired and virtual alarms along with monitoring and control capability. The Modular Valve Driver includes various sub AOIs and UDTs. The main AOI and sub UDT and AOIs are shown below in Figure 27 and Figure 28.

Page 28: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 24 -

Figure 27 - Analog Valve Drive AOI

Figure 28 - Analog Valve Tags

5.2.2.2 VARIABLES The analog valve module registers are listed in Table 5. Table 4 - Analog Valve Module

Description Tag NameOpen Command DRV.OP_REQClose Command DRV.CL_REQOpened Status DCM.OP_STSClosed Status DCM.CL_STSPosition Output Command DCM.POS_CALPosition Feedback DCM.POS_EGUPosition Feedback Fault DCM.PFL_ALM

Page 29: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 25 -

Description Tag NameLocal/Remote Status DCM.DMODE_MDIRemote Auto Mode Select DRV.AUT_HMIRemote Manual Mode Select DRV.MAN_HMIOpen/Close Request Status DCM.SYMB_MDIOperation Permissive Status DCM.OPRM_STSAll Alarms Enabled ALH.ENB_HMIFault Alarm Status DCM.FLT_ALMFault Alarm Enable ALH.FLT.ENB_HMIFault Alarm Dialer Enable ALH.FLT.END_HMIFault Latch Enable ALH.FLT.LTCH_HMIFault Reset ALH.FLT.RST_HMIFault Alarm Delay Setpoint ALH.FLT.TMN_HMIFail to Open Alarm Status DCM.OPFL_ALRMFail to Open Alarm Enable ALH.OPFL.ENB_HMIFail to Open Alarm Dialer Enable ALH.OPFL.END_HMIFail to Open Latch Enable ALH.OPFL.LTCH_HMIFail to Open Reset ALH.OPFL.RST_HMIFail to Open Alarm Delay Setpoint ALH.OPFL.TMN_HMIFail to Close Alarm Status DCM.CLFL_ALRMFail to Close Alarm Enable ALH.CLFL.ENB_HMIFail to Close Alarm Dialer Enable ALH.CLFL.END_HMIFail to Close Latch Enable ALH.CLFL.LTCH_HMIFail to Close Reset ALH.CLFL.RST_HMIFail to Close Alarm Delay Setpoint ALH.CLFL.TMN_HMIUncommanded Open Alarm Status DCM.UCOP_ALRMUncommanded Open Alarm Enable ALH.UCOP.ENB_HMIUncommanded Open Alarm Dialer Enable ALH.UCOP.END_HMIUncommanded Open Latch Enable ALH.UCOP.LTCH_HMIUncommanded Open Reset ALH.UCOP.RST_HMIUncommanded Open Alarm Delay Setpoint ALH.UCOP.TMN_HMIUncommanded Close Alarm Status DCM.UCCL_ALRMUncommanded Close Alarm Enable ALH.UCCL.ENB_HMIUncommanded Close Alarm Dialer Enable ALH.UCCL.END_HMIUncommanded Close Latch Enable ALH.UCCL.LTCH_HMIUncommanded Close Reset ALH.UCCL.RST_HMIUncommanded Close Alarm Delay Setpoint ALH.UCCL.TMN_HMI

5.3 ANALOG MODULES The analog modules are for any type of analog sensor. If an analog module is not able to perform the desired functions of the programmer, then the additional functions should be coded into the particular device program while still employing an analog module. The City is to be consulted with respect to any proposed changes to the modules, when a module is unable to meet the requirements of the software developer. These modules include all the logic to monitor the I/O associated with the sensor and to handle the hardwired and virtual alarming. Timers for alarming are to be configured by the integrator for each project and is their responsibility to do so in conjunction with the requirements of the process.

Page 30: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

5.3.1 ANALOG CONTROL 5.3.1.1 PURPOSE The analog module is for use with analog devices and includes several hardwired and virtual alarms along with monitoring capability. The Analog Driver includes various sub AOIs and UDTs. The main AOI and sub UDT and AOIs are shown below in Figure 29, Figure 30, and Figure 31.

- 26 -

Figure 29 - Analog Device AOI

Figure 30 - Analog Device Alarm AOI

Figure 31 - Analog Device Tags

5.3.1.2 VARIABLES The analog module registers are listed in Table 7. Table 5 - Analog Module

Description Tag NameCurrent Value DRV.OP_REQDevice Mode DRV.CL_REQCalibration Time Setpoint AIC.CLBTM_HMICalibration Run Mode AIC.CLB_HMICalibration Time Elapsed DCM.CLBTM_REG

Page 31: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 27 -

Description Tag NameAll Alarms Enabled ALH.ENB_HMIFault Alarm Dialer Enable ALH.FLT.END_HMIFault Alarm Enable ALH.FLT.ENB_HMIFault Alarm Latch Enable ALH.FLT.LTCH_HMIFault Alarm Reset ALH.FLT.RST_HMIFault Alarm Delay Setpoint ALH.FLT.TMN_HMIHigh High Alarm Setpoint ALH.HIHI.SPON_HMIHigh High Alarm Dialer Enable ALH.HIHI.END_HMIHigh High Alarm Enable ALH.HIHI.ENB_HMIHigh High Alarm Latch Enable ALH.HIHI.LTCH_HMIHigh High Alarm Reset ALH.HIHI.RST_HMIHigh High Alarm Delay Setpoint ALH.HIHI.TMN_HMIHigh Alarm Setpoint ALH.HI.SPON_HMIHigh Alarm Dialer Enable ALH.HI.END_HMIHigh Alarm Enable ALH.HI.ENB_HMIHigh Alarm Latch Enable ALH.HI.LTCH_HMIHigh Alarm Reset ALH.HI.RST_HMIHigh Alarm Delay Setpoint ALH.HI.TMN_HMILow Low Alarm Setpoint ALH.LOLO.SPON_HMILow Low Alarm Dialer Enable ALH.LOLO.END_HMILow Low Alarm Enable ALH.LOLO.ENB_HMILow Low Alarm Latch Enable ALH.LOLO.LTCH_HMILow Low Alarm Reset ALH.LOLO.RST_HMILow Low Alarm Delay Setpoint ALH.LOLO.TMN_HMILow Alarm Setpoint ALH.LO.SPON_HMILow Alarm Dialer Enable ALH.LO.END_HMILow Alarm Enable ALH.LO.ENB_HMILow Alarm Latch Enable ALH.LO.LTCH_HMILow Alarm Reset ALH.LO.RST_HMILow Alarm Delay Setpoint ALH.LO.TMN_HMISignal Fault Alarm Dialer Enable ALH.SIGFLT.END_HMISignal Fault Alarm Enable ALH.SIGFLT.ENB_HMISignal Fault Alarm Latch Enable ALH.SIGFLT.LTCH_HMISignal Fault Alarm Reset ALH.SIGFLT.RST_HMISignal Fault Alarm Delay Setpoint ALH.SIGFLT.TMN_HMISignal No Change Alarm Dialer Enable ALH.SIGNC.END_HMISignal No Change Alarm Enable ALH.SIGNC.ENB_HMISignal No Change Alarm Latch Enable ALH.SIGNC.LTCH_HMISignal No Change Alarm Reset ALH.SIGNC.RST_HMISignal No Change Alarm Delay Setpoint ALH.SIGNC.TMN_HMISignal Overrange Alarm Setpoint ALH.SIGOR.SPON_HMISignal Overrange Alarm Dialer Enable ALH.SIGOR.END_HMISignal Overrange Alarm Enable ALH.SIGOR.ENB_HMISignal Overrange Alarm Latch Enable ALH.SIGOR.LTCH_HMISignal Overrange Alarm Reset ALH.SIGOR.RST_HMISignal Overrange Alarm Delay Setpoint ALH.SIGOR.TMN_HMISignal Underrange Alarm Setpoint ALH.SIGUR.SPON_HMISignal Underrange Alarm Dialer Enable ALH.SIGUR.END_HMISignal Underrange Alarm Enable ALH.SIGUR.ENB_HMISignal Underrange Alarm Latch Enable ALH.SIGUR.LTCH_HMISignal Underrange Alarm Reset ALH.SIGUR.RST_HMISignal Underrange Alarm Delay Setpoint ALH.SIGUR.TMN_HMI

Page 32: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

5.4 CALCULATIONS

5.4.1 FLOW TOTALIZATION 5.4.1.1 PURPOSE The purpose of the Flow Totalization Module, is to calculate the accumulated volume of a flow meter. 5.4.1.2 VARIABLES

- 28 -

Table 6 – Flow Totalization Module

Description Tag NameTotal Non-Resettable AIS.TOT_M3Resettable Total AIS.RST_M3Total Reset AIS.RST_HMIDaily Total (Day 1) AIS.DAY_M3[0]Daily Total (Day 2) AIS.DAY_M3[1]Daily Total (Day 3) AIS.DAY_M3[2]Daily Total (Day 4) AIS.DAY_M3[3]Daily Total (Day 5) AIS.DAY_M3[4]Daily Total (Day 6) AIS.DAY_M3[5]Daily Total (Day 7) AIS.DAY_M3[6]Daily Total (Day 8) AIS.DAY_M3[7]

5.4.2 RUNTIME

5.4.2.1 PURPOSE The Runtime module provides a standard set of runtime values for any motorized device such as a pump or a blower. 5.4.2.2 VARIABLES / REGISTERS

Table 7 - Device Runtime Totalization Module

Description Tag NameElapsed Runtime DCM.RUN_EMT

5.5 AUTOMATIC CONTROL ROUTINES

Automatic routines contain control for auto control of devices, and duty rotation between devices such as pumps. Each process area shall be split into individual routines to maintain shorter troubleshooting and diagnostic time. The AutoControlProcess task will contain the auto control routines, and duty control routines with a main routine calling the subroutines. This can be seen below in Figure 32 and Figure 33.

Page 33: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

- 29 -

Figure 32 - Auto Control Task

Figure 33 - Auto Control Subroutine Calls

5.5.1 Duty Control Within the duty control, there are three (3) subroutines that are responsible for controlling the devices. The three main routines for duty are:

i. Duty Assignment

Page 34: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

ii. Parameters iii. Sequence

The duty assignment routine is used to assign pumps into a duty position, and check that no improper setting has been applied. This routine is also responsible for auto rotation of pumps if rotate on fail, or time have been applied. The parameter routine is used to set your setpoints related to the process area. This may include minimums and maximums, and ensuring valid entry of start and stop settings. The sequence routine is used to determine the start and stop requests of the auto logic. This logic is used to request the required duty pump which is then mapped to the corresponding pump driver start request.

5.5.2 Automatic Control Auto control within the Sequence Routine will determine the start and stop requests for the duty pumps. An example of a duty request can be seen below in Figure 34. This example shows the AOI for the start request. The enable for the AOI is determined to restrict the duty 1 pump from running. This could include alarms as below, or closed status of a valve, or another process running. The AOI then takes the parameters determined for the start and stop setpoints, and the on/off delay timers.

- 30 -

Figure 34 - Duty Start Request

Page 35: City of Orillia · SCADA System PLC Programming Standard December 2018 modified software modules will be incorporated in the City s standard baseline application for future deployment

City of Orillia SCADA System PLC Programming Standard December 2018

6.0 WATER FILTRATION PLANT REDUNDANCY The WFP ControlLogix system is a redundant setup. This programming standard does not address the configuration of the redundancy as the existing configuration is to be maintained. Future development of the system at remote sites and the wastewater system is to be standalone PLCs connected on the network. Expansion at the WFP can consider expansion of the remote I/O configuration or standalone PLCs as required.

7.0 TEST DOCUMENTATION Adhere to the City’s software factory acceptance test and software site acceptance test templates. Develop the test documentation from these templates for the specific requirements of the project.

- 31 -