Table of Contents
FOREWORD
INTRODUCTION
1General
1.1Scope
1.2Normativereferences
1.3Abbreviatedterms
1.4Overview
2IntroductiontoIEC61131-3
2.1Generalconsiderations
2.2Overcominghistoricallimitations
2.3BasicfeaturesinIEC61131-3
2.4NewfeaturesinthesecondeditionofIEC61131-3
2.5Softwareengineeringconsiderations
2.5.1Applicationofsoftwareengineeringprinciples
2.5.2Portability
3Applicationguidelines
3.1Useofdatatypes
3.1.1Typeversusvariableinitialization
3.1.2Useofenumeratedandsubrangetypes
3.1.3UseofBCDdata
3.1.4UseofREALdatatypes
3.1.5Useofcharacterstringdatatypes
3.1.6Useoftimedatatypes
3.1.7Declarationanduseofmulti-elementvariables
3.1.8Useofbit-stringfunctions
3.1.9Stronglytypedassignment
3.2Datapassing
3.2.1Globalandexternalvariables
3.2.2In-out(VAR_IN_OUT)variables
3.2.3Formalandnon-formalinvocationsandargument
lists
3.3Useoffunctionblocks
3.3.1Functionblocktypesandinstances
3.3.2Scopeofdatawithinfunctionblocks
3.3.3Functionblockaccessandinvocation
3.4Differencesbetweenfunctionblockinstancesand
functions
3.5Useofindirectlyreferencedfunctionblockinstances
3.5.1Establishinganindirectfunctionblockinstance
reference
3.5.2Accesstoindirectlyreferencedfunctionblock
instances
3.5.3Invocationofindirectlyreferencedfunction
blockinstances
3.5.4Recursionofindirectlyreferencedfunction
blockinstances
3.5.5Executioncontrolofindirectlyreferenced
functionblockinstances
3.5.6Useofindirectlyreferencedfunctionblock
instancesinfunctions
3.6Recursionwithinprogrammablecontrollerprogramming
languages
3.7Singleandmultipleinvocation
3.8Languagespecificfeatures
3.8.1Edge-triggeredfunctionality
3.8.2UseofEN/ENOinfunctionsandfunctionblocks
3.8.3Useofnon-IEC61131-3languages
3.9UseofSFCelements
3.9.1Actioncontrol
3.9.2Booleanactions
3.9.3Non-SFCactions
3.9.4SFCactions
3.9.5SFCfunctionblocks
3.9.6"Indicator"variables
3.10Scheduling,concurrency,andsynchronizationmechanisms
3.10.1Operatingsystemissues
3.10.2Taskscheduling
3.10.3Semaphores
3.10.4Messaging
3.10.5Timestamping
3.11CommunicationfacilitiesinISO/IEC9506/5andIEC61131-5
3.11.1Communicationchannels
3.11.2Readingandwritingvariables
3.11.3Communicationfunctionblocks
3.12Deprecatedprogrammingpractices
3.12.1Globalvariables
3.12.2JumpsinFBDlanguage
3.12.3Multipleinvocationsoffunctionblockinstancesin
FBD
3.12.4CouplingofSFCnetworks
3.12.5Dynamicmodificationoftaskpriorities
3.12.6Executioncontroloffunctionblockinstancesby
tasks
3.12.7IncorrectuseofWHILEandREPEATconstructs
3.13UseofTRUNCandREAL_TO_INTfunctions
4Implementationguidelines
4.1Resourceallocation
4.2Implementationofdatatypes
4.2.1REALandLREALdatatypes
4.2.2Bitstrings
4.2.3Characterstrings
4.2.4Timedatatypes
4.2.5Multi-elementvariables
4.3Executionoffunctionsandfunctionblocks
4.3.1Functions
4.3.2Functionblocks
4.4ImplementationofSFCs
4.4.1Generalconsiderations
4.4.2SFCevolution
4.5Taskscheduling
4.5.1Classificationoftasks
4.5.2Taskpriorities
4.6Errorhandling
4.6.1Error-handlingmechanisms
4.6.2Run-timeerror-handlingprocedures
4.7Systeminterface
4.8Compliance
4.8.1Compliancestatement
4.8.2Controllerinstructionsets
4.8.3Compliancetesting
5PSErequirements
5.1Userinterface
5.2Programmingofprograms,functionsandfunctionblocks
5.3Applicationdesignandconfiguration
5.4Separatecompilation
5.5Separationofinterfaceandbody
5.5.1Invocationofafunctionfromaprogrammingunit
5.5.2Declarationandinvocationofafunctionblock
instance
5.6Linkingofconfigurationelementswithprograms
5.7Librarymanagement
5.8Analysistools
5.8.1Simulationanddebugging
5.8.2Performanceestimation
5.8.3Feedbackloopanalysis
5.8.4SFCanalysis
5.9Documentationrequirements
5.10Securityofdataandprograms
5.11On-linefacilities
AnnexA(informative)ChangestoIEC61131-3,Secondedition
AnnexB(informative)Softwarequalitymeasures
AnnexC(informative)Relationshipstootherstandards
INDEX
Bibliography Abstract
Applies to the programming of programmable controller systems using the programming languages. Also provides guidelines for the implementation of these languages in programmable controller systems and their programming support environments (PSEs).