Home
1756-PM010C-EN-P, Logix5000 Controllers Add
Contents
1. Output REAL Float Output value of th Read Only InOut REAL 100 Float Enter an array of 1 000000000 1 Copy all default values of parameters and local tags whose values were modified to all tags of this instruction type Data Type Size 276 byte s Local Tags The Local Tags tab defines tags that are used by the logic within the Add On Instruction and are not visible outside the instruction Other Add On Instructions or programs in the project cannot access these tags The only way to make a local tag or one of its members accessible from outside the instruction is by defining an alias parameter See Creating an Alias Parameter for a Local Tag on page 28 Add On Instruction Definition Simulation DT_1st v1 0 Sim General Parameters Local Tags Scan Modes Signature Change History Help __ Name 8 4 Data Type Defaut Style Description i amp pept_o1 DEADTIME tee LEAD_LAG all tags of this instructio Data Type Size 276 byte s Publication 1756 P M010C EN P October 2009 Designing Add On Instructions Chapter 1 Data Type Parameters and local tags are used to define the data type that is used when executing the instruction The software builds the associated data type The software orders the members of the data type that correspond to the parameters in the order that the parameters are defined Local
2. Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Publication 1756 PM010C EN P October 2009 7 On the Source Key Entry dialog box enter the individual source key for this component These source keys follow the conventions for routine source keys which are defined in the online help 8 If you want to allow users to be able to see the logic and local tags check Allow viewing of component s The Source Protection Configuration should now resemble the following dialog box fs Source Protection Configuration eh E A x Component Source Key Viewable 8 Motor_Starter_Program ats Sim_Dead_Time_Program H E Sort_Program Unprotect S Add On Instructions REL 0g Simulation_DT_1st Under_Developement_Insertio Source Key File sk dat _ Help Location C Program Files Rockwell Software R Specify View ls Clear Close a Disable Ability To Configure Protection a 5 4 IMPORTANT If you want to observe the source protection settings before you click Close you must first do one of the following e click Clear e click Disable Ability to Configure Source Protection e remove the sk dat file from the personal computer so that the source key is no longer present 9 Click Close 10 Save the project IMPORTANT If you export a source protected Add On Instruction and want the exported contents encrypted you must first remove
3. rename or move the source key file sk dat This causes the exported Add On Instructions to be encrypted Chapter2 Defining Add On Instructions Observe Source Protection If you want to observe how source protection works follow these steps 1 Rename the sk dat file to some other name 2 Start RSLogix 5000 software and open the project There is now no valid key file available to this RSLogix 5000 project TIP When the source key is available the Add On Instruction behaves the same as if it were not source protected 3 Review how the instruction appears in the Add On Instructions folder Now the protected Add On Instruction definition s routines and tag folder are not shown if fully protected and the definition cannot be edited Generate an Add On The Signature tab of the Add On Instruction Definition Editor lets you manage the instruction signature create signature history entries and Instruction Signature view the safety instruction signature if it exists Instruction signatures are applied to the definition of the Add On Instruction All instances of that Add On Instruction are sealed when the signature is applied Generate Remove or Copy an Instruction Signature On the Signature tab of the Add On Instruction Definition Editor click Generate to create an instruction signature or Remove to delete the instruction signature You must be offline to generate or remove an instruction signature Both
4. Preface Instructions Term Argument Understanding Terminology This table defines some of the terms used in this manual when describing how parameters and arguments are used in Add On Definition An argument is assigned to a parameter of an Add On Instruction instance An argument contains the specification of the data used by an instruction in a user program An argument can contain the following e A simple tag for example L101 e A literal value for example 5 e A tag structure reference for example Recipe Temperature e A direct array reference for example Buffer 1 e An indirect array reference for example Buffer Index 1 e A combination for example Buffer Index 1 Delay Parameter Parameters are created in the Add On Instruction definition When an Add On Instruction is used in application code arguments must be assigned to each required parameter of the Add On Instruction InOut parameter An InOut parameter defines data that can be used as both input and output data during the execution of the instruction Because InOut parameters are always passed by reference their values can change from external sources during the execution of the Add On Instruction Input parameter Output parameter For an Add On Instruction an Input parameter defines the data that is passed by value into the executing instruction Because Input parameters are always passed by value their values cannot ch
5. Publication 1756 PM010C EN P October 2009 Import and Export Add On Instructions Chapter 4 When importing Add On Instructions directly or as references consider these guidelines Considerations when Importing an Add On Instruction Topic Consideration Tag Data Imported tags that reference an Add On Instruction in the import file may be affected if the Add On Instruction is not imported as well In this case the imported tag s data may be converted if the existing Add On Instruction s data structure is different and tag data may be lost If an existing Add On Instruction is overwritten project tag data may be converted if the Add On Instruction s data structure is different and tag data may be lost See Import Configuration on page 94 for more information Logic Imported logic that references the Add On Instruction in the import file may be affected if the Add On Instruction is not imported If an existing Add On Instruction is used for the imported logic reference and the parameter list of the Add On Instruction in the project is different the project may not verify or it may verify but not work as expected If an existing Add On Instruction is overwritten logic in the project that references the Add On Instruction may be affected The project may not verify or may verify but not work as expected See Import Configuration on page 94 for more information Add On Instructions While An Add On Instruction cannot
6. Simulation Example Definition Editor General Tab amp Add On Instruction Definition Simulation_DT_1st EX General Parameters Local Tags Scan Modes Signature Change History Help Name Simulation DT_1st Description Simulation instruction which includes a dead time and a first order lag L Type ESES Function Block Diagram Major Minor Extended Text Revision 12 0 S simpT 1st v Revision Note Vendor Rockwell Automation alue e of this instruction type Copy all default Data Type Size 278 byte ls 70 Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Publication 1756 PM010C EN P October 2009 Simulation Example Definition Editor Parameter Tab Add On Instruction Definition Simulation DT_ ist v1 0 Sim DT General Parameters Enableln 1 m oo Input Read Only EnableOut Output BOOL it E Enable Outpu Read Ony o Simlnput Input REAL 0 0 Float Mi M Enter the tag Read Write SimDeadti Input REAL 0 0 Float O Enter the dea Read Write SimTimeC Input REAL 1 0 Float X Enter the time Read write SimOutput Output REAL 0 0 Float M Output value Read Only SimDTinv Output BOOL O Decimal C A it on the dea Read Ony H DA1 InOut REAL 100 j Float Li fz H Enter an array Oo Move Up Move Do
7. Simulation_DT_1st General Parameters Local Tags Scan Modes Signature Change History Help Extended Description Text Instruction Help Preview Simulation_DT_1st v1 0 Sim DT 1st Rockwell Automation Contact the Add On Instruction developer for questions or problems with this instruction Simulation instruction which includes a dead time and a first order lag Available Languages Data Type Size 276 byte s When deciding whether to develop an Add On Instruction consider the following aspects Instruction Functionality Complex instructions tend to be highly application specific and not reusable or require extensive configuration support code As with the built in instructions Add On Instructions need to do one thing do it well and support modular coding Consider how the instruction will be used and manage interface complexity for the end user or application Add On Instructions are best at providing a specific type of functionality or device control Publication 1756 P M010C EN P October 2009 Designing Add On Instructions Chapter 1 Encapsulation Add On Instructions are designed to fully encapsulate the code and data associated with the instruction The logic inside an Add On Instruction uses only the parameters and local tags defined by the instruction definition There is no direct programmatic access to controller or program scope tags This lets the Add On Instruction be a
8. XIS Fine PEEN Find Replace Find Within Final Name Import Content Pr amp Add On Instruction Configure Add On Instruction Properties AO bak prrrerepeert E Import Name Conveyor_Control The component collides with a arameters ari ocal ags Routines Operation Overwrite x definition already in the project amp Ref nce i References will be imported as Add On Instructions configured in the References folders Errors ami r E Erors wamings Final Name Conveyor_Control v Collision Details Description Starts and stops a conveyor w Conveyor_Control already exists in project and is different Existing references to the instruction type may be affected including Revision N logic that calls instruction tags of this instruction type Revision Note add on instructions and user Vendor Rockwell K Conveyor_Control already exists in project and is different Existing references may be affected Calls to the add on instruction may verify with changes applied although calling arguments may not be what is intended Check all calls to instruction to ensure they will execute corectly with updates If the data layout is different data values for tags using this type will be converted if possible and some values may be lost Check any tags using this type to ensure tag data converts as expected Cancel Help Add on instruction definition Conveyor_Control already ex
9. Jhose value ere odihed to all tags of tr Data Type Size 276 byte s Class information for safety controller projects appears on the General tab as well The class can be standard or safety Safety Add On Instructions must meet requirements specific to safety applications See Safety Add On Instructions on page 19 for more information Add On Instruction Definition SafetyAddOnInstru General Parameters Local Tags Scan Modes Signature Change History Help Name SafetyAddOninstruction Description Class Safety ke Type BA Ladder Diagram Change Type EE 13 Chapter 1 Designing Add On Instructions 14 Parameters The parameters define the instruction interface that is how the instruction appears when used The parameter order defines the order that the parameters appear on the instruction call Add On Instruction Definition Simulation_DT_1st v1 0 Sim DT 1st General Parameters Local Tags Scan Modes Signature Change History Help EnableQut SimDTInv Simlnput SimOutput SimDeadtime Input REAL 4 Float Enter the dead tim Read Write SimTimeConst Input REAL Float Enter the time con Read Write BOOL Decimal E Enable Input Sys Read Only BOOL Decimal Enable Output S Read Only Output BOOL Decimal If on the dead tim Read Only Input REAL H Float Enter the tag for t Read Write
10. Using a Single Dimension Array as an InOut Parameter The InOut parameter can be defined to be a single dimension array When specifying the size of this array consider that the user of your array can either e pass an array tag that is the same size as your definition e pass an array tag that is larger than your definition When developing your logic use the Size instruction to determine the actual size of the referenced array to accommodate this flexibility TIP When you monitor an array InOut parameter inside of the logic routine the parameter definition is used to determine the size of the array For example assume you have defined an InOut parameter to be a 10 element array of DINTs and the end user passes in an array of 100 DINTs Then if you open the Add On Instruction logic select the appropriate context for that call and monitor the array parameter only 10 elements will be displayed Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Chapter 1 Publication 1756 PM010C EN P October 2009 Determining Which Parameters to Make Visible or Required To help be sure that specific data is passed into the Add On Instruction you can use required parameters A required parameter must be passed an argument for a call to the instruction to verify In Ladder Diagram and Structured Text this is done by specifying an argument tag for these parameters In a Function Block Diagram required Input and Ou
11. identifies the execution characteristics of the safety Add On Instruction Signature History The signature history provides a record of signatures for future reference A signature history entry consists of the name of the user the instruction signature the timestamp value and a user defined description Up to six history entries can be stored If a seventh entry is made the oldest entry is automatically deleted Change History The Change History tab displays the creation and latest edit information that is tracked by the software The By fields show who made the change based on the Windows user name at the time of the change Add On Instruction Definition Simulation_DT_ 1st General Parameters Local Tags Scan Modes Signature Change History Help Created 10 5 2005 2 56 13 PM By NASmilted Edited 6 22 2009 1 04 18 PM By NA sellnid Data Type Size 276 byte s Publication 1756 PM010C EN P October 2009 17 Chapter 1 Designing Add On Instructions Considerations for Add On Instructions 18 Help The name revision description and parameter definitions are used to automatically build the Instruction Help Use the Extended Description Text to provide additional Help documentation for the Add On Instruction The Instruction Help Preview shows how your instruction will appear in the various languages based on parameters defined as required or visible Add On Instruction Definition
12. 54 Testing the Add On Instruction oosa aoaaa 54 Befote You Tests 5 4 styg tae Geek acter cet a E oie Gk Goan 55 Test the FIONS Serana Maritain a eh E D 55 Monitor Logic with Data Context Views 55 Verifying Individual Scan Modes 0 0 04 56 Defining Source Protection for an Add On Instruction 57 Enable the Source Protection Feature ees ee aa 57 Apply Source Protection nanana aaa 58 Observe Source Protection ooo ise eae ae els 60 Publication 1756 PM010C EN P October 2009 Using Add On Instructions Import and Export Add On Instructions Publication 1756 PM010C EN P October 2009 Table of Contents Generate an Add On Instruction Signature Generate Remove or Copy an Instruction Signature Create a Signature History Entry Generate a Safety Instruction Signature Viewing and Printing the Instruction Signature Creating Instruction Help anasa aaa Write Clear Descripuonses oxa es 3 aaa Document an Add On Instruction Language Switching vow 6 gee Aibew eda boa Sale Fuk Sea ts Motor Starter Instruction Example Simulation Instruction Example oa sao sons 4 parreties a oS Ladder Diagram Configuration 4 34 4 4 oR oie he Rae Function Block Diagram Configuration Structured Text Configuration sg pee Ye ve ow Ate Chapter 3 Introduction ins Soya oe Ae baby haber ia se Soe oo
13. Chapter 2 64 Defining Add On Instructions This is an example of the Extended Description Text field in the Help tab of the Add On Instruction Definition Editor This area lets you create directions on how to use and troubleshoot your instruction The Instruction Help Preview window shows how your text will look as generated instruction help TIP When you are entering your text into the Extended Description Text field you can use returns and tabs in the field to format the text and if you copy and paste text into the field tabs are preserved Add On Instruction Definition Motor_Starter v1 0 alk General Parameters Local Tags Scan Modes Signature Change History Help Extended Description Text Use this instruction to start and stop a motor The instruction uses a basic stop and start circuit If the Stop button is closed the motor gets the command to run when you press the Start button The motor runs even after you release the Start button The motor stops when you press open the Stop button Use the Jog bit to jog the motor The Jog bit overrides the Stop button Instruction Help Preview Extended Description Use this instruction to start and stop a motor The instruction uses a basic stop and start circuit Ifthe Stop button is closed the motor gets the command to run when you press the Start button The motor runs even after you release the Start button The motor stops wh
14. CheckAuxContact Out AuxContact TON 3 JE JE k Timer On Delay KEN Aisy corin tel Timer FauitTimer Output command to the motor pists Dean cum od the motor starter Make sure you set If on the motor the FautTime starts Otherwise this If on the motor If off the motor input doesnt do dicint start or stops anything stop Out AuxContact FauttTimer DN Fault A aE lt u To clear the fault of the motor turn on the FaultClear bit To clear the fault If on the motor of the motor turn didn t start or on this bit stop ClearFautt Fault 4 JE lt u End The following diagrams show the Motor Starter instruction called in three different programming languages Motor Starter Ladder Diagram Conveyor lotor_ Starter Starts and stops a motor Motor_Starter Stop Motor_Starter_LD Stop_PB 0e Start _PB 0e Motor_Out_LD 0e Start Out 69 Chapter2 Defining Add On Instructions Motor Starter Function Block Diagram Conveyor Pushbutton to stop the conveyor Motor Starter FBD 0 Sto p_PB a Motor Starter Starts andstopsa motor Output command tothe conveyor motor Mo tor_O ut FBD Pushbutton to start the conte yor 0 Sta t_PB E Motor Starter Structured Text Motor_Starter Motor_Starter_ST Stop_PB Start _PB Motor_Out_ST The Simulation _DT_1st Add On Instruction adds a dead time and a first order lag to an input variable Simulation Instruction Example
15. Input BOOL 1 Decimal O Enable Input Sys Read Only EnableOut Output BOOL 0 Decimal Enable Output S Read Only OutCommand Input BOOL 9 Decimal Enter the tag for t Read Write SimulateF ault Input BOOL 9 Decimal To simulate a fault Read Write DelayTime Input DINT 9 Decimal Enter the time in m Read Write Input DINT 9 Decimal Read Write Data Type Size byte s 3 Define the Usage based on the type of parameter Input Output InOut An instruction with only Input parameters except EnableOut is treated as an input instruction in a Ladder diagram and is displayed left justified The EnableOut parameter is used for the rung out condition 4 Select a data type with the following options based on the parameter usage An Input parameter is passed by value into the Add On Instruction and must be a SINT INT DINT REAL or BOOL data type An Output parameter is passed by value out of the Add On Instruction and must be a SINT INT DINT REAL or BOOL data type An InOut parameter is passed by reference into the Add On Instruction and can be any data type including structures and arrays TIP REAL data types are not permitted in safety Add On Instructions Publication 1756 PM010C EN P October 2009 37 Chapter2 Defining Add On Instructions 5 If this parameter is intended as an alias for an existing local tag click the Alias For pu
16. SimOutput Parameter 72 Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Function Block Diagram Configuration The PIDE instruction sends the control variable to the Simulation_DT_1st instruction The Simulation_DT_1st instruction calculates an output and sends it to the PIDE instruction as the process variable The PIDE instruction sends the control variable to the Simulation_DT_1st instruction Simuation instruction which includes a dead time and a first order lay Sim _DT_FBD My _PDE_FBD Simulation_DT_4 st FIDE E Simulation instruction which includes a Enhanced PID Siminput Sim Output D PV Q SimDeactime SimDTinv Q SPProg sP D g SimTime Constant SPCascade RatioProg q DT_Array_FBD C Prog P LAlarm Grr P LLAlarm 5 The Simulation _DT_1st instruction d Hanara PVYROCPosAlarm 5 calculates an output and sends it to the E ProgProgReg PVROCNegAlarm PIDE instruction as the process variable i PERE Structured Text Configuration The Simulation _DT_1st instruction reads the control variable from the Simulation_DT_1st Sim_DT_ST ly_PIDE_ST CVEU DT_Array_ST PIDE instruction and calculates an output My_PIDE_ST PV im_OT_STSimOutput The output goes to the process variable of the PIDE instruction PIDE My_PIDE_ST Sim_DT_ST SimOutput Simulation_D
17. Using GSV and SSV Instructions When using GSV and SSV instructions inside an Add On Instruction the following classes are supported e AddOnInstructionDefinition e MotionGroup e Axis e Program e Controller e Routine e Controller Device e Redundancy e CoordinateSystem e Safety e CST e Serial Port e DF1 e Task e Fault Log e Wall Clock Time e Message 1 GSV only SSV instructions will not verify 2 The classes that represent programming components Task Program Routine AddOnlInstructionDefinition support only this as the Instance Name When you enter a GSV or SSV instruction RSLogix 5000 software displays the object classes object names and attribute names for each instruction This table lists the attributes for the AddOnInstructionDefinition class AddOninstructionDefinition Attributes Attribute Name Data Type Attribute Description MajorRevision DINT Major revision number of the Add On Instruction MinorRevision DINT Minor revision number of the Add On Instruction Name String Name of the Add On Instruction RevisionExtendedText String Text describing the revision of the Add On Instruction Vendor String Vendor that created the Add On Instruction LastEditDate LINT Date and time stamp of the last edit to an Add On Instruction SignaturelD DINT 32 bit instruction signature value SafetySignaturelD DINT 32 bit safety instruction signature value For more information o
18. Yov can also add and edit parameters and local tags on the Edit Tags tab shown below Add On Instruction Parameters and Local Tags Motor_Starter DER Scope Q Motor_Starter v Show All Tags EE za 2 Usage i Description External Access Constant Style O input Auxiliary contact o Read Write o Decimal Check uxContact Local Read Write o Decimal 3 ClearFault input To clear the fault Read Write o Decimal S Enableln Input Enable Input Sys Read Only o Decimal f EnableOut Output Enable Output Read Only o Decimal Fault Output If on the motor di Read Only o Decimal FaultT ime nput Enter the time ms Read w rite o Decimal FaultT imer Local Read Write o Jog Input Jog command for t Read Write o Decimal El ut Output Output command t Read Only o Decimal E RunCommand Local Read Write o Decimal E Start nput Enter the tag that Read w rite o Decimal E Stop Input Enter the tag that Read Write o Decimal 2 o Monitor Tags Edit Tags lt Updates to Arguments If you edit an Add On Instruction by adding deleting renaming reordering or changing the status or usage type of one or more parameters RSLogix 5000 software version 18 and later automatically updates the arguments on calls to the instruction Following Parameter Edits Source protected routines and other source protected Add On Instructions that use the edited Add On Instruction are not automatically updated if
19. a local tag via an alias parameter See Creating an Alias Parameter for a Local Tag on page 28 Publication 1756 P M010C EN P October 2009 Designing Add On Instructions Chapter 1 Unavailable Instructions within Add On Instructions Most built in instructions can be used within Add On Instructions The following instructions cannot be used Unavailable Instruction Description BRK Break EOT End of Transition EVENT Event Task Trigger FOR For For Next Loop IOT Immediate Output JSR Jump to Subroutine JXR Jump to External Routine MAOC Motion Arm Output Cam PATT Attach to Equipment Phase PCLF Equipment Phase Clear Failure PCMD Equipment Phase Command PDET Detach from Equipment Phase POVR Equipment Phase Override Command RET Return SBR Subroutine SFP SFC Pause SFR SFC Reset Safety application instructions such as Safety Mat SMAT may be used in safety Add On Instructions only For detailed information on safety application instructions refer to the GuardLogix Safety Application Instruction Set Safety Reference Manual publication 1756 RM095 In addition the following instructions may be used in an Add On Instruction but the data instances must be passed as InOut parameters e ALMA Analog Alarm e ALMD Digital Alarm e All Motion Instructions e MSG Message Publication 1756 PM010C EN P October 2009 25 Chapter 1 Designing Add On Instructions
20. a safety Add On Instruction so that it can be used in a standard task or standard controller You can change the class in a safety project if the instruction does not have an instruction signature you are offline the application does not have a safety task signature and is not safety locked You can also change the class from standard to safety so that the Add On Instruction can be used in the safety task Changing the class of an Add On Instruction results in the same class change being applied to the routines parameters and local tags of the Add On Instruction The change does not affect nested Add On Instructions or existing instances of the Add On Instruction If any parameters or tags become unverified due to the change of class they are identified on the Parameters and Local Tags tabs of the Add On Instruction Editor If any of the restrictions for safety Add On Instructions are violated by changing the class from standard to safety one of the following errors is displayed and the change does not succeed e Routines must be of Ladder Diagram type e Safety Add On Instructions do not support the Postscan routine e One or more parameters or local tags have an invalid data type for a safety Add On Instruction You must edit the parameter tag or routine types before the class change can be made TIP If the safety controller project contains safety Add On Instructions you must remove them from the project or change their c
21. all tags of this instruction type Data Type Size 20 byte s rea APP He Motor Starter Example Definition Editor Parameter Tab Add On Instruction Definition Motor_Starter v1 0 General Parameters Local Tags Scan Modes Signature Change History Help BOOL 1 a aia Enable Input Read Only EnableOut Output BOOL 0 Decimal E Enable Outpu Read Only Stop Input BOOL oj Decimal V Enter the tag Read Write Start Input BOOL 0 Decimal V Enter the tag Read Write Jog Input BOOL 9 Decimal Jog command Read Write AuxContact Input BOOL 0 Decimal Ausiliary cont Read Write ClearFault Input BOOL 0 Decimal To clear the f Read Write Out Output BOOL 9 Decimal Output comm Read Only Fault Output BOOL 9 Decimal If on the mot Read Only FaultTime Input DINT 0 Decimal Enter the time Read Write 00000000000 Copy all default values of parameters and local tag Data Type Size 20 byte s 68 Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Publication 1756 PM010C EN P October 2009 Motor Starter Example Ladder Logic Data Conten TE Motor_Starter lt definition gt hed E if the Stop button is closed the motor gets the command to run when you press
22. but will not execute the Logic routine when Enableln is false Optional Prescan Postscan and EnablelnFalse routines may be configured below Prescan routine Executes prior to first scan on transition from program to run New Postscan routine Executes on last scan of a step if SFC is configured for automatic reset New EnablelnFalse routine Executes when the Enableln parameter is false te iis instruction type Data Type Size 276 byte s cancel Publication 1756 PM010C EN P October 2009 51 Chapter 2 Defining Add On Instructions 4 From the Type pull down menu on the New Scan Mode Routine dialog box choose the type of programming language Ladder Function Block or Structured Text New Scan Mode Routine Mode EnablelnFalse Description Type Ba Function Block Diagram Instruction Simulation_DT_1st C Open Routine 5 Type a description of the EnableInFalse behavior 6 Click OK to add an EnableInFalse routine to the Add On Instruction definition 7 Define if EnableIn False routine executes or not by checking or clearing Execute EnableInFalse routine Fa EnablelnFalse routine Executes when the Enableln parameter is false Execute EnablelnFalse routine The EnableInFalse routine can now be edited like any other routine Using the Enableln and The EnableIn and EnableOut parameters that appear by default in EnableOut Parameters 52 every Add On Instruction have be
23. examples and diagrams No patent liability is assumed by Rockwell Automation Inc with respect to use of information circuits equipment or software described in this manual Reproduction of the contents of this manual in whole or in part without written permission of Rockwell Automation Inc is prohibited Throughout this manual when necessary we use notes to make you aware of safety considerations Identifies information about practices or circumstances that can cause an explosion in a hazardous environment which may lead to personal injury or death property damage or economic loss IMPORTANT Identifies information that is critical for successful application and understanding of the product ATTENTION Identifies information about practices or circumstances that can lead to personal injury or death property damage or economic loss Attentions help you identify a hazard avoid a hazard and recognize the consequence SHOCK HAZARD Labels may be on or inside the equipment for example a drive or motor to alert people that dangerous voltage may be present BURN HAZARD Labels may be on or inside the equipment for example a drive or motor to alert people that surfaces may reach dangerous temperatures os A EENS co A A A Allen Bradley Rockwell Automation TechConnect Logix5000 ControlLogix GuardLogix CompactLogix SoftLogix FlexLogix PowerFlex 700S and DriveLogix are trademarks of Rockw
24. in the argument field except for Structured Text where the field is blank e Unknown parameters are created for arguments where associated parameters have been deleted To accomplish this update RSLogix 5000 software tracks the changes made to the Add On Instruction parameters from the original instruction to the final version In contrast the import and paste processes compare only parameter names to associate arguments with parameters Therefore if two different parameters have the same name but different operational definitions importing or pasting may impact the behavior of the instruction Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Copying Parameter or Local In RSLogix 5000 software version 18 or later you can choose to copy Tag Default Values parameter or local tag default values to all tags of the Add On Instruction data type or just to specific tags You can do so only when you are offline Values cannot be modified when the instance tags are part of a source protected Add On Instruction or you do not have sufficient permission to make edits If you modify the default values of a parameter or local tag by using the Add On Instruction Definition Editor you can choose to copy the modified values to all of the tags of the Add On Instruction data type by checking Copy all default values of parameters and local tags Add On Instruction Definition Simulate
25. location for the sk dat Source Key File fi Source Protection Configuration Component Viewable HER Motor_Starter_Program Protect ji 4 ale Sim_Dead_Time_Program t as Sort_Program Unprotect i te EE yor 8g Motor_Starter AA Simulate_Feedback 0 Simulation_DT_1st RJ Under_Developement_Insertio Source Key File sk dat tect C Program Files Rockwell Software R sen View Clear Disable Ability To Configure Protection S ie is g Be p 3 fs Js 4 He Be 4 i Le EE Click OK in both dialog boxes to accept Click Yes to confirm creation of the sk dat Key File Expand the Add On Instructions folder to view the instructions available to apply source protection All routines and Add On Instruction definitions in the project are listed Select the Add On Instruction you want to protect and click Protect Source Protection Configuration gs E x Protect Unprotect Component Viewable C8 Motor_Starter_Program ER Sim_Dead_Time_Program HER Sort_Program THFHHH E Add On Instructions r sovcerey Apply Source Ke x Le pply Y xj G Sim Source Key to apply to selected component s Ea A Une Cancel IT Allow viewing of component s Source Key File sk dat __ Hee Laion C Program Files Rockwell Software R Specity View Clear Close Disable Ability To Configure Protection
26. parameters need to be defined for data from local tags that needs to be accessible from outside the Add On Instruction e How will the parameters display The order of the parameters defines the appearance of instruction e Which parameters should be required or visible Naming Conventions The instruction name will be used as the mnemonic for your instruction Although the name can be up to 40 characters long you will typically want to use shorter more manageable names Publication 1756 P M010C EN P October 2009 Designing Add On Instructions Chapter 1 Source Protection e What type of source protection needs to be defined if any e Who will have access to the source key e Will you need to manage source protection and an instruction signature Source protection can be used to provide read only access of the Add On Instruction or to completely lock or hide the Add On Instruction and local tags Source protection must be applied prior to generating an instruction signature Nesting Reuse Instructions e Are there other Add On Instructions that you can reuse e Do you need to design your instructions to share common code Local Tags e What data is needed for your logic to execute but is not public e Identify local tags you might use in your instruction Local tags are useful for items such as intermediate calculation values that you do not want to expose to users of your instruction e Do you want to creat
27. rest Ree et ied Accessing Add On Instructions 0 00005 Use the Add Element Dialog BOX 5 4 cae nea eek Include an Add On Instruction in a Routine Tips for Using an Add On Instruction Programmatically Access a Parameter Using the Jog Command in Ladder Diagram Using the Jog Command In Function Block Diagram Using the Jog Command in Structured Text Monitor the Value of a Parameter 0 View Logic and Monitor with Data Context Determine if the Add On Instruction is Source Protected Copy an Add On Instruction 5 yada a eee Store Your Add On Instructions 22 4 2 8so e6ae8 23 Chapter 4 Introduction Ve eee On Saree eee ae eee we Be eee Se a aa Creating an Export File se 3 cece Wy wine pe Akh oe ats Export to Separate Piless 4 8 0 son Fe ONS eae eee Export to a Single File gra siesta dons 445 gorgyies EIR a FAB ne ON OW Importing an Add On Instruction Import Considerations uSiiiya dS ck GA wo ee ek Import Configuration oo 4 Ee SPARSE A ES BS Update an Add On Instruction to a Newer Revision via Aporta tp teriy cean hen avec wel fe Sona a MAG some a E neato Index 60 61 62 62 63 64 67 68 70 72 73 73 75 75 76 Z 79 79 81 82 82 83 85 87 89 89 90 92 92 94 95 Table of Contents 8 Publication 1756 PM010C EN P October 2009 Purpose of This Manual
28. s Create Local Tags Use the Add On Instruction Definition Editor to create the local tags J for your instructions Local tags contain data that will be used by your Add On Instruction but that you do not want exposed to the user of your instruction Local tags do not appear in the data structure for an Add On Instruction because they are hidden members TIP You can access local tag values from an HMI by specifying the name of the local tag as a member in an Add On Instruction type tag For example the Motor_Starter v1 0 instruction shown in step 2 has a tag called CheckAuxContact This tag can be referenced by an HMI via instancetag CheckAuxContact where instancetag is the tag used to call the instruction Follow these steps to define the local tags for your instruction 1 In the Controller Organizer right click an instruction and choose Open Definition Publication 1756 PM010C EN P October 2009 39 Chapter2 Defining Add On Instructions 2 Click the Local Tags tab and type a name for a new tag and select a data type amp Add On Instruction Definition Motor_Starter v1 0 EX General Parameters Local Tags Scan Modes Signature Change History Help Name 8 4 Data Type CheckAusCont BOOL 0 Decimal FaultTimer TIMER RunCommand BOOL 0 Decimal 2 Data Type Size 20 byte s You cannot use these data types for local tags ALARM_ANALOG ALARM_DIGITAL MESSAGE or any Motion da
29. safety Add On Instructions feature a SIL 3 safety instruction signature for use in safety related functions up to and including SIL 3 Refer to the GuardLogix Controller Systems Safety Reference Manual publication 1756 RM093 for details on certifying safety Add On Instructions and using them in SIL 3 safety applications Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Chapter 1 Components of an Add On Instruction Publication 1756 PM010C EN P October 2009 Add On Instructions are made up of the following parts General Information The General tab contains the information you enter when you first create the instruction You can use this tab to update that information The description revision revision note and vendor information is copied into the custom help for the instruction The revision is not automatically managed by the software You are responsible for defining how it is used and when it is updated Add On Instruction Definition Simulation_DT_ 1st EEJ General Parameters Jl Local Tags Scan Modes Signature Change History Help ji Name Simulation DT 1st Simulation instruction which includes a dead time and a first order lag Description Ippe FA Function Block Diagram Change Type Extended Text Sim DT 1st Major Minor Revision 1 l0 Revision Note Vendor Rockwell Automation deta alues of paramete and local tag
30. source protected so you cannot view the logic Follow these steps to see if an Add On Instruction is source protected 1 Select the Add On Instruction in the Controller Organizer The Add On Instruction cannot be expanded when fully protected 2 Look in the Quick View pane for Source Protection If the Source Protection attribute isn t listed then the instruction isn t protected Add On Instructions Conveyor_Control fi Motor_Starter Simulate_Feedback Simulation _DT_1st Description Starts and stops a conveyor Revision v1 0 Revision Note Vendor Rockwell Data Type Siz 60 Edited 4 25 2006 11 02 23 AM Source Prote Source not available 85 Chapter3 Using Add On Instructions Copy an Add On Instruction You can copy an Add On Instruction into your project when it exists in another RSLogix 5000 project After you copy the Add On Instruction you can use the instruction as is or rename it modify it and then use it in your programs Use caution when copying and pasting components between different versions of RSLogix 5000 programming software RSLogix 5000 software only supports pasting to the same version or newer version of RSLogix 5000 software Pasting to an earlier version of RSLogix 5000 software is not supported When pasting to an earlier version the paste action may succeed but the results may not be as expected TIP When copying and pasting Add On Instructio
31. standalone component that can execute in any application that calls it by using the parameters interface It can be validated once and then locked to prevent edits Safety Add On Instructions Safety Add On Instructions are used in the safety task of GuardLogix safety controllers Create a safety Add On Instruction if you need to use your instruction in a safety application Safety Add On Instructions are subject to a number of restrictions These restrictions enforced by RSLogix 5000 software and all GuardLogix controllers are listed here for informational purposes only e They may use only safety approved instructions and data types e All parameters and local tags used in a safety Add On Instruction must also be safety class e Safety Add On Instructions use relay ladder logic only and can be called in safety routines only which are currently restricted to ladder logic e Safety Add On Instructions may be referenced by other safety Add On Instructions but not by standard Add On Instructions e Safety Add On instructions cannot be created edited or imported when a safety project is safety locked or has a safety task signature Refer to the GuardLogix Controller Systems Safety Reference Manual publication 1756 RM093 for information on how to certify a safety Add On Instruction as well as details on requirements for safety applications the safety task signature and a list of approved instructions and data types Publicati
32. tags are added as hidden members Logic Routine The logic routine of the Add On Instruction defines the primary functionality of the instruction It is the code that executes whenever the instruction is called Shown below is the interface of an Add On Instruction and its primary logic routine that defines what the instruction does Level Loop 101 Simulated Level based on Valve Pos LiC1014_Sim ProcSim Ei Process Simulation Deadtime gt Lag LIT_104 Simulation Input i Eng Units Deadtime Instruction LeadLag Instruction 0 0 Backing Tag Backing Tag DEDT_04 LDLG_01 DEDT ae LDLG imulation Output Deadtime Lead Lag Eng Units Deadtime seconds Cfg_DeadTime Lag Time Constant seconds 0 0 Cfg_LagTime m 0 0 Deadtime StorageArray DeadTimeShiftArray Publication 1756 PM010C EN P October 2009 15 Chapter 1 Designing Add On Instructions Optional Scan Mode Routines You can define additional routines for Scan mode behavior Add On Instruction Definition Simulation _DT_1st EX General Parameters Local Tags Scan Modes Signature Change History Help The controller prescans and postscans the Add On Instruction Logic routine but will not execute the Logic routine when Enableln is false Optional Prescan Postscan and EnablelnFalse routines may be configured below Prescan routine Executes prior to first s
33. the motor didn t start FaultTime iE DINT Enter the time ms to wait f nsert Instruction Default Insert Definition Defaults Save Instruction Defaults C Sort Parameters 2 Monitor the value of the parameters and change any if needed 3 Type a new value for each parameter as needed 4 Click Apply and when finished OK Follow this procedure when you want to view the logic of an Add On Instruction and monitor data values with the logic 1 Right click the instruction call in any routine lotor_Starter Starts and stops a motor Motor_Starter Motor_Starter_LD Stop Stop_PB Start Out Motor_Out_LD Pushbutton to stop the conveyor Motor Starter FBD o Stop_PB t Motor Starter Bl Output command to the conveyor motor _ Mo tor_O ut_F BD Pushbutton to start TREAD Stones Mats the conveyor o Stat PB D Pushbutton to jog p the conveyor fonward 0 jara 83 Chapter3 Using Add On Instructions 2 Choose Open Instruction Logic Open Instruction Logic Open Instruction Definition Properties Alt Enter The Language Editor opens with the Add On Instruction s logic routine and with data values from the instruction call As you view the logic you can e identify the instruction call whose tags are being used for data e see the logic as it executes when online e see Parameter and Local Tag values e change local tag an
34. the parameters and local tags and the instance tags where the Add On Instruction is used or referenced Copy Default Values Simulate_Feedback Default values of selected parameters and local tags in Simulate_Feedback will be copied to specified tags of this type Specify which values to copy to which tags Instances of Simulate_Feedback Container Routine amp Location B Motor_Starte Motor_Starte Rung 2 B Vv Conveyor_1_AuxContact amp Motor_Starte Nested_Motc Rung 2 DelayTimer H DelayTimer PRE DelayT imer ACC H DelayT imer EN H DelayT imer TT DelayT imer DN 8 4 Default Check the boxes to select which values to copy to which tags and click OK Follow these steps to enter logic into your project 1 In the Controller Organizer expand the Add On Instructions folder 5 g structions H Conveyor _Control E Motor_Starter Simulate_Feedback H E Simulation_DT_1st 2 Expand the instruction and double click the logic routine to open Motor_Starter Parameters and Local Tags DEN BA EnableInFalse 3 Edit your logic by using the available language editors Publication 1756 PM010C EN P October 2009 Defining Operation in Different Scan Modes Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Execution Considerations for Add On Instructio
35. the source key is unavailable The Add On Instruction or routine may still verify but the resulting operation may not be as intended It is your responsibility to know where Add On Instructions are used in logic when you make edits to existing Add On Instructions Publication 1756 PM010C EN P October 2009 4 Chapter 2 42 Defining Add On Instructions A confirmation dialog box shows you the impacts of the edits and lets you review the pending changes before confirming or rejecting them RSLogix 5000 Changes pending for Conveyor_Control instruction require updates to the calls of this instruction Each call will be edited to maintain arguments passed to existing parameters If you choose to apply the changes to the instruction check all locations calling instruction Conveyor_Control to ensure that they will execute correctly with the updates Locations where instruction is called Selected call s arguments Container Routine Location Parameter Argument Stop Conveyor_1_Stop_PB Start Conveyor_1_Entry_PE JamClear lt Unknown gt Conveyor_1_Out C Show Changed Parameters Only This operation cannot be undone Apply changes to the instruction and edit arguments for each call Yes C Open Cross Reference e An asterisk identifies parameters with changes pending e Existing arguments are reset to the parameters they were originally associated with e Newly added parameters are inserted with a
36. what instructions you want to store 2 Place them in a project file called something like MyInstructions ACD 3 Open other projects in additional instances of RSLogix 5000 software and use copy and paste or drag and drop to move a copy of the instruction from MyInstructions ACD to another project i If any of these instructions reference the same Add On Instruction or User Defined Data Type there is only one shared copy in the project file When an Add On Instruction is copied to another project it also copies any instruction it references to the target project Publication 1756 PM010C EN P October 2009 87 Chapter3 Using Add On Instructions Notes 88 Publication 1756 PM010C EN P October 2009 Chapter 4 Introduction Creating an Export File Publication 1756 PM010C EN P October 2009 Import and Export Add On Instructions Topic Page Creating an Export File 89 Importing an Add On Instruction 92 Update an Add On Instruction to a Newer Revision via Import 95 When you choose to export an Add On Instruction the exported Add On Instruction includes all of its parameters local tags and routines These will be imported with the Add On Instruction automatically Optionally you can include any nested Add On Instructions or User Defined Data Types that are referenced by the exported Add On Instruction Referenced Add On Instructions and data types are exported to the L5X file if you check In
37. 0 Instruction Help otor Starter v1 0 Motion Coordinated ASCII Serial Port Rockwell HE ASCII String Contact the Add On Instruction develope HE ASCII Conversion G Debug Starts and stops a motor Add On H Convey ConticStarts and stops a saws i Eto S 4 Simulate_ FeedbeSinuates a digital Enem device Liej Simulation_DT_1Simulation instruction which includ I Show Language Elements By Groups OK a e Available Languages anal Motor_Starter Starts and stops a motor x New Add On Instruction Help T wee ne Follow this procedure when you want to use an Add On Instruction in one of your routines 1 Open the Add On Instruction folder in the Controller Organizer and view the listed instructions If the instruction you want to use is not listed you need to do one of the following e Create the instruction in your project e Copy and paste an instruction into your project e Get the file for an exported instruction definition and then import the instruction into your current project 2 Open the routine that will use the instruction 3 Click the Add On tab on the instruction toolbar 4 Click the desired Add On Instruction for example Simulation and drag the instruction from the toolbar into the routine Simul Simul Simulation _DT_1st EA Simulation instruction which includes a D O Siminput SimDTiny o SimTimeConstant SimOutput D 7 5 Define arguments for each P
38. Additional Resources for Safety Applications Publication 1756 PM010C EN P October 2009 Preface This manual shows how to design configure and program Add On Instructions This manual is one of a set of related manuals that show common procedures for programming and operating Logix5000 controllers For a complete list of common procedures manuals see the Logix5000 Controllers Common Procedures Programming Manual publication 1756 PM001 The term Logix5000 controller refers to any controller that is based on the Logix5000 operating system including the following e CompactLogix and Compact GuardLogix controllers e ControlLogix and GuardLogix controllers e DriveLogix controllers e FlexLogix controllers e SoftLogix5800 controllers With the addition of safety Add On Instructions in RSLogix 5000 software version 18 you can use Add On Instructions in GuardLogix and Compact GuardLogix safety related functions This manual provides information about safety Add On Instructions For detailed information on safety application requirements the safety task signature and configuring and operating safety controllers refer to these publications e GuardLogix Systems Safety Reference Manual publication 1756 RM093 e Compact GuardLogix Controllers User Manual publication 1768 UM002 e GuardLogix Controllers User Manual publication 17560 UM020 e GuardLogix Safety Application Instruction Set Reference Manual publication 1756 RM095
39. Input Enter the tag that gives the stop command for the motor x Start BOOL Input Enter the tag that gives the start command for the motor Jog BOOL Input Jog command for the motor To jog the motor turn on this bit To stop the jog turn off this bit AuxContact BOOL Input Auxiliary contact of the motor Make sure you set the FaultTime Otherwise this input doesnt do anything ClearFault BOOL Input To clear the fault of the motor turn on this bit x Out BOOL Output Output command to the motor starter If on the motor starts If off the motor stops Fault BOOL Output If on the motor didnt start or stop FaultTime DINT Input Enter the time ms to wait for the auxiliary contact to open or close The Fault bit turns on when that time is up Extended Description Use this instruction to start and stop a motor The instruction uses a basic stop and start circuit Ifthe Stop button is closed the motor gets the command to run when you press the Start button The motor runs even after you release the Start button The motor stops when you press open the Stop button Use the Jog bit to jog the motor The Jog bit overrides the Stop button Signature You can also use the auxiliary contact of the motor to make a fault happen if the motor doesnt start or stop In FaultTime enter how long you want to wait for the contact to open or close Enter the time in milliseconds The Fault bit turns on if the contact doesnt show that the motor
40. Jog_PB Motor_Starter_ST Jog Jog_PB Motor_Starter Motor_Starter_ST Stop_PB Start_PB Motor_Out_ST Motor_Starter_ST Jog Motor_Starter tag dot Jog Parameter Monitor the Value of a Follow this procedure when you want to see or change a parameter Parameter value of an Add On Instruction 1 Open the Properties of the instruction based on what language you are using a For either a Function Block or Ladder Diagram click Properties J for the instruction otor_Starter Starts and stops a motor Motor_Starter Motor_Starter_LD Stop Stop_PB Start Out Motor_Out_LD 0e b For Structured Text right click the instruction name and choose Properties Motor_Starte Motor_Starter_ST Sto P p_PB Start_PB Motor_Out_ST 82 Publication 1756 PM010C EN P October 2009 Using Add On Instructions Chapter 3 View Logic and Monitor with Data Context Publication 1756 PM010C EN P October 2009 Motor_Starter Properties Motor_Starter_LD Rung 1 x Parameters Tag Enableln EnableOut 1 BOOL Enable Input System Defi 1 BOOL Enable Output System De Stop 0 BOOL Enter the tag that gives the Start 0 BOOL Enter the tag that gives the Jog 0 BOOL Jog command for the motor AusxContact 0 BOOL Auziliary contact of the mot ClearFault 9 BOOL To clear the fault of the mo Out 0 BOOL Output command to the mo Fault 0 BOOL If on
41. L 0 Decimal E Enable Qutpu Read Only o Sip mpe 800 ermal Tl Enerthe teg Reade O Stat Inpa BOOL O Decimal Z Z Erter the tag Read wite es Pa ema Jog Iput BOOL O Decimal C C Jog command Read Write oO AuxContact Input BOOL 8 Decimal C C Aurian cont Read Write ai ClearFaut Input BOOL 0 Decimal C C To clear the f Read wite a Out Output BOOL O Decimal Z Output comm Read Oniy Eres Fot Oupa Bo0L OfDecimal CI E llron temat Reston O F FauhTime Input DINT O Decimal C C Enter the time Read Write ma oo 0 _ E mE Motor_Starter Rockwell v1 0 Contact the Add On instruction developer for questions or problems with this instruction Starts and stops a motor Available Languages B Relay Ladder Motor_Starter Starts and stops a motor Motor_Starter 5 Stop 2 2 Start 2 Out 2 Faut E Function Block Motor_Starter Structured Text Starts and stops a motor E Stop E Start Fault Out Motor_Starter Motor_Starter Stop Start Out General Name Description Type In Instruction EB Ladder Diagram Motor_Starter Number of Rungs 1 66 Parameters Required Name Data Type Usage Description x Motor_Starter Motor_Starter InOut Enableln BOOL Input EnableOut BOOL Output x Stop BOOL
42. Logix5000 Controllers Add On Instructions Allen Bradley Catalog Numbers 1756 ControlLogix 1756 GuardLogix 1768 CompactLogix 1768 Compact GuardLogix 1769 CompactLogix 1789 SoftLogix PowerFlex with DriveLogix Programming Manual eee Peer Rockwell Allen Bradley Rockwell Software Automation Important User Information Solid state equipment has operational characteristics differing from those of electromechanical equipment Safety Guidelines for the Application Installation and Maintenance of Solid State Controls publication SGI 1 1 available from your local Rockwell Automation sales office or online at http www rockwellautomation com literature describes some important differences between solid state equipment and hard wired electromechanical devices Because of this difference and also because of the wide variety of uses for solid state equipment all persons responsible for applying this equipment must satisfy themselves that each intended application of this equipment is acceptable In no event will Rockwell Automation Inc be responsible or liable for indirect or consequential damages resulting from the use or application of this equipment The examples and diagrams in this manual are included solely for illustrative purposes Because of the many variables and requirements associated with any particular installation Rockwell Automation Inc cannot assume responsibility or liability for actual use based on the
43. ML File L5x x Cancel JV Include all referenced Add On Instructions and User Defined Types Add On Instructions CantopenEngrelease Oldnotneededquestionmark Example_Export_Conveyor_Control L5x Motor_Starter L5x il Publication 1756 PM010C EN P October 2009 91 Chapter4 Import and Export Add On Instructions Importing an Add On Instruction 92 3 Type a name for the file 4 Check Include referenced Add On Instructions and User Defined Types 5 Click Export This exports the selected Add On Instruction and all the referenced instructions into the same export file This file can be used to distribute an Add On Instruction When the exported Add On Instruction is imported into the project the referenced instructions are imported as well in one step You can import an Add On Instruction that was exported from another RSLogix 5000 project When importing an Add On Instruction the parameters local tags and routines are imported as part of the Add On Instruction Once the project has the Add On Instruction you can use it in your programs Import Considerations ATTENTION Editing an L5K or L5X File The EditedDate attribute of an Add On Instruction must be A updated if the Add On Instruction is modified by editing an L5K or L5X file If RSLogix 5000 software detects edits to the Add On Instruction but the Edited Date attribute is the same the Add On Instruction will not be imported
44. REAL 32 bit math operations which causes DINT data types to execute faster than other integer data types Data conversion rules of SINT to INT to DINT are applied automatically and can add overhead Whenever possible use DINT data types for the Add On Instruction Input and Output parameters 27 Chapter 1 28 Designing Add On Instructions Creating an Alias Parameter for a Local Tag Alias parameters simplify connecting local tags to an Input or Output tag that is commonly used in the Add On Instruction s application without requiring that manual code be created to make the association Aliases can be used to define an Input or Output parameter with direct access to a local tag or its member Changing the value of an alias parameter changes the data of the local tag or local tag member it represents and vice versa Alias parameters are subject to these restrictions e Alias parameters must be either Input or Output parameters e You can only create an alias parameter for a local tag or its member e Only one Input and one Output parameter may be mapped to the same local tag or the same member of a local tag e Only BOOL SINT INT DINT and REAL data types may be used e Alias parameters may not be constants e The External Access type of an alias parameter matches the External Access type of the local tag to which it is mapped For information on constants and External Access see Data Access Control on page 31
45. T_1st tag dot SimOutput Parameter Publication 1756 PM010C EN P October 2009 73 Chapter 2 Defining Add On Instructions Notes 74 Publication 1756 PM010C EN P October 2009 Chapter 3 Using Add On Instructions Introduction Add On Instructions are used in your routines like any built in instructions You add calls to your instruction and then define the arguments for any parameters Topic Page Accessing Add On Instructions 75 Use the Add Element Dialog Box 76 Include an Add On Instruction in a Routine 77 Tips for Using an Add On Instruction 79 Programmatically Access a Parameter 79 Monitor the Value of a Parameter 82 View Logic and Monitor with Data Context 83 Determine if the Add On Instruction is Source Protected 85 Copy an Add On Instruction 86 Store Your Add On Instructions 87 Accessing Add On The Add On Instruction can be used in any one of the Ladder Diagram Function Block or Structured Text languages including Structured Text within Sequential Function Chart actions The appearance of the instruction conforms to the language in which it is placed Instructions The Add On Instructions in the project can be accessed from any of the normal instruction selection tools The instruction toolbar has an Add On tab that lists all of the currently available Add On Instructions in the project Cony Mot Simul Simul Und FO ET EE Eal gt 4 gt 7 Favorites Add O
46. _Feedback v1 0 General Parameters Local Tags Scan Modes Signature Change History Help L Enableln Alias For Default Style Req is Description External Access Constant Input BOOL 1 Decimal O Enable Input Sys Read Only Dutput BOOL D Decimal Enable Output 5 Read Only Enable0ut DutCommand Input BOOL 9 Decimal Enter the tag for t Read Write SimulateFault Input BOOL 9 Decimal To simulate a fault Read Write DelayTime 2 Input DINT 0 Decimal Enter the time in m Read Write Copy all default values of parameters and local tags whose values were modified to all tags of this instruction type Data Type Size 20 byte s Publication 1756 PM010C EN P October 2009 You can also click the copy default values icon to copy default values to all tags the Add On Instruction data type The icon appears on the watch pane as a context menu data monitor and logic editor when the Data Context is the Add On Instruction s definition If you want to select which specific tags and values to copy click the pull down arrow of the copy default values icon and choose Copy Specified Values al Copy All Values i Copy Specified Values 43 Chapter2 Defining Add On Instructions Create Logic for the Add On Instruction 44 EnableOut OutCommand SimulateF ault The Copy Default values dialog box shows the current default values for
47. actions change the Last Edited Date IMPORTANT If you remove an instruction signature when the Add On Instruction also has a safety instruction signature the safety instruction signature is also deleted 60 Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 You can click Copy to copy the instruction signature and the safety instruction signature if it exists to the clipboard to facilitate record keeping Signature Generate a signature to uniquely identify this instruction and seal it from modifications 2009 06 22T 18 04 18 0152 Timestamp Add to History IMPORTANT If an invalid instruction signature is detected during l verification an error message indicates that the signature is invalid You must remove the instruction signature review the Add On Instruction and generate a new instruction signature Create a Signature History Entry The signature history provides a record of signatures for future reference A signature history entry consists of the name of the user the instruction signature the timestamp value and a user defined description You can only create a signature history if an instruction signature exists and you are offline Creating a signature history changes the Last Edited Date which becomes the timestamp shown in the history entry Up to six history entries may be stored Follow these steps to create a signature history entry 1 On the Signature tab of
48. ain logic routine Any required Input and Output parameters values are passed Postscan The Postscan routine executes normally after a postscan execution of the main logic routine The Scan Modes tab in the Instruction Definition Editor lets you create and enable execution of the routines for the three Scan modes Prescan Postscan and EnableInFalse Prescan Routine When the controller transitions from Program mode to Run mode or when the controller powers up in Run mode all logic within the controller is executed in Prescan mode During this scan each instruction may initialize itself and some instructions also initialize any tags they may reference For most instructions Prescan mode is synonymous with scanning false For example an OTE instruction clears its output bit when executed during Prescan mode For others special initialization may be done such as an ONS instruction setting its storage bit during Prescan mode During Prescan mode all instructions evaluate false so conditional logic does not execute The optional Prescan routine for an Add On Instruction provides a way for an Add On Instruction to define additional behavior for Prescan mode When a Prescan routine is defined and enabled the Prescan routine executes normally after the primary logic routine executes in Prescan mode This is useful when you want to initialize tag values to some known or predefined state prior to execution For example setting a PID in
49. and Pasting Add On Instructions 86 Updated Information on Exporting Add On Instructions 89 Updated Information on Importing Add On Instructions 92 Updated Information on Updating Add On Instructions via Import 95 Summary of Changes Notes 4 Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Publication 1756 PM010C EN P October 2009 Table of Contents Preface Purpose of This Manual Owlag cee end Soon oo au debe 9 Additional Resources for Safety Applications 9 Understanding Terminology 4 ck nena ak hepa Oh eetanes 10 Chapter 1 TNEOAUCHOI a sig RO Al ROT ha A Bea kA 11 About Add On Instructions Gwe ae a 11 Components of an Add On Instruction 13 General Information onana aaae 13 Pa r metersoi seora gurera a TAa Ae ea ee 14 Local Tags 2 a Pooks eek OA Eee On EE See 14 Pata EO oo dct sie asta Rte Pt Map Ped bck GAT est oho Rae ee 15 EOSICROUUNE gume Sts eini ce sta ati SA ae Sy Sak Bee tts 15 Optional Scan Mode Routines 0005 16 Instruction Signature g475 praia amas Gogtne a Batemans eee 16 Signature HIStory ce Crese Sed ane Bn Ee ORE ed ae es 17 Change History oins canoaka e ae 2 hile eek 17 S lol Ore ae ai esio aa aa R i a A S o a a 18 Considerations for Add On Instructions 18 Instruction Functionality neo 3d ty adi ae he ew fb 18 Eycapsulation s ieoa ey cae ate A ORs Gee a Mae eis 19 Safety Add On Instruct
50. ange from external sources during the execution of the Add On Instruction For an Add On Instruction an Output parameter defines the data that is produced as a direct result of executing the instruction Because Output parameters are always passed by value their values cannot change from external sources during the execution of the Add On Instruction Passed by reference When an argument is passed to a parameter by reference the logic directly reads or writes the value that the tag uses in controller memory Because the Add On Instruction is acting on the same tag memory as the argument other code or HMI interaction that changes the argument s value can change the value while the Add On Instruction is executing Passed by value 10 When an argument is passed to a parameter by value the value is copied in or out of the parameter when the Add On Instruction executes The value of the argument does not change from external code or HMI interaction outside of the Add On Instruction itself Publication 1756 PM010C EN P October 2009 Chapter 1 Designing Add On Instructions Introduction Add On Instructions are available beginning with RSLogix 5000 software version 16 Add On Instructions are custom instructions that you design and create Beginning in RSLogix 5000 software version 18 high integrity and safety Add On Instructions are available Topic Page About Add On Instructions S mMm Comp
51. annot import a safety Add On Instruction into a safety project that has been safety locked or one that has a safety task signature You cannot import a safety Add On Instruction while online Class instruction signature signature history and safety instruction signature if it exists remain intact when an Add On Instruction with an instruction signature is imported IMPORTANT Importing an Add On Instruction created in version 18 or later of RSLogix 5000 software into an older project that does not support Add On Instruction signatures causes the Add On Instruction to lose attribute data and the instruction may no longer verify Publication 1756 PM010C EN P October 2009 93 Chapter4 Import and Export Add On Instructions Click Add On Instructions to see the Configure Add On Instruction References view lf any referenced instruction definitions collide the References folder is flagged 94 Import Configuration When you select a file to import the Import Configuration dialog box lets you choose how the Add On Instruction and referenced components are imported If there are no issues you can simply click OK to complete the import If your Add On Instruction collides with one already in the project you can e rename it by typing a new unique name in the Final Name field e choose Overwrite from the Operation pull down menu e choose Use Existing from the Operation pull down menu Import Configuration
52. arameter on the instruction call 77 Chapter 3 78 Using Add On Instructions The instruction appears as follows in each of the languages Simulation_DT_1st Simulation instruction which includes Simulation_DT_1st Siminput Ladder Diagram SimTimeConstant ra SimOutput DAM Parameter With Description Single question mark This is a required InOut parameter Enter a tag Single and double question marks This is a required Input or Output parameter Enter a tag Double question marks This is not a required parameter You can either e leave as is and use the default value e enter a different value if it s an Input parameter Function Block Diagram Nub T x Sim ulation_D T_1st Simulation instruction which includes a 0 C SimBTinv D 0 0 mM SimOutput D Item Description Nub on the end of pin This is a required Input or Output parameter You must wire the pin to an IREF OREF connector or another block to verify Single question mark This is a required InOut parameter Enter a tag No nub on the end of pin This is not a required parameter You can either e leave as is and use the default value e enter a different value if it s an Input parameter Publication 1756 PM010C EN P October 2009 Using Add On Instructions Chapter 3 Structured Text Simulation instruction which includes a Simulation_DT_1st Simulation_DT_1st Simlnput DA1 The inst
53. arrays structures Atomic for any parameter Arrays and structures must be InOut parameters Parameter checking N A None user must manage Verification checks that correct type of argument has been provided for a parameter Data encapsulation N A All data at program or controller Local data is isolated only accessible within scope accessible to anything instruction Monitor debug which complicates debugging Supported programming languages In line code with its data FBD LD SFC ST Mixed data from multiple calls FBD LD SFC ST Single calling instance data which simplifies debugging FBD LD ST Callable from N A FBD LD SFC ST FBD LD SFC via ST ST Protection Locked and view only Locked and view only Locked and view only Documentation Routine rung textbox line Publication 1756 PM010C EN P October 2009 Routine rung textbox line Instruction revision information vendor rung textbox line extended help 23 Chapter 1 Designing Add On Instructions Advantages and Disadvantages of Routines and Add On Instructions Aspect Main Routine Subroutine Add On Instruction Execution performance Fastest JSR SBR RTN instructions add Call is more efficient overhead All data is copied InOut parameters are passed by reference which Indexed reference impact is faster than copying data for many types Parameter references are automatically offset fr
54. ate Add On Instruction 35 alias parameter 38 EnablelnFalse routine 51 instruction help 64 instruction signature 60 local tags 39 logic 44 parameters 37 postscan routine 50 prescan routine 48 signature history 61 D data access 24 data access control 31 data context views 55 data types alias 28 parameters 27 37 size 22 tags 40 default values 38 40 copy 43 Publication 1756 PM010C EN P October 2009 Index delete safety instruction signature 62 E Edit Tags tab 41 Enableln parameter 52 Function Block Diagram 53 ladder diagram 53 structured text 53 EnablelnFalse routine 51 create 51 EnableOut parameter 52 export 89 92 external access 31 F Function Block Diagram instruction example 78 G General tab 13 generate instruction signature 60 GSV 26 H help create 64 example 66 Help tab 18 import 92 97 Import Configuration dialog box 96 instruction size 22 toolbar 75 instruction signature changing 20 copy 60 definition 16 generate 60 language switching 20 67 remove 60 restricted actions 16 20 source protection 20 99 Index 100 L Ladder Diagram instruction example 78 language switching 67 instruction signature 20 Last Edit Date 61 local tags create 39 external access 41 planning 33 Local Tags tab 14 create tags 40 logic 44 execution 45 monitor data values 83 parameter values 82 move parameter 39 naming conventions 32 36 nesting 22 data access 24 p
55. be overwritten during import while online with the controller though a new Online Add On Instruction may be created while online i i Final Name Change If the Final Name of an Add On Instruction is modified during import configuration the edit date of the imported Add On Instruction will be updated In addition all logic tags User Defined Data Types and other Add On Instructions in the import file that reference the Add On Instruction will be updated to reference the new name As a result the edit date of any Add On Instruction that references the Add On Instruction will be updated Add On Instructions that have been sealed with an instruction signature cannot be renamed during import User Defined Data Types Add On Instructions cannot overwrite User Defined Data Types Add On Instructions and User Defined Data Types must have unique names Instruction Signature If you import an Add On Instruction with an instruction signature into a project where referenced Add On Instructions or User Defined Data Types are not available you may need to remove the signature You can overwrite an Add On Instruction that has an instruction signature by importing a different Add On Instruction with the same name into an existing routine Add On Instructions that have been sealed with an instruction signature cannot be renamed during import Safety Add On You cannot import a safety Add On Instruction into a standard task Instructions You c
56. can on transition from program to run New Postscan routine Executes on last scan of a step if SFC is configured for automatic reset New EnablelnFalse routine Executes when the Enableln parameter is false Copy all defau istruction type Data Type Size 276 byte s Cance Instruction Signature The instruction signature consists of an ID number that identifies the contents of the Add On Instruction and a timestamp that identifies the specific date and time at which the instruction signature was generated or a signature history entry was made whichever came last Add On Instruction Definition Simulation_DT_ 1st General Parameters Local Tags Scan Modes Signature Change History Help Signature Generate a signature to uniquely identify this instruction and seal it from modifications Timestamp 2009 06 22T17 58 29 193Z Add to History Signature History __ User Signature ID Description Copy all default value Data Type Size 276 byte ls Once generated the instruction signature seals the Add On Instruction preventing it from being edited while the signature is in place 16 Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Chapter 1 In addition when a sealed safety Add On Instruction is downloaded for the first time a SIL 3 safety instruction signature is automatically generated The safety instruction signature is an ID number that
57. clude all referenced Add On Instructions and User Defined Types during the export Add On Instruction definition references may also be exported when a program routine set of rungs or User Defined Data Type is exported TIP If an Add On Instruction uses Message MSG instruction and InOut parameters of type MESSAGE you may wish to export a rung containing the Add On Instruction to include the MESSAGE tags This captures the message configuration data such as type and path In deciding how to manage your Add On Instruction definitions in export files you need to consider your goals in storing the definitions lf Then You want to store many Add On Instructions that share a set of Export to separate common Add On Instructions or User Defined Data Types in a files as described on common location page 90 You want to distribute an Add On Instruction as one file You want to manage each Add On Instruction as a standalone Export to a single file instruction as described on page You want to preserve the instruction signature on your Add On at Instruction TIP Add On Instructions with instruction signatures are encrypted upon export to prevent modifications to the export file 89 Chapter4 Import and Export Add On Instructions Export to Separate Files If you want to store many Add On Instructions that share a set of common Add On Instructions or User Defined Data Types in a common location you may want to choo
58. cumentation for multiple languages in a single project file rather than in language specific project files You define all the localized languages that the project will support and set the current default and optional custom localized language The software uses the default language if the current language s content is blank for a particular component of the project However you can use a custom language to tailor documentation to a specific type of project file user Enter the localized descriptions in your RSLogix 5000 project either when programming in that language or by using the import export utility to translate the documentation offline and then import it back into the project Once you enable language switching in RSLogix 5000 software you can dynamically switch between languages as you use the software Project documentation that supports multiple translations within a project includes e component descriptions in tags routines programs user defined data types and Add On Instructions e equipment phases e trends e controllers e alarm messages in ALARM_ANALOG and ALARM_DIGITAL configuration e tasks e property descriptions for modules in the Controller Organizer e rung comments SFC text boxes and FBD text boxes If you want to allow language switching on an Add On Instruction that is sealed with an instruction signature you must enter the localized documentation into your Add On Instruction before gene
59. d one more time in Postscan mode This mode is similar to Prescan in that most instructions simply execute as if they have a false condition It is possible for an instruction to have different behavior during Postscan mode than it has during Prescan mode When an Add On Instruction is called by logic in an SFC Action or a call resides in a routine called by a JSR from an SFC Action and the Automatic Reset option is set the Add On Instruction executes in Postscan mode The primary logic routine of the Add On Instruction executes in Postscan mode Then if it is defined and enabled the Postscan routine for the Add On Instruction executes This could be useful in resetting internal states status values or de energizing instruction outputs automatically when the action is finished TIP Because safety Add On Instructions cannot be called from an SFC Action this option is disabled for safety Add On Instructions Publication 1756 PM010C EN P October 2009 49 Chapter 2 50 Defining Add On Instructions Follow these steps to create a postscan routine 1 In the Controller Organizer right click an instruction and choose Open Definition 2 Click the Scan Modes tab 3 Click New for Postscan Routine Add On Instruction Definition Simulation_DT_1st BX General Parameters Local Tags Scan Modes Signature Change History Help The controller prescans and postscans the Add On Instruction Logic routine b
60. d parameter values for the data instance selected See Parameters and Local Change Local Tag and Parameter Data Context identifies the instruction call Tag values values for that data context by its instance tag being used for data tl EA E Data Contest Motor_1_AuxContact Motor_Starter_Prograr v Jil l a _Frog Enter the tag for Enter the time in the output command milliseconds that it to the output To simulate a fault takes for the device turn on this bit feedback to turn on OutCommand SimulateFault EQ Ov 0 Grtr Then or Eql 4 gt B Move a DelayTime Source DelayTime 2000 2000 Source B 0 Dest DelayTimer PRE 2000 TON Timer On Delay EN Timer DelayTimer Preset 2000 DN Accum 0 Enable Output System Defined Parameter DelayTimer DN EnableOut 1 SSS 84 Publication 1756 PM010C EN P October 2009 Using Add On Instructions Chapter 3 Determine if the Add On Instruction is Source Protected Publication 1756 PM010C EN P October 2009 To edit the logic of the Add On Instruction you must select the instruction lt definition gt in Data Context Data Context e Motor_Starter lt definition gt You can t edit the instruction logic e online e when the logic is in the context of an instruction call e if the instruction is source protected e if the instruction is sealed with an instruction signature An Add On Instruction may be
61. determine if the instruction functionality has changed Refer to the GuardLogix Controller Systems Safety Reference manual publication 1756 RM093 for details on safety application requirements Viewing and Printing the Instruction Signature When the instruction signature has been generated RSLogix 5000 software displays the instruction with the blue seal icon in the Controller Organizer on the Add On Instruction title bar and in the Logic Editor Parameters and Local EA Logic TIP When an instruction is sealed the instruction signature is displayed on the faceplate of the instruction in the Ladder Diagram Editor and the Function Block Diagram Editor Ladder Diagram Function Block Diagram Sim_DT_FBD Simulation_DT_1st onveyor_Control Starts and stops a conveyor Conveyor_Control Conveyor_1_LD CJ KFaut Stop Conveyor_1_Stop_PB 0e Start Conveyor_1_Entry_PE 0e amp Simuation instruction which includes a Siminput SimDTinv Q SimDeactime g SimTime Constant Out Conveyor_1_Out oe DT_Array FBD Signature ID 3DC08D58 Signature D 33761058 You can turn off the display of the instruction signature in the Workstation Options dialog box of RSLogix 5000 software 62 Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Creating Instruction Help Publication 1756 PM010C EN P October 2009 You can also view the instruction signatu
62. e an alias parameter to provide outside access to a local tag Programming Languages e What language do you want to use to program your instruction The primary logic of your instruction will consist of a single routine of code Determine which RSLogix 5000 software programming language to use based on the use and type of application Safety Add On Instructions are restricted to Ladder Diagram e If execution time and memory usage are critical factors refer to the Logix5000 Controllers Execution Time and Memory Use Reference Manual publication 1756 RM087 Publication 1756 PM010C EN P October 2009 33 Chapter 1 Designing Add On Instructions Scan Mode Routines e Do you need to provide Scan mode routines You can optionally define the scan behavior of the instruction in different Scan modes This lets you define unique initialization behaviors on controller startup Program gt Run SFC step postscan or EnableIn False condition e In what language do Scan mode routines need to be written Test e How will you test the operation of your Add On Instruction before commissioning it e What possible unexpected inputs could the instruction receive and how will the instruction handle these cases Help Documentation e What information needs to be in the instruction help When you are creating an instruction you have the opportunity to enter information into various description fields You will also need to develo
63. e defined as required Required parameters are always visible If the parameter is required you will see it checked in the Properties dialog box 1 Click Properties for the instruction J Stop 2 Check the Vis checkbox of the Jog parameter to use it in your fj diagram Motor_Starter Properties Motor_Starter_FBD Sheet 1 X Parameters Tag __ vis Name Argument Vale Data Type Description wo fl Enableln 1 BOOL Enable Input System Defi fo Oo EnableOut 1 BOOL Enable Output System De Lt ic Stop 0 BOOL Enter the tag that gives the M Stat 0 BOOL Enter the tag that gives the a Jog 0 BOOL Jog command for the motor m Oo AuxContact 9 BOOL Auxiliary contact of the mot m o ClearFault 9 BOOL To clear the fault of the mo o Out 0 BOOL Output command to the mo o O Fault 0 BOOL If on the motor didn t start 1 Lal ero fone aoa ey Se eee 3 Click OK 4 Wire to the pin for the parameter Pushbutton to stop the conveyor Stop_PB a Pushbutton to start the conveyor o Stat_PB D Pushbutton to jog the conveyor fonward free Conveyor 0 Motor Starter FBD MotorStarter El Output command to Starts andstopsa motor the conveyor motor a Motor_O ut_F BDI ee Publication 1756 PM010C EN P October 2009 81 Chapter3 Using Add On Instructions Using the Jog Command in Structured Text The assignment sets the Jog bit of X Motor_Starter_ST
64. ell Automation Inc Trademarks not belonging to Rockwell Automation are property of their respective companies Publication 1756 PM010C EN P October 2009 Summary of Changes The information below summarizes the changes to this manual since the last publication To help you find new and updated information in this release of the manual we have included change bars as shown to the right of this paragraph The Designing Add On Instructions chapter was divided into two chapters Designing Add On Instructions and Defining Add On Instructions and some of the content was restructured Information on high integrity Add On Instructions and safety Add On Instructions was added throughout the manual as well as the changes listed in this table Topic Page Table of terms 10 New Signature Tab for High integrity and Safety Add On Instructions 16 Restrictions for Safety Add On Instructions 19 Changing the Language Type of the Logic Routine 21 Additional Classes Supported by GSV and SSV Instructions 26 Create an Alias Parameter for a Local Tag 28 38 Designating an InOut Parameter as a Constant 31 Defining External Access for Tags 31 Updates to Arguments Following Parameter Edits 41 Copying Parameter or Local Tag Default Values 43 Change the Class of an Add On Instruction 54 Updates to Applying Source Protection procedure 58 Generate an Add On Instruction Signature 60 Updated Information on Copying
65. en you press open the Stop button Use the Jog bit to jog the motor The Jog bit overrides the Stop button You can also use the auxiliary contact of the motor to make a fault happen if the motor doesn t start or stop Document an Add On Instruction Follow these steps to create custom help for an instruction 1 Right click an Add On Instruction and choose Open Definition 2 On the General tab enter a description and a revision note for the Add On Instruction to explain the purpose of the instruction 3 Click the Parameters tab and enter a meaningful description for each Parameter Publication 1756 P M010C EN P October 2009 Defining Add On Instructions Chapter 2 Publication 1756 PM010C EN P October 2009 4 Right click each routine located below the Add On Instruction in the Controller Organizer and choose Properties 5 Enter a description for execution of each routine a b For the logic routine describe execution of the instruction when EnablelIn is true For the EnableInFalse routine Gf one exists describe actions that will take place when EnableIn is false such as any outputs that get cleared For the Prescan routine Gf one exists briefly describe actions that will take place during the Prescan routine such as initialization of any parameters For the Postscan routine Gf one exists briefly describe actions that will take place during the Postscan routine such as initializati
66. er This may be due to the proprietary nature of the algorithms or for strict revision control e Source Protected with Viewable Option Users without the source key can view all components of the Add On Instruction including its logic and local tags but are prevented from making any edits to the instruction Apply source protection before generating an instruction TIP ee signature for your Add On Instruction definition You will need the source key to create a signature history entry When source protection is enabled you can still copy the instruction signature or signature history if they exist Enable the Source Protection Feature If source protection is unavailable and not listed in your menus you can enable it by using the RS5KSrcPtc exe tool on your installation CD If it is the first time the source protection has been configured a dialog box appears asking to configure a source key file location ial Cancel Source Key File Location 1 Enter the location of or browse to where the source key is kept it may or may not exist yet 2 Click OK Publication 1756 PM010C EN P October 2009 57 Chapter 2 58 Defining Add On Instructions Apply Source Protection To source protect your Add On Instruction follow these steps 1 In RSLogix 5000 software choose Tools gt Security gt Configure Source Protection to access the source configuration dialog box Click Specify to identify the
67. hanges with RSLogix 5000 software by configuring FactoryTalk security Constant Values InOut parameters may be designated as constant value tags to prevent their data from being modified by controller logic If the logic of an Add On Instruction contains a write operation to a constant value parameter the Add On Instruction will not verify in the Add On Instruction definition context v Show All Tags Safety Enable Input Sys Read Only Safety Enable Output Read Only Safety 4 gt Monitor Tags Edit Tags External Access External Access Al EEE v ey D 3 F B External Access defines the level of access that is allowed for external devices such as an HMI to see or modify tag values Add On Instruction Parameters and Tags External Access Options Local tag Read Write Input parameter Read Only Output parameter None Enableln parameter EnableOut parameter Head Only InOut parameter N A Add On Instruction Parameters and Local Tags Simulate_Feedback Scope G Simulate_ Feedback Show All Tags Name DelayTime DelayTimer Enableln EnableOut OutCommand SimulateF ault BI zaf Usage Alias For Data Type Description External Access Constant Style Input DINT Enter the time in m Read Write Decimal Local TIMER Read Write Input BOOL Enable Input Sys Read Only Decimal Output BOOL Enable Output S Read O
68. haviors that conform to the three language environments Ladder Diagram Function Block Diagram and Structured Text To execute the primary logic routine in any of the language environments the EnableIn parameter must be True 1 In general the EnableIn parameter should not be referenced by the primary logic routine within the instruction definition The EnableOut parameter will by default follow the state of the EnableIn parameter but can be overridden by user logic to force the state of this Parameter TIP If Enableln is False then EnableOut cannot be made True in an Enableln False routine If the EnableIn parameter of the instruction is False 0 the logic routine is not executed and the EnableOut parameter is set False 0 If an EnableInFalse routine is included in the instruction definition and it is enabled the EnableInFalse routine will be executed Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Enableln Parameter and Ladder Diagram In the ladder diagram environment the EnableIn parameter reflects the rung state on entry to the instruction If the rung state preceding the instruction is True 1 the EnableIn parameter will be True and the primary logic routine of the instruction will be executed Likewise if the rung state preceding the instruction is False 0 the EnableIn parameter will be False and the primary logic routine will not be executed An instruction with only Input
69. ing 34 transitional instructions 21 translation See language switching U unavailable instructions 25 update Add On Instruction revision 95 V visible parameters 29 30 101 Index 102 Publication 1756 PM010C EN P October 2009 Rockwell Automation Support Rockwell Automation provides technical information on the Web to assist you in using its products At http www rockwellautomation com support you can find technical manuals a knowledge base of FAQs technicaland applicationnotes samplecodeandlinkstosoftwareservice packs andaMySupportfeaturethatyoucancustomizetomakethe best use of these tools Foranadditionalleveloftechnical phone supportfor installation configuration and troubleshooting we offerTechConnect support programs For more information contact your local distributor or Rockwell Automation representative or visit http www rockwellautomation com support Installation Assistance If you experience an anomoly within the first 24 hours of installation review the information that s contained in this manual You can contact Customer Support for initial help in getting your product up and running United States or Canada 1 440 646 3434 Outside United States or Use the Worldwide Locator at htto www rockwellautomation com support americas phone_en html Canada or contact your local Rockwell Automation representative New Product Satisfaction Return Rockwell Automation tests all of its p
70. instruction definition Conveyor_Control already exists in project Existing references may be affected 4 Click Collision Details to see any differences in the Add On Instructions and to view where the Add On Instruction is used The Property Compare tab shows the differences between the instructions in this case the Revision Edited Date and Software Revision Add On Instruction Name Collision Conveyor_Control X Property Compare Project References Differences are highlighted Import Add On Instruction Existing Add On Instruction 2 0 1 0 Rockwell Rockwell 10 24 2005 6 50 43 PM 10 24 2005 6 50 43 PM NA Mills NA Mills 5 27 2009 4 39 12 PM 5 20 2009 9 15 59 PM NA srdennis NA srdennis No No No No No No Software Revision v17 00 v16 03 Additional Help Text Use this instruction to start and st Use this instruction to start a Logic is different Current Operation Overwrite Overwrite Use Existing 96 Publication 1756 PM010C EN P October 2009 Import and Export Add On Instructions Chapter 4 TIP The Compare dialog box only compares metadata for each instruction definition such as description revision or edited date For effective revision control enter a detailed revision note The Project References tab shows where the existing Add On Instruction is used Add On Instruction Name Collision Conveyor_Control x Property Compare Project References Locations where Conveyor_Co
71. ion with no optional scan routines created may be sufficient for the intended operation of the instruction If you do not define an optional Scan Mode the following default behavior of an Add On Instruction occurs Default Instruction Behavior Scan Mode True False Result Executes the main logic routine of the Add On Instruction Does not execute any logic for the Add On Instruction and does not write any outputs Input parameters are passed values Prescan Executes the main logic routine of the Add On Instruction in Prescan mode Any required Input and Output parameters values are passed Postscan Executes the main logic routine of the Add On Instruction in Postscan mode Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Enabling Scan Modes Publication 1756 PM010C EN P October 2009 For each Scan mode you can define a routine that is programmed specifically for that Scan mode and can be configured to execute in that mode User programmed Routines for Specific Scan Modes Scan Mode Result True The main logic routine for the Add On Instruction executes not optional False The Enableln False routine executes normally in place of the main logic when a scan false of the instruction occurs Any required or wired in FBD Input and Output parameters values are passed Prescan The Prescan routine executes normally after a prescan execution of the m
72. ions 0 0 0 00005 19 Instruction Signature 0 2 00 00 eee eee 20 Safety Instruction Signature 1 vines ee ee bee 21 Programming Languages sssaaa saaa 21 Transitional Instructions o aa aaaea 21 Instrctiorn SiZ kara is Ga Kee 4 A A E EAE A 22 Runtime EN Moy von aaaea ae ak Dee ek OS 22 Nesting Add On Instructions oaaae 22 Routines Versus Add On Instructions 23 Programmatic Access to Data 0000404 24 Unavailable Instructions within Add On Instructions 25 Using GSV and SSV Instructions o oo eee e ey eee 26 Considerations When Creating Parameters 27 Passing Arguments to Parameters by Reference or by AVE N E EN EEA EE EET EEA AEE 27 Selecting a Data Type for a Parameter 27 Creating an Alias Parameter for a Local Tag 28 Using a Single Dimension Array as an InOut Parameter 28 Determining Which Parameters to Make Visible or PRS CEI Cs esa ox car ae a r A E EE T eA RADE i 29 Using Standard and Safety Tags j 04 6645s pelea Seo pas 30 Data Access Control ay 34s Seda Sg Se oe ho ed amp Rad eS 31 5 Table of Contents Defining Add On Instructions Planning Your Add On Instruction Design 32 Intended Behavior doi F pts dead amp be doe S cna ate mi aes ed Sd 32 Parameters ita teow dhe Paw hand lo he ee et a 32 Naming Conventions 0 0000s 32 Source Protection 2 runen ne a ee 33 Nesting Reuse In
73. ions 3 Review the Import Configuration dialog box and from the Operations pull down menu choose Overwrite Import Configuration Pa l Find v ajas Find Replace Find Within Final Name Import Content amp Add On Ins Configure Add On Instruction Properties a Conveyor_Control Import Name Conveyor_Control Parameters and Local Tags Choose Overwrite Routines Operation Overwrite aA amp References i References will be imported as Add On Instructions configured in the References folders Errors Wamii gt Erors wamings Final Name Conveyor_Control w Collision Details Description Starts and stops a conveyor WY Conveyor_Control already existsin a project and is different Existing references to the instruction type may be affected including Revision j logic that calls instruction tags of this instruction type Revision Note add on instructions and user Vendor Rockwell A Conveyor_Control already exists in project and is different Existing references may be affected Calls to the add on instruction may verify with changes applied although calling arguments may not be what is intended Check all calls to instruction to ensure they will execute correctly with updates If the data layout is different data values for tags using this type will be converted if possible and some values may be lost E Check any tags using this type to ensure tag data converts as expected Add on
74. ists in project Existing references may be affected TIP You can only rename an Add On Instruction if it has not been sealed with an instruction signature To rename an Add On Instruction that has been source protected you need the source key The Collision Details button lets you view the Property Compare tab which shows the differences between the two instructions and the Project References tab which shows where the existing Add On Instruction is used Publication 1756 P M010C EN P October 2009 Import and Export Add On Instructions Chapter 4 Update an Add On When need to ae an een to a newer revision you can import it from an L5X file or copy it from an existing project You Instruction to a Newer must be offline to update an Add On Instruction Revision via Import Follow these steps to update an Add On Instruction to a newer revision by importing it 1 Right click the Add On Instruction folder and choose Import Add On Instruction 2 Select the file with the Add On Instruction and click Import Import Instruction Look in RSLogix5000examples i Conveyor _Control L5X 2 My Recent Documents G Desktop la K My Documents My Computer a File name Conveyor_Control Si My Network Files of type Cancel Places Files containing Instruction Bi Help Into E Publication 1756 PM010C EN P October 2009 95 Chapter4 Import and Export Add On Instruct
75. lanning 33 0 object classes 26 P parameter alignment 41 42 parameters alias 28 create 37 Enableln 52 EnableOut 52 monitor 82 move 39 planning 32 reorder 39 required 29 visible 29 30 Parameters tab 14 create a parameter 37 passing arguments 27 performance 45 planning 32 postscan routine 49 create 50 prescan routine 47 create 48 programming language choosing 21 planning 33 programming tips 79 Project References tab 97 Property Compare tab 96 remove instruction signature 60 reorder parameters 39 required parameters 29 routine EnablelnFalse 51 postscan 49 prescan 47 S safety class 13 restrictions 19 tags 30 safety Add On Instruction copy 86 import 93 safety application instructions restrictions 25 safety instruction signature 17 21 copy 61 create 62 delete 62 invalid 62 view 63 safety task signature 19 54 86 93 additional resources 9 Scan Mode tab 16 scan modes 45 52 planning 34 verify 56 Scan Modes tab 47 SFC Action 49 signature history 17 61 Signature tab 16 SIL 3 21 Publication 1756 PM010C EN P October 2009 source protection applying 57 59 enabling 57 instruction signature 20 operation 60 options 57 planning 33 Quick View pane 85 SSV 26 standard class 13 tags 30 store your instructions 87 Structured Text instruction example 79 Publication 1756 PM010C EN P October 2009 Index T tags create local tags 39 standard and safety 30 test 54 plann
76. lass to standard before changing to a standard controller type You need to test and troubleshoot the logic of an instruction to get it working TIP When a fault occurs in an Add On Instruction routine a fault log is created that contains extended information useful for troubleshooting Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Before You Test Before you start to test an Add On Instruction do the following 1 Open a project to debug offline TIP Add On Instructions can only be created or modified when offline You can add delete or modify tag arguments in calls to Add On Instructions while editing online but you cannot edit arguments inside the Add On Instruction while online 2 Add the Add On Instruction to the project if it is not already there Test the Flow 1 Add a call to the instruction in a routine in the open project 2 Assign any arguments to required parameters for your call 3 Download the project Monitor Logic with Data Context Views You can simplify the online monitoring and troubleshooting of your Add On Instruction by using Data Context views The Data Context selector lets you select a specific call to the Add On Instruction that defines the calling instance and arguments whose values are used to visualize the logic for the Add On Instruction TIP When troubleshooting an Add On Instruction use a non arrayed instance tag for the call to the in
77. lex functionality by nesting instructions The instructions can be nested to seven levels deep Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Chapter 1 Add On Instructions cannot call other routines via a JSR instruction You must use nested instructions if you need complex functionality consisting of multiple routines TIP To nest Add On Instructions both the nested instruction and the instruction that calls it must be of the same class type or the calling instruction will not verify That is standard Add On Instructions may call only standard Add On Instructions and safety Add On Instructions may call only safety Add On Instructions Routines Versus Add On Instructions You can write your code in three basic ways to run in line as a main routine to use subroutine calls or as Add On Instructions The following table summarizes the advantages and disadvantages of each J Advantages and Disadvantages of Routines and Add On Instructions Aspect Main Routine Subroutine Add On Instruction Accessibility N A Within program multiple copies Anywhere in controller single copy for the entire one for each program project Parameters N A Pass by value Pass by value via Input and Output parameters or by reference via InOut parameters Numeric parameters N A No conversion user must manage Automatic data type conversion for Input and Output parameters Parameters data types N A Atomic
78. ll down menu to choose the local tag or its member You can also designate a parameter as an alias for a local tag by using the Tag Editor See Edit Parameters and Local Tags on page 41 6 Set the default values Default values are loaded from the Add On Instruction definition into the tag of the Add On Instruction data type when it is created and anytime a new Input or Output parameter is added to the Add On Instruction TIP Check the box at the bottom of the Add On Instruction Definition Editor to Copy all default values of parameters and local tags whose values were modified to all tags of this instruction type if you want to update existing invocations of the instruction to the new default values For details on copying default values see Copying Parameter or Local Tag Default Values on page 43 7 Set the display style 8 Check the box to make the parameter required or visible as desired See Determining Which Parameters to Make Visible or Required on page 29 If you decide to make the parameter required it will also be visible 9 Type a description maximum 512 characters This description appears in the instruction s help 10 Select an External Access type for Input or Output parameters 11 Check the Constant box for InOut parameters you want to designate as constant values 12 Repeat for additional parameters You can also create parameters by using the Tag Editor New TIP ae Pa
79. meter non required Output Parameter DT_Array_LD InOut Parameter Visible non required SimDTInw a Output Parameter e f you want the parameter s value displayed on the instruction face in Ladder set the parameter as visible e An Output parameter of the BOOL tag type that is not required but visible will show as a status flag on the right side of the block in Ladder This can be used for status flags like DN or ER 29 Chapter 1 Parameter Type Input Is the Parameter Required Designing Add On Instructions Is the Parameter Visible Does the Value display This table explains the effects of the Required and Visible parameter settings on the display of the instruction Input Output and InOut Required and Visible Settings Ladder Diagram Does the Argument display Function Block Diagram Do You Need to Connect the Parameter Does the Argument display Can You Change Change the Visibility Setting Within Structured Text Does the Argument display the Function Block N A Input N A Input N A Output Output N A N A Output Z Z lt Z Z lt N A InOut 30 lt j 2 a2z lt 2 2 lt lt zl lt lt z lt z z lt lt z lt lt lt z z lt z z lt z lt x z lt lt 2 lt zl z lt z z lt N A Y If you have a parameter for which the user m
80. n Bit Timer Counter Element Group Add On IMPORTANT Safety Add On Instructions can be used only in safety routines which are currently restricted to ladder logic Safety Add On Instructions are shown in the Language Element Toolbar only when the routine is a safety routine Publication 1756 PM010C EN P October 2009 75 Chapter 3 Using Add On Instructions Use the Add Element Di alog Follow these instructions to access the Add Canguage Element dialog how Box 1 Press Alt Insert anywhere in the editor or by right clicking the logic in the Editor E Add Ladder Element 4_ Motion Move Motion Group JEHA Motion Event 14 Motion Config LiH Motion Coordinated JEE ASCII Serial Port HA ASCII String lt J eH ASCII Conversion 2 0 Debug a Add On J Motion Coordinated I ASCII Serial Port J ASCII String J ASCII Conversion t Conveyor_ContrcStarts and stops a conveyor maak ioto Starter Starts an a motor Simulate_FeedbeSimulates a digital feedback device LF Simulation_DT_1 Simulation instruction which includ f F7 Show Language Elements By Group 76 Publication 1756 PM010C EN P October 2009 Using Add On Instructions Chapter 3 Include an Add On Instruction in a Routine Publication 1756 PM010C EN P October 2009 3 Select the Add On Instruction and click OK Use ASlogiy 500
81. n be configured to fully define the behavior of the instruction Scan mode routines do not initially exist for Add On Instructions You can create them depending upon the requirements of your instruction 45 Chapter 2 Defining Add On Instructions 46 Like all built in instructions in the controller Add On Instructions support the following four controller Scan modes Scan Mode Types Scan Mode Description True The instruction is scanned as the result of a true rung condition or the Enableln parameter is set True False The instruction is scanned as the result of a false rung condition or the Enableln parameter is set False Instructions in the controller may or may not have logic that executes only when that instruction is scanned false Prescan Occurs when the controller either powers up in Run mode or transitions from Program to Run Instructions in the controller may or may not have logic that executes only when that instruction is executed in Prescan mode Postscan t Occurs as a result of an Action in an Sequential Function Chart SFC routine becoming inactive if SFCs are configured for Automatic Reset Instructions in the controller may or may not have logic that executes only when that instruction is executed in Postscan mode 1 Postscan mode routines cannot be created for safety Add On Instructions because safety instructions do not support SFC The default behavior for executing an Add On Instruct
82. n or an existing Add On Instruction New Add On Instruction Name Motor_Starter Description Starts and stops a motor Type E Ladder Diagram Major Minor Extended Text Revision Revision Note Vendor Rockwell C Open Logic Routine Open Definition Type a description for the new instruction maximum 512 characters For safety projects choose a class either Standard or Safety The Class field is available on the New Add On Instruction dialog box for safety controller projects Choose a programming language for Add On Instruction logic The language Type defaults to Ladder Diagram for safety Add On Instructions Assign a Revision level for the instruction Write a Revision note if necessary Add information about the Vendor if necessary Click OK to create the instruction Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Create Parameters Use the Add On Instruction Definition Editor to create the parameters for your instructions Follow these steps to define the parameters for your instruction 1 In the Controller Organizer right click an Add On Instruction and choose Open Definition 2 Click the Parameters tab and enter a name for a parameter Add On Instruction Definition Simulate_Feedback v1 0 General Parameters Local Tags Scan Modes Signature Change History Help Description External Access Constant Enableln
83. n using GSV and SSV instructions refer to the Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 26 Publication 1756 P M010C EN P October 2009 Considerations When Creating Parameters Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Chapter 1 Consider the following information when you are creating parameters Passing Arguments to Parameters by Reference or by Value The following information will help you understand the differences between passing argument tags to parameters by reference or by value Aspect Value Performance By Value Input or Output Synchronous the argument s value does not change during Add On Instruction execution Argument values are copied in and out of the parameters of the Add On Instruction This takes more time to execute a call to the instruction By Reference InOut Asynchronous the argument s value may change during Add On Instruction execution Any access by the instruction s logic directly reads or writes the passed tag s value Parameters access argument tags directly by reference which leads to faster execution of instruction calls Memory usage Most amount Least amount Parameter data types supported Atomic SINT DINT INT REAL BOOL Selecting a Data Type for a Parameter Atomic arrays and structures The Logix5000 controllers perform DINT 32 bit and
84. nd enabled for an Add On Instruction the EnableInFalse routine executes when the rung condition is false or if the EnableIn parameter of the Add On Instruction is false 0 This is useful primarily for scan false logic when used as an output instruction in a Ladder routine A common use of scan false is the setting of OTEs to the de energized state when the preceding rung conditions are false An Add On Instruction can use the EnableInFalse capability to let you define behavior for the False conditions When the Add On Instruction is executed in the false condition and has an EnableInFalse routine defined and enabled any required parameters have their data passed e Values are passed to Input parameters from their arguments in the instruction call e Values are passed out of Output parameters from their arguments in the instruction call If the EnableInFalse routine is not enabled the only action performed for the Add On Instruction in the false condition is that the values are passed to any required Input parameters in ladder logic Follow these steps to create an EnableInFalse routine 1 Right click the instruction and choose Open Definition 2 Click the Scan Modes tab 3 Click New on EnableInFalse routine Add On Instruction Definition Simulation_DT_1st HEX General Parameters Local Tags Scan Modes Signature Change History Help The controller prescans and postscans the Add On Instruction Logic routine
85. ne this entails placing an XIC before an instance of the instruction and evaluating instruction results when the XIC is false In a Function Block target routine this entails executing an instance of the instruction with the Enableln parameter set to zero 0 Prescan Place the controller in Program mode then place it in Run mode Postscan With the controller configured for SFC Automatic Reset place an instance of the instruction into the Action of an SFC Run the SFC such that this Action is executed and the SFC proceeds beyond the step that is associated with this Action Publication 1756 P M010C EN P October 2009 Defining Add On Instructions Chapter 2 Defining Source Protection You can apply source protection to your Add On Instruction to L protect your intellectual property or prevent unintended edits of a for an Add On Instruction ig ted source With source protection you can limit a user of your Add On Instruction to read only access or prevent access to the internal logic or local tags used by the instruction You can protect the use and modification of your instructions with a source key file when you distribute them You have two options when using source protection e Source Protected Users without the source key cannot view any routine or local tags or make any edits to the Add On Instruction Choose this option if you want to protect the source definition of an Add On Instruction from the view of a us
86. ng Add On Instructions 12 e Protect intellectual property You can place your proprietary code inside of an Add On Instruction then use Source Protection to prevent others from viewing or changing your code e Simplify maintenance You can simplify code maintenance because Add On Instruction logic monitored in RSLogix 5000 software animates with tag values relative to that specific instance of the Add On Instruction e Track revisions and easily confirm instruction functionality with high integrity Add On Instructions You can add an instruction signature to your Add On Instruction which generates a unique identifier and prevents the instruction from being edited without resulting in a change to the signature An Add On Instruction can be used across multiple projects You can define the instructions the instructions can be provided to you by someone else or they can be copied from another project Once defined in a project they behave similarly to the built in instructions already available in RSLogix 5000 software They appear on the instruction toolbar and in the instruction browser for easy access just like built in RSLogix 5000 software instructions Like standard Add On Instructions safety Add On Instructions let you encapsulate commonly used safety logic into a single instruction making it modular and easier to reuse In addition to the instruction signature used for high integrity Add On Instructions
87. nly Decimal Input BOOL Enter the tag for t Read Write Decimal Input BOOL To simulate a fault Read write v Decimal 4 gt Monitor Tags Edit Tags lt Publication 1756 PM010C EN P October 2009 Read Write Read Only None salpadoig ih 31 Chapter 1 Designing Add On Instructions Planning Your Add On Instruction Design 32 Take time to plan your instruction design Advance planning can identify issues that need to be addressed When defining the requirements of an instruction you are also determining the interface Keep the following aspects in mind when defining your instruction requirements and creating your Add On Instruction Intended Behavior e What is the purpose for creating the Add On Instruction e What problem is it expected to solve e How is it intended to function e Do you need to higher level of integrity on your Add On Instruction If so you can generate an instruction signature as a means to verify that your Add On Instruction has not been modified e Do you need to use safety application instructions and certify your safety Add On Instruction to SIL 3 integrity For details on how to certify a safety Add On Instruction refer to the GuardLogix Controller Systems Safety Reference Manual publication 1756 RM093 Parameters e What data needs to be passed to the instruction e What information needs to be accessible outside of the instruction e Will alias
88. ns An Add On Instruction is executed just like any other routine belonging to a particular program Because another task can preempt a program containing an Add On Instruction that is being executed an Add On Instruction may be interrupted prior to completing its execution In standard programs you can use the User Interrupt Disable Enable UID UIE instructions to block a task switch if you want to be sure the Add On Instruction executes uninterrupted before switching to another task TIP UID and UIE instructions are not supported in the safety task of GuardLogix projects Optimizing Performance The performance depends on the structuring configuration and the amount of code in an Add On Instruction You can pass large amounts of data through a structure by using an InOut parameter The size of data referenced by an InOut parameter does not impact scan time and there is no difference between passing a user defined type tag or an atomic tag because it is passed by reference When a rung condition is false any calls to an Add On Instruction are still processed even though the logic routine is not executed The scan time can be affected when many instances of an Add On Instruction are executed false Be sure to provide instructions in your documentation if an Add On Instruction can be skipped when the rung condition is false To provide Add On Instructions with the same flexibility as built in instructions optional Scan mode routines ca
89. ns consider these guidelines e You cannot paste a safety Add On Instruction into a standard routine e You cannot paste a safety Add On Instruction into a safety project that has been safety locked or one that has a safety task signature e You cannot copy and paste a safety Add On Instruction while online Follow these steps to copy the Add On Instruction 1 Open the RSLogix 5000 project that contains the Add On Instruction 2 Find the instruction in the Add On Instructions folder Controller My_Controller_1 Tasks Motion Groups Add On Instructions Conveyor_Control Motor_Starter Simulate_Feedback 3 Right click the instruction and choose Copy 86 Publication 1756 PM010C EN P October 2009 Using Add On Instructions Chapter 3 4 Go to the other project where you want to paste the instruction Jj 5 Right click the Add On Instructions folder and choose Paste Controller My_Controller_2 0 Tasks 29 Motion Groups Add On Instructions 5 Data Types CJ New Add On Instruction Import Add On Instruction Paste t Ctrl There are two ways to store a group of Add On Instructions together ore rour n p One is to save your Add On Instructions in a project file Another is to Instruction es structions create an L5X export file as described in Chapter 4 Follow these steps to store your instructions by saving them in a project file 1 Identify
90. ns and programming styles In general Ladder Diagram executes simple boolean logic timers and counters the fastest Function Block Diagrams and Structured Text may be more efficient if you take advantage of the more advanced process and drives instructions available in those languages You cannot compare execution times for the same Add On Instruction written in different programming languages There are fundamental differences on how the different languages execute and are compiled TIP You can change the programming language after you create the Add On Instruction by clicking Change Type on the General tab of the Add On Instruction Definition Editor However any existing logic will be lost Transitional Instructions Some instructions execute or retrigger only when rung condition in toggles from false to true These are transitional relay ladder instructions When used in an Add On Instruction these instructions will not detect the rung in transition to the false state When the EnablelIn bit is false the Add On Instruction logic routine no longer executes thus the transitional instruction does not detect the transition to the false state Extra conditional logic is required to handle triggering of transitional instructions contained in an Add On Instruction Publication 1756 PM010C EN P October 2009 21 Chapter 1 22 Designing Add On Instructions Some examples of transitional instructions include ONS MSG PXRQ SRT s
91. ntrol is called in project Selected call s arguments Container Routine Location Parameter Argument G Motor_Starte 5 Nested_Moto Rung 1 Stop Conveyor_1_Jamcl Start Conveyor_1_Entry_PE Out Jam lt Unknown gt Conveyor_1_Out C Show Changed Parameters Only If existing instruction is overwritten once import completes check all locations calling Conveyor_Control to ensure they will execute correctly with the updates Current Operation Overwrite meea Check each routine where your Add On Instruction is l used to make sure that your existing program code will work correctly with the new version of the instruction For more information on updates to arguments see Updates to Arguments Following Parameter Edits on page 41 5 Click Close and then OK to complete the operation Publication 1756 PM010C EN P October 2009 97 Chapter4 Import and Export Add On Instructions Notes 98 Publication 1756 PM010C EN P October 2009 A access Add On Instructions 75 Add Element dialog box 76 Add On Instruction Definition Editor 37 alias parameter 28 38 array 28 C Change History tab 17 changing class 54 class 13 changing 54 collision import 94 96 compare instructions 96 constant value tags 31 copy Add On Instruction 86 default values 43 instruction signature 60 safety Add On Instruction 86 safety instruction signature 61 signature history 61 Copy Default Values dialog box 44 cre
92. om passed in instruction tag location Memory use Most used Very compact Compact call requires more memory than a subroutine call All references need an additional word Edit Online offline Online offline Offline only Import export Entire routine Entire routine including tags and Full instruction definition including routines and including tags and instruction definitions to L5X instruction definitions to L5X tags to L5X Instruction signature 24 N A N A 32 bit signature value seals the instruction to prevent modification and provide high integrity Programmatic Access to Data Input and Output parameters and local tags are used to define an instruction defined data type Each parameter or local tag has a member in the data type although local tag members are hidden from external use Each call to an Add On Instruction uses a tag of this data type to provide the data instance for the instruction s execution The parameters of an Add On Instruction are directly accessible in the controller s programming via this instruction defined tag within the normal tag scoping rules Local tags are not accessible programmatically through this tag This has impact on the usage of the Add On Instruction If a structured Gincluding UDTs array or nested Add On Instruction type is used as a local tag not InOut parameters then they are not programmatically available outside the Add On Instruction definition TIP You can access
93. ome of the ASCII instructions and some of the Motion instructions TIP The EnablelnFalse routine can be used to provide the conditioning required to retrigger transitional instructions contained in an Add On Instruction However this method will not work for calls to this Add On Instruction contained in a Structured Text routine since Enableln is always true for calls in Structured Text Instruction Size Add On Instructions have one primary logic routine that defines the behavior of the instruction when executed This logic routine is like any other routine in the project and has no additional restrictions in length The total number of Input parameters plus Output parameters plus local tags can be up to 512 There are no limits on the number of InOut parameters The maximum data instance supported which includes Inputs Outputs and local tags is two megabytes The data type size is displayed on the bottom of the Parameters and Local Tags tab in the Add On Instruction Definition Logic Data Type Size 276 byte s Runtime Editing Add On Instructions can only be edited offline If the intended functionality needs to be changed in a running controller consider carefully if an Add On Instruction is suitable Nesting Add On Instructions Add On Instructions can call other Add On Instructions in their routines This provides the ability to design more modular code by creating simpler instructions that can be used to build more comp
94. on 1756 PM010C EN P October 2009 19 Chapter 1 Designing Add On Instructions 20 Instruction Signature The instruction signature available for both standard and safety controllers lets you quickly determine if the Add On Instruction has been modified Each Add On Instruction has its own instruction signature on the Add On Instruction definition The instruction signature is required when an Add On Instruction is used in SIL 3 safety related functions and may be required for regulated industries Use it when your application calls for a higher level of integrity Once generated the instruction signature seals the Add On Instruction preventing it from being edited until the signature is removed This includes rung comments tag descriptions and any instruction documentation that was created When an instruction is sealed you can perform only these actions e Copy the instruction signature e Create or copy a signature history entry e Create instances of the Add On Instruction e Download the instruction e Remove the instruction signature e Print reports The instruction signature does not prevent referenced Add On Instructions or User defined Data Types from being modified Changes to the parameters of a referenced Add On Instruction or to the members of a referenced User defined Data Type can cause the instruction signature to become invalid These changes include e adding deleting or moving parameters local tags o
95. on of any parameters resetting any internal state of the instruction Click the Help tab of the Add On Instruction Definition Editor and enter additional information in the Extended Description field The extended description can include the following information e Additional parameter information e Description of how the instruction executes e Change history notes 65 Chapter2 Defining Add On Instructions 7 Review the Help format in the preview window This is an example of the RSLogix 5000 software generated help for the instruction This information is gathered from the definition descriptions that you complete when defining an instruction amp Add On Instruction Definition Motor_Starter v1 0 Description Starts and stops a motor Type EB Ladder Diagram Change Tyy Major Minor Extended Tent Revision Revision Note Rockwell 000 BE Add On Instruction Definition Motor_Starter v1 0 General Parameters Local Tags Scan Modes Signature Change History Help Signature Generate a signature to uniquely identify this instruction and seal it from modifications 1D 48F181FC E De Timestamp 2009 07 31T00 14 35 4492 Add to Histo Signature History Enableln Input BOOL 1 Decimal C C Enable Input Read Only Oo EnableOut Output BOO
96. onents of an Add On Instruction 13 Considerations for Add On Instructions 18 Considerations When Creating Parameters 27 Planning Your Add On Instruction Design 32 About Add On Instructions With Add On Instructions you can create new instructions for sets of commonly used logic provide a common interface to this logic and provide documentation for the instruction Add On Instructions are intended to be used to encapsulate commonly used functions or device control They are not intended to be a high level hierarchical design tool Programs with routines are better suited to contain code for the area or unit levels of your application These are some benefits to using Add On Instructions e Reuse code You can use Add On Instructions to promote consistency between projects by reusing commonly used control algorithms If you have an algorithm that will be used multiple times in the same project or across multiple projects it may make sense to incorporate that code inside an Add On Instruction to make it modular and easier to reuse e Provide an easier to understand interface You can place complicated algorithms inside of an Add On Instruction and then provide an easier to understand interface by making only essential parameters visible or required You can reduce documentation development time through automatically generating instruction help Publication 1756 PM010C EN P October 2009 11 Chapter 1 Designi
97. p information on how to use the instruction and how it operates 34 Publication 1756 PM010C EN P October 2009 Chapter 2 Introduction Create an Add On Instruction Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Topic Page Create an Add On Instruction 35 Create Parameters 37 Create Local Tags 39 Edit Parameters and Local Tags 41 Updates to Arguments Following Parameter Edits 41 Copying Parameter or Local Tag Default Values 43 Create Logic for the Add On Instruction 44 Defining Operation in Different Scan Modes 45 Enabling Scan Modes 47 Using the Enableln and EnableOut Parameters 52 Change the Class of an Add On Instruction 54 Testing the Add On Instruction 54 Defining Source Protection for an Add On Instruction 57 Generate an Add On Instruction Signature 60 Creating Instruction Help 63 Motor Starter Instruction Example 68 Simulation Instruction Example 70 Follow these steps to create a new Add On Instruction 1 Open a new or existing project 2 Right click the Add On Instructions folder in the Controller Organizer and choose New Add On Instruction 35 Chapter 2 Defining Add On Instructions 36 3 Type a unique name for the new instruction The name can be up to 40 characters long It must start with a letter or underscore and must contain only letters numbers or underscores The name must not match the name of a built in instructio
98. parameters except EnableOut is TIP aoe hee treated as an input instruction left justified in a Ladder Diagram The EnableOut parameter is used for the rung out condition Enableln Parameter and Function Blocks In the function block environment the EnableIn parameter can be manipulated by the user through its pin connection If no connection is made the EnableIn parameter is set True 1 when the instruction begins to execute and the primary logic routine of the instruction will be executed If a wired connection to this parameter is False 0 the primary logic routine of the instruction will not execute Another reference writing to the EnableIn parameter such as a Ladder Diagram rung or a Structured Text assignment will have no influence on the state of this parameter Only a wired connection to this parameter s input pin can force it to be False 0 Enableln Parameter and Structured Text In the Structured Text environment the EnableIn parameter is always set True 1 by default The user cannot influence the state of the EnableIn parameter in a Structured Text call to the instruction Because EnableIn is always True 1 in Structured Text the EnableInFalse routine will never execute for an instruction call in Structured Text Publication 1756 PM010C EN P October 2009 53 Chapter2 Defining Add On Instructions Change the Class of an Add On Instruction Testing the Add On Instruction 54 You can change the class of
99. r members in referenced User defined Data Types e changing the name data type or display style of parameters local tags or members in referenced User defined Data Types If you want to enable language switching or source protection on an Add On Instruction that will be sealed with an instruction signature you need to import the translated information or apply source protection before generating the signature You must have the source key to generate a signature or to create a signature history entry for a source protected Add On Instruction that has an instruction signature See Defining Source Protection for an Add On Instruction on page 57 for more information on source protecting your Add On Instruction Publication 1756 P M010C EN P October 2009 Designing Add On Instructions Chapter 1 Safety Instruction Signature When a sealed safety Add On Instruction is downloaded for the first time a SIL 3 safety instruction signature is automatically generated For details on how to certify a safety Add On Instruction refer to the GuardLogix Controller Systems Safety Reference Manual publication 1756 RM093 Programming Languages Select the programming language based on the type of application you are developing Ladder Diagram Function Block Diagram and Structured Text can be used for Add On Instruction logic Each of the programming languages supported in RSLogix 5000 software is targeted for different types of applicatio
100. ram to run New Postscan routine Executes on last scan of a step if SFC is configured for automatic reset New EnablelnFalse routine Executes when the Enableln parameter is false d local tags whose value Data Type Size 276 byte s Lo Cancer Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 4 From the Type pull down menu on the New Scan Mode Routine dialog box choose the type of programming language Ladder Diagram Function Block or Structured Text New Scan Mode Routine Mode Prescan Description Ippe E Function Block Diagram v Instruction Simulation_DT_1st C Open Routine 5 Type a description of the Prescan behavior 6 Click OK to create the routine and return to the Scan Modes tab 7 Define if the prescan routine executes or not by checking or clearing Execute Prescan routine after the logic routine is prescanned T Prescan routine Executes prior to first scan on transition from program to run V Execute Prescan routine after the Logic routine is prescanned The Prescan routine can now be edited like any other routine Postscan Routine Postscan mode occurs only for logic in a Sequential Function Chart Action when the Action becomes inactive and the SFC language is configured for Automatic Reset which is not the default option for SFC When an SFC Action becomes inactive then the logic in the Action is execute
101. rameter or Local Tag dialog box or by right clicking a tag name in the logic of your routine 38 Publication 1756 P M010C EN P October 2009 Defining Add On Instructions Chapter 2 The order that you create the parameters is how they will appear in the data type and on the instruction face To rearrange the order on the Parameter tab of the Add On Instruction Definition Editor select the parameter row and click Move Up or Move Down Add On Instruction Definition Editor Parameters Tab Add On Instruction Definition Motor_Starter v1 0 General Parameters Local Tags Scan Modes Signature Change History Help Name Usage Data Type Alias For Default Style Reg Vis Description External Access Constant Enableln Input BOOL 1 Decimal Oo Enable Input Sys Read Only EnableOut Output BOOL 0 Decimal OO CO Enable Output Read Only Stop Input BOOL 9 Decimal v V Enter the tag that Read Write Start Input BOOL 9 Decimal v Enter the tag that Read Write Input BOOL Decimal Jog command for t Ni AuxContact Input 9 Decimal Auziliary contact o ClearFault Input 9 Decimal To clear the fault Read Write Out Output 9 Decimal Output command t Read Only Fault Output 9 Decimal If on the motor di Read Only FaultT ime Input 9 Decimal Enter the time ms Read Write 0000000000 reret eve Dow Data Type Size 20 byte
102. rating the signature Because the signature history is created after the instruction signature is generated the signature history is not translatable If the translated information already exists when you generate the Add On Instruction signature you can switch the language while keeping the signature intact because the switch does not alter the instruction definition it only changes the language that is displayed For more information on enabling a project to support multiple translations of project documentation refer to the online help Publication 1756 PM010C EN P October 2009 67 Chapter2 Defining Add On Instructions Motor Starter Instruction The Motor_Starter Add On Instruction starts and stops a motor Example If the stop pushbutton is closed and the start pushbutton is pressed then e the motor gets the command to run e the instruction seals in the command so the motor keeps running even after you release the start pushbutton If the stop pushbutton is pressed opened then the motor stops Motor Starter Example Definition Editor General Tab Add On Instruction Definition Motor_Starter v1 0 E General Parameters Local Tags Scan Modes Signature Change History Help Name Motor Starte Description _ Starts and stops a motor Type Ba Ladder Diagram Major Minor Extended Text Revision Revision Note Vendor Rockwell Copy all default values of parameters an d to
103. re and the safety instruction signature on the Quick View pane of the Controller Organizer and on the Signature tab of the Instruction Definition Editor dialog box The Add On Instruction name revision instruction signature safety instruction signature and timestamp are printed on the Add On Instruction Signature Listing report You can also choose to include the instruction signature safety instruction signature and signature history on the Add On Instruction report by clicking Print Options on the Generate Report dialog box Custom instruction help is generated automatically as you are creating your Add On Instructions RSLogix 5000 software automatically builds help for your Add On Instructions by using the instruction s description revision note and parameter descriptions By creating meaningful descriptions you can help the users of your instruction In addition you can add your own custom text to the help by using the extended description field You can provide additional help documentation by entering it on the Help tab of the Add On Instruction Definition Editor The instruction help is available in the instruction browser and from any call to the instruction in a language editor by pressing F1 Write Clear Descriptions When writing your descriptions keep the following in mind e Use short sentences and simple language e Be brief and direct when you write e Include simple examples e Proofread your entries 63
104. roducts to ensure that they are fully operational when shipped from the manufacturing facility However if your product is not functioning and needs to be returned follow these procedures United States Contact your distributor You must provide a Customer Support case number call the phone number above to obtain one to your distributor to complete the return process Outside United States Please contact your local Rockwell Automation representative for the return procedure Documentation Feedback Your comments will help us serve your documentation needs better If you have any suggestions on how to improve this document complete this form publication RA DU002 available at http www rockwellautomation com literature www rockwellautomation com Power Control and Information Solutions Headquarters Americas Rockwell Automation 1201 South Second Street Milwaukee WI 53204 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Europe Middle East Africa Rockwell Automation Vorstlaan Boulevard du Souverain 36 1170 Brussels Belgium Tel 32 2 663 0600 Fax 32 2 663 0640 Asia Pacific Rockwell Automation Level 14 Core F Cyberport 3 100 Cyberport Road Hong Kong Tel 852 2887 4788 Fax 852 2508 1846 Publication 1756 PM010C EN P October 2009 Supersedes Publication 1756 PM010B EN P July 2008 Copyright 2009 Rockwell Automation Inc All rights reserved Printed in the U S A
105. ruction expects arguments for required parameters as listed in the instruction tooltip TIP For help with an instruction select the instruction and then press F1 In Structured Text make sure the cursor is in the blue instruction name Tips for Using an Add On This table describes programming tips for you to reference when using Add On Instructions Instruction Topic Description Instruction Help Use the instruction help to determine how to use the instruction in your code Ladder Rungs In a ladder rung consider if the instruction should be executed on a false rung condition It may improve scan time to not execute it Data Types A data type defined with the Add On Instruction is used for the tag that provides context for the execution from your code A tag must be defined of this Add On Instruction defined type on the call tothe J instruction Indexed Tag You can use an indirect array indexed tag for the Instruction instance One drawback is that you cannot monitor the Add On Instruction by using this as a data context Passing Data e Input and Output parameters are passed by value e InOQut parameters are passed by reference Programmatically Accessa Follow these procedures for any language when you want to access a Parameter an Add On Instruction parameter that isn t available on the instruction face by default Publication 1756 PM010C EN P October 2009 79 Chapter3 Using Add On Instructions The follo
106. s Chapter 4 To use Add On Instructions that have been exported in a separate file without references you must first import any User Defined Data Types of Add On Instructions that the exported instruction references before the import of the referencing instruction can be successful To do this work from the bottom up Import the lowest level User Defined Data Types and any User Defined Data Types that reference them Then import the lowest level Add On Instructions followed by any Add On Instructions that reference those low level Add On Instructions Once all of the items it references are in place the import of the Add On Instruction will succeed Export to a Single File If you manage each Add On Instruction as a standalone you may want to export the instruction and any referenced Add On Instructions or User Defined Data Types into one export file By including any referenced Add On Instructions or User Defined Data Types you also make it easier to preserve the instruction signature of an Add On Instruction Follow these steps to export to a single file and include any referenced items 1 Right click Add On Instruction in Controller Organizer and choose Export Add On Instruction 2 Choose the location to store the L5X file I KK x Save in ao Projects e Aae My Recent Documents E Desktop 9 My Documents PE My Computer K f oe File name Conveyor_Contral nd ss ina Save as type RSLoaix 5000 X
107. se to export each Add On Instruction and User Defined Data Types to separate files without including references Follow these steps to export to separate files 1 Right click the Add On Instruction in the Controller Organizer and choose Export Add On Instruction 2 Select the common location to store the L5X file Export Add On Instruction My Recent Documents Desktop 9 My Documents pe My Computer Bc File name 3 My Network Save as type RSLoaix 5000 XML File L5 7 Cancel Places i J Include all referenced Add On Instructions and User Defined Types Help Mu 3 Type a name for the file 4 Clear Include referenced Add On Instructions and User Defined Types 5 Click Export 6 Follow the above steps to individually export the other shared Add On Instructions and User Defined Data Types Using export in this way lets you manage the shared Add On Instruction and User Defined Data Types independently of the Add On Instructions that reference them One advantage of this is the ability to update the shared component without having to regenerate all the export files for the instructions that reference it That is it is only stored in one file instead of in every file whose instruction references it This can help with the maintenance of the instructions as you only have to update one export file 90 Publication 1756 PM010C EN P October 2009 Import and Export Add On Instruction
108. started or stopped within the FaultTime You must set FaultTime greater than 0 to use the auxiliary contact Otherwise the instruction doesn t use the value of the auxiliary contact To clear the Fault bit turn on the FaultClear bit The instruction doesn t let you enter tags for the Jog AuxContact and FaultClear bits in the LD and ST programming languages You must write code to turn those bits on and off For example In LD use XIC and OTE instructions to read the value of the auxiliary contact tag and write it to the AuxContact bit In ST use an assignment to set the AuxContact bit equal to the value of the auxiliary contact tag 1D 48F181FC Timestamp 2009 07 317 00 14 35 4492 Signature History User 10 Timestamp Description NA selnis 48F181FC 2009 07 31T00 14 35 4492 signature for high integrity Execution see Add On Instruction Scan Modes online Help for more information ondition Description Enableln is true OutCommand turns on when Stop and Start are on OutCommand turns off when Stop turns off Enableln is false OutCommand turns off Fault timer resets Revision v1 0 Notes Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 Language Switching With RSLogix 5000 software version 17 and later you have the option J to display project documentation such as tag descriptions and rung comments in any supported localized language You can store project fj do
109. struction This lets you monitor and troubleshoot the instruction s logic routine with a data context Variable indexed arrays cannot be used to monitor the logic inside an Add On Instruction Publication 1756 PM010C EN P October 2009 55 Chapter 2 Defining Add On Instructions 56 Follow these steps to monitor the logic 1 Go into Run mode 2 Right click the instruction call and choose Open Instruction Logic Stars and stopsa a motor Motor_2_FBD Motor_Starter jum Starts and stop Cut Element Ctrl x otor_2_Stop_PB Den af Stop Copy Element Ctrl C are Motor_2_Jog_PB P Delete Element Del Delete Element but not Tag Add Element Alt Ins Save Instruction Defaults Edit Main Operand Description Go To Ctrl G Instruction Help Fl Never Show Description Open Instruction Logic N Open Instruction Definition v Logic Sim_Dead_ MainRout eo Motor_St al Properties Alt Enter gt The logic routine opens with animated logic for the specific calling instance Verifying Individual Scan Modes The most straightforward method to verify Scan mode operation is to execute the instruction first with the Scan mode routine disabled then again with it enabled Then you can determine whether the Scan mode routine performed as expected Instruction Description True This is simply the execution of the main logic routine False In a ladder logic target routi
110. struction to Manual mode with a 0 output prior to its first execution or to initialize some coefficient values in your Add On Instruction 47 Chapter 2 Defining Add On Instructions 48 When an Add On Instruction executes in Prescan mode any required parameters have their data passed e Values are passed to Input parameters from their arguments in the instruction call e Values are passed out of Output parameters to their arguments defined in the instruction call These values are passed even when the rung condition is false in Ladder Diagram or when the instruction call is in a false conditional statement in Structured Text When Function Block Diagram routines execute the data values are copied to all wired inputs and from all wired outputs whether or not the parameters are required Follow these steps to create a Prescan routine 1 In the Controller Organizer right click an instruction and choose Open Definition 2 Click the Scan Modes tab 3 Click New for Prescan Routine amp Add On Instruction Definition Simulation_DT_ st General Parameters Local Tags Scan Modes Signature Change History Help The controller prescans and postscans the Add On Instruction Logic routine but will not execute the Logic routine when Enableln is false Optional Prescan Postscan and EnablelnFalse routines may be configured below Prescan routine Executes prior to first scan on transition from prog
111. structions sssaaa aaa 33 Local Tags sor kee 4D A PoE EN PES aa O E ED 33 Programming Languages sles boo ka ge Pago halla eg 33 Scan Mode Routines nona anaa 34 MES ena 5 ok SF ES I N S BAAS AE OG 34 Help Documentation nasa etereeny oo ere oes ey 34 Chapter 2 INCOCMCHOM 225 ea4 eee hg eo Wed ae end Cocke Re ek ed OS 35 Create an Add On Instruction 0 00 0000 00005 35 Create PAtaimMClens 4b entea br Bee ey OXY Rate we Pa ESS SDS 37 Create Local Tags 555s oth eh Sainte den inking Re dsh Mnpp ie ay GE Reston de 39 Edit Parameters and Local Tags naana aaa aaa 41 Updates to Arguments Following Parameter Edits 41 Copying Parameter or Local Tag Default Values 43 Create Logic for the Add On Instruction 44 Execution Considerations for Add On Instructions 45 Optimizing Performance ha 9 2 aa gare Fay poe a 45 Defining Operation in Different Scan Modes 45 Enabling Scan Modes i622 foc 06 0 2 cily w Aaa ch gaebaedes 47 Presc n ROUUINES 24 a4 ea erie Ae Rete 47 Postscan Routine 24 3 F423 Gined amc 8 Gb aegt a Be bab ine dome 49 EnableInFalse Routine 4 2039 wk 8 eG bes wales Oa ES 51 Using the EnableIn and EnableOut Parameters 52 EnableIn Parameter and Ladder Diagram 53 EnableIn Parameter and Function Blocks 53 EnableIn Parameter and Structured Text 53 Change the Class of an Add On Instruction
112. ta types for example Axis or MOTION_GROUP To use these type of tags in your Add On Instruction define an InOut Parameter Local tags also are limited to single dimension arrays the same as User Defined Data Types TIP Refer to the GuardLogix Controller Systems Safety Reference Manual publication 1756 RM093 for a list of data types supported for safety instructions 3 Set the default values Default values are loaded from the Add On Instruction definition into the tag of the Add On Instruction data type when it is created or any time a new tag is added to the Add On Instruction Check the box at the bottom of the Add On Instruction TIP D Definition Editor to Copy all default values of parameters and local tags whose values were modified to all tags of this instruction type if you want to update existing invocations of the instruction to the new default values For details on copying default values see Copying Parameter or Local Tag Default Values on page 43 4 Set the display style 5 Type a description a maximum of 512 characters 40 Publication 1756 P M010C EN P October 2009 Defining Add On Instructions Chapter 2 6 Repeat for additional local tags TIP When you create a local tag from the Local Tags tab the External Access setting defaults to None You can edit the External Access setting by using the Tag Editor See Edit Parameters and Local Tags on page 41 Edit Parameters and Local
113. the Add On Instruction Definition Editor click Add to History 2 Type a description up to 512 characters long for the entry 3 Click OK TIP To facilitate record keeping you can copy the entire signature history to the clipboard by selecting all the rows in the signature history and choosing Copy from the Edit menu The data is copied in tab separated value TSV format To delete the signature history click Clear Signature History while the instruction does not have an instruction signature You must be offline to delete the Signature History Publication 1756 PM010C EN P October 2009 61 Chapter2 Defining Add On Instructions Generate a Safety Instruction Signature When a sealed safety Add On Instruction is downloaded for the first time a SIL 3 safety instruction signature is automatically generated Once created the safety instruction signature is compared at every download If RSLogix 5000 software detects an invalid safety instruction signature value it generates a new safety instruction signature value in the offline project and displays a warning indicating that the safety instruction signature was changed The safety instruction signature is deleted if the instruction signature is removed IMPORTANT After testing the safety Add On Instruction and verifying its functionality you must record the instruction signature the safety instruction signature and the timestamp value Recording these values will help you
114. the Start button The motor runs even after you release the Start button The motor stops P3 when you press open the Stop button The run command turns off if there is a fault If on the motor Stop command tor the Start command for didnt start or motor the motor stop Faut RunCommand i RunCommand J Ir The motor starts if the run command is on The motor also starts if the Jog input is on and there isn t a fault Output command to the motor starter If on the motor starts If off the motor stops RunCommand Out 4 ea 2c Jog command for the motor To jog the motor turn on this bit If on the motor To stop the jog didnt start or turn off this bit stop Jog Fault JE It FauttTime is greater than 0 turn on CheckAuxContact This lets the instruction use the auxiliary contact of the motor Time ms to wait for the auxiliary contact to open or close The Faut bit turns on when that time is up ois MOV CheckAuxContact 2 Greater Than A B Move Source A FauttTime Source FautTime 04 o Source B a Dest FaultTimer PRE o4 If CheckAuxContact is on the rung checks for that state of the auxiliary contact The Fault bit turns on if the auxiliary contact doesnt match the commanded state of the motor within FeultTime Auxiliary contact of Output command to the motor the motor starter Make sure you set If on the motor the FeultTime starts Otherwise this If off the motor input doesnt do stops anything
115. tput parameters must be wired and InOut parameters must have an argument tag If a required parameter does not have an argument associated as described above then the routine containing the call to the Add On Instruction will not verify For Output parameters making a parameter visible is useful if you do not usually need to pass the parameter value out to an argument but you do want to display its value prominently for troubleshooting Required parameters are always visible and InOut parameters are always required and visible All Input and Output parameters regardless of being marked as required or visible can be programmatically accessed as a member of the instruction s tag Simulation Instruction in Function Block Visible non required Boolean Output Parameter Sim_DT_FBD Required Input x Simulation_DT_1st ey Parameter ae ee Simulation instruction which includes a Cc Siminput J SimDeadtime Visible _ SimTim eConstant non required DT_Array_FBD Input Parameter Sim Output D p InOut Parameter If you want a pin that is displayed in Function Block but wiring to it is optional set it as Visible Simulation Instruction in Ladder Visible non required Boolean Visible Output Parameter Simulation_DT_1st Simulation instruction which includes a d Simulation_DT_1st Sim_DT_LD Ea Si Siminput non required Input Parameter DTInv o Required Input Visible Para
116. ust specify a tag as its source for input or its destination as output and you do not want this to be optional set the parameter as required Any required parameters are automatically set to visible The Visible setting is always set to visible for InOut parameters All InOut parameters are required When you are using your Add On Instructions the Visible setting may be overridden in Function Block Diagram routines if the parameter is not required or already wired Overriding the visibility at the instruction call does not affect this definition configuration TIP Using Standard and Safety Tags When creating a safety Add On Instruction follow these guidelines for standard and safety tags e Standard tags may not be used as Input Output or InOut parameters of a safety Add On Instruction e Safety tags may be used as Input parameters for standard Add On Instructions Publication 1756 PM010C EN P October 2009 Designing Add On Instructions Chapter 1 Add On Instruction Parameters and Local Tags SafetyAddOnInstruction Scope E Safety dd0 ninstruction EnableOut Output El MNPara InDut Data Access Control In RSLogix 5000 software version 18 and later you can prevent programmatic modification of InOut parameters by designating them as constants You can also configure the type of access you will allow external devices such as an HMI to have to your tag and parameter data You can control access to tag data c
117. ut will not execute the Logic routine when Enableln is false Optional Prescan Postscan and EnablelnFalse routines may be configured below Prescan routine Executes prior to first scan on transition from program to run tine is prese d New Postscan routine Executes on last scan of a step if SFC is configured for automatic reset EnablelnFalse routine Executes when the Enableln parameter is false Copy all default values of parameters and local tags whose values were n Data Type Size 276 byte s Cancer 4 From the Type pull down menu on the New Scan Mode Routine dialog box choose the type of programming language Ladder Diagram Function Block or Structured Text New Scan Mode Routine Mode Postscan Description Ippe Function Block Diagram Instruction Simulation_DT_1st C Open Routine 5 Type a description of the postscan behavior 6 Click OK to create the routine and return to the Scan Modes tab 7 Define if the postscan routine executes or not by checking or clearing Execute Postscan routine after the logic routine is postscanned a Postscan routine Executes on last scan of a step if SFC is configured for automatic reset Execute Postscan routine after the Logic routine is postscanned The Postscan routine can now be edited like any other routine Publication 1756 PM010C EN P October 2009 Defining Add On Instructions Chapter 2 EnablelnFalse Routine When defined a
118. wing procedures demonstrate how to use the Jog parameter of the Motor Starter Add On Instructions Parameters Required Name DataType Usage Description x Motor_Starter Motor_Starter InOut EnableIn BOOL Input EnableOut BOOL Output x Stop BOOL Input Stop command for the motor x Start BOOL Input Start command for the motor Jog command for the motor To jog the motor turn on this bit To stop the jog turn off this bi A Using the Jog Command in Ladder Diagram The first rung sets the Jog bit of Motor_Starter_LD Jog_PB Conveyor Jog command for the motor To jog the motor turn on this bit Pushbutton to jog the conveyor forward To stop the jog turn off this bit Jog_PB Motor_Starter_LD Jog Conveyor jotor_Starter Starts and stops a motor Motor_Starter Motor_Starter_LD Stop Start Out Motor_Out_LD 0e Motor_Starter_LD Jog Motor_Starter tag dot Jog Parameter Use another instruction an assignment or an expression to read or write to the tag name of the parameter Use this format for the tag name of the parameter Add_On_Tag Parameter Where Is Add_On_lag An instance tag defined by the Add On data type Parameter Name of the parameter 80 Publication 1756 PM010C EN P October 2009 Using Add On Instructions Chapter 3 Using the Jog Command In Function Block Diagram Any parameter can be made visible or invisible except thos
119. wn ooo ji Oooo Copy all default values of parameters and local tags whose values were modified to all tags of this instruction type Data Type Size 276 byte s Apply Simulation Example Logic DEDT_01 DEDT p Deadtime ad ml Lead Lag Simulation Input C Deadtime De adtimelnv D StorageAray Time Corstant Sec 10 Sim TimeConstat D Simulation Output SimOutput Dead Time Invalid E SimDTIn n Chapter2 Defining Add On Instructions Ladder Diagram Configuration In this example the instruction simulates a deadtime and lag first order process The Simulation_DT_1st instruction reads the control variable from the PID instruction The PID instruction reads the SimOutput Parameter of the Simulation_DT_1st instruction Simulation instruction which includes a The Simulation DT 1st Se eee first ondor lag instruction reads the control Simulation _DT_1st iable f he PID Simulation instruction which includes a d vanes mom thg Simulation _DT_1st Sim_DT_LD i instruction Siminput My_Control_ariable 00e SimTimeConstant 5 0 SimOutput j i P DAI DT_Array_LD The PID instruction reads the SimOutput Parameter of the Simulation_DT_1st instruction Tieback Control Variable My_Control_ Variable PID Master Loop Inhold Bit Inhold Value Setpoint Process Variable Output Sim_DT_LD SimOutput f Simulation _DT_1st tag
Download Pdf Manuals
Related Search
Related Contents
Owner`s Manual - Northern Tool + Equipment Manual de instrucciones Fujitsu ESPRIMO P5915 (DE) PDF:4397KB ITC-BT-29 Guide de formation du LMD - Projet UQAM PX-435A PX405A PDF - 厚生労働省 Copyright © All rights reserved.
Failed to retrieve file