13.07.2015 Views

Safety Considerations Guide, Tricon v9.0 - Tuv-fs.com

Safety Considerations Guide, Tricon v9.0 - Tuv-fs.com

Safety Considerations Guide, Tricon v9.0 - Tuv-fs.com

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Tricon</strong>Version 9<strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong><strong>Tricon</strong>ex CorporationAn Invensys <strong>com</strong>pany


Information in this document is subject to change without notice. Companies,names and data used in examples herein are fictitious unless otherwise noted. Nopart of this document may be reproduced or transmitted in any form or by anymeans, electronic or mechanical, for any purpose, without the express writtenpermission of <strong>Tricon</strong>ex Corporation.©2001 <strong>Tricon</strong>ex Corporation. All Rights Reserved.Microsoft, Windows, and Windows NT are registered trademarks of MicrosoftCorporation.Modbus is a registered trademark of Modicon Corporation.<strong>Tricon</strong>ex is a registered trademark of <strong>Tricon</strong>ex Corporation in the USA and othercountries.TriStation 1131 and <strong>Tricon</strong> are trademarks of <strong>Tricon</strong>ex Corporation in the USAand other countries.All other brands or product names may be trademarks or registered trademarks oftheir respective owners.Document No. 9720078-002Printed in the United States of America.


Acknowledgement<strong>Tricon</strong>ex acknowledges the generous assistance of TÜV Rheinland/Berlin-Brandenburg in the development of this guide. In addition, their efforts havecontributed to the overall quality and integrity of the <strong>Tricon</strong> system.TÜV Rheinland/Berlin-Brandenburg aims to “shape technology so that it does notput people and the environment at risk but is of the greatest benefit to them.” Toachieve this aim, TÜV offers support during the <strong>com</strong>plete life cycle of a product,from concept through development and testing to certification.


About This <strong>Guide</strong>This manual provides information about safety concepts and standards that applyto the <strong>Tricon</strong> controller.How This <strong>Guide</strong> Is OrganizedThis manual is organized as follows:• Chapter 1, “<strong>Safety</strong> Concepts”—Describes safety issues, safety standards,and implementation of safety measures.• Chapter 2, “Application <strong>Guide</strong>lines”—Provides information on industryguidelines and re<strong>com</strong>mendations.• Chapter 3, “Fault Management”—Discusses fault tolerance and faultdetection.• Chapter 4, “Application Development”—Discusses methods for developingapplications properly to avoid application faults• Appendix A, “Peer-to-Peer Communication”—Describes the functionblocks intended for use in safety-critical applications and shows theirStructured Text code.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


viRelated DocumentsRelated DocumentsThe following manuals contain information that is relevant to the use of the system.• Advanced Communication Module User's <strong>Guide</strong>• Enhanced Intelligent Communication Module User's Manual• Hiway Interface Module User's <strong>Guide</strong>• Network Communication Module User's <strong>Guide</strong>• <strong>Safety</strong> Manager Module User's <strong>Guide</strong>• <strong>Tricon</strong> DDE Server User's <strong>Guide</strong>• <strong>Tricon</strong> System Access Application Programmer's Reference• <strong>Tricon</strong> System Aliases Reference Manual• <strong>Tricon</strong> Planning & Installation <strong>Guide</strong>• TriStation 1131 Developer's <strong>Guide</strong> for <strong>Tricon</strong> Systems• TriStation 1131 Getting Started for <strong>Tricon</strong> Users• TriStation 1131 <strong>Tricon</strong>ex Libraries<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Abbreviations UsedviiAbbreviations UsedThe controller is hereafter called <strong>Tricon</strong>, except in cases where the full name mustbe used to ensure clarity. The TriStation 1131 Developer’s Workbench is hereaftercalled TriStation.The following list provides full names for abbreviations of safety terms used in thisguide.BPCSESDHAZOPMOCMTBFPESPFDPHAPSMRMPRRFSILSISSOVSRSSVBasic process control systemEmergency shutdownHazard and operability studyManagement of changeMean time between failureProgrammable electronic systemProbability to fail on demandProcess hazard analysisProcess safety managementRisk management programRisk reduction factor<strong>Safety</strong> integrity level<strong>Safety</strong>-instrumented systemSolenoid-operated valve<strong>Safety</strong> requirements specification<strong>Safety</strong> (relief) valve


viiiHow to Contact <strong>Tricon</strong>exHow to Contact <strong>Tricon</strong>exYou can obtain sales information and technical support for <strong>Tricon</strong>ex products fromany regional customer center or from corporate headquarters. To locate regionalcenters, go to which displays the Global Locator page on the <strong>Tricon</strong>ex web site at:http://www.triconex.<strong>com</strong>.Requesting Technical SupportYou can obtain technical support from any regional center and from offices inIrvine, California and Houston, Texas. If you require emergency or immediateresponse and are not a participant in the System Maintenance Program (SMP), youmay incur a charge. After-hours technical support is billed at the rate specified inthe current Customer Satisfaction Price List.Requests for support are prioritized as follows:• Emergency requests are given the highest priority.• Requests from SMP participants and customers with purchase order orcharge card authorization are given next priority.• All other requests are handled on a time-available basis.Gathering Supporting DocumentationBefore contacting corporate technical support, please try to solve the problem byreferring to the <strong>Tricon</strong>ex documentation. If you are unable to solve the problem,obtain the following information:• Error messages and other indications of the problem• Sequence of actions leading to the problem• Actions taken after the problem occurred• If the problem involves a <strong>Tricon</strong>ex controller, obtain the model numbers andrevision levels for all affected items. This information can be found on themodules, in the System Log Book, or on the TriStation Diagnostic Panel.• If the problem involves software, obtain the product version number byselecting the About topic from the Help menu.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Requesting Technical SupportixContacting <strong>Tricon</strong>ex Technical SupportIf possible, you should contact your regional customer center for assistance. If youcannot contact your regional center, contact technical support for the type o<strong>fs</strong>ystem you are using, either ESD systems or Turbomachinery systems.Please include the following information in your message:• Your name and your <strong>com</strong>pany name.• Your location (city, state, and country).• Your phone number (area code and country code, if applicable).• The time you called.• Whether this is an emergency.Note If you require emergency support and are not an SMP participant, pleasehave a purchase order or credit card available for billing.For ESD SystemsFor ESD systems, contact the Customer Response Center in Irvine, California.Normal business hours are 8:00 A.M. to 5:00 P.M. (Pacific time), Monday throughFriday.You can leave a message at any time.Emergency calls are responded to on a 24-hour daily basis.TelephonePhone: Toll-free at 866-TMR-CALL (866-867-2255), or949-885-0800FaxSend your request to the Technical Support Manager.Fax: Toll-free at 800-325-2134, or949-753-9101


xTrainingFor Turbomachinery SystemsFor turbomachinery systems, contact the Customer Response Center in Houston,Texas. Normal business hours are 8:00 A.M. to 5:00 P.M. (Central time), Mondaythrough Friday. You can leave a message at any time.Emergency calls are responded to on a 24-hour daily basis.TelephonePhone: Toll-free at 866-TMC-HELP (866-862-4357), or281-709-1200FaxSend your request to the Technical Support Manager.Fax: 281-709-0015TrainingIn addition to this documentation, <strong>Tricon</strong>ex offers in-house and on-site training.For information on available courses, please contact your regional customer center.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


xii<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


xiCONTENTSAbout This <strong>Guide</strong> .................................................................................................... vHow This <strong>Guide</strong> Is Organized ........................................................................ vRelated Documents ....................................................................................... viAbbreviations Used ...................................................................................... viiHow to Contact <strong>Tricon</strong>ex ............................................................................. viiiRequesting Technical Support ................................................................... viiiGathering Supporting Documentation ...................................................... viiiContacting <strong>Tricon</strong>ex Technical Support .................................................... ixFor ESD Systems ............................................................................... ixFor Turbomachinery Systems ............................................................. xTraining ........................................................................................................... xChapter 1 <strong>Safety</strong> Concepts ........................................................................... 1<strong>Safety</strong> Overview .............................................................................................. 2Protection Layers ....................................................................................... 3SIS Factors ................................................................................................ 4SIL Factors ................................................................................................. 4Hazard and Risk Analysis .............................................................................. 5<strong>Safety</strong> Integrity Levels ................................................................................ 6Determining a <strong>Safety</strong> Integrity Level ................................................... 6Example SIL Calculation ............................................................................ 8<strong>Safety</strong> Life Cycle Model ........................................................................... 10<strong>Safety</strong> Standards .......................................................................................... 15General <strong>Safety</strong> Standards ........................................................................ 15DIN V 19250 ...................................................................................... 15DIN V VDE 0801 ............................................................................... 15IEC 61508, Parts 1–7 ........................................................................ 16ANSI/ISA S84.01 ............................................................................... 16Draft IEC 61511, parts 1–3 ................................................................ 16Application-Specific Standards ................................................................ 17DIN VDE 0116 ................................................................................... 17EN 54, Part 3 ..................................................................................... 17NFPA 72 ............................................................................................ 17NFPA 8501 ........................................................................................ 17<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


xiiNFPA 8502 ....................................................................................... 17CSA C22.2 NO 199 ........................................................................... 17Chapter 2 Application <strong>Guide</strong>lines .............................................................. 19TÜV Rheinland Certification ....................................................................... 20General <strong>Guide</strong>lines ...................................................................................... 20All <strong>Safety</strong> Systems .................................................................................. 20Emergency Shutdown Systems .............................................................. 21Burner Management Systems ................................................................. 21Fire and Gas Systems ............................................................................. 22<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers ............................................................... 23<strong>Safety</strong>-Critical Modules ........................................................................... 24<strong>Safety</strong>-Shutdown ..................................................................................... 24Response Time and Scan Time .............................................................. 24Disabled Points Alarm ............................................................................. 24Disabled Output Voter Diagnostic ........................................................... 25Download All at Completion of Project .................................................... 25Modbus Master Functions ....................................................................... 25Peer-to-Peer Communication .................................................................. 25Sending Node ................................................................................... 25Receiving Node ................................................................................. 26SIL3/AK5 <strong>Guide</strong>lines ............................................................................... 27Additional Fire and Gas <strong>Guide</strong>lines .................................................. 28SIL3/AK6 <strong>Guide</strong>lines ............................................................................... 29Additional Fire and Gas <strong>Guide</strong>lines .................................................. 30Project Change and Control .................................................................... 30Maintenance Overrides ........................................................................... 32Using Serial Communication ............................................................. 32Additional Re<strong>com</strong>mendations .................................................................. 35Chapter 3 Fault Management ..................................................................... 37System Architecture .................................................................................... 38System Diagnostics ..................................................................................... 39Types of Faults ............................................................................................. 40External Faults ........................................................................................ 40Internal Faults .......................................................................................... 40Operating Modes .......................................................................................... 41Module Diagnostics ..................................................................................... 43Digital Input Modules ............................................................................... 43Digital Input Module Alarms .............................................................. 43Digital Output Modules ............................................................................ 43Digital Output Module Alarms ........................................................... 43Analog Input Modules .............................................................................. 44<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


xiiiAnalog Input Module Alarms ............................................................. 44Analog Output Modules ........................................................................... 44Analog Output Module Field Alarms .................................................. 44Relay Output Modules ............................................................................. 45Relay Output Module Alarms ............................................................ 45Input/Output Processing .......................................................................... 45I/O Module Alarms ............................................................................. 45Main Processor and TriBus ...................................................................... 46External Communication .......................................................................... 46Semaphore Flags .............................................................................. 46System Attributes .............................................................................. 47Chapter 4 Application Development .......................................................... 49Development <strong>Guide</strong>lines ............................................................................. 50TriStation Install Check ......................................................................... 50Important TriStation Commands ................................................................ 51Download Change ................................................................................... 51Upload and Verify .................................................................................... 52Compare to Last Download ..................................................................... 52Setting Scan Time ........................................................................................ 53Scan Time ................................................................................................ 53Scan Surplus ............................................................................................ 53Scan Overruns .................................................................................. 54Sample <strong>Safety</strong>-Shutdown Programs .......................................................... 55All I/O Modules <strong>Safety</strong>-Critical ................................................................. 55Program EX01_SHUTDOWN ............................................................ 56Some I/O Modules <strong>Safety</strong>-Critical ............................................................ 60Program EX02_SHUTDOWN ............................................................ 61Defining Function Blocks ......................................................................... 65Partitioned Processes .............................................................................. 66Program EX03_SHUTDOWN ............................................................ 67Alarm Usage ................................................................................................. 68Programming Permitted Alarm ................................................................. 68Remote Access Alarm ............................................................................. 68Response Time and Scan Time ............................................................... 68Disabled Points Alarm .............................................................................. 68Appendix A Peer-to-Peer Communication .................................................... 69Data Transfer Time ....................................................................................... 70<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


xivExamples of Peer-to-Peer Applications ..................................................... 72Fast Send to One <strong>Tricon</strong>ex Node ............................................................ 72Sending Data Every Second to One Node .............................................. 72Controlled Use of TR_USEND/TR_URCV Function Blocks .................... 73Using TR_USEND/TR_URCV Function Blocks for <strong>Safety</strong>-Critical Data . 73Sending Node #1 Parameters: ....................................................... 73Receiving Node #3 Parameters: .................................................... 73TR_CRITICAL_IO Function Block ............................................................... 75Instructions for Use ................................................................................. 75Structured Text ........................................................................................ 79TR_SHUTDOWN Function Block ................................................................ 82Structured Text ........................................................................................ 86TR_VOTE_MODE Function Block ............................................................... 90Structured Text ........................................................................................ 92Appendix B Shutdown Function Blocks ...................................................... 95TR_CRITICAL_IO Function Block ............................................................... 96Instructions for Use ................................................................................. 96Structured Text ...................................................................................... 100TR_SHUTDOWN Function Block .............................................................. 103Structured Text ...................................................................................... 107TR_VOTE_MODE Function Block ............................................................. 111Structured Text ...................................................................................... 113Index .................................................................................................................... 115<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


CHAPTER 1<strong>Safety</strong> ConceptsThis chapter describes background information about safety concepts andstandards.Topics include:“<strong>Safety</strong> Overview” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2“Hazard and Risk Analysis” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5“<strong>Safety</strong> Standards” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15“Application-Specific Standards” . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


2 <strong>Safety</strong> Overview<strong>Safety</strong> OverviewModern industrial processes tend to be technically <strong>com</strong>plex, involve substantialenergies, and have the potential to inflict serious harm to persons or propertyduring a mishap.The IEC 61508 standard defines safety as “freedom from unacceptable risk.” Inother words, absolute safety can never be achieved; risk can only be reduced to anacceptable level.<strong>Safety</strong> methods to mitigate harm and reduce risk include:• Changing the process or mechanical design, including plant or equipmentlayout• Increasing the mechanical integrity of equipment• Improving the basic process control system (BPCS)• Developing additional or more detailed training procedures for operationsand maintenance• Increasing the testing frequency of critical <strong>com</strong>ponents• Using a safety-instrumented system (SIS)• Installing mitigating equipment to reduce harmful consequences; forexample, explosion walls, foams, impoundments, and pressure relie<strong>fs</strong>ystemsMethods that provide layers of protection should be:• Independent• Verifiable• Dependable• Designed for the specific safety risk<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Safety</strong> Overview 3Protection LayersThe figure below shows how layers of protection can be used to reduceunacceptable risk to an acceptable level. The amount of risk reduction for eachlayer is dependent on the specific nature of the safety risk and the impact of thelayer on the risk. Economic analysis should be used to determine the appropriate<strong>com</strong>bination of layers for mitigating safety risks.Acceptable Risk LevelMechanical IntegrityInherent Process RiskSVSISBPCS*Effect of ProtectionLayers on ProcessRisk0Lower RiskProcessHigher Risk* BPCS–Basic process control systemSIS–<strong>Safety</strong>-instrumented systemSV–<strong>Safety</strong> (relief) valveWhen an SIS is required, one of the following should be determined:• Level of risk reduction assigned to the SIS• <strong>Safety</strong> integrity level (SIL) of the SISTypically, a determination is made according to the requirements of the ANSI/ISAS84.01 or IEC 61508 standards during a process hazard analysis (PHA). A processdemand is defined as the occurrence of a process deviation that causes an SIS totransition a process to a safe state.Chapter 1<strong>Safety</strong> Concepts


4 <strong>Safety</strong> OverviewSIS FactorsSIL FactorsAccording to the ANSI/ISA S84.01 and IEC 61508 standards, the scope of an SISis restricted to the instrumentation or controls that are responsible for bringing aprocess to a safe state in the event of a failure. The availability of an SIS isdependent upon:• Failure rates and modes of <strong>com</strong>ponents• Installed instrumentation• Redundancy• Voting• Diagnostic coverage• Testing frequencyA SIL can be considered a statistical representation of the availability of an SIS atthe time of a process demand. A SIL is the litmus test of acceptable SIS design andincludes the following factors:• Device integrity• Diagnostics• Systematic and <strong>com</strong>mon cause failures• Testing• Operation• MaintenanceIn modern applications, a programmable electronic system (PES) is used as thecore of a SIS. The <strong>Tricon</strong>ex controller is a state-of-the-art PES optimized forsafety-critical applications.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Hazard and Risk Analysis 5Hazard and Risk AnalysisIn the United States, OSHA Process <strong>Safety</strong> Management (PSM) and EPA RiskManagement Program (RMP) regulations dictate that a PHA be used to identifypotential hazards in the operation of a chemical process and to determine theprotective measures necessary to protect workers, the <strong>com</strong>munity, and theenvironment. The scope of a PHA may range from a very simple screening analysisto a <strong>com</strong>plex hazard and operability study (HAZOP).A HAZOP is a systematic, methodical examination of a process design that uses amulti-disciplinary team to identify hazards or operability problems that could resultin an accident. A HAZOP provides a prioritized basis for the implementation ofrisk mitigation strategies, such as SISs or ESDs.If a PHA determines that the mechanical integrity of a process and the processcontrol are insufficient to mitigate the potential hazard, an SIS is required. An SISconsists of the instrumentation or controls that are installed for the purpose ofmitigating a hazard or bringing a process to a safe state in the event of a processupset.A <strong>com</strong>pliant program incorporates “good engineering practice.” This means thatthe program follows the codes and standards published by such organizations as theAmerican Society of Mechanical Engineers, American Petroleum Institute,American National Standards Institute, National Fire Protection Association,American Society for Testing and Materials, and National Board of Boiler andPressure Vessel Inspectors. Other countries have similar requirements.Chapter 1<strong>Safety</strong> Concepts


6 Hazard and Risk Analysis<strong>Safety</strong> Integrity LevelsThe figure below shows the relationship of DIN V 19250 classes and safetyintegrity levels (SILs). As a required SIL increases, SIS integrity increases asmeasured by:• System availability (expressed as a percentage)• Average probability-to-fail-on-demand (PFD avg )• Risk reduction factor (RRF, reciprocal of PFD avg )The relationship between AK class and SIL is extremely important and should notbe overlooked. These designations were developed in response to serious incidentsthat resulted in the loss of life, and are intended to serve as a foundation for theeffective selection and appropriate design of safety-instrumented systems.Risk99.99999.990.000010.0001>10,000SIL 4AK 8AK 7Standards andRisk MeasuresReductIon99.9099.0090.00PercentAvailability0.0010.010.1PFD avg10,000–1,0001,000–100100–10RRFSIL 3SIL 3SIL 2 SIL 2SIL 1ANSI/ISAS84.01SIL 1IEC61508AK 6AK 5AK 4AK 3AK 2AK 1DIN V19250Risk MeasuresRisk StandardsDetermining a <strong>Safety</strong> Integrity LevelIf a PHA concludes that an SIS is required, ANSI/ISA S84.01 and IEC 61508require that a target SIL be assigned. The assignment of a SIL is a corporatedecision based on risk management and risk tolerance philosophy. <strong>Safety</strong>regulations require that the assignment of SILs should be carefully performed andthoroughly documented.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Hazard and Risk Analysis 7Completion of a HAZOP determines the severity and probability of the risksassociated with a process. Risk severity is based on a measure of the anticipatedimpact or consequences, including:• On-site consequences• Worker injury or death• Equipment damage• Off-site consequences• Community exposure, including injury and death• Property damage• Environmental impact• Emission of hazardous chemicals• Contamination of air, soil, and water supplies• Damage to environmentally sensitive areasA risk probability is an estimate of the likelihood that an expected event will occur.A risk probability is classified as high, medium, or low, and is often based on a<strong>com</strong>pany’s or a <strong>com</strong>petitor’s operating experience.Several methods of converting HAZOP data into SILs are used. Methods rangefrom making a corporate decision on all safety system installations to more<strong>com</strong>plex techniques, such as an IEC 61508 risk graph.Chapter 1<strong>Safety</strong> Concepts


8 Hazard and Risk AnalysisExample SIL CalculationAs a PES, the controller is designed to minimize its contribution to the SIL, therebyallowing greater flexibility in the SIS design.Comparison ofPercent Availabilityand PFDRiskReductIon99.9999 0.00000199.999 0.0000199.99 0.000199.00 0.0190.00 0.1PercentAvailabilityRisk MeasuresPFD<strong>Tricon</strong> PES*99.90 0.001 SIL 3 SIS* <strong>Tricon</strong> controller failure rates have been independently calculated by FactoryMutual System. A copy of Factory Mutual Technical Report, “An Estimation of theFailure Rates for Modules Used in the <strong>Tricon</strong>ex <strong>Tricon</strong> 9 System,” FMRC J.I.003003840, is available upon request.<strong>Safety</strong> Integrated SystemSimplified Diagramof Key Elements3 PressureTransmitters (2oo3)SensorsTMR Controller(2oo3)PES/Logic Solver2 Block Valvesin Series (1oo2)Final Elements3 TemperatureTransmitters (2oo3)<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Hazard and Risk Analysis 9Equation for Calculating PFD avg for SensorsThe following simplified equation may be used to calculate PFD avg for sensors(2oo3):PFD avg = (λ DU *TI) 2where the following variables are supplied by the manufacturer:λ = failure rateDU = dangerous, undetected failure rateTI = test interval in hoursEquation for Calculating PFD avg for Block ValvesThe following simplified equation may be used to calculate PFD avg for blockvalves (1oo2) in series (final elements):PFD avg = 1/3(λ DU *TI) 2where the following variables are supplied by the manufacturer:λ = failure rateDU = dangerous, undetected failure rateTI = test interval in hoursEquation for Calculating PFD avg for SystemThe following simplified equation may be used to calculate PFD avg for a system.System PFD avg = Sensors PFD avg + Block Valves PFD avg + Controller PFD avgChapter 1<strong>Safety</strong> Concepts


10 Hazard and Risk AnalysisUsing the EquationsλDU TI PFD ResultPressure Transmitters (2oo3) 2.28E-06 4380 1.00E-04Temperature Transmitters (2oo3) 2.85E-06 4380 1.56E-04Total for Sensors2.56E-04Block Valves (1oo2) 2.28E-06 4380 3.33E-05Total for Block Valves3.33E-05<strong>Tricon</strong> Controller2.00E-05PFD avg for System 3.09 E-04To determine the SIL, <strong>com</strong>pare the calculated PFD avg to the figure on page 8. Inthis example, the system is acceptable as an SIS for use in SIL3 applications.<strong>Safety</strong> Life Cycle ModelThe necessary steps for designing an SIS from conception throughde<strong>com</strong>missioning are described in the safety life cycle.Before the safety life cycle model is implemented, the following requirementsshould be met:• Hazard and operability study has been <strong>com</strong>pleted• SIS requirement has been determined• Target SIL has been determined<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Hazard and Risk Analysis 11Flowchart of <strong>Safety</strong>Life CycleStartDesignconceptual processPerform processhazard analysisand riskassessmentApply non-SISprotection layers toprevent identifiedhazards or reduceriskDevelop safetyrequirementsdocumentPerform SISconceptualdesign and verifyit meets the SRSPerform SISdetail designEstablish operationand maintenanceprocedurePre-start-upsafety reviewassessmentSIS start-upoperation,maintenance,periodic functionaltestingExitNoSIS required?YesDefine target SILSIS installation,<strong>com</strong>missioning,and pre-startupacceptance testConceptual process designModifyModify orde<strong>com</strong>missionSIS?De<strong>com</strong>missionSISde<strong>com</strong>missioningS84.01 ConcernChapter 1<strong>Safety</strong> Concepts


12 Hazard and Risk Analysis▼PES Steps in a <strong>Safety</strong> Life Cycle:1 Develop a safety requirement specification.An SRS consists of safety functional requirements and safety integrityrequirements. An SRS can be a collection of documents or information.<strong>Safety</strong> functional requirements specify the logic and actions to be performed byan SIS and the process conditions under which actions are initiated. Theserequirements include such items as consideration for manual shutdown, loss ofenergy source, etc.<strong>Safety</strong> integrity requirements specify a SIL and the performance required forexecuting SIS functions. <strong>Safety</strong> integrity requirements include:• Required SIL for each safety function• Requirements for diagnostics• Requirements for maintenance and testing• Reliability requirements if the spurious trips are hazardous2 For conceptual design, an engineer should:• Define the SIS architecture to ensure the SIL is met; e.g. voting 1oo1,1oo2, 2oo2, 2oo3• Define the logic solver to meet the highest SIL if different SIL levels arerequired in a single logic solver• Select a functional test interval to achieve the SIL• Verify the conceptual design against the SRS3 Develop a detail design including:• General requirements• SIS logic solver• Field devices• Interfaces• Energy sources• System environment• Application logic requirements• Maintenance or testing requirements<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Hazard and Risk Analysis 13Some key ANSI/ISA S84.01 requirements are:• The logic solver shall be separated from the basic process control system• Sensors for SIS shall be separated from the sensors for the BPCS• The logic system vendor shall provide:– MTTF data– Covert failure listing– Frequency of occurrence of identified covert failures• Each individual field device shall have its own dedicated wiring to thesystem I/O. Using a field bus is not allowed!• A control valve from the BPCS shall not be used as a single final elementfor SIL3• The operator interface may not be allowed to change the SIS applicationsoftware• Forcing shall not be used as a part of application software or operatingprocedures• When on-line testing is required, test facilities shall be an integral part ofthe SIS design4 Develop a pre-start-up acceptance test procedure that provides a fully functionaltest of the SIS to verify conformance with the SRS.5 Before startup, establish operational and maintenance procedures to ensure thatthe SIS functions <strong>com</strong>ply with the SRS throughout the SIS operational life,including:• Training• Documentation• Operating procedures• Maintenance program• Testing and preventive maintenance• Functional testing• Documentation of functional testing6 Before start-up, <strong>com</strong>plete a safety review.Chapter 1<strong>Safety</strong> Concepts


14 Hazard and Risk Analysis7 Define procedures for the following:• Start-up• Operations• Maintenance, including administrative controls and written proceduresthat ensure safety if a process is hazardous while an SIS function is beingbypassed• Training that <strong>com</strong>plies with national regulations (e.g., OSHA 29 CFR1910.119)• Functional testing to detect covert faults that prevent the SIS fromoperating according to the SRS• SIS testing, including:– Sensors– Logic solver– Final elements (e.g., shutdown valves, motors, etc.)8 To ensure that no unauthorized changes are made to an application program, asmandated by OSHA 29 CFR 1910.119, follow management of change (MOC)procedures.9 To ensure proper review, de<strong>com</strong>mission an SIS before its permanent retirementfrom active service.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Safety</strong> Standards 15<strong>Safety</strong> StandardsOver the past several years, there has been rapid movement in many countries todevelop standards and regulations to minimize the impact of industrial accidentson citizens. The standards described below apply to typical applications.General <strong>Safety</strong> StandardsDIN V 19250In Germany, the methodology of defining the risk to individuals is established inDIN V 19250, “Control Technology; Fundamental <strong>Safety</strong> Aspects To BeConsidered for Measurement and Control Equipment.” DIN V 19250 establishesthe concept that safety systems should be designed to meet designated classes,Class 1 (AK1) through Class 8 (AK8). The choice of the class is dependent on thelevel of risk posed by the process. DIN V 19250 attempts to force users to considerthe hazards involved in their processes and to determine the integrity of therequired safety-related system.DIN V VDE 0801As the use of programmable electronic systems in safety system designs hasbe<strong>com</strong>e prevalent, it is necessary to determine whether the design of a PES issufficiently rigorous for the application and for the DIN V 19250 class. DIN VVDE 0801, “Principles for Computers in <strong>Safety</strong>-Related Systems,” sets forth thefollowing specific measures to be used in evaluating a PES:• Design• Coding (system level)• Implementation and integration• ValidationEach measure is divided into specific techniques that can be thoroughly tested anddocumented by independent persons. Thus, DIN V VDE 0801 provides a means ofdetermining if a PES meets certain DIN V 19250 classes.Chapter 1<strong>Safety</strong> Concepts


16 <strong>Safety</strong> StandardsIEC 61508, Parts 1–7The IEC 61508 standard, “Functional <strong>Safety</strong>: <strong>Safety</strong> Related Systems,” is aninternational standard designed to address a <strong>com</strong>plete SIS for the process, transit,and medical industries. The standard introduces the concept of a safety life cyclemodel (see the flowchart on page 11) to illustrate that the integrity of an SIS is notlimited to device integrity, but is also a function of design, operation, testing, andmaintenance.The standard includes 4 SILs that are indexed to a specific probability-to-fail-ondemand(PFD) (see figure on page 6). A SIL assignment is based on the requiredrisk reduction as determined by a PHA.ANSI/ISA S84.01ANSI/ISA S84.01-1996 is the United States standard for safety systems in theprocess industry. The SIL classes from IEC 61508 are used and the DIN V 19250relationships are maintained. ANSI/ISA S84.01-1996 does not include the highestSIL class, SIL 4. The S84 Committee determined that SIL 4 is applicable formedical and transit systems in which the only layer of protection is the safetyinstrumentedlayer. In contrast, the process industry can integrate many layers ofprotection in the process design. The overall risk reduction from these layers ofprotection is equal to or greater than that of other industries.Draft IEC 61511, parts 1–3The IEC 61511 standard, “Functional <strong>Safety</strong>: <strong>Safety</strong> Instrumented Systems for theProcess Industry Sector,” is an international standard designed to be used as a<strong>com</strong>panion to IEC 61508. IEC 61508 is intended primarily for manufacturers andsuppliers of devices. IEC 61511 is intended for SIS designers, integrators, andusers in the process-control industry.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Safety</strong> Standards 17Application-Specific StandardsDIN VDE 0116DIN VDE 0116 “Electrical Equipment Of Furnaces,” outlines the Germanrequirements for burner management applications.EN 54, Part 3EN 54, Part 3, “Components of Automatic Fire Detection System: Control andIndicating Equipment,” outlines the European requirements for fire detectionsystems.NFPA 72NFPA 72, “National Fire Alarm Code,” outlines the United States requirements forfire alarm systems.NFPA 8501NFPA 8501, Standard for Single Burner Boiler Operation,” outlines the UnitedStates requirements for operations using single burner boilers.NFPA 8502NFPA 8502, Standard for the Prevention of Furnace Explosions/Implosions inMultiple Burner Boilers,” outlines the United States requirements for operationsusing multiple burner boilers.CSA C22.2 NO 199CSA C22.2 NO 199, “Combustion <strong>Safety</strong> Controls and Solid-State Igniters for Gasand Oil-Burning Equipment,” outlines the Canadian requirements for burnermanagement applications.Chapter 1<strong>Safety</strong> Concepts


18 <strong>Safety</strong> Standards<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


CHAPTER 2Application <strong>Guide</strong>linesThis chapter provides information on industry guidelines.Topics include:“TÜV Rheinland Certification” . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20“General <strong>Guide</strong>lines” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20“<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers” . . . . . . . . . . . . . . . . . . . . . . . . . 23<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


20 TÜV Rheinland CertificationTÜV Rheinland CertificationWhen used as a PES in an SIS, the <strong>Tricon</strong> controller and its <strong>com</strong>panionprogramming workstation, the TriStation 1131 Developer’s Workbench, havebeen certified by TÜV Rheinland/Berlin-Brandenburg to meet the requirements ofDIN 19250 AK5-AK6 and IEC 61508 SIL3. If these standards apply to yourapplication, <strong>com</strong>pliance with the guidelines described in this chapter is highlyre<strong>com</strong>mended.General <strong>Guide</strong>linesAll <strong>Safety</strong> SystemsThis section describes standard industry guidelines that apply to:• All safety systems• Emergency shutdown (ESD) systems• Fire and gas systems• Burner management systemsThe following general guidelines apply to all user-written safety applicationprograms and procedures:• Functional testing is re<strong>com</strong>mended to verify the correct design andoperation.• After a safety system is <strong>com</strong>missioned, no changes to the system software(operating system, I/O drivers, diagnostics, etc.) are allowed without typeapproval and re-<strong>com</strong>missioning. Any changes to the application or thecontrol program should be made under strict change-control procedures. Formore information on change-control procedures, see section “ProjectChange and Control” on page 30. All changes should be thoroughlyreviewed, audited, and approved by a safety change control <strong>com</strong>mittee orgroup. After an approved change is made, it should be archived.• In addition to printed documentation of the application program, two copiesof the program should be archived on an electronic medium which is writeprotectedto avoid accidental changes.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


General <strong>Guide</strong>lines 21• Under certain conditions, a PES may be run in a mode which allows anexternal <strong>com</strong>puter or operator station to write to system attributes. This isnormally done by means of a <strong>com</strong>munication link. The following guidelinesapply to writes of this type:– Serial <strong>com</strong>munication should use Modbus or another approved protocolwith CRC checks.– Serial <strong>com</strong>munication should not be allowed to write directly to outputpoints.– For information about writes to safety-related variables that result indisabling safety action, see section “Module Diagnostics” on page 43.• PID and other control algorithms should not be used for safety-relatedfunctions. Each control function should be checked to verify that it does notprovide a safety-related function.• An SIS PES should be wired and grounded according to the proceduresdefined by the manufacturer.Emergency Shutdown SystemsThe safe state of the plant should be a de-energized or low (0) state.For ESD functions, it is re<strong>com</strong>mended that the hardware devices connected to PESoutputs should be made of fail-safe <strong>com</strong>ponents or should have two separate,independent shutdown paths which are periodically inspected.Burner Management SystemsThe safe state of the plant should be a de-energized or low (0) state.When a safety system is required to conform with the DIN 0116 standard forelectrical equipment in furnaces, PES throughput time should ensure that a safeshutdown can be performed within one second after a problem in the process isdetected.Chapter 2Application <strong>Guide</strong>lines


22 General <strong>Guide</strong>linesFire and Gas SystemsFire and gas applications typically do not have a safe state and should operatecontinuously to provide protection. The following industry guidelines apply:• If inputs and outputs are energized to mitigate a problem, a PES systemshould detect and alarm open and short circuits in the wiring between thePES and the field devices.• An entire PES system should have redundant power supplies. Also, thepower supplies that are required to activate critical outputs and read safetycriticalinputs should be redundant. All power supplies should be monitoredfor proper operation.• De-energized outputs may be used for normal operation. To initiate actionto mitigate a problem, the outputs are energized. This type of system shouldmonitor the critical output circuits to ensure that they are properlyconnected to the end devices.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 23<strong>Guide</strong>lines for <strong>Tricon</strong> ControllersThe following topics relate to industry guidelines that are specific to <strong>Tricon</strong>controllers when used as a PES in an SIS:• <strong>Safety</strong>-critical modules• Safe shutdown• Programming lockout alarm• Remote access alarm• Scan time and response time alarm• Disabled points alarm• Disabled output voters• Download all• Use of Peer-to-Peer functions• Modbus master functions• SIL3/AK5 guidelines• SIL3/AK5 fire and gas guidelines• SIL3/AK6 guidelines• SIL3/AK6 fire and gas guidelines• Project change and controlChapter 2Application <strong>Guide</strong>lines


24 <strong>Guide</strong>lines for <strong>Tricon</strong> Controllers<strong>Safety</strong>-Critical ModulesIt is re<strong>com</strong>mended that only the following modules be used for safety-criticalapplications:• Main Processor Modules, all models• Communication Modules, all models• Digital Input Modules, all models• Digital Output Modules, all models• Analog Input Modules, all models• Analog Output Module, Model #3805 only• Pulse Totalizer Input ModuleThe Relay Output Module is re<strong>com</strong>mended for non-safety-critical points only.<strong>Safety</strong>-ShutdownA safety application should include a network that initiates a safe shutdown of theprocess being controlled when a controller operates in a degraded mode for aspecified maximum time.The <strong>Tricon</strong>ex Library provides two function blocks to simplify programming asafety-shutdown application: TR_SHUTDOWN and TR_CRITICAL_IO. To seethe Structured Text code for these function blocks, see Appendix A, “Peer-to-PeerCommunication.” For more information on safety-shutdown networks, see section“Sample <strong>Safety</strong>-Shutdown Programs” on page 55.Response Time and Scan TimeScan time must be set below 50% of the required response time. If scan time isgreater than 50%, an alarm should be available.Disabled Points AlarmA project should not contain disabled points unless there is a specific reason fordisabling them, such as initial testing. An alarm should be available to alert theoperator that a point is disabled.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 25Disabled Output Voter DiagnosticA safety application may not disable the output voter diagnostic.Download All at Completion of ProjectWhen development and testing of a safety application is <strong>com</strong>pleted, use theDownload All <strong>com</strong>mand on the Control Panel to <strong>com</strong>pletely re-load the applicationto the controller.Modbus Master FunctionsModbus Master functions are designed for use with non-critical I/O points only.These functions should not be used for safety-critical I/O points or for transferringsafety-critical data using the MBREAD and MBWRITE functions.Peer-to-Peer CommunicationPeer-to-Peer <strong>com</strong>munication enables <strong>Tricon</strong>ex controllers (also referred to asnodes) to send and receive information. If a node sends critical data to another nodethat makes safety-related decisions, you must ensure that the application on thereceiving node can determine whether it has received new data.If new data is not received within the time-out period (equal to half of theprocessing-tolerance time), the application on the receiving node should be able todetermine the action to take. The actions may include one or more of the following:• Use the last data received for safety-related decisions in the application.• Use default values for safety-related decisions in the application.• Monitor the status of the TR_URCV and TR_PORT_STATUS functions todetermine whether there is a network problem that requires operatorintervention.The specific actions that an application should take depends on the unique safetyrequirements of your particular process. The sections that follow summarize themain types of actions entailed in the use of Peer-to-Peer send and receive functions.Sending NodeThe actions required in the logic of the sending application are:Chapter 2Application <strong>Guide</strong>lines


26 <strong>Guide</strong>lines for <strong>Tricon</strong> Controllers• The sending node must set the SENDFLG parameter in the send call to true(1) so that the sending node sends new data as soon as the acknowledgmentfor the last data is received from the receiving node.• The TR_USEND function block must include a diagnostic integer variablethat is incremented with each new send initiation so that the receiving nodecan check this variable for changes every time it receives new data. Thisnew variable should have a range of 1 to 65,565 where the value 1 is sentwith the first sample of data. When this variable reaches the limit of 65,565,the sending node should set this variable back to 1 for the next data transfer.This diagnostic variable is required because the <strong>com</strong>munication path is nottriplicated like the I/O system.• The number of TR_USEND functions in an application must be less than orequal to five because the controller only initiates five TR_USEND functionsper scan. To send data as fast as possible, the TR_USEND function must beinitiated as soon as the acknowledgment for the last data is received fromthe receiving node.• The sending application must monitor the status of the TR_URCV andTR_PORT_STATUS functions to determine whether there is a networkproblem that requires operator intervention.Receiving NodeThe types of actions required in the logic of the receiving application are:• To transfer safety-critical data, the basic rule is that the receiving node mustreceive at least one sample of new data within the maximum time-out limit.If this does not happen, the application for the receiving node must take oneor more of the following actions, depending on requirements:– Use the last data received for safety-related decisions.– Use default values for safety-related decisions in the application.– Check the status of the TR_URCV and TR_PORT_STATUS functions tosee whether there is a network problem that requires operatorintervention.• The receiving node must monitor the diagnostic integer variable every timeit receives new data to determine whether this variable has changed fromlast time.• The receiving program must monitor the status of the TR_URCV andTR_PORT_STATUS functions to determine if there is a network problemthat requires operator intervention.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 27For information on data transfer time and examples of how to use Peer-to-Peerfunctions to transfer safety-critical data, see Appendix A, “Peer-to-PeerCommunication”.SIL3/AK5 <strong>Guide</strong>linesFor SIL3/AK5 applications, the following guidelines should be followed:• If non-approved modules are used, the inputs and outputs should be checkedto verify that they do not affect safety-critical functions of the controller.• Two modes control write operations from external hosts:– Remote Mode—When the keyswitch setting is REMOTE, externalhosts, such as Modbus master, DCS, etc., can write to aliased variables inthe controller. When false, writes are prohibited.– Program Mode—When the keyswitch setting is PROGRAM, TriStationcan make program changes, including operations that modify thebehavior of the programs currently running. (For example, DownloadAll, Download Change, declaring variables, enabling/disablingvariables, changing values of variables and scan time, etc.)Remote mode and program mode are independent of each other. In safetyapplications, operation in these modes is not re<strong>com</strong>mended. In other words,write operations to the controller from external hosts should be prohibited. Ifremote mode or program mode be<strong>com</strong>es true, the application programshould include the following safeguards:– When remote mode is true:• A program should turn on an alarm. For example, if using theTR_SHUTDOWN function block, the ALARM_REMOTE_ACCESSoutput could be used.• Aliased variables should be checked for adherence to the guidelinesdescribed in section “Maintenance Overrides” on page 32.– When program mode is true:• A program should turn on an alarm. For example, if using theTR_SHUTDOWN function block, theALARM_PROGRAMMING_PERMITTED output could be used.• Wiring and grounding procedures outlined in the <strong>Tricon</strong> Planning &Installation <strong>Guide</strong> should be followed.Chapter 2Application <strong>Guide</strong>lines


28 <strong>Guide</strong>lines for <strong>Tricon</strong> Controllers• Maintenance instructions outlined in the <strong>Tricon</strong> Planning & Installation<strong>Guide</strong> should be followed.• If degradation to dual mode occurs, continued operation without repairshould be limited to 1500 hours (two months).• If degradation to single mode occurs, continued operation without repairshould be limited to 72 hours (three days).• The GATENB function allows external hosts to write selected aliasedvariables even when the remote mode is false. A network using theGATENB function should be thoroughly validated to ensure that only theintended aliased variable range is used.• Remote Peer-to-Peer connections must be programmed according to there<strong>com</strong>mendations in the section “Peer-to-Peer Communication” on page 25.Additional Fire and Gas <strong>Guide</strong>lines• Analog input cards with current loop terminations should be used to readdigital inputs. Opens and shorts in the wiring to the field devices should bedetectable. The <strong>Tricon</strong>ex library function, LINEMNTR, should be used tosimplify program development.• A controller should be powered by two independent sources.• If outputs are normally de-energized, a Supervised Digital Output Moduleshould be used to verify proper connection to the final control element andto check the load and the wiring for potential shorts.• If degradation to dual mode or single mode occurs, repairs should be timelyand limits for maximum time in degraded mode should not be imposed toensure maximum availability.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 29SIL3/AK6 <strong>Guide</strong>linesFor SIL3/ AK6 applications, the following guidelines should be followed:• DIN V VDE 19250/AK6 applications that require continued operation afterdetecting an output failure must have a secondary means of operating theoutput. A secondary means may be an external group relay or a single pointon an independent output module that controls a group of outputs. If a relayis used, it should be checked at least every six months, manually orautomatically.• If non-approved modules are used, the inputs and outputs should be checkedto verify that they do not affect safety-critical functions of the controller.• Two modes control write operations from external hosts:– Remote Mode—When the keyswitch setting is REMOTE, externalhosts, such as Modbus master, DCS, etc., can write aliased data in thecontroller. When false, writes are prohibited.– Program Mode—When the keyswitch setting is PROGRAM, TriStationcan make program changes, including operations that modify thebehavior of the programs currently running. (For example, DownloadAll, Download Change, declaring variables, enabling/disablingvariables, changing values of variables and scan time, etc.)Remote mode and program mode are independent of each other. In safetyapplication, operation in these modes is not re<strong>com</strong>mended. In other words,write operations to the controller from external hosts should be prohibited. Ifremote mode or program mode be<strong>com</strong>es true, the application programshould include the following safeguards:– When remote mode is true:• A program should turn on an alarm. For example, if using theTR_SHUTDOWN function block, the ALARM_REMOTE_ACCESSoutput could be used.• Aliased variables should be checked for adherence to the guidelinesdescribed in section “Maintenance Overrides” on page 32.– When program mode is true:• A program should turn on an alarm. For example, if using theTR_SHUTDOWN function block, theALARM_PROGRAMMING_PERMITTED output could be used.• Wiring and grounding procedures outlined in the <strong>Tricon</strong> Planning &Installation <strong>Guide</strong> should be followed.Chapter 2Application <strong>Guide</strong>lines


30 <strong>Guide</strong>lines for <strong>Tricon</strong> Controllers• Maintenance instructions outlined in the <strong>Tricon</strong> Planning & Installation<strong>Guide</strong> should be followed.• If degradation to dual mode occurs, continued operation without repairshould be limited to 1500 hours (two months).• If degradation to single mode occurs, continued operation without repairshould be limited to one hour.• The GATENB function allows external hosts to write selected aliasedvariables even when the remote mode is false. A network using theGATENB function should be thoroughly validated to ensure that only theintended aliased variable range is used.Additional Fire and Gas <strong>Guide</strong>linesProject Change and Control• Analog input cards with current loop terminations should be used to readdigital inputs. Opens and shorts in the wiring to the field devices should bedetectable. The <strong>Tricon</strong>ex library function, LINEMNTR, should be used tosimplify program development.• A controller should be powered by two independent sources.• If outputs are normally de-energized, a Supervised Digital Output Moduleshould be used to verify proper connection to the final control element andto check the load and the wiring for potential shorts.• If degradation to dual mode or single mode occurs, repairs should be timelyand limits for maximum time in degraded mode should not be imposed toensure maximum availability.A change to a project, however minor, should <strong>com</strong>ply with the guidelines of yourorganization’s change control <strong>com</strong>mittee. The following steps are re<strong>com</strong>mended:1 Generate a change request defining all changes and reasons for changes, thenobtain approval for the changes from the <strong>Safety</strong> Change Control Committee(SCCC).2 Develop a specification for changes, including a test specification, then obtainapproval for the specification from the SCCC.3 Make the appropriate changes to the project, including those related to design,operation, or maintenance documentation.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 314 To verify that the configuration in the controller matches the last downloadedconfiguration, use the Upload and Verify <strong>com</strong>mand on the Control Panel. Fordetails, see section “Upload and Verify” in the TriStation 1131 Developer's<strong>Guide</strong> for <strong>Tricon</strong> Systems.5 Compare the configuration in your project with the configuration that was lastdownloaded to the controller by printing the Configuration Differences reportfrom the Configuration editor. For details, see section “Compare to LastDownload” in the TriStation 1131 Developer's <strong>Guide</strong> for <strong>Tricon</strong> Systems.6 Print all logic elements and verify that the changes to networks within eachelement do not affect other sections of the application.7 Test the changes according to the test specification by using the EmulatorControl Panel.8 Write a test report.9 Review and audit all changes and test results with the SCCC.10 When approved by the SCCC, download the changes to the controller.• You may make minor changes on-line only if the changes are absolutelynecessary and are tested thoroughly.• To enable a Download Change <strong>com</strong>mand, select the EnableProgramming option in the Set Programming Mode dialog box on theControl Panel if it is not already selected.Note Changing the operating mode to PROGRAM should generate an alarm toremind the operator to return the operating mode to run as soon as possible afterthe Download Change. For more information, see section “Programming PermittedAlarm” on page 68.11 Save the downloaded project in TriStation and back up the project.12 Archive two copies of the project file and all associated documentation.Chapter 2Application <strong>Guide</strong>lines


32 <strong>Guide</strong>lines for <strong>Tricon</strong> ControllersMaintenance OverridesThree methods can be used to check safety-critical devices connected tocontrollers:• Special switches are connected to inputs to a controller that deactivate theactuators and sensors undergoing maintenance. The maintenance conditionis handled in the logic of the control program.• Sensors and actuators are electrically disconnected from a controller andmanually checked using special measures.• Serial <strong>com</strong>munication to a controller activates the maintenance overridecondition. This method is useful when space is limited and the maintenanceconsole should be integrated with the operator display.Using Serial CommunicationFor maintenance overrides, two options for serial connection are available:• DCS connection using Modbus RTU protocol (or another approved serialprotocol)• TriStation PC connection, which requires additional, industry-standardsafety measures in a controller to prevent downloading a program changeduring maintenance intervals. For more information on TriStation, seesection “Alarm Usage” on page 68.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 33Design RequirementsThe following table describes design requirements for handling maintenanceoverrides when using serial <strong>com</strong>munication.Design RequirementsControl program logic and thecontroller configuration determinewhether the desired signal can beoverridden.Control program logic and/orsystem configuration specifywhether simultaneous overriding inindependent parts of theapplication is acceptable.Controller activates the override.The operator should confirm theoverride condition.Direct overrides on inputs andoutputs are not allowed, but shouldbe checked and implemented inrelation to the application.Multiple overrides in a controllerare allowed as long as only oneoverride applies to each safetycriticalgroup. The controller alarmshould not be overridden.DCS warns the operator about anoverride condition. The operatorcontinues to receive warnings untilthe override is removed.A second way to remove themaintenance override conditionshould be availableIf urgent, a maintenance engineermay remove the override using ahard-wired switch.DCSProject Engineer,CommissionerProject EngineerOperator,Maintenance EngineerProject EngineerProject Engineer,CommissionerProject EngineerResponsible PersonTriStationProject Engineer,CommissionerProject Engineer,Type ApprovalMaintenance Engineer,Type ApprovalProject Engineer,Type ApprovalN/AMaintenance Engineer,Type ApprovalChapter 2Application <strong>Guide</strong>lines


34 <strong>Guide</strong>lines for <strong>Tricon</strong> ControllersDesign RequirementsDuring an override, properoperating measures should beimplemented. The time span foroverriding should be limited to oneshift (typically no longer than 8hours). A maintenance overrideswitch (MOS) light on the operatorconsole should be provided (oneper a controller or process unit).DCSProject Engineer,Commissioner, DCS,TriStationResponsible PersonTriStationOperating RequirementsThe following table describes operating requirements for handling maintenanceoverrides when using serial <strong>com</strong>munication.Operating RequirementsDCSResponsible PersonTriStationMaintenance overrides areenabled for an entire controller orfor a subsystem (process unit).Controller activates an override.The operator should confirm theoverride condition.Controller removes an override.Operator,Maintenance EngineerOperator,Maintenance EngineerOperator,Maintenance EngineerMaintenance Engineer,Type ApprovalMaintenance Engineer,Type ApprovalMaintenance Engineer<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


<strong>Guide</strong>lines for <strong>Tricon</strong> Controllers 35Additional Re<strong>com</strong>mendationsThe following procedures are re<strong>com</strong>mended in addition to the re<strong>com</strong>mendationsdescribed in the tables on page 33 and page 34:• A DCS program should regularly verify that no discrepancies exist betweenthe override <strong>com</strong>mand signals issued by a DCS and override-activatedsignals received by a DCS from a PES. The following diagram depicts thisprocedure:<strong>Safety</strong>-Instrumented SystemControllerSensorsSafeguardingApplicationProgramActuatorsPES Block DiagramHard-WiredSwitchMaintenanceOverride Handling(Application Program)OperatorWarningDistributedControl SystemInputsEngineeringWorkstation• Use of the maintenance override capability should be documented in a DCSor TriStation log. The documentation should include:– Begin- and end-time stamps of the maintenance override.– Identification of the maintenance engineer or operator who activates amaintenance override. If the information cannot be printed, it should beentered in a work-permit or maintenance log.– Tag Name of the signal being overridden.– Communication packages that are different from a type-approvedModbus should include CRC, address check, and check of the<strong>com</strong>munication time frame.– Loss of <strong>com</strong>munication should lead to a warning to the operator andmaintenance engineer. After loss of <strong>com</strong>munication, a time-delayedremoval of the override should occur after a warning to the operator.Chapter 2Application <strong>Guide</strong>lines


36 <strong>Guide</strong>lines for <strong>Tricon</strong> Controllers<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


CHAPTER 3Fault ManagementThis chapter discusses system architecture and diagnostics, types of faults,operating modes, and module diagnostics.Topics include:“System Architecture” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38“System Diagnostics” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39“Types of Faults” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40“Operating Modes” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41“Module Diagnostics” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


38 System ArchitectureSystem ArchitectureThe controller has been designed from its inception with self-diagnostics as aprimary feature. Triple-Modular Redundant (TMR) architecture (shown below)ensures fault tolerance and provides error-free, uninterrupted control in the eventof hard failures of <strong>com</strong>ponents or transient faults from internal or external sources.Each I/O module houses the circuitry for three independent channels. Each channelon the input modules reads the process data and passes that information to itsrespective main processor. The three Main Processor (MP) Modules <strong>com</strong>municatewith each other using a proprietary, high-speed bus system called the TriBus.Fault information is available to an application. It is critical that an applicationproperly manage fault information to avoid an unnecessary shutdown of a processor plant.Auto SpareAuto SpareInputChannelAI/O BusTriBusMainProcessorAOutputChannelATypical <strong>Tricon</strong>SystemInputTerminationInputChannelBInputChannelCMainProcessorBTriBusI/O BusI/O BusMainProcessorCTriBusOutputChannelBOutputChannelCVoterOutputTermination<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


System Diagnostics 39System DiagnosticsTo improve system availability and safety, a safety system must be able to detectfailures and provide the means for managing failures properly. The controller’sdiagnostics may be categorized as:• Reference diagnostics—<strong>com</strong>paring an operating value to a predeterminedreference, such as a system specification• Comparison diagnostics—<strong>com</strong>paring one <strong>com</strong>ponent to another, such asone independent channel with two other independent channels• Field device diagnostics—diagnostics are extended to a system’s fielddevices and wiringChapter 3Fault Management


40 Types of FaultsTypes of FaultsExternal FaultsA controller is subject to external faults and internal faults, which are reported bythe:• Status indicators on a module’s front panels• Diagnostic Panel in TriStation• System attributes on the Control Panel in TriStationA controller may experience the following types of external faults:• Logic power faults• Field power faults• Load or fuse faultsWhen an external fault occurs, the controller asserts an alarms. How the alarm is<strong>com</strong>municated is module-specific. In some cases, a yellow alarm indicator isprovided on the module. For example, a Load/Fuse alarm is provided on digitaloutput modules. In most cases, the System alarm is asserted, and the System alarmindicators on the Main Chassis Power Modules are lit. The Diagnostic Panel inTriStation identifies the faulting module by displaying a red frame around it. Forinstructions on responding to specific alarm conditions, see the <strong>Tricon</strong> Planningand Installation <strong>Guide</strong>.Internal FaultsInternal faults are usually isolated to one of the controller’s three channels (A, B orC). When an internal fault occurs on one of the three channels, the remaining twohealthy channels maintain full control. Depending on the type of fault, thecontroller either remains in TMR mode or degrades to dual mode for the system<strong>com</strong>ponent that is affected by the fault. For more information of on operatingmodes, see “Operating Modes” on page 41.When an internal fault occurs, the controller lights the red Fault indicator on thefaulting module and the System alarm on the Main Chassis Power Modules to alertthe operator to replace the faulting module.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Operating Modes 41Operating ModesEach input or output point is considered to operate in Triple Modular Redundant,dual, or single mode.The current mode indicates the number of channelscontrolling a point; in other words, the number of channels controlling the outputor having confidence in the input. System variables summarize the status of inputand output points. For safety reasons, system mode is defined as the mode of thepoint controlled by the fewest number of channels. When a safety-critical point isin dual or single mode, the application may need to shut down the controlledprocess within a pre-determined time.A user can further simplify and customize shutdown logic using special functionblocks provided by <strong>Tricon</strong>ex. By considering only faults in safety-critical modules,system availability can be improved. For more information, see Appendix A,“Peer-to-Peer Communication.”While operating in TMR mode, the process is protected each scan from the effectof a single safety-critical system fault. The system can also tolerate multiple faultsand continue to operate correctly unless the <strong>com</strong>bined effects of multiple faultsaffects the same point on multiple channels. If a system fault occurs, the loss ofredundancy causes an increased probability-of-failure-on-demand. To keep thePFD within industry-acceptable guidelines, adherence with the re<strong>com</strong>mendedmaximum operating period of 1500 hours in dual mode and 72 hours (SIL3/AK5)or 1 hour (SIL3/AK6) in single mode should be observed.A safety-critical fault is defined as a fault that can affect the ability of the systemto correctly control outputs, including:• Inability to detect a change of state on a digital input point.• Inability to detect a change of value on an analog input point.• Inability to change the state of a digital output point.• Inability of the system to:– Read each input point– Vote the correct value of each input– Execute the control program– Determine the state of each output point correctlyChapter 3Fault Management


42 Operating ModesAlso, during each execution of the control program, each channel independentlyverifies the:• Integrity of the data path between the MPs• Proper voting of all input values• Proper evaluation of the control program• Calculated value of each output point<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Module Diagnostics 43Module DiagnosticsEach system <strong>com</strong>ponent detects and reports operational faults.Digital Input ModulesDigital Input Module points typically use a <strong>com</strong>bination of <strong>com</strong>parison and forceto-valuediagnostics (FVD). Under system control, each channel is independently<strong>com</strong>pared against the measured value of all channels. If a mismatch is found, analarm is set. Using the integral FVD capability, each point can be independentlyverified for its ability to accurately detect a transition to the opposite state. Achannel that has detected a fault on a digital input point votes that point to be deenergized.These diagnostics are executed independently by each channel, thusassuring nearly 100% fault coverage and fail-safe operation under all single-fault,and most <strong>com</strong>mon, multiple-fault scenarios.Digital Input Module AlarmsDigital Input Module faults are reported to the control program, and these alarmscan be used to increase availability during specific multiple fault conditions. Lossof logic power is reported to the control program.Digital Output ModulesDigital Output Modules use output voter diagnostics (OVD). Under systemcontrol, each output point is <strong>com</strong>manded sequentially to both the energized and deenergizedstates and the forced state is maintained until the value is detected by thesystem or a time-out occurs (500 microseconds, typical; 2 milliseconds, worstcase). Using the integral OVD capability, each point can be independently verifiedfor its ability to a transition to either state. The OVD is executed in TMR mode,thus assuring nearly 100% fault coverage and fail-safe operation under all singlefaultscenarios.Digital Output Module AlarmsDigital Output Module faults are reported to the control program and can be usedto increase availability during specific multiple fault conditions. Loss of fieldpower or logic power is reported to the control program.The inability of a Digital Output Module to control an output point is reported tothe control program as a Load/Fuse alarm. This condition can result from a loss ofChapter 3Fault Management


44 Module Diagnosticsfield power or a field short condition. The alarm can be used to modify the controlstrategy or direct effective maintenance action.Analog Input ModulesAnalog Input Module points use a <strong>com</strong>bination of <strong>com</strong>parison and referencediagnostics. Under system control, each channel is independently <strong>com</strong>paredagainst the measured value of all channels. If a mismatch if found, an alarm is set.Each channel’s measured values are also <strong>com</strong>pared its against internal references.A channel that has detected a fault on an analog input point votes that point to bezero. Using these diagnostics, each channel can be verified independently, thusassuring near 100% fault coverage and fail-safe operation under all single-fault,and most <strong>com</strong>mon, multiple-fault scenarios.Analog Input Module AlarmsAnalog Input Module faults are reported to the control program. These alarms canbe used to increase availability during specific multiple fault conditions. Loss oflogic power is reported to the control program.Analog Output ModulesAnalog Output Modules use a <strong>com</strong>bination of <strong>com</strong>parison and referencediagnostics. Under system control, each channel is given control of the outputsequentially using the 2oo3 voting mechanism. Each channel independentlymeasures the actual state of an output value by <strong>com</strong>paring it with the <strong>com</strong>mandedvalue. If the values do not match, a channel switch is forced by voting anotherchannel. Each channel also <strong>com</strong>pares its measured values against internalreferences. Using these diagnostics, each channel can be independently verified forits ability to control the analog output value, thus assuring nearly 100% faultcoverage and fail-safe operation under all single-fault, and most <strong>com</strong>mon,multiple-fault scenarios.Analog Output Module Field AlarmsAnalog Output Module faults are reported to the control program. These alarmscan be used to increase availability during specific multiple-fault conditions. Lossof field power or logic power is reported to the control program.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Module Diagnostics 45Relay Output ModulesRelay Output Module points are not intended for safety-critical applications. Thediagnostics used by the relay output points cannot detect faults in the relaycontacts.Relay Output Module AlarmsDetectable Relay Output Module faults are reported to the control program.Input/Output ProcessingEach processor on an I/O module is protected by an independent watchdog thatverifies the timely execution of the I/O module firmware and diagnostics. If an I/Oprocessor fails to execute correctly, the I/O processor enters the fail-safe state. TheI/O bus transceiver and all outputs for the faulting channel are disabled, leaving alloutputs under control of the remaining healthy channels.The integrity of the I/O bus is continuously monitored and verified independentlyby each channel of the system. A catastrophic bus fault results in affected I/Omodule channels reverting to the fail-safe state in less than 50 milliseconds, worstcase.• Each digital input point is reported to the control program as de-energized.• Each analog input point is reported to the control program as zero.• Each digital output point goes to the de-energized state.• Each analog output point goes to 0.0 mA.• Each relay output point goes to the normally open (NO) position.I/O Module AlarmsLoss of <strong>com</strong>munication with an I/O module is reported to the control program andcan be used to increase availability during specific multiple-fault conditions.Chapter 3Fault Management


46 Module DiagnosticsMain Processor and TriBusEach Main Processor (MP) Module uses memory data <strong>com</strong>parison between itselfand the other MPs to ensure that the control program executes correctly on eachscan. Each MP transfers its input point data to the other two MPs via the TriBusduring each scan. Each MP then votes the input data and provides voted data to thecontrol program. The results of the control program (outputs), including all internalvariables, are transferred by the TriBus. If a mis-<strong>com</strong>pare is detected, specialalgorithms are used to isolate the faulting MP. The faulting MP enters the fail-safestate and is ignored by the remaining MPs. Background diagnostics test MPmemory and <strong>com</strong>pare control program instructions and internal status.The integrity of the TriBus is continuously monitored and verified independentlyby each MP. All TriBus faults are detected within the scan associated with theTriBus transfer. Fault isolation hardware and firmware causes the MP with thefaulting TriBus to enter the fail-safe state.An independent watchdog ensures that the control program and diagnosticsexecute within 500 milliseconds seconds (the watchdog period). If an MP fails toexecute the scan, the watchdog forces the MP to the fail-safe state. The I/Oprocessor adds a sequential element to the MP watchdog. If an MP fails to reportthe proper sequence of execution, the I/O processor causes the MP to enter the failsafestate.External CommunicationLoss of external <strong>com</strong>munication is not indicated by a system alarm. However,alarms can be generated by using:• Semaphore flags• System attributes! CAUTIONExternal <strong>com</strong>munications are intended for transporting non-safety-critical data.The guidelines outlined in section “Using Serial Communication” on page 32should be followed in SIS applications.Semaphore FlagsEstablish a semaphore between a controller and an external device by using a timerfunction block to evaluate the changing state of semaphore flags.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Module Diagnostics 47System AttributesSystem attributes can be used to generate an alarm when a <strong>com</strong>munication link islost.For more information about <strong>com</strong>munication alarms, see the TriStation 1131Developer’s <strong>Guide</strong> for <strong>Tricon</strong> Systems. See also the following relevant manuals:• Advanced Communication Module User's <strong>Guide</strong>• Enhanced Intelligent Communication Modules User's Manual• Hiway Interface Module User's <strong>Guide</strong>• Network Communication Module User's <strong>Guide</strong>• <strong>Safety</strong> Manager Module User's <strong>Guide</strong>• <strong>Tricon</strong> DDE Server User's <strong>Guide</strong>• <strong>Tricon</strong> System Access Application Programmer's Reference• <strong>Tricon</strong> System Aliases Reference Manual• <strong>Tricon</strong> Planning & Installation <strong>Guide</strong>• TriStation 1131 <strong>Tricon</strong>ex LibrariesChapter 3Fault Management


48 Module Diagnostics<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


CHAPTER 4Application DevelopmentThis chapter discusses methods for developing applications to avoid applicationfaults.Topics include:“Development <strong>Guide</strong>lines” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50“Important TriStation Commands” . . . . . . . . . . . . . . . . . . . . . . . . . . 51“Setting Scan Time” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53“Sample <strong>Safety</strong>-Shutdown Programs” . . . . . . . . . . . . . . . . . . . . . . . 55“Alarm Usage” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


50 Development <strong>Guide</strong>linesDevelopment <strong>Guide</strong>linesTriStation Install CheckWhile developing an application, you should:• Use a dedicated PC that is not connected to a network.• Use a good virus checker.• Verify proper installation of TriStation 1131 using TriStation Install Check.You should run the TriStation Install Check program to verify that TriStation iscorrectly installed on your PC and that no associated files are corrupted. This isespecially helpful if applications besides TriStation 1131 reside on your PC. Formore information on the TriStation Install Check program, see the TriStation 1131Developer's <strong>Guide</strong>.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Important TriStation Commands 51Important TriStation CommandsDownload ChangeSeveral <strong>com</strong>mands in TriStation 1131 Developer’s Workbench are of specialinterest when developing a safety application:• Download Change• Upload and Verify• Compare to Last DownloadThe Download Change <strong>com</strong>mand is a convenient means of making simplemodifications to an off-line system during application development.! WARNINGDownload Change is intended for off-line use during application development. Ifyou use Download Change to modify a safety-critical application that is runningon-line, you must exercise extreme caution because an error in the modifiedapplication or system configuration may cause a trip or unpredictable behavior.If you must make on-line changes to a controller, you should always follow theguidelines provided in TriStation 1131 Developer's <strong>Guide</strong> and fully understand therisks you are taking by using the Download Change <strong>com</strong>mand.Before a Download Change, use the Diagnostic Panel to verify that Scan Surplusis sufficient for the application and changes being made. As a rule, the value forScan Surplus should be at least 10% of Scan Time to ac<strong>com</strong>modate newly addedelements. For more information on scan time, see “Setting Scan Time” on page 53.! CAUTIONDo not attempt a Download Change if you have a negative Scan Surplus. First,adjust Scan Time to make the surplus value greater than or equal to zero.For more information on the Download Change <strong>com</strong>mand, see the TriStation 1131Developer's <strong>Guide</strong>.Chapter 4Application Development


52 Important TriStation CommandsUpload and VerifyBefore you make changes to a project in TriStation, you should run the Upload andVerify <strong>com</strong>mand to verify that the project in TriStation matches the project runningin the controller. (The Upload and Verify <strong>com</strong>mand is on the Commands menu onthe Control Panel in TriStation.) This <strong>com</strong>mand <strong>com</strong>pares the current projectrunning in the controller to a record of the last downloaded project. To use theUpload and Verify <strong>com</strong>mand, you must be able to connect your application to thecontroller using the Connect <strong>com</strong>mand on the Control panel in TriStation.For more information on the Upload and Verify <strong>com</strong>mand, see the TriStation 1131Developer's <strong>Guide</strong>.Compare to Last DownloadAfter you have run the Upload and Verify <strong>com</strong>mand, make the desired changes tothe project. Use the Compare to Last Download <strong>com</strong>mand to verify that thechanges to the project are only the intended changes. (The Compare to LastDownload <strong>com</strong>mand is on the Commands menu of the Configuration editor inTriStation.) To test the changes, use the Emulator Control Panel in TriStation.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Setting Scan Time 53Setting Scan TimeSetting appropriate scan time for the project is essential to avoid impropercontroller behavior. When changing a project running in an on-line system, specialprecautions should be exercised to avoid scan time overruns, which could result inunexpected controller behavior.Scan TimeScan time is the interval required for evaluations (in other words, scans) of anapplication as it executes in the controller. The time it actually takes to do anevaluation may be less than the requested scan time. To prevent scan-timeoverruns, a scan time must be set that includes sufficient time for all executableelements in an application—including print statements, conditional statements,and future download changes.Use the Scan Time parameter in the TriStation Configuration editor to suggest thedesired scan time before downloading an application. Upon downloading, thecontroller determines the minimum and maximum allowable scan times for yourapplication and uses your suggested scan time if it falls within the acceptablelimits. The default scan time is 200 milliseconds. The maximum allowable scantime is 500 milliseconds and the minimum allowable scan time is 25 milliseconds.Requested Scan Time is a system parameter that is set using the Configurationeditor.Actual scan time is the actual time of the last scan. Actual scan time is always equalto or greater than the requested scan time.Scan SurplusScan surplus is the scan time remaining after application elements have beenexecuted. Scan Surplus must be positive—if it is negative, the Scan Timeparameter must be adjusted using the Set Scan Time <strong>com</strong>mand on the ControlPanel to set the surplus value to greater than or equal to zero. The Scan Timeparameter in the TriStation Configuration editor applies only when you do aDownload All.Chapter 4Application Development


54 Setting Scan TimeScan OverrunsIf Scan Surplus be<strong>com</strong>es negative and a scan overrun occurs, the relevant statusattributes are set as follows:• SCAN_OVERRUNS is incremented once for each time that a longer scantime is needed.• SURPLUS_SCAN is set to a negative number to indicate the additionaltime period used by a scan overrun.SCAN_STATUSTR_SCAN_STATUS1 C1001COPOWERUPFIRSTSCANSCANREQUESTSCANSURPLUSSCANDELTADELTATSCANOVERRUNKEYSWITCHSCAN_SURPLUSSCAN_OVERRUNSFor more information, see the TriStation 1131 Developer's <strong>Guide</strong> and the <strong>Tricon</strong>exLibraries Manual.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 55Sample <strong>Safety</strong>-Shutdown ProgramsThe following section describes sample programs and methods for implementingsafety-shutdown networks.All I/O Modules <strong>Safety</strong>-CriticalThe sample program, PROGRAM EX01_SHUTDOWN, shows one way to verifythat the safety system is operating properly when every module in the safety systemis safety-critical. The example uses an instance of the <strong>Tricon</strong>ex Library functionblock TR_SHUTDOWN named CRITICAL_MODULES. (The sample program isan element of project ExTUV.pt2 found on the TriStation CD. The default locationof the project is C:\Program Files\<strong>Tricon</strong>ex\TS1131\_<strong>Tricon</strong>\Examples.)When the output CRITICAL_MODULES_OPERATING is true, all safety-criticalmodules are operating properly. The input MAX_TIME_DUAL specifies themaximum time allowed with two channels operating (with no connection defaultsto 40000 days). The input MAX_TIME_SINGLE specifies the maximum timeallowed with one channel operating (3 days in the example).Note In typical applications, continued operation in dual mode is restricted to1500 hours (two months).Continued operation in single mode is restricted to 72 hours for SIL/AK5 and onehour for SIL/AK6 guidelines.When CRITICAL_MODULES_OPERATING is false, the time in degradedoperation exceeds the specified limits; therefore, the control program should shutdown the process under safety control.! CAUTIONThe sample program called EX01_SHUTDOWN does not handle detected fieldfaults, rare <strong>com</strong>binations of faults detected as field faults, or output voter faultshidden by field faults. The application program, not the TR_SHUTDOWNfunction block, must read the NO_FLD_FLTS module status or FLD_OK pointstatus to provide the required application-specific action.For information on improving availability using external, power-disconnect relaysand advanced programming techniques, see the sample program calledEX02_SHUTDOWN.Chapter 4Application Development


56 Sample <strong>Safety</strong>-Shutdown ProgramsProgram EX01_SHUTDOWNCRITICAL_MODULESTR_SHUTDOWNCIIO_COCOOPERATIINGCRITICAL_MODULES_OPERATINGIO_TMRTMRIO_GE_DUALDUALIO_GE_SINGLESINGLIO_NO_VOTER_FLTSZEROT#1500hT#3dT#400msIO_ERRORMAX_TIME_DUALMAX_TIME_SINGLEMAX_SCAN_TIMETIMER_RUNNINGTIME_LEFTALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSERRORALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTS001CO false indicates a programming error; for example, MAX_TIME_SINGLEgreater than MAX_TIME_DUAL. The error number shows more detail.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 57Input ParametersThe table below describes the input parameters for the TR_SHUTDOWN function block.ParameterCIIO_COIO_TMRIO_GE_DUALIO_GE_SINGLEIO_NO_VOTER_FLTSIO_ERRORMAX_TIME_DUALMAX_TIME_SINGLEMAX_SCAN_TIMEDescriptionDo not connect when all I/O modules are system-criticalDo not connect when all I/O modules are system-criticalDo not connect when all I/O modules are system-criticalDo not connect when all I/O modules are system-criticalDo not connect when all I/O modules are system-criticalDo not connect when all I/O modules are system-criticalDo not connect when all I/O modules are system-criticalMaximum time with only two channels operatingMaximum time with only one channel operating50% of the maximum response timeChapter 4Application Development


58 Sample <strong>Safety</strong>-Shutdown ProgramsOutput ParametersThe table below describes the output parameters for the TR_SHUTDOWN function block.ParameterCOOPERATINGDescriptionControl outWhen OPERATING is true, all safety-critical modules areoperating properlyWhen OPERATING is false, the time in degraded operationexceeds the specified limits; therefore, the control programshould shut down the processTMRDUALSINGLZEROTIMER_RUNNINGTIME_LEFTALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSERROR_NUMSystem is operating in triple modular redundant modeAt least one safety-critical point is controlled by two channelsAt least one safety-critical point is controlled by one channelAt least one safety-critical point is not controlled by anychannelTime left to shutdown is decreasingTime remaining before shutdownTrue if application changes are permittedTrue if remote-host writes are enabledTrue if actual scan time is greater than MAX_SCAN_TIMETrue if one or more points are disabled.Error Number:0 = No error1 = Error in maximum time2 = I/O function block error—IO_ERROR is non-zero3 = Function block error—system status or MP Status<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 59Alarm Output OperationThe table below describes how the alarm output parameters operate.ParameterALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSDescriptionTo remind the operator to lock out programming changesafter a download change, or for applications in whichdownload changes are not allowed, connect theALARM_PROGRAMMING_PERMITTED Output to analarmFor applications in which remote changes are not allowed,connect the ALARM_REMOTE_ACCESS Output to analarmTotal response time depends primarily on the actual scantime. To meet the required response time of the process, setthe MAX_SCAN_TIME Input to less than 50% of therequired response time. When the actual scan time exceedsthe MAX_SCAN_TIME value, theALARM_RESPONSE_TIME output be<strong>com</strong>es trueA project should not contain disabled points unless there is aspecific reason for disabling them, such as initial testing ormaintenance. To remind an operator that some points aredisabled, connect the ALARM_DISABLED_POINTS outputto an alarmChapter 4Application Development


60 Sample <strong>Safety</strong>-Shutdown ProgramsSome I/O Modules <strong>Safety</strong>-CriticalFor some applications, not all modules may be critical to a process. For example,an output module that interfaces to the status indicators on a local panel is usuallynot critical to a process.The EX02_SHUTDOWN sample program shows how to increase systemavailability by detecting the status of safety-critical modules.The user-definedfunction block CRITICAL_IO checks the safety-critical I/O modules. TheCRITICAL_IO Outputs are connected to the inputs of the CRITICAL_MODULESfunction block. (The sample program is an element of project ExTUV.pt2 found onthe TriStation CD. The default location of the project is C:\ProgramFiles\<strong>Tricon</strong>ex\TS1131\_<strong>Tricon</strong>\Examples.)When the output CRITICAL_MODULES_OPERATING is true, all criticalmodules are operating properly. The input MAX_TIME_DUAL specifies themaximum time allowed with two channels operating (with no connection defaultsto 40000 days). The input MAX_TIME_SINGLE Specifies the maximum timeallowed with one channel operating (3 days in the example).Note In typical applications, continued operation in dual mode is restricted to1500 hours (two months).Continued operation in single mode is restricted to 72 hours for SIL/AK5 and onehour for SIL/AK6 guidelines.When CRITICAL_MODULES_OPERATING is false, the time in degradedoperation exceeds the specified limits; therefore, the control program should shutdown the plant.! CAUTIONThe EX02_SHUTDOWN sample program does not handle detected field faults,rare <strong>com</strong>binations of faults detected as field faults, or output voter faults hidden byfield faults. The application program, not the TR_SHUTDOWN function block,must read the NO_FLD_FLTS module status or FLD_OK point status to providethe required application-specific action.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 61Program EX02_SHUTDOWNCRITICAL_IOEX02_CRITICAL_IOCIRELAY1_OK001COTMRGE_DUALGE_SINGLENO_VOTER_FLTSERRORT#1500hT#3dT#400msCRITICAL_MODULESTR_SHUTDOWNCICOIO_COOPERATIINGIO_TMRTMRIO_GE_DUALDUALIO_GE_SINGLESINGLIO_NO_VOTER_FLTSZEROIO_ERRORTIMER_RUNNINGMAX_TIME_DUALTIME_LEFTMAX_TIME_SINGLE ALARM_PROGRAMMING_PERMITTEDMAX_SCAN_TIMEALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSERROR002CRITICAL_MODULES_OPERATINGALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSChapter 4Application Development


62 Sample <strong>Safety</strong>-Shutdown ProgramsInput ParametersThe table below describes the input parameters for the TR_SHUTDOWN function block.ParameterCIIO_COIO_TMRIO_GE_DUALIO_GE_SINGLEIO_NO_VOTER_FLTSIO_ERRORMAX_TIME_DUALMAX_TIME_SINGLEMAX_SCAN_TIMEDescriptionControl inIf CI is false, then CO is false—no change in the output valueIf CI is true and ERROR_NUM is 0, then CO is trueCritical I/O control outAll critical I/O points are operating in triple modular redundant modeAll critical I/O points are operating are operating in dual or TMR modeAll critical I/O points are operating are operating in single, dual, or TMR modeIf true, then no voter faults exist on a critical I/O moduleIf false, then a voter fault exists on a critical I/O moduleError number—zero indicates no error. Non-zero indicates a programming orconfiguration errorMaximum time with only two channels operatingMaximum time with only one channel operating50% of the maximum response time<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 63Output ParametersThe table below describes the output parameters for the TR_SHUTDOWN function block.ParameterCOOPERATINGTMRDUALSINGLZEROTIMER_RUNNINGTIME_LEFTALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSERROR_NUMDescriptionControl outWhen OPERATING is true, all safety-critical modules areoperating properlyWhen OPERATING is false, the time in degraded operationexceeds the specified limits; therefore, the control programshould shut down the processSystem is operating in triple modular redundant modeAt least one safety-critical point is controlled by two channelsAt least one safety-critical point is controlled by one channelAt least one safety-critical point is not controlled by anychannelTime left to shutdown is decreasingTime remaining before shutdownTrue if application changes are permittedTrue if remote-host writes are enabledTrue if actual scan time is greater than MAX_SCAN_TIMETrue if one or more points are disabledError Number:0 = No error1 = Error in maximum time2 = I/O function block error—IO_ERROR is non-zero3 = Function block error—system status or MP StatusChapter 4Application Development


64 Sample <strong>Safety</strong>-Shutdown ProgramsAlarm Output OperationThe table below describes how the alarm output parameters operate.ParameterALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSDescriptionTo remind the operator to lock out programming changesafter a download change, or for applications in whichdownload changes are not allowed, connect theALARM_PROGRAMMING_PERMITTED output to analarmFor applications in which remote changes are not allowed,connect the ALARM_REMOTE_ACCESS output to an alarmTotal response time depends primarily on the actual scantime. To meet the required response time of the process, setthe MAX_SCAN_TIME input to less than 50% of therequired response time. When the actual scan time exceedsthe MAX_SCAN_TIME value, theALARM_RESPONSE_TIME output be<strong>com</strong>es trueA project should not contain disabled points unless there is aspecific reason for disabling them, such as initial testing ormaintenance. To remind an operator that some points aredisabled, connect the ALARM_DISABLED_POINTS outputto an alarm<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 65Defining Function Blocks▼To create a user-defined function block for a safety-critical module:1 Copy the example EX02_CRITICAL_IO in the ExTUV.pt2 sample projectprovided with the TriStation 1131 Developer’s Workbench.2 Edit the lines following the <strong>com</strong>ment “Include all safety-critical I/O moduleshere.”Each line calls the safety-critical I/O (SCIO) function block for one safetycriticalI/O module.Example**************************************************************)(* Include here all safety-critical I/O modules: *)SCIO( CHASSIS:=1,SLOT:=1,APP:=DE_ENERGIZED,RELAY_OK:=FALSE ): (*DI*)SCIO( CHASSIS:=1,SLOT:=2,APP:=RELAY, RELAY_OK:=RELAY1_OK ); (*DO*)SCIO( CHASSIS:=1,SLOT:=3,APP:=RELAY, RELAY_OK:=RELAY1_OK ); (*DO*)(* ( CHASSIS:=1,SLOT:=4,NOT CRITICAL) *) (*RO*)(3 (Enter the correct CHASSIS number, SLOT number, APP (application), andRELAY_OK parameters for the safety-critical I/O module.Application Type(App)RELAY(de-energized to tripwith relay)RELAY(de-energized to tripwith relay)DE-ENERGIZED(de-energized to tripwith no relay)Relay_OKParameterTrueFalse—DescriptionA voter fault degrades the mode to dual. Therelay provides a third channel for shutdownso that if an output voter fails, there remaintwo independent channels (the relay andother output voter channel) that can deenergizethe output.A voter fault degrades the mode to single. Anon-voter fault degrades the mode to dual.Chapter 4Application Development


66 Sample <strong>Safety</strong>-Shutdown ProgramsPartitioned ProcessesYou can achieve greater system availability if you can allocate modules toprocesses that do not affect each other. For example, you could have two processeswith:• Outputs for one process on one DO module• Outputs for another process on a second DO module• Inputs from a shared DI module▼To partition processes:1 Partition the safety-critical I/O modules into three function blocks:• SHARED_IO for the shared safety-critical I/O modules.• PROCESS_1_IO for safety-critical I/O modules that do not affect process 2.• PROCESS_2_IO for safety-critical I/O modules that do not affect process 1.2 Connect the function blocks as shown in the EX03_SHUTDOWN example onpage 67.! CAUTIONThe EX03_SHUTDOWN sample program does not handle detected field faults,rare <strong>com</strong>binations of faults detected as field faults, or output voter faults hidden byfield faults. The application program, not the TR_SHUTDOWN function block,must read the NO_FLD_FLTS module status or FLD_OK point status to providethe required application-specific action.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Sample <strong>Safety</strong>-Shutdown Programs 67Program EX03_SHUTDOWNSHAREDSHARED_IOEX03_SHARED_IOCITR_SHUTDOWNCOCICOIO_COOPERATIINGRELAY1_OKTMRIO_TMRTMRGE_DUALIO_GE_DUALDUALGE_SINGLEIO_GE_SINGLESINGLNO_VOTER_FLTSIO_NO_VOTER_FLTSZERO001ERRORIO_ERRORTIMER_RUNNINGT#1500hMAX_TIME_DUALTIME_LEFTT#3dT#400msMAX_TIME_SINGLEMAX_SCAN_TIMEALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_PROGRAMMING_PERMITTEDALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_RESPONSE_TIMEALARM_DISABLED_POINTSALARM_DISABLED_POINTSERROR002PROCESS_1PROCESS_1_IOEX03_PROCESS_1_IOCICORELAY1_OKTMRGE_DUALGE_SINGLENO_VOTER_FLTS003ERRORT#1500hT#3dT#400msTR_SHUTDOWNCICOIO_COOPERATIINGIO_TMRTMRIO_GE_DUALDUALIO_GE_SINGLESINGLIO_NO_VOTER_FLTSZEROIO_ERRORTIMER_RUNNINGMAX_TIME_DUALTIME_LEFTMAX_TIME_SINGLE ALARM_PROGRAMMING_PERMITTEDMAX_SCAN_TIMEALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSAND005PROCESS_1_OPERATINGIf PROCESS_1_OPERATING= FALSE, shut down process1 because the time indegraded mode exceeds thespecified limit for safetycriticalmodules that affectprocess 1.004ERRORPROCESS_2_IOEX03_PROCESS_2_IOCICORELAY1_OKTMRGE_DUALGE_SINGLENO_VOTER_FLTS005ERRORT#1500hT#3dT#400msPROCESS_2TR_SHUTDOWNCICOIO_COOPERATIINGIO_TMRTMRIO_GE_DUALDUALIO_GE_SINGLESINGLIO_NO_VOTER_FLTSZEROIO_ERRORTIMER_RUNNINGMAX_TIME_DUALTIME_LEFTMAX_TIME_SINGLE ALARM_PROGRAMMING_PERMITTEDMAX_SCAN_TIMEALARM_REMOTE_ACCESSALARM_RESPONSE_TIMEALARM_DISABLED_POINTSAND006PROCESS_2_OPERATINGIf PROCESS_2_OPERATING= FALSE, shut down process2 because the time indegraded mode exceeds thespecified limit for safetycriticalmodules that affectprocess 2.006ERRORChapter 4Application Development


68 Alarm UsageAlarm UsageTo implement the guidelines, the alarms described below are provided withTriStation 1131 Developer’s Workbench.Programming Permitted AlarmTo remind the operator to lock out programming changes after a download change,or for applications in which download changes are prohibited, connect theALARM_KEYINPROGRAM output to an alarm.Remote Access AlarmIn applications for which remote changes are not allowed, connect theALARM_KEYINREMOTE output to an alarm.Response Time and Scan TimeResponse time refers to the maximum time allocated for the controller to detect achange on an input point and to change the state of an output point. Response timeis primarily determined by scan time (the rate at which the program is run), but isalso affected by process time (how fast the process can react to a change). Theresponse time of the controller must be equal to or faster than the process time. Thescan time must be at least two times faster than the response time. To meet therequired response time of the process, set the MAX_SCAN_TIME input to lessthan 50% of the required response time. When the actual scan time as measured bythe firmware exceeds the MAX_SCAN_TIME value, theALARM_RESPONSE_TIME output be<strong>com</strong>es true.Disabled Points AlarmA project should not contain disabled points unless there is a specific reason fordisabling them, such as initial testing. An alarm is available to alert the operationthat a point is disabled.<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


APPENDIX APeer-to-Peer CommunicationThis appendix provides information about data transfer time, and examples ofPeer-to-Peer applications.Topics include:“Data Transfer Time” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70“Examples of Peer-to-Peer Applications” . . . . . . . . . . . . . . . . . . . . . 72<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


70 Data Transfer TimeData Transfer TimeThe Peer-to-Peer function blocks require multiple scans to transfer data from thesending node to the receiving node. The time it takes to transfer data depends onthe following parameters of the sending and receiving nodes:• Scan time• Configuration size• Amount of aliased data• Number of TR_USEND function blocks, TR_URCV function blocks, printfunction blocks, and Modbus master function blocks• Number of nodes on the peer-to-peer networkTo estimate the data transfer time, first calculate the number of bytes for aliasedvariables according to the instructions that follow.▼To calculate the number of bytes for aliased variables:1 On the <strong>Tricon</strong> menu, select Edit Configuration. This will display theconfiguration tree.2 Click Memory Allocation under <strong>Tricon</strong> System Configuration on theconfiguration tree.This will display the Memory Allocation dialog box to the right of theconfiguration tree. The display gives the allocation for Unaliased, Read Aliased,and Read/Write Aliased Memory points, and if you scroll down you can see theallocation for Input points and Output points. For each data type (BOOLs,DINTs, and REALs), you can see the Maximum, Allocated, Forecast, andCurrent number of variables. The number you need is Allocated.3 Total the number of allocated “Aliased” BOOLs, DINTs and REALs.4 The number of bytes for aliased variables is 376 + BOOLs/8 + DINTs*4 +REALs*4.The basic formula for estimating the data transfer time is as follows:Data transfer time in milliseconds =2 * (larger of TS or SS) + 2 * (larger of TR or SR)<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Data Transfer Time 71ParameterTS =SS =TR =SR =DescriptionTime for sending node to transfer Aliased data over the <strong>com</strong>municationbus in milliseconds =(Number of aliased variables in bytes ÷ 20000) * 1000Scan time of sending node in millisecondsTime for receiving node to transfer Aliased data over the<strong>com</strong>munication bus in milliseconds =(Number of aliased variables in bytes ÷ 20000) * 1000Scan time of receiving node in millisecondsAs a general rule, the data transfer time is 1 second to 2 seconds. So when you usePeer-to-Peer function blocks to transfer safety-critical data, you must set themaximum time-out limit to at least 2 seconds. This means that the processtolerancetime of the receiving node must be greater than 4 seconds.See “Using TR_USEND/TR_URCV Function Blocks for <strong>Safety</strong>-Critical Data” onpage 73 for an example that shows how to measure the maximum data transfer timeand use TR_USEND/TR_URCV function blocks to transfer-safety critical data.You should measure the actual maximum time it takes to transfer data while testingyour system to ensure the validity of your calculations and the general rules givenhere.As the table shows, it takes from 2 to 30 seconds to detect and report time-out and<strong>com</strong>munication errors. This is why a receiving node that uses the received data tomake safety-critical decisions must include logic to check that new data is receivedwithin the specified time period. If the data is not received within the specifiedprocess-tolerance time, then the application must take appropriate actionsdepending on requirements.Refer to “Using TR_USEND/TR_URCV Function Blocks for <strong>Safety</strong>-CriticalData” on page 73 for an example that shows how to use TR_USEND andTR_URCV function blocks for transferring safety critical data.Appendix APeer-to-Peer Communication


72 Examples of Peer-to-Peer ApplicationsExamples of Peer-to-Peer ApplicationsPeer-to-Peer function blocks are designed to transfer limited amounts of databetween two applications. Therefore you should use these function blockssparingly in your applications. Ideally, you should control the execution of eachTR_USEND function block in such a way that each TR_USEND is initiated onlywhen the acknowledgment for the last TR_USEND is received and new data isavailable for sending. You can do this through effective use of the SENDFLGparameter in the TR_USEND function block and the STATUS output of theTR_USEND function block, as shown in Examples 2 and 3.The examples described below can be found in the Expeer.pt2 project on theTriStation CD.Fast Send to One <strong>Tricon</strong>ex NodeThis is a simple example of sending data as fast as possible from Node #2 to Node#3. Scan time in both controllers is set to 100 milliseconds.The example uses the following project elements:• PEER_EX1_SEND_FBD (for sending Node #2)• PEER_EX1_RCV_FBD (for receiving Node #3)Sending Data Every Second to One NodeThis is a simple example of sending data every second from Node #2 to Node #3.Scan time in both controllers is set to 100 milliseconds.The example uses the following project elements:• PEER_EX2_SEND_FBD (for sending Node #2)• PEER_EX2_RCV_FBD (for receiving Node #3)<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Examples of Peer-to-Peer Applications 73Controlled Use of TR_USEND/TR_URCV Function BlocksThe networks in this example show how to use TR_USEND/TR_URCV functionblocks correctly, in a controlled way, so that a limited amount of important data canbe transferred between two applications when new data is ready to be sent.This example uses the following project elements:• PEER_EX3_SEND_FBD (for sending Node #2)• PEER_EX3_RCV_FBD (for receiving Node #3)Using TR_USEND/TR_URCV Function Blocks for <strong>Safety</strong>-Critical DataThis example shows how to use TR_USEND/TR_URCV function blocks fortransferring a limited amount of safety-critical data between the two applicationsas fast as possible. It also shows how to measure the actual maximum time fortransferring data from the sending node to the receiving node. Because this issafety-critical data, each controller must have two NCMs and two peer-to-peernetworks connected.Sending Node #1 Parameters:• Scan time (SS) = 150 milliseconds• Number of aliased variables in bytes = 2000• Time to transfer alias data over the <strong>com</strong>munication bus in milliseconds (TS)= (2000/20000) * 1000 = 100 milliseconds• The sending controller has only one TR_USEND function block in theapplication, meeting the requirement to have five or fewer TR_USENDfunction blocks. The sendflag is on in the TR_USEND function block sothat, as soon as the last TR_USEND is acknowledged by the receivingcontroller, the sending controller initiates another TR_USENDReceiving Node #3 Parameters:• Scan time (SR) = 200 milliseconds• Number of aliased variables in bytes = 5000• Time to transfer aliased data over the <strong>com</strong>munication bus in milliseconds(TR) = (5000/20000) * 1000 = 250 milliseconds• Process tolerance time = 4 secondsAppendix APeer-to-Peer Communication


74 Examples of Peer-to-Peer ApplicationsIf the sending controller does not receive acknowledgment from the receivingcontroller in 1 second, then it automatically retries the last TR_USEND message.Assume that once in a while (due to network collisions, <strong>com</strong>munication busloading, etc.) the sending controller has to retry one time to get the message to thereceiving node. This is why the general rule for data transfer time is 1 to 2 seconds,even though the estimated time is 800 milliseconds. The receiving node also has anetwork to measure the actual time so that you can validate the assumed 2-secondmaximum transfer time. Since the process-tolerance time of the receiving node is4 seconds, the maximum time-out limit is set to 2 seconds (half the processtolerance time). The receiving node should get at least one sample of new datawithin the maximum time-out limit. Using this criteria satisfies the basicrequirement for using peer-to-peer to transfer safety critical data.This example packs 32 BOOL values into a DWORD and sends the DWORD anda diagnostic variable to a receiving node as fast as possible by setting the sendflagparameter to 1 all the time. The diagnostic variable is incremented every time a newTR_USEND is initiated. The receiving node checks the diagnostic variable to seethat it has changed from the previous value received. The receiving node alsochecks whether it has received at least one sample of new data within the processtolerancetime. If not, the application takes appropriate action such as using the lastdata received or using default data to make safety-critical decisions.This example uses the following project elements:• PEER_EX4_SEND_FBD (for sending Node #1)• PEER_EX4_RCV_FBD (for receiving Node #3)<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_CRITICAL_IO Function Block 75TR_CRITICAL_IO Function BlockAccumulates Status of Critical I/O ModulesThe TR_CRITICAL_IO function block provides an easy way to accumulate thestatus of all safety-critical I/O modules in a <strong>Tricon</strong> system.Instructions for UseThe following instructions for using the TR_CRITICAL_IO function block applyto the Structured Text (ST) language.▼To obtain the accumulated status of critical I/O modules:1 Initialize TR_CRITICAL_IO by invoking it once with INIT := TRUE.SCIO( INIT := TRUE );where SCIO is the function block instance name2 To <strong>com</strong>plete initialization, invoke TR_CRITICAL_IO again as follows:SCIO( INIT := FALSE, CI := TRUE, APP:=DE_ENERGIZED, RELAY_OK:=FALSE );where SCIO is the function block instance name3 To get the status of all safety-critical I/O modules, invoke each module byspecifying these input values:• CHASSIS• SLOT• APP• RELAY_OKIf CHASSIS 1 SLOT 1 is a critical DI module, and CHASSIS 1 SLOT 2 is acritical DO module with a relay, then the following example applies. SCIO isthe function block instance name:SCIO(CHASSIS:=1,SLOT:=1,APP:=DE-ENERGIZED,RELAY_OK:=FALSE);SCIO(CHASSIS:=1,SLOT:=2,APP:=RELAY,RELAY_OK:=RELAY1_OK);Appendix APeer-to-Peer Communication


76 TR_CRITICAL_IO Function Block4 Read the output values:– CO– TMR– GE_DUAL– GE_SINGLE– NO_VOTER_FAULTSThe output values are an accumulation of the status of all critical I/O modules.For example, the output called TMR is true if all of the critical modules in thesystem are in TMR mode.InputsParameter Type DescriptionCI BOOL Control In—enablesoperationINIT BOOL InitializeCHASSIS DINT Chassis number (1–15)SLOT DINT Physical slot number mustbe odd (1, 3...15)APP DINT Application number (1–2)RELAY_OK BOOL Relay is energized and notstuckOutputs CO BOOL Critical I/O Control OutTMR BOOL Three channels areoperating without faults onevery critical I/O moduleGE_DUAL BOOL At least two channels areoperating without faults onevery critical I/O moduleGE_SINGLE BOOL At least one channel isoperating without faults onevery critical I/O moduleNO_VOTER_FLTS BOOL No voter faults on criticalI/O modules<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_CRITICAL_IO Function Block 77Parameter Type DescriptionOutputs ERROR DINT Error Number:0 = No error-1 = Slot is not odd or notnumbered 1–15-2 = Invalid chassis or slot-3 = Module not configured-4 = Reserved (not used)-5 = Invalid applicationnumber-6 = Not initializedRuntime Error Code Return Value ConditionEBADPARAMBad parameterNote If there is a programming error, then CO is false and the error number isnon-zero. For more information, see ERROR above.App Relay_OK DescriptionRELAY True A single fault (even a voter fault) degrades themode to dual. The relay provides a third channelfor shutdown so that if an output voter fails,there remain two independent channels (therelay and other output voter channel) that cande-energize the output.RELAY False A voter fault degrades the mode to single. ADE-ENERGIZED —non-voter fault degrades the mode to dual.AttributeApplication TypeProgramming UsageCEM FeatureUsage<strong>Safety</strong>, ControlN/AN/ALibrary<strong>Tricon</strong>Appendix APeer-to-Peer Communication


78 TR_CRITICAL_IO Function BlockRelated TopicsTR_64_POINT_STATUSTR_CALENDARTR_MP_STATUSTR_PEER_STATUSTR_POINT_STATUSTR_PORT_STATUSTR_PROGRAM_STATUSTR_SCAN_STATUSTR_SHUTDOWNTR_SLOT_STATUSTR_VOTE_MODE<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_CRITICAL_IO Function Block 79Structured TextFUNCTION_BLOCK TR_CRITICAL_IOVAR_INPUTCI : BOOL := TRUE ; (* Control in. *)INIT : BOOL ; (* Initialize *)CHASSIS : DINT ; (* Chassis number 1-15 *)SLOT : DINT ; (* Physical SLOT odd number 1,3..15 *)APP : DINT ; (* Application number 1-2 *)RELAY_OK : BOOL := TRUE ; (* Relay is energized and not stuck. *)END_VARVAR_OUTPUTCO : BOOL ; (* Critical IO Control out. *)TMR : BOOL := TRUE ; (* Critical IO 3 channels operating. *)GE_DUAL : BOOL ; (* Critical IO 2 or more channels operating. *)GE_SINGLE : BOOL ; (* Critical IO 1 or more channels operating. *)NO_VOTER_FLTS : BOOL ; (* No voter faults on critical modules. *)ERROR : DINT ; (* Error number. *)(** Error number:* 0 = No error.* -1 = Slot is not odd or not in 1..15.* -2 = Chassis or slot is invalid.* -3 = Module not configured.* -4 = Reserved (not used).* -5 = Application number is invalid.* -6 = Not initialized.*)END_VARVARPREVIOUS_INIT : BOOL ; (* INIT on previous evaluation. *)MP : TR_MP_STATUS ; (* MP status. *)LEFT_SLOT : TR_SLOT_STATUS ; (* Left slot status. *)RIGHT_SLOT : TR_SLOT_STATUS ; (* Right slot status. *)RELAY : DINT := 1 ; (* De-energized to trip with relay *)DE_ENERGIZED : DINT := 2 ; (* De-energized to trip with no relay *)U : BOOL ; (* Unused value. *)LEFT_GE_SINGLE : BOOL ; (* Left slot, mode >= single. *)LEFT_GE_DUAL : BOOL ; (* Left slot, mode >= dual. *)LEFT_TMR : BOOL ; (* Left slot, mode = tmr. *)RIGHT_GE_SINGLE : BOOL ; (* Right slot, mode >= single. *)RIGHT_GE_DUAL : BOOL ; (* Right slot, mode >= dual. *)RIGHT_TMR : BOOL ; (* Right slot, mode = tmr. *)VOTER_FAULT : BOOL ; (* Voter fault on either slot. *)END_VAR(**=F===============================================================================* FUNCTION_BLOCK: TR_CRITICAL_IO* Purpose: Calculate status of critical IO modules.** Return: none** Remarks:* Usage* 1. Invoke once with INIT := TRUE, to initialize.* 2. Invoke again with INIT := FALSE, CI := TRUE, APP := DE_ENERGIZED, andAppendix APeer-to-Peer Communication


80 TR_CRITICAL_IO Function Block* RELAY_OK := FALSE to <strong>com</strong>plete initialization.* 3. Invoke repeatedly, once for each critical IO module.* 4. Read outputs CO, TMR, GE_DUAL, and GE_SINGLE for safety critical results.** In step 3, invoke with the CHASSIS and SLOT of the critical IO module,* the module application, and the relay status.* For example, if CHASSIS 1 SLOT 5 is a critical DO module with a relay,* and SCIO is the function block instance name:* SCIO( CHASSIS:=1, SLOT:= 5, APP:=RELAY, RELAY_OK:=RELAY1_OK );** Slot Number* Each logical IO slot consists of two physical slots,* a left slot and a right slot. By convention,* the physical slot number of the left slot is always odd.* The SLOT parameter is the physical slot number of the left slot.** Application* The APP parameter for a module selects the effect of a fault* on the vote mode outputs of the shutdown function blocks.* APP:=RELAY with RELAY_OK:=true* A sinlge fault (even a voter fault) degrades the mode to DUAL.* The relay provides a third channel for shutdown,* so if an output voter fails, there are still* two independent channels that can de-energize the output,* i.e., the relay and the other output voter channel.* APP:=RELAY with RELAY_OK:=false, or* APP:=DE_ENERGIZED* A voter fault degrades the mode to SINGLE.* A non-voter fault degrades the mode to DUAL.** Runtime Errors* EBADPARAM Bad parameter* CO=FALSE indicates a programming error.* See ERROR number parameter for details.*=F===============================================================================*)IF INIT THENMP( CI := TRUE ) ;CO := MP.CO ;TMR := TRUE ;GE_DUAL := TRUE ;GE_SINGLE := TRUE ;NO_VOTER_FLTS := TRUE ;ELSIF PREVIOUS_INIT THEN; (* No operation. *)ELSIF CI AND CO THENIF (DINT_TO_DWORD(SLOT) AND 1) 1 OR SLOT


TR_CRITICAL_IO Function Block 81CO := FALSE ;END_IF ;END_IF ;IF CO THENIF NOT ( LEFT_SLOT.PASS OR LEFT_SLOT.FAILOR LEFT_SLOT.ACTIVE OR LEFT_SLOT.INSTALLEDOR RIGHT_SLOT.PASS OR RIGHT_SLOT.FAILOR RIGHT_SLOT.ACTIVE OR RIGHT_SLOT.INSTALLED ) THENERROR := -3 ; (* Module not configured. *)U := ReportBadParam(0) ;CO := FALSE ;END_IF ;END_IF ;IF CO THENLEFT_GE_SINGLE := LEFT_SLOT.INSTALLED AND LEFT_SLOT.ACTIVE ;LEFT_GE_DUAL := LEFT_GE_SINGLEAND NOT LEFT_SLOT.NOGOOD ;LEFT_TMR := LEFT_GE_DUALAND LEFT_SLOT.PASS AND NOT LEFT_SLOT.FAIL ;RIGHT_GE_SINGLE := RIGHT_SLOT.INSTALLED AND RIGHT_SLOT.ACTIVE ;RIGHT_GE_DUAL := RIGHT_GE_SINGLEAND NOT RIGHT_SLOT.NOGOOD ;RIGHT_TMR := RIGHT_GE_DUALAND RIGHT_SLOT.PASS AND NOT RIGHT_SLOT.FAIL ;VOTER_FAULT := LEFT_SLOT.VOTER_FAULT OR RIGHT_SLOT.VOTER_FAULT ;TMR := TMR AND (LEFT_TMR OR RIGHT_TMR) ;GE_DUAL := GE_DUAL AND (LEFT_GE_DUAL OR RIGHT_GE_DUAL) ;GE_SINGLE := GE_SINGLE AND (LEFT_GE_SINGLE OR RIGHT_GE_SINGLE) ;NO_VOTER_FLTS := NO_VOTER_FLTS AND NOT VOTER_FAULT ;IF APP = RELAY AND RELAY_OK THENTMR := TMR AND NOT VOTER_FAULT ;ELSIF APP = DE_ENERGIZED OR APP = RELAY AND NOT RELAY_OK THENTMR := TMR AND NOT VOTER_FAULT ;GE_DUAL := GE_DUAL AND NOT VOTER_FAULT ;ELSEERROR := -5 ; (* Application number is invalid *)U := ReportBadParam(0) ;CO := FALSE ;END_IF ;END_IF ;END_IF ;IF ERROR = 0 AND NOT CO THENERROR := -6 ; (* Not initialized *)U := ReportBadParam(0) ;END_IF ;IF NOT CO THENTMR := FALSE ;GE_DUAL := FALSE ;GE_SINGLE := FALSE ;NO_VOTER_FLTS := FALSE ;END_IF ;PREVIOUS_INIT := INIT ;END_FUNCTION_BLOCKAppendix APeer-to-Peer Communication


82 TR_SHUTDOWN Function BlockTR_SHUTDOWN Function BlockEnable System ShutdownThe TR_SHUTDOWN function block provides an easy way to enable systemshutdown according to industry guidelines.Parameter Type DescriptionInputs CI BOOL Control In—enablesoperationIf CI=FALSE, thenCO=FALSE—there is nochange in the output valueIf CI=TRUE andERROR_NUM=0, thenCO=TRUEIO_CO BOOL Critical I/O Control Out—True indicates that a userdefinedfunction blockprovides the status forcritical I/O modulesIO_TMR BOOL Three channels areoperating without faults onevery critical I/O moduleIO_GE_DUAL BOOL At least two channels areoperating without faults onevery critical I/O moduleIO_GE_SINGLE BOOL At least one channel isoperating without faults onevery critical I/O moduleIO_NO_VOTER_FLTS BOOL No voter faults exist oncritical I/O modulesIO_ERROR DINT Zero means no error—nonzeromeans there is aprogramming error or aconfiguration error<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 83Parameter Type DescriptionInputs MAX_TIME_DUAL TIME Maximum time ofcontinuous operation in dualmode (with only twochannels)MAX_TIME_SINGLE TIME Maximum time ofcontinuous operation insingle mode (with only onechannel)MAX_SCAN_TIME TIME 50% of the maximumresponse timeOutputs CO BOOL Control OutOPERATING BOOL Shutdown if FALSETMR BOOL Three channels operatingDUAL BOOL Dual modeSINGL BOOL Single modeZERO BOOL Zero modeTIMER_RUNNING BOOL Shutdown timer is runningTIME_LEFT TIME Time remaining toshutdownALARM_PROGRAMMING_PERMITTEDBOOLTrue if application changesare permittedALARM_REMOTE_ACCESS BOOL True if remote-host writesare enabledALARM_RESPONSE_TIME BOOL True if actual scan time ≥MAX_SCAN_TIMEALARM_DISABLED_POINTS BOOL True if one or more pointsare disabledAppendix APeer-to-Peer Communication


84 TR_SHUTDOWN Function BlockParameter Type DescriptionOutputs ERROR_NUM DINT Error Number:0 = No error1 = Error in maximum time2 = Error in I/O functionblock (IO_ERRORinput is non-zero)3 = Error in status functionblockRuntime Error Code Return Value ConditionEBADPARAMBad parameterNote If there is a programming error, then CO is false and the error number isnon-zero. For more information, see ERROR_NUM.AttributeApplication TypeProgramming UsageCEM FeatureUsage<strong>Safety</strong>, ControlN/AN/ALibrary<strong>Tricon</strong><strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 85Related TopicsTR_64_POINT_STATUSTR_CALENDARTR_CRITICAL_IOTR_MP_STATUSTR_PEER_STATUSTR_POINT_STATUSTR_PORT_STATUSTR_PROGRAM_STATUSTR_SCAN_STATUSTR_SLOT_STATUSTR_VOTE_MODEAppendix APeer-to-Peer Communication


86 TR_SHUTDOWN Function BlockStructured TextFUNCTION_BLOCK TR_SHUTDOWNVAR_INPUTCI : BOOL := TRUE ; (* Control in. *)IO_CO : BOOL ; (* Critical IO Control out. *)IO_TMR : BOOL ; (* Critical IO 3 channels operating. *)IO_GE_DUAL : BOOL ; (* Critical IO 2 or more channels operating. *)IO_GE_SINGLE : BOOL ; (* Critical IO 1 or more channels operating. *)IO_NO_VOTER_FLTS : BOOL ; (* No voter faults on critical modules. *)IO_ERROR : DINT ; (* Error number, 0 = no error. *)MAX_TIME_DUAL : TIME := T#40000d ; (* Max Time with only 2 channels. *)MAX_TIME_SINGLE : TIME := T#40000d ; (* Max Time with only 1 channel. *)MAX_SCAN_TIME : TIME := T#400ms ; (* 50% of Max Response Time. *)END_VARVAR_OUTPUTCO : BOOL ; (* Control out. *)OPERATING : BOOL ; (* Shutdown if OPERATING=FALSE. *)TMR : BOOL ; (* Three channels operating. *)DUAL : BOOL ; (* Dual mode. *)SINGL : BOOL ; (* Single mode. *)ZERO : BOOL ; (* Zero mode. *)TIMER_RUNNING : BOOL ; (* Shutdown timer is running. *)TIME_LEFT : TIME ; (* Time remaining to shutdown. *)ALARM_PROGRAMMING_PERMITTED : BOOL ; (* Alarm -- download change. *)ALARM_REMOTE_ACCESS : BOOL ; (* Alarm -- remote host writes. *)ALARM_RESPONSE_TIME : BOOL ; (* Alarm -- exceed response time. *)ALARM_DISABLED_POINTS : BOOL ; (* Alarm -- some points disabled. *)ERROR : DINT ; (* Error number. *)(** Error number:* 0 = No error.* 1 = Error in maximum time.* 2 = IO function block error - IO_ERROR is non-zero.* 3 = Status function block error.*)END_VARVARGE_DUAL : BOOL ; (* Two or more channels operating. *)GE_SINGLE : BOOL ; (* One or more channels operating. *)MP : TR_MP_STATUS ; (* MP status. *)PROG : TR_PROGRAM_STATUS ; (* Program status. *)SCAN : TR_SCAN_STATUS ; (* Scan status. *)DUAL_TIME : TON ; (* Dual mode timer. *)SINGLE_TIME : TON ; (* Single mode timer. *)U : BOOL ; (* Unused Value. *)END_VAR(**=F===============================================================================* FUNCTION_BLOCK: TR_SHUTDOWN* Purpose: Implement TUV restrictions.** Return: none** Remarks:*<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 87* Example EX01_SHUTDOWN shows one way to check that* the safety system is operating within spec when* every module in the safety system is safety critical.* The example uses the <strong>Tricon</strong> Library function block* TR_SHUTDOWN - one instance named CRITICAL_MODULES.* The output CRITICAL_MODULES.OPERATING indicates* that all safety critical modules are operating* within spec. Input MAX_TIME_DUAL specifies the* maximum time allowed with two channels operating* (for example, 1500 hours).* Input MAX_TIME_SINGLE specifies the maximum time allowed* with only one channel operating (for example, 72 hours).* When CRITICAL_MODULES.OPERATING is FALSE,* the time in degraded operation exceeds the* specified limits -- therefore the control program* should shutdown the plant.** Excluding output voter faults and field faults -- TMR implies* three channels with no detected fatal errors, GE_DUAL implies* at least two channels with no detected fatal errors,* and GE_SINGLE implies at least one channel* with no detected fatal errors -- for every path* from a safety critical input to a safety critical output.* Detected output voter faults reduce TMR or GE_DUAL to GE_SINGLE.* (See example EX02_SHUTDOWN to improve availability* using relays and advanced programming techniques.)** The "TMR" output indicates TMR.* The "DUAL" output indicates GE_DUAL but not TMR.* The "SINGL" output indicates GE_SINGLE but not GE_DUAL.* The "ZERO" output indicates not GE_SINGLE.* The "TIMER_RUNNING" output indicates that* the time left to shutdown is decrementing.* The "TIME_LEFT" output indicates the time remaining before shutdown.** WARNING - the TR_SHUTDOWN function block* does not use detected field faults or* <strong>com</strong>binations of faults reported as field faults.* It is the responsibility of the application program* to use system variable NoFieldFault or FieldOK* to detect and respond to such faults.** To see how to create a user-defined function block* to improve availability, see the examples* in the help topic for TR_SHUTDOWN.** NOTE -- If IO_CO is false (for example, if you do not provide* a user-defined function block like the one in example EX02_SHUTDOWN),* then losing all three legs of an active IO module results in* a transition to "SINGL", not "ZERO".** Runtime Errors* EBADPARAM Bad parameter* CO=FALSE indicates a programming error.* See ERROR number parameter for details.*=F===============================================================================*)Appendix APeer-to-Peer Communication


88 TR_SHUTDOWN Function BlockIF CI THENMP( CI := TRUE ) ;PROG( CI := TRUE ) ;SCAN( CI := TRUE ) ;ERROR := 0 ;IFMAX_TIME_DUAL < MAX_TIME_SINGLE ORMAX_TIME_DUAL < T#0S ORMAX_TIME_SINGLE < T#0S ORMAX_SCAN_TIME < T#0STHENERROR := 1 ;ELSIF IO_ERROR 0 THENERROR := 2 ;ELSIF NOT (MP.CO AND PROG.CO AND SCAN.CO) THENERROR := 3 ;END_IF ;CO := ERROR = 0 ;(* Get Status *)(* Check for programming errors. *)IF CO THENTMR := NOT MP.MPMAIN AND(NOT IO_CO AND NOT MP.IOMAINOR IO_CO AND IO_TMR);(* Summarize redundancy. *)GE_DUAL := NOT MP.MPBAD AND(NOT IO_CO AND NOT MP.IOBADOR IO_CO AND IO_GE_DUAL);GE_SINGLE :=(NOT IO_COOR IO_CO AND IO_GE_SINGLE);(* Update timers. *)DUAL_TIME( IN := NOT TMR, PT := MAX_TIME_DUAL ) ;SINGLE_TIME( IN := NOT GE_DUAL, PT := MAX_TIME_SINGLE ) ;(* Shutdown if excessive time in degraded operation. *)OPERATING :=GE_SINGLEAND NOT DUAL_TIME.QAND NOT SINGLE_TIME.Q;DUAL := GE_DUAL AND NOT TMR ;SINGL := GE_SINGLE AND NOT GE_DUAL ;ZERO := NOT GE_SINGLE ;(* Output current status. *)<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 89TIMER_RUNNING := OPERATING AND NOT TMR ;(* Output time remaining to shutdown. *)IF NOT OPERATING THENTIME_LEFT := T#0s ;ELSIF TMR THENTIME_LEFT := T#999999d ;ELSIF GE_DUAL ORMAX_TIME_DUAL-DUAL_TIME.ET MAX_SCAN_TIME ;ALARM_DISABLED_POINTS := PROG.POINTS_DISABLED > 0 ;ELSEU := ReportBadParam(0) ;(* Programming error. *)OPERATING := FALSE ;TMR := FALSE ;GE_DUAL := FALSE ;GE_SINGLE := FALSE ;DUAL := FALSE ;SINGL := FALSE ;ZERO := FALSE ;TIMER_RUNNING := FALSE ;TIME_LEFT := T#0S;ALARM_PROGRAMMING_PERMITTED := TRUE ;ALARM_REMOTE_ACCESS := TRUE ;ALARM_RESPONSE_TIME := TRUE ;ALARM_DISABLED_POINTS := TRUE ;END_IF ;END_IF ;END_FUNCTION_BLOCKAppendix APeer-to-Peer Communication


90 TR_VOTE_MODE Function BlockTR_VOTE_MODE Function BlockConverts Redundancy StatusThe TR_VOTE_MODE function block provides an easy way to convertredundancy status from one voting mode to another, as shown in the followingtruth table.TMR GE_DUAL GE_SINGLE TMR DUAL SINGL ZEROT T T T F F FF T T F T F FF F T F F T FF F F F F F TOther 1F F F F1. If there is an error in the inputs, then CO is false, the mode outputs are false, and the functionblock reports a bad parameter error (EBADPARAM).Note To save memory and reduce scan time when using this function block,create a single instance of the function block in your program and invoke itmultiple times. Do not use the same instance more than once in a network.Parameter Type DescriptionInputs CI BOOL Control In—enables operationIf CI=FALSE, then CO=FALSE—there is nochange in the output valueIf CI=TRUE and ERROR_NUM=0, then CO=TRUEIN_TMR BOOL Three critical I/O channels operatingGE_DUAL BOOL Two or more critical I/O channels operatingGE_SINGLE BOOL One or more critical I/O channels operatingOutputs CO BOOL Control Out—indicates <strong>com</strong>pletion of theoperation with no errors<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_VOTE_MODE Function Block 91Parameter Type DescriptionOutput TMR BOOL Three critical I/O channels operatingDUAL BOOL Dual modeSINGL BOOL Single modeZERO BOOL Zero modeRuntime Error Code Return Value ConditionEBADPARAMBad parameterNote If there is a programming error, then CO is false and the mode outputs areset to false.AttributeApplication TypeProgramming UsageCEM FeatureUsage<strong>Safety</strong>, ControlSpace SaverN/ALibrary<strong>Tricon</strong>Related TopicsTR_64_POINT_STATUSTR_CALENDARTR_CRITICAL_IOTR_MP_STATUSTR_PEER_STATUSTR_POINT_STATUSTR_PORT_STATUSTR_PROGRAM_STATUSTR_SCAN_STATUSTR_SHUTDOWNTR_SLOT_STATUSAppendix APeer-to-Peer Communication


92 TR_VOTE_MODE Function BlockStructured TextFUNCTION_BLOCK TR_VOTE_MODEVAR_INPUTCI : BOOL := TRUE ; (* Control in. *)IN_TMR : BOOL ; (* 3 channels operating. *)GE_DUAL : BOOL ; (* 2 or more channels operating. *)GE_SINGLE : BOOL ; (* 1 or more channels operating. *)END_VARVAR_OUTPUTCO : BOOL ; (* Control out. *)TMR : BOOL ; (* Triple Modular Redundant. *)DUAL : BOOL ; (* Dual mode. *)SINGL : BOOL ; (* Single mode. *)ZERO : BOOL ; (* Zero mode. *)END_VARVARU : BOOL ; (* Unused Value. *)END_VAR(**=F===============================================================================* FUNCTION_BLOCK: TR_VOTE_MODE* Purpose: Convert redundancy status.** Return: none** Remarks:* 1. Convert redundancy status (TMR, GE_DUAL, GE_SINGLE)* to (TMR, DUAL, SINGL, ZERO).* 2. "GE_" denotes "greater than or equal to".* 3. CO is true if CI is true and there is no programming error.** Runtime Errors* EBADPARAM Bad parameter* CO=false indicates a programming error if CI=true.* The outputs are all false if there is a programming error.*=F==============================================================================*)CO := CI ;IF CI THENCO := GE_DUAL AND GE_SINGLE OR NOT GE_DUAL AND NOT IN_TMR;IF CO THENTMR := IN_TMR ;DUAL := GE_DUAL AND NOT IN_TMR ;SINGL := GE_SINGLE AND NOT GE_DUAL ;ZERO := NOT GE_SINGLE ;ELSEU := ReportBadParam(0) ;TMR := FALSE ;DUAL := FALSE ;SINGL := FALSE ;ZERO := FALSE ;END_IF ;END_IF ;END_FUNCTION_BLOCK<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_VOTE_MODE Function Block 93Appendix APeer-to-Peer Communication


94 TR_VOTE_MODE Function Block<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


APPENDIX BShutdown Function BlocksThis appendix provides information about shutdown function blocks.Topics include:“TR_CRITICAL_IO Function Block” . . . . . . . . . . . . . . . . . . . . . . . 96“TR_SHUTDOWN Function Block” . . . . . . . . . . . . . . . . . . . . . . . 103“TR_VOTE_MODE Function Block” . . . . . . . . . . . . . . . . . . . . . . 111<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


96 TR_CRITICAL_IO Function BlockTR_CRITICAL_IO Function BlockAccumulates Status of Critical I/O ModulesThe TR_CRITICAL_IO function block provides an easy way to accumulate thestatus of all safety-critical I/O modules in a <strong>Tricon</strong> system.Instructions for UseThe following instructions for using the TR_CRITICAL_IO function block applyto the Structured Text (ST) language.▼To obtain the accumulated status of critical I/O modules:1 Initialize TR_CRITICAL_IO by invoking it once with INIT := TRUE.SCIO( INIT := TRUE );where SCIO is the function block instance name2 To <strong>com</strong>plete initialization, invoke TR_CRITICAL_IO again as follows:SCIO( INIT := FALSE, CI := TRUE, APP:=DE_ENERGIZED, RELAY_OK:=FALSE );where SCIO is the function block instance name3 To get the status of all safety-critical I/O modules, invoke each module byspecifying these input values:• CHASSIS• SLOT• APP• RELAY_OKIf CHASSIS 1 SLOT 1 is a critical DI module, and CHASSIS 1 SLOT 2 is acritical DO module with a relay, then the following example applies. SCIO isthe function block instance name:SCIO(CHASSIS:=1,SLOT:=1,APP:=DE-ENERGIZED,RELAY_OK:=FALSE);SCIO(CHASSIS:=1,SLOT:=2,APP:=RELAY,RELAY_OK:=RELAY1_OK);<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_CRITICAL_IO Function Block 974 Read the output values:– CO– TMR– GE_DUAL– GE_SINGLE– NO_VOTER_FAULTSThe output values are an accumulation of the status of all critical I/O modules.For example, the output called TMR is true if all of the critical modules in thesystem are in TMR mode.InputsParameter Type DescriptionCI BOOL Control In—enablesoperationINIT BOOL InitializeCHASSIS DINT Chassis number (1–15)SLOT DINT Physical slot number mustbe odd (1, 3...15)APP DINT Application number (1–2)RELAY_OK BOOL Relay is energized and notstuckOutputs CO BOOL Critical I/O Control OutTMR BOOL Three channels areoperating without faults onevery critical I/O moduleGE_DUAL BOOL At least two channels areoperating without faults onevery critical I/O moduleGE_SINGLE BOOL At least one channel isoperating without faults onevery critical I/O moduleNO_VOTER_FLTS BOOL No voter faults on criticalI/O modulesAppendix BShutdown Function Blocks


98 TR_CRITICAL_IO Function BlockParameter Type DescriptionOutputs ERROR DINT Error Number:0 = No error-1 = Slot is not odd or notnumbered 1–15-2 = Invalid chassis or slot-3 = Module not configured-4 = Reserved (not used)-5 = Invalid applicationnumber-6 = Not initializedRuntime Error Code Return Value ConditionEBADPARAMBad parameterNote If there is a programming error, then CO is false and the error number isnon-zero. For more information, see ERROR above.App Relay_OK DescriptionRELAY True A single fault (even a voter fault) degrades themode to dual. The relay provides a third channelfor shutdown so that if an output voter fails,there remain two independent channels (therelay and other ouput voter channel) that can deenergizethe output.RELAY False A voter fault degrades the mode to single. ADE-ENERGIZED —non-voter fault degrades the mode to dual.AttributeApplication TypeProgramming UsageCEM FeatureUsage<strong>Safety</strong>, ControlN/AN/ALibrary<strong>Tricon</strong><strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_CRITICAL_IO Function Block 99Related TopicsTR_64_POINT_STATUSTR_CALENDARTR_MP_STATUSTR_PEER_STATUSTR_POINT_STATUSTR_PORT_STATUSTR_PROGRAM_STATUSTR_SCAN_STATUSTR_SHUTDOWNTR_SLOT_STATUSTR_VOTE_MODEAppendix BShutdown Function Blocks


100 TR_CRITICAL_IO Function BlockStructured TextFUNCTION_BLOCK TR_CRITICAL_IOVAR_INPUTCI : BOOL := TRUE ; (* Control in. *)INIT : BOOL ; (* Initialize *)CHASSIS : DINT ; (* Chassis number 1-15 *)SLOT : DINT ; (* Physical SLOT odd number 1,3..15 *)APP : DINT ; (* Application number 1-2 *)RELAY_OK : BOOL := TRUE ; (* Relay is energized and not stuck. *)END_VARVAR_OUTPUTCO : BOOL ; (* Critical IO Control out. *)TMR : BOOL := TRUE ; (* Critical IO 3 channels operating. *)GE_DUAL : BOOL ; (* Critical IO 2 or more channels operating. *)GE_SINGLE : BOOL ; (* Critical IO 1 or more channels operating. *)NO_VOTER_FLTS : BOOL ; (* No voter faults on critical modules. *)ERROR : DINT ; (* Error number. *)(** Error number:* 0 = No error.* -1 = Slot is not odd or not in 1..15.* -2 = Chassis or slot is invalid.* -3 = Module not configured.* -4 = Reserved (not used).* -5 = Application number is invalid.* -6 = Not initialized.*)END_VARVARPREVIOUS_INIT : BOOL ; (* INIT on previous evaluation. *)MP : TR_MP_STATUS ; (* MP status. *)LEFT_SLOT : TR_SLOT_STATUS ; (* Left slot status. *)RIGHT_SLOT : TR_SLOT_STATUS ; (* Right slot status. *)RELAY : DINT := 1 ; (* De-energized to trip with relay *)DE_ENERGIZED : DINT := 2 ; (* De-energized to trip with no relay *)U : BOOL ; (* Unused value. *)LEFT_GE_SINGLE : BOOL ; (* Left slot, mode >= single. *)LEFT_GE_DUAL : BOOL ; (* Left slot, mode >= dual. *)LEFT_TMR : BOOL ; (* Left slot, mode = tmr. *)RIGHT_GE_SINGLE : BOOL ; (* Right slot, mode >= single. *)RIGHT_GE_DUAL : BOOL ; (* Right slot, mode >= dual. *)RIGHT_TMR : BOOL ; (* Right slot, mode = tmr. *)VOTER_FAULT : BOOL ; (* Voter fault on either slot. *)END_VAR(**=F===============================================================================* FUNCTION_BLOCK: TR_CRITICAL_IO* Purpose: Calculate status of critical IO modules.** Return: none** Remarks:* Usage* 1. Invoke once with INIT := TRUE, to initialize.* 2. Invoke again with INIT := FALSE, CI := TRUE, APP := DE_ENERGIZED, and<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_CRITICAL_IO Function Block 101* RELAY_OK := FALSE to <strong>com</strong>plete initialization.* 3. Invoke repeatedly, once for each critical IO module.* 4. Read outputs CO, TMR, GE_DUAL, and GE_SINGLE for safety critical results.** In step 3, invoke with the CHASSIS and SLOT of the critical IO module,* the module application, and the relay status.* For example, if CHASSIS 1 SLOT 5 is a critical DO module with a relay,* and SCIO is the function block instance name:* SCIO( CHASSIS:=1, SLOT:= 5, APP:=RELAY, RELAY_OK:=RELAY1_OK );** Slot Number* Each logical IO slot consists of two physical slots,* a left slot and a right slot. By convention,* the physical slot number of the left slot is always odd.* The SLOT parameter is the physical slot number of the left slot.** Application* The APP parameter for a module selects the effect of a fault* on the vote mode outputs of the shutdown function blocks.* APP:=RELAY with RELAY_OK:=true* A sinlge fault (even a voter fault) degrades the mode to DUAL.* The relay provides a third channel for shutdown,* so if an output voter fails, there are still* two independent channels that can de-energize the output,* i.e., the relay and the other output voter channel.* APP:=RELAY with RELAY_OK:=false, or* APP:=DE_ENERGIZED* A voter fault degrades the mode to SINGLE.* A non-voter fault degrades the mode to DUAL.** Runtime Errors* EBADPARAM Bad parameter* CO=FALSE indicates a programming error.* See ERROR number parameter for details.*=F===============================================================================*)IF INIT THENMP( CI := TRUE ) ;CO := MP.CO ;TMR := TRUE ;GE_DUAL := TRUE ;GE_SINGLE := TRUE ;NO_VOTER_FLTS := TRUE ;ELSIF PREVIOUS_INIT THEN; (* No operation. *)ELSIF CI AND CO THENIF (DINT_TO_DWORD(SLOT) AND 1) 1 OR SLOT


102 TR_CRITICAL_IO Function BlockCO := FALSE ;END_IF ;END_IF ;IF CO THENIF NOT ( LEFT_SLOT.PASS OR LEFT_SLOT.FAILOR LEFT_SLOT.ACTIVE OR LEFT_SLOT.INSTALLEDOR RIGHT_SLOT.PASS OR RIGHT_SLOT.FAILOR RIGHT_SLOT.ACTIVE OR RIGHT_SLOT.INSTALLED ) THENERROR := -3 ; (* Module not configured. *)U := ReportBadParam(0) ;CO := FALSE ;END_IF ;END_IF ;IF CO THENLEFT_GE_SINGLE := LEFT_SLOT.INSTALLED AND LEFT_SLOT.ACTIVE ;LEFT_GE_DUAL := LEFT_GE_SINGLEAND NOT LEFT_SLOT.NOGOOD ;LEFT_TMR := LEFT_GE_DUALAND LEFT_SLOT.PASS AND NOT LEFT_SLOT.FAIL ;RIGHT_GE_SINGLE := RIGHT_SLOT.INSTALLED AND RIGHT_SLOT.ACTIVE ;RIGHT_GE_DUAL := RIGHT_GE_SINGLEAND NOT RIGHT_SLOT.NOGOOD ;RIGHT_TMR := RIGHT_GE_DUALAND RIGHT_SLOT.PASS AND NOT RIGHT_SLOT.FAIL ;VOTER_FAULT := LEFT_SLOT.VOTER_FAULT OR RIGHT_SLOT.VOTER_FAULT ;TMR := TMR AND (LEFT_TMR OR RIGHT_TMR) ;GE_DUAL := GE_DUAL AND (LEFT_GE_DUAL OR RIGHT_GE_DUAL) ;GE_SINGLE := GE_SINGLE AND (LEFT_GE_SINGLE OR RIGHT_GE_SINGLE) ;NO_VOTER_FLTS := NO_VOTER_FLTS AND NOT VOTER_FAULT ;IF APP = RELAY AND RELAY_OK THENTMR := TMR AND NOT VOTER_FAULT ;ELSIF APP = DE_ENERGIZED OR APP = RELAY AND NOT RELAY_OK THENTMR := TMR AND NOT VOTER_FAULT ;GE_DUAL := GE_DUAL AND NOT VOTER_FAULT ;ELSEERROR := -5 ; (* Application number is invalid *)U := ReportBadParam(0) ;CO := FALSE ;END_IF ;END_IF ;END_IF ;IF ERROR = 0 AND NOT CO THENERROR := -6 ; (* Not initialized *)U := ReportBadParam(0) ;END_IF ;IF NOT CO THENTMR := FALSE ;GE_DUAL := FALSE ;GE_SINGLE := FALSE ;NO_VOTER_FLTS := FALSE ;END_IF ;PREVIOUS_INIT := INIT ;END_FUNCTION_BLOCK<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 103TR_SHUTDOWN Function BlockEnable System ShutdownThe TR_SHUTDOWN function block provides an easy way to enable systemshutdown according to industry guidelines.Parameter Type DescriptionInputs CI BOOL Control In—enablesoperationIf CI=FALSE, thenCO=FALSE—there is nochange in the output valueIf CI=TRUE andERROR_NUM=0, thenCO=TRUEIO_CO BOOL Critical I/O Control Out—True indicates that a userdefinedfunction blockprovides the status forcritical I/O modulesIO_TMR BOOL Three channels areoperating without faults onevery critical I/O moduleIO_GE_DUAL BOOL At least two channels areoperating without faults onevery critical I/O moduleIO_GE_SINGLE BOOL At least one channel isoperating without faults onevery critical I/O moduleIO_NO_VOTER_FLTS BOOL No voter faults exist oncritical I/O modulesIO_ERROR DINT Zero means no error—nonzeromeans there is aprogramming error or aconfiguration errorAppendix BShutdown Function Blocks


104 TR_SHUTDOWN Function BlockParameter Type DescriptionInputs MAX_TIME_DUAL TIME Maximum time ofcontinuous operation in dualmode (with only twochannels)MAX_TIME_SINGLE TIME Maximum time ofcontinuous operation insingle mode (with only onechannel)MAX_SCAN_TIME TIME 50% of the maximumresponse timeOutputs CO BOOL Control OutOPERATING BOOL Shutdown if FALSETMR BOOL Three channels operatingDUAL BOOL Dual modeSINGL BOOL Single modeZERO BOOL Zero modeTIMER_RUNNING BOOL Shutdown timer is runningTIME_LEFT TIME Time remaining toshutdownALARM_PROGRAMMING_PERMITTEDBOOLTrue if application changesare permittedALARM_REMOTE_ACCESS BOOL True if remote-host writesare enabledALARM_RESPONSE_TIME BOOL True if actual scan time ≥MAX_SCAN_TIMEALARM_DISABLED_POINTS BOOL True if one or more pointsare disabled<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 105Parameter Type DescriptionOutputs ERROR_NUM DINT Error Number:0 = No error1 = Error in maximum time2 = Error in I/O functionblock (IO_ERRORinput is non-zero)3 = Error in status functionblockRuntime Error Code Return Value ConditionEBADPARAMBad parameterNote If there is a programming error, then CO is false and the error number isnon-zero. For more information, see ERROR_NUM.AttributeApplication TypeProgramming UsageCEM FeatureUsage<strong>Safety</strong>, ControlN/AN/ALibrary<strong>Tricon</strong>Appendix BShutdown Function Blocks


106 TR_SHUTDOWN Function BlockRelated TopicsTR_64_POINT_STATUSTR_CALENDARTR_CRITICAL_IOTR_MP_STATUSTR_PEER_STATUSTR_POINT_STATUSTR_PORT_STATUSTR_PROGRAM_STATUSTR_SCAN_STATUSTR_SLOT_STATUSTR_VOTE_MODE<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 107Structured TextFUNCTION_BLOCK TR_SHUTDOWNVAR_INPUTCI : BOOL := TRUE ; (* Control in. *)IO_CO : BOOL ; (* Critical IO Control out. *)IO_TMR : BOOL ; (* Critical IO 3 channels operating. *)IO_GE_DUAL : BOOL ; (* Critical IO 2 or more channels operating. *)IO_GE_SINGLE : BOOL ; (* Critical IO 1 or more channels operating. *)IO_NO_VOTER_FLTS : BOOL ; (* No voter faults on critical modules. *)IO_ERROR : DINT ; (* Error number, 0 = no error. *)MAX_TIME_DUAL : TIME := T#40000d ; (* Max Time with only 2 channels. *)MAX_TIME_SINGLE : TIME := T#40000d ; (* Max Time with only 1 channel. *)MAX_SCAN_TIME : TIME := T#400ms ; (* 50% of Max Response Time. *)END_VARVAR_OUTPUTCO : BOOL ; (* Control out. *)OPERATING : BOOL ; (* Shutdown if OPERATING=FALSE. *)TMR : BOOL ; (* Three channels operating. *)DUAL : BOOL ; (* Dual mode. *)SINGL : BOOL ; (* Single mode. *)ZERO : BOOL ; (* Zero mode. *)TIMER_RUNNING : BOOL ; (* Shutdown timer is running. *)TIME_LEFT : TIME ; (* Time remaining to shutdown. *)ALARM_PROGRAMMING_PERMITTED : BOOL ; (* Alarm -- download change. *)ALARM_REMOTE_ACCESS : BOOL ; (* Alarm -- remote host writes. *)ALARM_RESPONSE_TIME : BOOL ; (* Alarm -- exceed response time. *)ALARM_DISABLED_POINTS : BOOL ; (* Alarm -- some points disabled. *)ERROR : DINT ; (* Error number. *)(** Error number:* 0 = No error.* 1 = Error in maximum time.* 2 = IO function block error - IO_ERROR is non-zero.* 3 = Status function block error.*)END_VARVARGE_DUAL : BOOL ; (* Two or more channels operating. *)GE_SINGLE : BOOL ; (* One or more channels operating. *)MP : TR_MP_STATUS ; (* MP status. *)PROG : TR_PROGRAM_STATUS ; (* Program status. *)SCAN : TR_SCAN_STATUS ; (* Scan status. *)DUAL_TIME : TON ; (* Dual mode timer. *)SINGLE_TIME : TON ; (* Single mode timer. *)U : BOOL ; (* Unused Value. *)END_VAR(**=F===============================================================================* FUNCTION_BLOCK: TR_SHUTDOWN* Purpose: Implement TUV restrictions.** Return: none** Remarks:*Appendix BShutdown Function Blocks


108 TR_SHUTDOWN Function Block* Example EX01_SHUTDOWN shows one way to check that* the safety system is operating within spec when* every module in the safety system is safety critical.* The example uses the <strong>Tricon</strong> Library function block* TR_SHUTDOWN - one instance named CRITICAL_MODULES.* The output CRITICAL_MODULES.OPERATING indicates* that all safety critical modules are operating* within spec. Input MAX_TIME_DUAL specifies the* maximum time allowed with two channels operating* (for example, 1500 hours).* Input MAX_TIME_SINGLE specifies the maximum time allowed* with only one channel operating (for example, 72 hours).* When CRITICAL_MODULES.OPERATING is FALSE,* the time in degraded operation exceeds the* specified limits -- therefore the control program* should shutdown the plant.** Excluding output voter faults and field faults -- TMR implies* three channels with no detected fatal errors, GE_DUAL implies* at least two channels with no detected fatal errors,* and GE_SINGLE implies at least one channel* with no detected fatal errors -- for every path* from a safety critical input to a safety critical output.* Detected output voter faults reduce TMR or GE_DUAL to GE_SINGLE.* (See example EX02_SHUTDOWN to improve availability* using relays and advanced programming techniques.)** The "TMR" output indicates TMR.* The "DUAL" output indicates GE_DUAL but not TMR.* The "SINGL" output indicates GE_SINGLE but not GE_DUAL.* The "ZERO" output indicates not GE_SINGLE.* The "TIMER_RUNNING" output indicates that* the time left to shutdown is decrementing.* The "TIME_LEFT" output indicates the time remaining before shutdown.** WARNING - the TR_SHUTDOWN function block* does not use detected field faults or* <strong>com</strong>binations of faults reported as field faults.* It is the responsibility of the application program* to use system variable NoFieldFault or FieldOK* to detect and respond to such faults.** To see how to create a user-defined function block* to improve availability, see the examples* in the help topic for TR_SHUTDOWN.** NOTE -- If IO_CO is false (for example, if you do not provide* a user-defined function block like the one in example EX02_SHUTDOWN),* then losing all three legs of an active IO module results in* a transition to "SINGL", not "ZERO".** Runtime Errors* EBADPARAM Bad parameter* CO=FALSE indicates a programming error.* See ERROR number parameter for details.*=F===============================================================================*)<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_SHUTDOWN Function Block 109IF CI THENMP( CI := TRUE ) ;PROG( CI := TRUE ) ;SCAN( CI := TRUE ) ;ERROR := 0 ;IFMAX_TIME_DUAL < MAX_TIME_SINGLE ORMAX_TIME_DUAL < T#0S ORMAX_TIME_SINGLE < T#0S ORMAX_SCAN_TIME < T#0STHENERROR := 1 ;ELSIF IO_ERROR 0 THENERROR := 2 ;ELSIF NOT (MP.CO AND PROG.CO AND SCAN.CO) THENERROR := 3 ;END_IF ;CO := ERROR = 0 ;(* Get Status *)(* Check for programming errors. *)IF CO THENTMR := NOT MP.MPMAIN AND(NOT IO_CO AND NOT MP.IOMAINOR IO_CO AND IO_TMR);(* Summarize redundancy. *)GE_DUAL := NOT MP.MPBAD AND(NOT IO_CO AND NOT MP.IOBADOR IO_CO AND IO_GE_DUAL);GE_SINGLE :=(NOT IO_COOR IO_CO AND IO_GE_SINGLE);(* Update timers. *)DUAL_TIME( IN := NOT TMR, PT := MAX_TIME_DUAL ) ;SINGLE_TIME( IN := NOT GE_DUAL, PT := MAX_TIME_SINGLE ) ;(* Shutdown if excessive time in degraded operation. *)OPERATING :=GE_SINGLEAND NOT DUAL_TIME.QAND NOT SINGLE_TIME.Q;DUAL := GE_DUAL AND NOT TMR ;SINGL := GE_SINGLE AND NOT GE_DUAL ;ZERO := NOT GE_SINGLE ;(* Output current status. *)Appendix BShutdown Function Blocks


110 TR_SHUTDOWN Function BlockTIMER_RUNNING := OPERATING AND NOT TMR ;(* Output time remaining to shutdown. *)IF NOT OPERATING THENTIME_LEFT := T#0s ;ELSIF TMR THENTIME_LEFT := T#999999d ;ELSIF GE_DUAL ORMAX_TIME_DUAL-DUAL_TIME.ET MAX_SCAN_TIME ;ALARM_DISABLED_POINTS := PROG.POINTS_DISABLED > 0 ;ELSEU := ReportBadParam(0) ;(* Programming error. *)OPERATING := FALSE ;TMR := FALSE ;GE_DUAL := FALSE ;GE_SINGLE := FALSE ;DUAL := FALSE ;SINGL := FALSE ;ZERO := FALSE ;TIMER_RUNNING := FALSE ;TIME_LEFT := T#0S;ALARM_PROGRAMMING_PERMITTED := TRUE ;ALARM_REMOTE_ACCESS := TRUE ;ALARM_RESPONSE_TIME := TRUE ;ALARM_DISABLED_POINTS := TRUE ;END_IF ;END_IF ;END_FUNCTION_BLOCK<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_VOTE_MODE Function Block 111TR_VOTE_MODE Function BlockConverts Redundancy StatusThe TR_VOTE_MODE function block provides an easy way to convertredundancy status from one voting mode to another, as shown in the followingtruth table.TMR GE_DUAL GE_SINGLE TMR DUAL SINGL ZEROT T T T F F FF T T F T F FF F T F F T FF F F F F F TOther 1F F F F1. If there is an error in the inputs, then CO is false, the mode outputs are false, and the functionblock reports a bad parameter error (EBADPARAM).Note To save memory and reduce scan time when using this function block,create a single instance of the function block in your program and invoke itmultiple times. Do not use the same instance more than once in a network.Parameter Type DescriptionInputs CI BOOL Control In—enables operationIf CI=FALSE, then CO=FALSE—there is nochange in the output valueIf CI=TRUE and ERROR_NUM=0, then CO=TRUEIN_TMR BOOL Three critical I/O channels operatingGE_DUAL BOOL Two or more critical I/O channels operatingGE_SINGLE BOOL One or more critical I/O channels operatingOutputs CO BOOL Control Out—indicates <strong>com</strong>pletion of theoperation with no errorsAppendix BShutdown Function Blocks


112 TR_VOTE_MODE Function BlockParameter Type DescriptionOutput TMR BOOL Three critical I/O channels operatingDUAL BOOL Dual modeSINGL BOOL Single modeZERO BOOL Zero modeRuntime Error Code Return Value ConditionEBADPARAMBad parameterNote If there is a programming error, then CO is false and the mode outputs areset to false.AttributeApplication TypeProgramming UsageCEM FeatureUsage<strong>Safety</strong>, ControlSpace SaverN/ALibrary<strong>Tricon</strong>Related TopicsTR_64_POINT_STATUSTR_CALENDARTR_CRITICAL_IOTR_MP_STATUSTR_PEER_STATUSTR_POINT_STATUSTR_PORT_STATUSTR_PROGRAM_STATUSTR_SCAN_STATUSTR_SHUTDOWNTR_SLOT_STATUS<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


TR_VOTE_MODE Function Block 113Structured TextFUNCTION_BLOCK TR_VOTE_MODEVAR_INPUTCI : BOOL := TRUE ; (* Control in. *)IN_TMR : BOOL ; (* 3 channels operating. *)GE_DUAL : BOOL ; (* 2 or more channels operating. *)GE_SINGLE : BOOL ; (* 1 or more channels operating. *)END_VARVAR_OUTPUTCO : BOOL ; (* Control out. *)TMR : BOOL ; (* Triple Modular Redundant. *)DUAL : BOOL ; (* Dual mode. *)SINGL : BOOL ; (* Single mode. *)ZERO : BOOL ; (* Zero mode. *)END_VARVARU : BOOL ; (* Unused Value. *)END_VAR(**=F===============================================================================* FUNCTION_BLOCK: TR_VOTE_MODE* Purpose: Convert redundancy status.** Return: none** Remarks:* 1. Convert redundancy status (TMR, GE_DUAL, GE_SINGLE)* to (TMR, DUAL, SINGL, ZERO).* 2. "GE_" denotes "greater than or equal to".* 3. CO is true if CI is true and there is no programming error.** Runtime Errors* EBADPARAM Bad parameter* CO=false indicates a programming error if CI=true.* The outputs are all false if there is a programming error.*=F==============================================================================*)CO := CI ;IF CI THENCO := GE_DUAL AND GE_SINGLE OR NOT GE_DUAL AND NOT IN_TMR;IF CO THENTMR := IN_TMR ;DUAL := GE_DUAL AND NOT IN_TMR ;SINGL := GE_SINGLE AND NOT GE_DUAL ;ZERO := NOT GE_SINGLE ;ELSEU := ReportBadParam(0) ;TMR := FALSE ;DUAL := FALSE ;SINGL := FALSE ;ZERO := FALSE ;END_IF ;END_IF ;END_FUNCTION_BLOCKAppendix BShutdown Function Blocks


114 TR_VOTE_MODE Function Block<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Index 115IndexAactual scan time 53alarmsAnalog Input Module 44Analog Output Module 44Digital Input Module 43Digital Output Module 43disabled points 24, 68I/O modules 45output operation 59, 64programming permitted 68Relay Output Module 45remote access 68semaphore flags 46system attributes 47Analog Input Modulealarms 44diagnostics 44Analog Output Modulealarms 44diagnostics 44analysishazard and risk 5ANSI/ISA S84.01 16application-specific standards 17architecturesystem 38TMR 38Bblock valveequation for calculating PFD avg 9burner management systems 21busTribus 38Ccalculating PFD avgequation for block valves 9equation for sensors 9equation for system 9calculationSIL example 8certificationTÜV Rheinland 20<strong>com</strong>mandsCompare to Last Download 52Download All 25Download Change 51Upload and Verify 52<strong>com</strong>municationexternal 46serial 32Compare to Last Download <strong>com</strong>mand 52contacting <strong>Tricon</strong>ex viiiconvertingredundancy status 90, 111critical I/O modulesaccumulating status 75, 96CSA C22.2 NO 199 17customer support viiiDdesign requirements 33development guidelines 50diagnosticsAnalog Input Module 44Analog Output Module 44Digital Input Module 43Digital Output Module 43disable output voter 25<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


116 IndexRelay Output Module 45system 39Digital Input Modulealarms 43diagnostics 43Digital Output Modulealarms 43diagnostics 43DIN V 19250 15DIN V VDE 0801 15DIN VDE 0116 17disable output voter diagnostics 25disabled points alarms 24, 68Download All <strong>com</strong>mand 25Download Change <strong>com</strong>mand 51Eemergency shutdown system 21EN 54, part 3 17equationscalculating PFD avg for sensors 9calculating PFD avg for system 9calculating PFD avg for block valves 9EX01_shutdown program 56EX02_shutdown program 61EX03_shutdown program 67external <strong>com</strong>munication 46external faults 40FfactorsSIL 4SIS 5faultsexternal 40internal 40types 40fire and gas systems 22flagssemaphore 46functionsModbus master 25Ggeneral guidelines 20guidelinesdevelopment 50general 20SIL 27–30SIL fire and gas 28, 30SIL general 27, 29<strong>Tricon</strong> controller 23Hhazard and risk analysis 5II/O modulesaccumulating status 75, 96alarms 45system-critical 55IEC 61508, parts 1–7 16IEC 61511 16Input Module alarmsAnalog 44Digital 43Input Module diagnosticsAnalog 44Digital 43input parameters 57, 62installation checkTriStation 50internal faults 40Llayersprotection 5life cycle modelsafety 12MMain Processorsystem attributes 47Tribus 46maintenance overrides 32<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Index 117Modbus master functions 25modelsafety life cycle 12modesoperating 41module alarmsAnalog Input 44Analog Output 44Digital Input 43Digital Output 43I/O 45Relay Output 45module diagnosticsAnalog Input 44Analog Output 44Digital Input 43Digital Output 43Relay Output 45modulesaccumulating status 75, 96safety-critical 24system-critical shutdown program for all55system-critical shutdown program forsome 60NNFPA 72 17NFPA 8501 17NFPA 8502 17Ooperating modesdual 41single 41TMR 41zero 41operating requirements 34operationalarm output 59, 64Output Module alarmsAnalog 44Digital 43Relay 45Output Module diagnosticsAnalog 44Digital 43Relay 45output operation alarms 64output parameters 58, 63output voter diagnosticsdisable 25OVDSee output voter diagnosticsoverridesmaintenance 32overrunscan 54overviewsafety 5Pparametersinput 62output 58partitioning processes 66Peer-to-Peer <strong>com</strong>munication 25description of function blocks for 70, 96Peer-to-Peer function blocksdata transfer time 70, 96errors 71examples 72rules for correct usage 70, 96using with critical data 26permitted alarmsprogramming 68PFD avg for block valveequation for calculating 9PFD avg for sensorsequation for calculating 9PFD avg for systemequation for calculating 9points alarmsdisabled 68processespartitioning 66<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


118 Indexprogramming permitted alarm 68programsEX01_shutdown 56EX02_shutdown 61EX03_shutdown 67safety-shutdown for all system-criticalI/O modules 55safety-shutdown for some system-criticalI/O modules 60protection layers 5Rredundancy statusconverting 90, 111Relay Output Modulealarms 45diagnostics 45requested scan time 53requirementsdesign 33operating 34response time and scan time 24, 68Ssafety life cycle model 12safety overview 5safety-critical modules 24safety-shutdown 24networks 24programs for all system-critical I/Omodules modules 55programs for some system-critical I/Omodules 60scan overrun 54scan surplus 53scan time 53actual 53requested 53response time and 24, 68semaphore flags 46sensorsequation for calculating PFD avg 9serial <strong>com</strong>munication 32shutdownenabling for <strong>Tricon</strong> 82, 103programs for all system-critical I/Omodules 55programs for some system-critical I/Omodules 60safe 24systems emergency 21SILcalculation example 8factors 4fire and gas guidelines 28, 30general guidelines 27, 29guidelines 27–30SISfactors 5standardsapplication-specific 17general 15–16statusof critical I/O modules 75, 96surplusscan 53SYS_SHUTDOWN parametersinput 57output 63systemarchitecture 38attributes as alarms 47attributes of Main Processor 47diagnostics 39enabling shutdown for <strong>Tricon</strong> 82, 103equation for calculating PFD avg 9system-critical I/O modulessafety-shutdown program for all 55safety-shutdown program for some 60systemsburner management 21emergency shutdown 21fire and gas 22Ttechnical support viii<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


Index 119timescan 53TMR architecture 38TR_SHUTDOWN function block 82, 103TR_VOTE_MODE function block 90,111training xTribusMain Processor 46system architecture 38<strong>Tricon</strong>ex support viiiTriple Module RedundantSee TMRTriStation Install Check 50TÜV Rheinland certification 20types of faults 40UUpload and Verify <strong>com</strong>mand 52Vvoter diagnosticsdisable output 25<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>


120 Index<strong>Tricon</strong> <strong>Safety</strong> <strong>Considerations</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!