Home

1756-PM001G-EN-P, Logix5000™ Controllers Common Procedures

image

Contents

1. handshake ASCII Device Controller 1 cD T CD 2 RDX 2 RDX 3 TxD lt 3 TxD 4 DTR SS 4 DTR COMMON COMMON 6 DSR 6 DSR 7 RTS 7 RTS 8 CTS 8 CTS 9 9 42231 do not handshake ASCII Device Controller 1 CD 1 CD 2 RDX 2 RDX 3 TxD lt 3 TxD 4 DTR 4 DTR COMMON COMMON 6 DSR 6 DSR 7 RTS 7 RTS 8 CTS 8 CTS 9 9 42232 3 Attach the cable shield to both connectors 4 Connect the cable to the controller and the ASCII device Publication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 3 Configure the Serial Port 1 Determine the following communication settings for the ASCII device a baud rate b data bits c parity d stop bits 2 Open the RSLogix 5000 project Offline J m RUN se No Forces gt m OK e a m BAT No Edits E 1 0 42627 3 On the Online toolbar click the controller button 4 Click the Serial Port tab o Controller Properties Ascii_examples ioj x Major Faults Minor Faults Date Time Advanced File General Serial Port System Protocol User Protocol 5 Mode Baud Rate fis20 6 Data Bits j m Parity None Stop Bits 1 ba Control Line No Handshake bul Jo Gontnuous Garnie
2. controller tags global data All programs have access to Tag_1 data that is at the controller Tag 2 scope Tag 3 Program_A Program_B program tags program tags local data local data other routines other routines main routine Tag_4 main routine Tag_4 Tag_5 da Tag_5 Tag_6 Tag_6 Data at the program scope is isolated from other programs e Routines cannot access data that is at the program scope of another program e You can re use the tag name of a program scoped tag in multiple programs For example both Program_A and Program_B can have a program tag named Tag_4 Create a Program Each task requires at least one program You can create multiple programs for a task Controller Controller_1 Controller Tags E3 Controller Fault Handler 9 Power Up Handler E Tasks Sal MainTask 2 MainProgram A Program Tags ER MainRoutine 1 In the controller organizer right click the task that will execute the program and choose New Program Publication 1756 PM001G EN P March 2004 Getting Started 1 21 2 gt Name Description 2 In the Name text box type a name for the program 3 Choose Configure a Program Each program requires a main routine The main routine executes whenev
3. Tag Name Value Z sort_table product_id sort_table 0 GH ge sort_table 0 Product_ID ABC sort_table 0 Lane 1 sort_table 1 sort_table 1 Product_ID DEF sort_table 1 Lane 2 sort_table 2 sort_table 2 Product_ID GHI lane sort_table 2 Lane 3 3 To look up a bar code e Create the PRODUCT_INFO Data Type e Search for the Characters e Identify the Lane Number e Reject Bad Characters e Enter the Product IDs and Lane Numbers TIP To copy the above components from a sample project open the RSLogix 5000 Projects Samples folder Open Import Project Look in E3 Samples v i Look_Up_a Bar_Code ACD q Open this project 43039 Publication 1756 PM001G EN P March 2004 To create a new data type Controller Your_Project Tasks Motion Groups Trends Data Types User Defined 7 Right click and choose New Data Type Process ASCII Characters 13 5 Create the PRODUCT_INFO Data Type Create the following user defined data type Data Type PRODUCT_INFO Name Description PRODUCT_INFO Identifies the destination for an item based on an ASCII string of characters that identify the item Members Name Data Type Style Description Product_ID STRING ASCII characters that identify the
4. project controller tags 1 0 data feel Controller_1 global data w Controller Tags system shared data E Controller Fault Handler CI Power Up Handler Tasks task 1 8 MainTask 3 63 MainProgram program A Program Tags ERI MainRoutine E3 Unscheduled Programs 29 Motion Groups CI Trends E Data Types ER User Defined ja Strings H E Predefined program tags local data other routines main routine A Logix5000 controller lets you divide your application into multiple programs each with its own data There is no need to manage conflicting tag names between programs This makes it easier to re use both code and tag names in multiple programs controller tags global data All programs have access to Tag_1 data that is at the controller Tag_2 scope Tag 3 Program_A Program_B program tags program tags local data local data other routines other routines main routine Tag_4 main routine Tag_4 Tag_5 dd Tag_5 Tag_6 Tag_6 Data at the program scope is isolated from other programs e Routines cannot access data that is at the program scope of another program e You can re use the tag nam
5. This executes like this step_l step_1 c tran_1 i return to tran_1 talse step_2 step_3 true 7 tran return to step_1 last scan step_2 step_3 z return to talse true step_2 g step_3 tran_2 Misc return to true return to step_2 last scan step_3 Publication 1756 PM001G EN P March 2004 5 54 Design a Sequential Function Chart This step_1 tran_1 tran_2 step_2 step_3 tran_3 t tran_4 Figure 5 7 Execution of a Selection Branch executes like this input parameters return parameters Publication 1756 PM001G EN P March 2004 step_1 lt n gt faise true tran_2 false return to return to true return to step_1 step_1 last scan step_ 2 e step 3 e m gt faise etun to D faise etem to true true return to return to step_2 step_3 last scan Figure 5 8 When parameters enter and exit an SFC input parameters gt step_1 return to Bere true return parameters return to input parameters step_1 last scan This step_1 step_2 Figure 5 9 Options f
6. DRILL_STATION data m drill 0 part_advance BOOL as Sees data for the drill H Ey drat ype tee a drilf0 hole_position REAL _ arilf depth _ aiilf0 total_depth Eai DRILL_STATION eel DRILL_STATION E drill 3 Publication 1756 PM001G EN P March 2004 gt Monitor Tags DRILL_STATION KI 42583 Organize Tags 3 19 Guidelines for User Defined Data Types When you create a user defined data type keep the following in mind e If you include members that represent I O devices you must use logic to copy the data between the members in the structure and the corresponding I O tags Refer to Buffer I O on page 2 8 e If you include an array as a member limit the array to a single dimension Multi dimension arrays are not permitted in a user defined data type e When you use the BOOL SINT or INT data types place members that use the same data type in sequence more efficient less efficient BOOL BOOL BOOL DINT BOOL BOOL DINT DINT DINT BOOL Create a User Defined Data Type ey Controller example Controller Tags CI Controller Fault Handler CI Power Up Handler E Tasks 3 48 MainTask 3 63 MainProgram A Program Tags MainFoutine 9 Unscheduled Programs CI Trends a Data Types ER User Defined lt d 1 1 Right click User Def
7. This is a tag that uses the Timer structure data type This is a tag that uses an array of the Timer data type Tag Name Data Type Tag Name Data Type Timer 1 TIMER Timers TIMER 3 Timer_1 PRE DINT Timer 0 TIMER Timer_1 ACC DINT Timer 1 TIMER Timer_1 EN BOOL Timer 2 TIMER Timer_1 1T BOOL Timer_1 DN BOOL EXAMPLE Single dimension array In this example a single timer instruction times the duration of several steps Each step requires a different preset value Because all the values are the same data type DINTs an array is used lo expand an array and y display its elements click Program Tags MainProgram the sign Scope MainProgram Show Show All aif Ete T Tag Name z Alias For Base Tag Type tanks TANK 3 3 p To collapse an array and timer_presets DINT 6 This array contains six hide its elements click timer_presets 0 DINT elements of the DINT the sign data type timer_presets 1 J DINT DETA T elements of i H timer_presets 2 cu six DINTs timer_presets EHtimer_presets 3 DINT timer_presets 4 DINT H timer_presets 5 DINT WIA Monitor Tags Edit Tags 4 42367 Publication 1756 PM001G EN P March 2004 Two dimension array Organize Tags 3 15 A drill machine can drill one to five holes in a book The machine requires a value for t
8. Type Code Cause Recovery Method 4 4 An arithmetic overflow occurred in an instruction Fix program by examining arithmetic operations order or adjusting values 4 5 In a GSV SSV instruction the specified instance was Check the instance name not found 4 6 In a GSV SSV instruction either Check the Class name and Attribute name e specified Class name is not supported e specified Attribute name is not valid 4 7 The GSV SSV destination tag was too small to hold all Fix the destination so it has enough space of the data 4 35 PID delta time lt 0 Adjust the PID delta time so that it is gt 0 4 36 PID setpoint out of range Adjust the setpoint so that it is within range 4 51 The LEN value of the string tag is greater than the DATA 1 Check that no instruction is writing to the LEN size of the string tag member of the string tag 2 In the LEN value enter the number of characters that the string contains 4 52 The output string is larger than the destination Create a new string data type that is large enough for the output string Use the new string data type as the data type for the destination 4 53 The output number is beyond the limits of the Either destination data type e Reduce the size of the ASCII value e Use a larger data type for the destination 4 56 The Start or Quantity value is invalid 1 Check that the Start value is between 1 and the DATA size of the Source 2 Check that
9. make a separate sheet for each valve sequential function chart SFC Break the SFC into steps routine step step step To perform the following sequence 1 Fill a tank 2 Mix the ingredients in the tank 3 Empty the tank make each section fill mix empty a separate step Publication 1756 PM001G EN P March 2004 1 10 Getting Started Create a Routine Each program requires at least one routine Use a routine to execute your logic in a specific programming language I Controller Controller_1 Controller Tags E3 Controller Fault Handler 9 Power Up Handler E Tasks Al MainTask E3 MainProgram Program Tags ER MainRoutine 3 Unscheduled Programs 1 In the controller organizer right click the program that will execute the routine and choose New Routine 2 p Name Description 3 gt Type A Sequential Function Chart 2 In the Name text box type a name for the routine 3 From the Type list choose the programming language for the routine 4 Choose Publication 1756 PM001G EN P March 2004 Getting Started 1 11 Open a Routine To open a folder and show its contents either e Double click the folder e Click the sign Controller Controller_Name Tasks B E MainT
10. Init_Done compressor_1 Device1State on 1 and EXAMPLE o oo package_done on 1 and carton_size 8 a Package the product When the product is in the package the package_done bit turns on b Pack the product either 8 per carton or 16 per carton Solution Pac age carton_8 _ Pack_8 Pack_16 carton_16 E package_done on 1 and carton_size 16 To override the state of a transition see Force Logic Elements on page 14 1 Publication 1756 PM001G EN P March 2004 5 26 Design a Sequential Function Chart Transition Tag Each transition uses a BOOL tag to represent the true or false state of the transition If the transition is The value is And true 1 The SFC goes to the next step false 0 The SFC continues to execute the current step How Do You Want to Program the Transition To program the transition you have these options If you want to Then enter the conditions as an expression in Use a BOOL Expression structured text enter the conditions as instructions in Call a Subroutine another routine use the same logic for multiple transitions Use a BOOL Expression The simplest way to program the transition is to enter the conditions as a BOOL expression in structured text A BOOL expression uses bool tags relational operators and logical operator
11. If Then Yes Go to step 1 No Go to Import the RSLogix5000Security bak File on page 18 15 Keys ini SetSecKeys exe 1 Run this file 3 Select the RSLogix 5000 check box gt and choose OK Publication 1756 PM001G EN P March 2004 Where Is the language language of your software For example for software that is in English open the ENU folder version version of your software such as v10 The Locate Project File dialog box opens By default the Keys ini file should already be selected 2 Choose Open Checked Security On IF i 43073 Secure a Project 18 15 Import the RSLogix5000Security bak File The RSLogix5000Security bak file provides the configuration that Security Server requires to operate with RSLogix 5000 software 1 Start the Security Configuration explorer 2 From the File menu choose Import Database 3 Which revision of Security Server software are you using If Then 2 00 Look in this folder Program Files Rockwell Software RSLogix 5000 language Z version Security Where Is the language language of your software For example for software that is in English open the ENU folder version version of your software such as v10 2 01 Look in this folder Program Files Rockwell Softwar
12. ad EM weight_re 42810 Publication 1756 PM001G EN P March 2004 Process ASCII Characters 13 13 6 Go to step 11 7 Enter the following rung STOD String To DINT Source if Ti Dest 42810 8 Enter the EM bit of the ARD or ARL instruction that read the value 9 Enter the string tag that contains the value 10 Enter a tag name to store the value for use in your application Define the data type as DINT EXAMPLE When MV_read EM is on the STOD instruction converts the first set of numeric characters in MV_msg to an integer value The instruction skips the initial control character 06 and stops at the delimiter STOD String To DINT Source MY msg 0632441 241 r Dest M _msq_nmbr 324 M _ read EM 42620 11 Does this string have another value that you want to use If Then yes Go to Decode an ASCII Message on page 13 14 no Stop You are done with this procedure Publication 1756 PM001G EN P March 2004 13 14 Process ASCII Characters Decode an ASCII Message If the string has more than one value Use the following steps to extract and convert a value from an ASCII message that contains multiple values For example a message may look like this first value second value third value Ctrl F message F key F key action CR control character delimiter delimiter termination character
13. Move Source Dest array_transfer_timer ACC MOV 0 array_transfer_ time 0 array transfer timer Dest Length array_packet 0 123 GRT Greater Than A gt B Source A array_transfer_time 0 Source B array_transfer_time_max 0 RED COP MOV CLR Copy File Move Clear Source array array_offset Source array_offset Dest array_packet 124 0 Dest array packet 123 o 0 If the current transfer time is greater than the maximum transfer time updates the maximum transfer time This maintains a record of the longest time to transfer data Publication 1756 PM001G EN P March 2004 MOV Move Source array transfer time 0 Dest array _transfer_time_max 0 42355 10 11 12 Produce a Large Array 11 5 Open the RSLogix 5000 project that will consume the array In the Controller Tags folder create the following tags P Tag Name Type Vv array_ack DINT 2 array_packet DINT 125 where array is the name for the data that you are sending Use the same name as in the producing controller step 2 Convert array_packet to a consumed tag For Specify Controller name of the controller that is sending the packet Remote Tag Name array_packet Both controllers use the same name for this shared data Refer to Consume Data That Is Produced by Another C
14. take effect solid 1 0 forces are enabled active When you install add a force it immediately takes effect 2 Open the routine that contains the tag that you want to force 3 Right click the tag and choose Monitor If necessary expand the tag to show the value that you want to force e g BOOL value of a DINT tag 4 Install the force value To force a Do this BOOL value Right click the tag and choose Force ON or Force OFF non BOOL value In the Force Mask column for the tag type the value to which you want to force the tag Then press the Enter key 5 Are I O forces enabled See step 1 If Then no From the Logic menu choose 0 Forcing gt Enable All I O Forces Then choose Yes to confirm yes Stop Publication 1756 PM001G EN P March 2004 When to Use Step Through Step Through a Transition or a Force of a Path When to Use an SFC Force Force Logic Elements 14 9 To override a false transition one time and go from an active step to the next step use the Step Through option With the Step Through option e You do not have to add enable disable or remove forces e The next time the SFC reaches the transition it executes according to the conditions of the transition This option also lets you override one time the false force of a simultaneous path When you step through the force the SFC executes the steps of the path To step through the transition of an active
15. 5058 AMS Source B gate 1 5058 AMS 42808 7 Do you want to check another part of the bar code If Then yes Go to Extract a Part of a Bar Code on page 13 2 no Stop You are done with this procedure Publication 1756 PM001G EN P March 2004 13 12 Process ASCII Characters Convert a Value Use the following steps to convert the ASCII representation of a value to an DINT or REAL value that you can use in your application e The STOD and STOR instructions skip any initial control or non numeric characters except the minus sign in front of a number e If the string contains multiple groups of numbers that are separated by delimiters e g the STOD and STOR instructions convert only the first group of numbers Steps 1 Which type of number is the value If Then floating point Go to step 2 integer Go to step 7 2 Enter the following rung STOR String to Real Source 42810 3 Enter the EM bit of the ARD or ARL instruction that read the value 4 Enter the string tag that contains the value 5 Enter a tag name to store the value for use in your application Define the data type as REAL EXAMPLE After reading the weight from the scale weight_read EM is on the STOR instruction converts the numeric characters in weight_ascii to a REAL value and stores the result in weight STOR String to Real Source weight_ascil 428 259 Dest weight 428 259
16. DINT_Array 1 Word 3 INT_Buffer 2 DINT_Array 2 1 The Message MSG instruction reads 16 bit integers INTs from the device and stores them in a temporary array of INTs 2 An File Arith Logical FAL instruction converts the INTs to DINTs for use by other instructions in your project DINTs fromthe Buffer of INTs Data forthe project device DINT_Array 0 INT Buffer 0 Word 1 DINT_Array 1 INT Buffer 1 Word 2 DINT_Array 2 INT Buffer 2 Word 3 1 An FAL instruction converts the DINTs from the Logix5000 controller to INTs 2 The MSG instruction writes the INTs from the temporary array to the device Communicate with Other Devices 10 29 EXAMPLE Read integer values from a PLC 5 controller If Condition_1 1 And Msg_1 EN 0 MSG instruction is not already enabled then Read 3 integers from the PLC 5 controller and store them in INT_Buffer 3 INTs a Condition_1 a EN If Msg_1 DN 1 MSG instruction has read the data then MSG Type PLC5 Typed Read Message Control Msg 1 al ap Reset the FAL instruction The FAL instruction sets DINT_Array INT_Buffer This converts the values to 32 bit integers DINTs i o aaou DN Control_1 AL File Arith Logical Control Control_1 Length 3e Position 0e Mode ALL Dest DINT_Array Control_1 P0S 0 Expression INT_Buffer Control_1 P0
17. Yes For the task that is configured for automatic No For the task that you are configuring output processing does it execute P enable automatic output processing frequently continuously For this flow chart a task executes frequently if For the task that you are configuring its interval time elapsed time between triggers is lt the RPI of the I O modules in your Yes 1 Disable automatic output system processing 2 Use an IOT instruction to update each output module that it effects Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 15 Manually Configure Output Processing Fj Controller Controller_1 Controller Tags 9 Controller Fault Handler 9 Power Up Handler 3 6 Tasks al MainTask 4 a MainProgram Program Tags Ba MainRoutine 1 In the controller organizer right click the task and choose Properties 2 Click the Configuration tab METE General Configuration Program Schedule Monitor Type Peiodce H Period oOo Priority fi 0 Lower Number Yields Higher Priority Watchdog 500 000 ms 3 gt I Disable Automatic Output Processing To Reduce Task Overhead 3 Configure output processing for the task If you want to Then enable the processing of outputs at the Clear uncheck the Disable Automatic Output Processing To Reduce end of the task Task Overhead check box default disabl
18. CSW 42361 4 Note the name of the export file roject_name Tags 5 Select the scope of tags to export If you select Program Tags select the program tags to export 6 Click Export Publication 1756 PM001G EN P March 2004 3 12 Organize Tags Publication 1756 PM001G EN P March 2004 Edit the Export File 1 In Microsoft Excel software open the export file TYPE SCOPE NAME DESCRIPTION DATATYPE TAG in_cycle DINT TYPE SCOPE NAME DESCRIPTION DATATYPE TAG MainProgram conveyor_alarm BOOL TAG MainProgram conveyor_on BOOL TAG MainProgram drill_1 DRILL_STATION TAG MainProgram hole_position REAL 6 6 TAG MainProgram machine_on BOOL 2 3 4 5 2 Enter TAG 3 Identify the scope of the tag If the scope is controller Then Leave this cell empty program Enter the name of the program Enter the name of the tag Enter the data type of the tag Repeat steps 2 to 5 for each additional tag 7 Save and close the file Keep it as a CSV format Import the New Tags 1 In the RSLogix 5000 software from the Tools menu select Import Tags 2 Select the file that contains the tags and click Import The tags import into the project The lower section of the RSLogix 5000 window displays the results Organize Tags 3 13 Create an Array Logix5000 controllers also let you use arrays to organize data Term Definition array
19. tells the controller to clear Sugar Inlet whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction Example 4 IF THEN ELSIF ELSE If you want this If tank temperature gt 100 then pump slow If tank temperature gt 200 then pump fast otherwise pump off END_IF pump fast ELSIF tank temp gt 100 THEN pump fast ELSE Enter this structured text IF tank temp gt 200 THEN 1 pump slow 0 pump off 0 0 pump slow 1 pump off 0 pump fast 0 pump slow 0 pump off 1 Publication 1756 PM001G EN P March 2004 7 16 Program Structured Text CASE OF Use CASE to select what to do based on a numerical value Operands CASE numeric_expression OF selectorl statement selectorN statement ELSE statement END CASE Structured Text Operand Enter Type Format numeric SINT tag tag or expression that evaluates to a expression INT expression DINT REAL number numeric expression selector SINT immediate INT DINT REAL same type as numeric expression IMPORTANT If you use REAL values use a range of values for a selector because a REAL value is more likely to be within a range of values than an exact match
20. 1 Determine where to start And Then This is the first value Go to Convert a Value on page 13 12 This is not the value Go to step 2 string has only one value Rung A Find and Convert a Floating Point Value Rung B Find and Convert an Integer Value Publication 1756 PM001G EN P March 2004 p gt Go to Convert a Value on page 13 12 2 Which type of number is the value If Then floating point Enter Rung A Find and Convert a Floating Point Value integer Enter Rung B Find and Convert an Integer Value IND MID STOR Find String Middle String String to Real Source Source Source Search Dest Oy Start Result IND MID STOD Find String Middle String String To DINT Source Source Source Dest 7 Search Oty l Start Result 42810 42810 Process ASCII Characters 13 15 MID Middle String Source Oty Start IND Find String Source Search Start Result Dest 42810 3 Enter the EM bit of the ARL instruction that read the value 4 Enter the string tag that contains the value 5 Enter a tag name to store the delimiter that marks the beginning of the value Define the data type as a string 6 Double click the value area of Search fy String Browser x f4 T Position 0 Count 0 of 82 Enos gt 42615 7 Type the delimiter and choose OK 8 Enter
21. A 2 Manage Multiple Messages Message Manager Logic Initialize the Logic If S FS 1 first scan then initialize the MSGs Msg_Group 0 which disables all the MSGs Msg_Group 0 1 which enables the first group of MSGs S FS CLR Msq_Group 0 Clear Dest Msg_Group 2 0000_0000_0000_0000_0000_0000_0000_0000 Restart the Sequence If Required If the MSGs in group 2 last group are currently enabled Msg_Group 2 1 And Msg_4 is done or errored And Msg_5 is done or errored Then restart the sequence of MSGs with the first group Msg_Group 2 0 This disables the last group of MSGs Msg_Group 0 1 This enables the first group of MSGs Meg _Group 2 Meq_4 DN Meg _5 0M Meg _Group 2 Msq_Group 0 1 Meg 4 ER Meg 5 ER Send the First Group of MSGs If Msg_Group 0 changes from 0 gt 1 then Send Msg_0 Send Msg_1 Because a MSG instruction is a transitional instruction it executes only when its rung condition in changes from false to true Msq_Group 0 MSG 2 Type CIP Data Table Read Message Control Msg 0 EJ F gt Msq_Group 0 MSG 3 Type CIP Data Table Read Message Control Msq_1 17 Publication 1756 PM001G EN P March 2004 Manage Multiple Messages A 3 Enable the Next Group of MSGs If the MSGs in group 0 are currently enabled Msg_Group 0 1 And Msg_0 is done or errored And Msg_1 is done or errored Then Msg_Group 0 0 This disables the current group of MSGs Msg
22. E Used 28 476 bytes E Used 25 992 bytes 7 tas Used 28 476 bytes Max Used 25 992 bytes Largest Block Free 200 900 bytes Largest Block Free 793 208 bytes 5 Estimate the amount of controller memory Reset Alli ay Estimate Publication 1756 PM001G EN P March 2004 Determine Controller Memory Information 19 3 View Run Time Memory When online with a controller the Memory tab shows the actual Information memory usage of the controller While the controller is running it uses additional memory for communication The amount it needs varies depending on the state of the communication The Memory tab of the controller includes a Max Used entry for each type of memory The Max Used values show the peak of memory usage as communications occur Rem Run E E Run Mode No Forces gt M Controller OK E Battery Fault No Edits F 1 0 Not Present Redundancy Dat 1 Click the controller properties button 2 Click the Memory tab fs Controller Properties MyController_1 4 Oj x Major Faults Minor Faults Date Time Advanced SFC Execution General Serial Port System Protocol er Protocol File Redundancy Nonvolatile Memory Memory Memory Option 1756 15574 1756 M14 A v 1 0 Memory Data and Logic Memory 3 View the memory information F Total 229 376 bytes x Total 3 702 784 bytes ii C Free 200 900 bytes O Free 3 676 376 bytes E Used 28 476 bytes E Used 26 408 byte
23. Name of data type TANK Member Name Data Type temp REAL deadband REAL step DINT step_time TIMER preset DINT 6 mix BOOL An array that is based on this data type would look like this Program Tags MainProgram Scope MainProgram Show Show All al Sort Tag Name Alias For gt i xa F y te en ons first recipe gt 0 TANK three elements of the E E dia ae TANK data type a e tecipe 0 deadband REAL E recipe 0 step t En recipe 0 step_time _ HF recipe 0 preset DNG ecipe 0 mix array of recipes members of the recipe 42368 Publication 1756 PM001G EN P March 2004 3 18 Organize Tags EXAMPLE User defined data type that stores the data that is required to run a machine Because several drill stations require the following mix of data a user defined data type is created Name of data type DRILL_STATION Member Name Data Type part_advance BOOL hole_sequence CONTROL type DINT hole_position REAL depth REAL total_depth REAL An array that is based on this data type would look like this Program Tags MainProgram array of drills Scope MainProgram Show Show All Tag Name p y Base Tag Type DRILL_STATION 4 This array contains first drill gt drill dril 0 DRILL_STATION four elements of the
24. Program a Sequential Function Chart on page 6 1 single horizontal lt q line each path has its own transition oa e do this OR this OR this This path skips the structure does nothing single horizontal lt q line For a detailed diagram of the execution of a selection branch see Figure 5 7 on page 5 54 To override the state of a transition see Force Logic Elements on page 14 1 Publication 1756 PM001G EN P March 2004 5 16 Design a Sequential Function Chart Simultaneous Branch A simultaneous branch represents paths steps or group of steps that occur at the same time Gi e an AND structure e All paths execute e All paths must finish before continuing with the SFC e The SFC checks the transition after the last step of each path has executed at least once one transition for all paths p double horizontal do this AND this AND this line Y Y Y lt g double horizontal line For a detailed diagram of the execution of a simultaneous branch see Figure 5 6 on page 5 53 To override the branch and prevent a path from executing see Force Logic Elements on page 14 1 Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 17 Wire to a Previous Step In addition t
25. To automatically turn off clear devices at the end of a step 1 In the Last Scan of Active Steps property choose the Automatic reset option 2 To turn off a device at the end of the step control the state of the device with an assignment or instruction such as e assignment non retentive assignment e Output Energize OTE instruction in a subroutine During the last scan of each step the Automatic reset option does the following e execute P and PO actions according to their logic conditions e clear tags to the left of assignments e execute a postscan of embedded structured text e execute a postscan of any subroutine that an action calls via a Jump to Subroutine JSR instruction e reset any nested SFC SFC that an action calls as a subroutine IMPORTANT The postscan of an action actually occurs when the action goes from active to inactive Depending on the qualifier of the action the postscan could occur before or after the last scan of the step As a general rule the postscan executes instructions as if all conditions are false For example the Output Energize OTE instruction clears its data during postscan Some instructions do not follow the general rule during postscan For a description of how a specific instruction executes during postscan see the following manuals e Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 e Logix5000 Controllers Process
26. 3 On the Online toolbar click the controller properties button 4 Click the Nonvolatile Memory tab Publication 1756 PM001G EN P March 2004 17 10 Store and Load a Project Using Nonvolatile Memory 42865 5 Choose Load Store Project that is currently in the nonvolatile memory of the Project that is currently in the user memory RAM of the controller controller if any project is there On Power Up Run Remote Only 6 Choose when under what conditions to load the project back into the user memory RAM of the controller 7 In step 6 which load image option did you select If Then On Power Up Select the mode that you want the controller to go to after a load On Corrupt Memory e remote program e remote run To go to this mode after a load turn the keyswitch of the controller to the REM position User Initiated Go to step 8 8 Type a note that describes the project that you are storing if desired Publication 1756 PM001G EN P March 2004 Store and Load a Project Using Nonvolatile Memory 17 11 Store the Project 1 Choose lt Store A dialog box asks you to confirm the store 2 To store the project choose Yes During the store the following events occur e On the front of the controller the OK LED displays the following sequence flashing green gt solid red gt solid green e RSLogix 5000 software goes offline e A dialog box tells you that the store is in
27. By String Browser message_config 1 message_config 1 A message_config 1 RemoteElement ba Position 0 int O of 82 lt lt Eros gt Type the tag name or address of the data in the other controller Publication 1756 PM001G EN P March 2004 B 8 Send a Message to Multiple Controllers 4 Enter the path and remote element for each additional controller Tag Name Value message_config R message_config 0 Ll message_config 0 Path message_config 0 RemoteElement message_config 1 T message_configl1 Path lt q lt message_config 1 RemoteElement q Get the Size of the Local 1 The SIZE instruction local_array 2 The SIZE instruction Array SIZE Size in Elements Source local_array 0 0 Dim To Yar 0 Size local_array_length pe counts the number of elements in counts the number of elements in Dimension 0 of the array In this case that is the only dimension 3 Local_array_length stores the size number of elements of local_array This value tells a subsequent rung when the message has been sent to all the controllers and to start with the first controller again Tag Name Type local_array_length DINT Publication 1756 PM001G EN P March 2004 message EN H Send a Message to Multipl
28. If a MSG instruction uses a connection you have the option to leave the connection open cache or close the connection when the message is done transmitting If you Then Cache the connection The connection stays open after the MSG instruction is done This optimizes execution time Opening a connection each time the message executes increases execution time Do not cache the The connection closes after the MSG instruction is done This connection frees up that connection for other uses The controller has the following limits on the number of connections that you can cache If you have this software Then you can cache and firmware revision 11 x or earlier e block transfer messages for up to 16 connections e other types of messages for up to 16 connections 12 x or later up to 32 connections Publication 1756 P M001G EN P March 2004 If the MSG instructions are to different devices Glossary 9 If several messages go to the same device the messages may be able to share a connection same device And they are Then p gt Each MSG instruction uses 1 connection enabled at the same time Each MSG instruction uses 1 connection NOT enabled at the same time The MSG instructions share the connection l e Together they count as 1 connection EXAMPLE Share a Connection If the controller alternates between sending a block transfer read message and a block transfer write message to the
29. Publication 1756 PM001G EN P March 2004 10 Index output processing 4 13 overlap 4 9 overview 1 4 priority 4 5 programmatically check for overlap 4 11 programmatically configure output processing 4 16 scan time 1 29 trigger via EVENT instruction 4 50 watchdog time 1 31 test a fault routine 15 12 test mode 1 16 text box sequential function chart 6 25 show or hide in sequential function chart 6 26 throughput estimate for event task 4 28 timeout define for event task 4 55 transition BOOL expression 5 26 call subroution 6 15 choose program method 5 26 define 5 24 EOT instruction 5 27 force 14 9 14 12 program 6 14 rename 6 14 step through 14 9 use of a subroutine 5 27 trigger axis registration 4 34 axis watch 4 38 choose for event task 4 20 consumed tag 4 42 Publication 1756 PM001G EN P March 2004 EVENT instruction 4 50 module input data 4 22 motion group 4 32 supported by controller 4 21 U unresolved loop function block diagram 9 8 upload 1 12 user protocol configure for ASCII 12 5 user defined data type create 3 19 guidelines 3 19 overview 3 17 V verify project 1 12 routine 6 29 8 17 9 26 W watch point trigger event task 4 38 watchdog time 1 31 weight convert 13 12 WHILE DO 7 22 wire function block diagram 9 5 9 8 9 20 sequential function chart 5 17 6 write ASCII characters 12 14 How Are We Doing ANE Your comments on our technical publications will help us serve you be
30. Use this format Use logical operators Program Structured Text 7 9 Logical operators let you check if multiple conditions are true or false The result of a logical operation is a BOOL value lf the comparison is true The result is false Use the following logical operators For Use this operator Data Type logical AND amp AND BOOL logical OR OR BOOL logical exclusive OR XOR BOOL logical complement NOT BOOL For example Example For this situation You d write BOOLtag If photoeye is a BOOL tag and your specification IF photoeye THEN says If photoeye_7is on then NOT BOOLtag If photoeye is a BOOL tag and your specification IF NOT photoeye THEN says If photoeye is off then expression1l amp expression2 If photoeye is a BOOL tag temp is a DINT tag IF photoeye amp temp lt 100 and your specification says If photoeyeison THEN and temp is less than 100 then expression1 OR expression2 If photoeye is a BOOL tag temp is a DINT tag IF photoeye OR temp lt 100 and your specification says If photoeye is on or temp is less than 100 then THEN expression1 XOR expression2 If photoeye and photoeye2 are BOOL tags and your specification says If e photoeyel is on while photoeye2 is off or e photoeyel is off while photoeye2 is on then IF photoeyel XOR photoeye2 THEN BOOLtag expressio
31. axis position Publication 1756 PM001G EN P March 2004 For this Manage Multiple Tasks 4 35 Checklist for an Axis Registration Task Make sure you Q 1 Registration input Arm the registration input MAR instruction This lets the axis detect the registration input and trigger the event task e Initially arm the registration input to detect the first trigger condition e Re arm the registration input after each execution of the event task e Re arm the registration input fast enough to detect each trigger condition If your normal logic is Then fast enough to re arm the registration input Arm the registration input within between intervals of the trigger condition your normal logic if desired E g Your normal logic always completes at least 2 scans between registration inputs not fast enough to re arm the registration input Arm the registration input within the event task Q 2 Task priority Configure the event task as the highest priority task If a periodic task has a higher priority the event task may have to wait until the periodic task is done Q 3 Number of event tasks Limit the number of event tasks Each additional task reduces the processing time that is available for other tasks This could cause an overlap m 4 Automatic Output Processing For an event task you can typically disable automatic output processing default This reduces the elapsed time of the task To verify
32. boolean or bit based operations complex logical operations message and communication processing machine interlocking operations that service or maintenance personnel may have to interpret in order to troubleshoot the machine or process continuous process and drive control function block diagram loop control calculations in circuit flow high level management of multiple operations sequential function chart SFC repetitive sequences of operations batch process motion control using structured text state machine operations complex mathematical operations structured text specialized array or table loop processing ASCII string handling or protocol processing Publication 1756 PM001G EN P March 2004 If a routine uses this language ladder logic structured text Getting Started 1 9 Divide Each Routine Into More Meaningful Increments Then Break up large routines into several smaller routines Example To continuously execute several complex boolean operations routine create a separate routine for each operation function block diagram To control 4 valves where each valve FBD requires feedback that it is in its routine commanded position Within the FBD routine make a sheet for each functional loop for a device motor valve etc S sheet
33. e t increments again only after the action goes inactive and then active again e The count resets only if you configure the SFC to restart at the initial step With that configuration it resets when the controller changes from program mode to run mode use one tag for the various Status DINT For this member Use this bit status bits of this action 0 30 A 31 Describe Each Action in Pseudocode To organize the logic for an action first describe the action in pseudocode If you are unfamiliar with pseudocode follow these guidelines e Use a series of short statements that describe exactly what should happen Publication 1756 PM001G EN P March 2004 5 22 Design a Sequential Function Chart e Use terms or symbols such as if then otherwise until and or 5 gt lt e Sequence the statements in the order that they should execute e If necessary name the conditions to check first when Ist and then the action to take second what 2nd Enter the pseudocode into the body of the action After you enter the pseudocode you can e Refine the pseudocode so it executes as structured text e Use the pseudocode to design your logic and leave the pseudocode as comments Since all structured text comments download to the controller your pseudocode is always available as documentation for the action To convert the pseudocode to structured text comments add the following comment symbols For a comment Use one o
34. i 42235 Enter 0 Enter a tag name for the ABL instruction and define the data type as SERIAL_PORT_CONTROL Enter the EN bit of the ABL tag The tag from step 16 Enter the following rung 21 20 ASCII Read Line Channel Destination SerialPort Control SerialPort Control Length Characters Read Ai 22 23 42235 Enter the FD bit of the ABL tag The tag from step 16 Enter 0 Enter a tag name to store the ASCII characters Define the data type as a string Enter a tag name for the ARL instruction and define the data type as SERIAL_PORT_CONTROL Enter 0 This lets the instruction set the SerialPort Control Length equal to the size of the Destination Communicate with an ASCII Device 12 13 EXAMPLE Continuously tests the buffer for a message from the MessageView terminal e Since each message ends in a carriage return 0D the carriage return is configured as the termination character in the Controller Properties dialog box User Protocol tab e When the ABL finds a carriage return its sets the FD bit MV_line EN ABL ASCII Test For Buffer Line EN Channel 0 DN gt SerialPort Control MV_line ER gt Character Count 0 When the ABL instruction finds the carriage return MV_line FD is set the controller removes the characters from the buffer up to and including the carriage return and places them in the MV_msg tag MV_line FD ARL ASCII Read Line EN
35. 18 19 MID Middle String Source STOD String To DINT Source Dest Oty 4 42809 Start Dest Enter the tag that stores the value The tag from step 13 Enter a tag name to store the value for use in your application Define the data type as DINT Does the string have another value that you want to use If Then yes A Add 1 to the Result of the Find instruction The tag from step 9 B Repeat steps 2 19 no Stop You are done with this procedure Publication 1756 PM001G EN P March 2004 13 18 Process ASCII Characters Builda String Use the following steps to build a string from variables in your application You can then send the string to an ASCII triggered device such as a MessageView terminal e In this procedure you build a string that contains two variables For example an operator terminal may require a string that looks like this Ctrl F message address CR control character delimiter termination character e If you need to include more variables use additional INSERT or CONCAT instructions e If you need to send a floating point value use a RTOS instruction in place of the DTOS instruction e The final string will not include the termination character When you send the string use an AWA instruction to automatically append the termination character Steps 1 Enter the following rung DTOS IN
36. 3 This EQU instruction checks for a fault of code 20 which means that either an array subscript is too large or a POS or LEN value of a CONTROL structure is invalid 4 This CLR instruction sets to zero the value of the fault type in the major_fault_record tag 5 This CLR instruction sets to zero the value of the fault code in the major_fault_record tag Publication 1756 PM001G EN P March 2004 Handle a Major Fault 15 11 Clear the Fault Enter this rung in the fault routine for the program CPU_scanning Set System Value Class name PROGRAM Instance name THIS Attribute Name MAJORFAULTRECORD Source major_fault_record T ime_Low pe wn 43064 1 During prescan the bits of all OTE instructions are off and this instruction is true Once the controller begins to execute the logic this instruction is always false 2 The SSV instruction writes new values to the MAJORFAULTRECORD attribute of this program 3 The SSV instruction writes the values contained in the major_fault_record tag Since the Type and Code member are set to zero the fault clears and the controller resumes execution Publication 1756 PM001G EN P March 2004 15 12 Handle a Major Fault Test a Fault Routine You can use a JSR instruction to test the fault routine of a program without creating an error i e simulate a fault 1 Create a BOOL tag that you will use to initiate the fault 2 In the main routine
37. 5 In the Priority text box type the priority for the task 6 In the Watchdog text box type the watchdog time for the task 7 Choose Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 55 Define a Timeout Value for an Event Task If you want your event task to automatically execute if the trigger fails to occur within a certain time assign a timeout value to the task When the event task is done its timeout timer begins to increment If the timer reaches its preset value before the event task is triggered the event task automatically executes event task ML Ml timeout value for the task 1 12 timeout timer AL be bit 1 of the status attribute of the TASK object Oe Description O Event task executes Timeout time stops incrementing Event task is done Timeout timer resets and begins incrementing Timeout timer reaches the timeout value Event task automatically executes In the Status attribute of the TASK object bit 1 turns on Assign a Timeout Value to an Event Task To assign a timeout value to an event task Controller Controller_1 Controller Tags E3 Controller Fault Handler CI Power Up Handler E Tasks fa MainTask 4 cS MainProgram A Program Tags ER MainRoutine 1 In the controller organizer right click the event task and choose Properties Public
38. 5 1 Equivalent strings of length two AE and Descriptions and String Editor C4 CB 6 2 String dollar sign Descriptions and String Editor 6 3 String single quote Descriptions and String Editor 6 4 String Line Feed L or 1 Descriptions and String Editor Publication 1756 PM001G EN P March 2004 C 6 1EC61131 3 Compliance Table Feature Feature Description Extensions and Implementation Notes Number Number 6 5 String New line N or n Descriptions and String Editor 6 6 String From Feed page P or p Descriptions and String Editor 6 7 String Carriage return R or r Descriptions and String Editor 6 8 String Tab T or t Descriptions and String Editor 6 9 String double quote Descriptions and String Editor 10 1 BOOL Data Type Tag variable definition 10 2 SINT Data Type Tag variable definition 10 3 INT Data Type Tag variable definition 10 4 DINT Data Type Tag variable definition 10 10 REAL Data Type Tag variable definition 10 12 Time Tag variable definition TIMER Structure 10 16 STRING data type 8 Bits 11 Data type Hierarchy none 12 Direct Derivation from elementary types User Defined data type structures 12 4 Array data types Tag variable definition 12 5 Structured Data types User defined data type structures 13 1 BOOL SINT INT DINT initial value of 0 Tag variable de
39. At the end of step_4 the fan is reset turned off When the SFC jumps back to step_3 the fan remains off Pane turn on the fan p stored step_2 step_3 step_4 turn off the fan reset To turn the fan back on the SFC has to jump back to step_i Publication 1756 PM001G EN P March 2004 5 44 Design a Sequential Function Chart Use One Large Step If you use one large step for multiple functions then use additional logic to sequence the functions One option is to nest an SFC within the large step In the following example a step turns on a fan and then calls another SFC The nested SFC sequences the remaining functions of the step The fan stays on throughout the steps of the nested SFC EXAMPLE Use a Large Step N fan_on fan ProgProgReq fan ProgCommand This action turns on a fan e fan ProgProgReq lets the SFC command the state of the fan e fan ProgCommand turns on the fan li Hm N Nested_SFc JSR SFC 2 0 lt This action calls another SFC The SFC sequences the remaining functions of the step For additional information on how to nest an SFC see Nest an SFC on page 5 49 Publication 1756 PM001G EN P March 2004 End the SFC last_tranistion process_done stop Design a Sequential Function Chart 5 45 Once an SFC completes its last step it does not automatically restart at the fi
40. Automatic reset At the end of the step that calls the nested SFC the nested SFC as a subroutine SFC automatically resets e The nested SFC resets to the initial step e The X bit of the stop element in the nested SFC clears to zero Programmatic reset 1 Use an SFC Reset SFR instruction to restart the SFC Don t scan at the required step 2 Use logic to clear the X bit of the stop element NOT nested i e no SFC calls this gt 1 Use an SFC Reset SFR instruction to restart the SFC SFC as a subroutine Publication 1756 PM001G EN P March 2004 at the required step 2 Use logic to clear the X bit of the stop element Design a Sequential Function Chart 5 47 The following example shows the use of the SFC Reset SFR instruction to restart the SFC and clear the X bit of the stop element EXAMPLE Restart Reset the SFC If SFC_a_stop X on SFC_a is at the stop and SFC_a_reset on time to reset the SFC then for one scan ons 0 on Reset SFC_a to SFC_a_Step_1 SFC_a_stop X 0 SFR SFC_a_stop SFC_a_reset ons 0 SFC_a_stop E _ E ONS SFC Reset SFC Routine Name SFC_a Step Name SFC_a_step_1 SFC_STOP Structure Each stop uses a tag to provide the following information about the stop element If you want to Then check or set Datatype Details this member determine when the SFC is at X BOOL e When the SFC reaches
41. C configuration S status Member Specific data from the I O module depends on what type of data the module can store e For adigital module a Data member usually stores the input or output bit values e For an analog module a Channel member CH usually stores the data for a channel SubMember Specific data related to a Member Bit Specific point on a digital 1 0 module depends on the size of the I O module 0 31 for a 32 point module Publication 1756 PM001G EN P March 2004 2 8 Communicate with 0 Buffer 1 0 When to Buffer 1 0 Buffering is a technique in which logic does not directly reference or manipulate the tags of real I O devices Instead the logic uses a copy of the I O data Buffer I O in the following situations e To prevent an input or output value from changing during the execution of a program I O updates asynchronous to the execution of logic e To copy an input or output tag to a member of a structure or element of an array Buffer 1 0 To buffer I O perform these actions 1 On the rung before the logic for the function s copy or move the data from the required input tags to their corresponding buffer tags 2 In the logic of the function s reference the buffer tags 3 On the rung after the function s copy the data from the buffer tags to the corresponding output tags Publication 1756 PM001G EN P March 2004 Communicate with 0 2 9 The following example copies inputs and
42. CNB in a remote chassis select the most efficient communication format for that chassis Are most of the modules inthe chassis Then select this communication format non diagnostic digital 1 0 modules for the remote CNB module Yes Rack Optimization No None The Rack Optimization format uses an additional 8 bytes for each slot in its chassis Analog modules or modules that are sending or getting diagnostic fuse timestamp or schedule data require direct connections and cannot take advantage of the rack optimized form Selecting None frees up the 8 bytes per slot for other uses such as produced or consumed tags Separate the tag into two or more smaller tags 1 Group the data according to similar update rates For example you could create one tag for data that is critical and another tag for data that is not as critical 2 Assign a different RPI to each tag Create logic to transfer the data in smaller sections packets Refer to Produce a Large Array on page 11 1 Publication 1756 PM001G EN P March 2004 10 14 Communicate with Other Devices Produce a Tag 1 Open the RSLogix 5000 project that contains the tag that you want to produce Controller Controller_1 Controller Tags C Controller Fault Handler aa Power Lp Handler 2 In the controller organizer right click the Controller Tags folder and choose Edit Tags You can produce only controller scoped tags
43. INT _arrayl 5 lower 16 bits of the 32 bit value INT array 6 upper 16 bits of the 32 bit value 1756 L55M16 controllers only amount of additional free INT _array lower 16 bits of the 32 bit value logic Memely ie Hit words INT array 8 upper 16 bits of the 32 bit value total size of I O memory 32 bit words INT_array 11 lower 16 bits of the 32 bit value INT array 12 upper 16 bits of the 32 bit value total size of data and logic memory 32 bit words INT array 13 lower 16 bits of the 32 bit value INT _array 14 upper 16 bits of the 32 bit value 1756 L55M16 controllers only additional logic memory INT_array 15 lower 16 bits of the 32 bit value SE DIEM INT array 6 upper 16 bits of the 32 bit value 1756 L55M16 controllers only largest contiguous block of INT array 19 lower 16 bits of the 32 bit value additional free logic memory 32 bit words INT array 20 upper 16 bits of the 32 bit value largest contiguous block of free 1 0 memory 32 bit words INT _array 23 lower 16 bits of the 32 bit value INT _array 24 upper 16 bits of the 32 bit value largest contiguous block of free data and logic memory INT _array 27 lower 16 bits of the 32 bit value ening INT _array 28 upper 16 bits of the 32 bit value Publication 1756 PM001G EN P March 2004 19 6 Determine Controller Memory Information Convert INTs to a DINT The MSG instruction returns each memory value as two separate INTs e The first INT represents the lower 16
44. On Power U laf aN i p i 4 You replace the CompactFlash card oad Mode Program Revision gt 12 0 5 When you turn on the power both the firmware and project load into the controller The controller remains in program mode 4 1 You want to load a different project into your controller 2 A CompactFlash card contains the desired project 3 With the CompactFlash card installed in the controller you use Load Image User Initiated RSLogix 5000 software to load the project into the controller Load Mode n a Publication 1756 PM001G EN P March 2004 Store and Load a Project Using Nonvolatile Memory 17 9 Store a Project In this task you store a project in the nonvolatile memory of the controller ATTENTION During a store all active servo axes are turned off Before you store a project make sure that this will not cause any unexpected movement of an axis Before you store the project e make all the required edits to the logic e download the project to the controller e schedule your ControlNet networks To store a project Configure the Store Operation Store the Project Save the Online Project Configure the Store Operation 1 Go online with the controller 2 Put the controller in Program mode Rem Program or Program Rem Prog J M Not Running No Forces gt ribose tt No Edits aes 1 0 0K Redundancy H 3 42627
45. The sort_table_search tag controls the FSC instruction which looks through the sort_table array for the bar code characters 5 Although the previous instruction sets the Length of this instruction the software requires an initial value to verify the project 6 The product_id tag contains the bar code characters that identify the item The FSC instruction searches each Product_ID member in the sort_table array until the instruction finds a match to the product_id tag Tag Name Type product_id STRING Publication 1756 PM001G EN P March 2004 13 8 Process ASCII Characters sort_table_search FD Publication 1756 PM001G EN P March 2004 Identify the Lane Number sort_table_search Move Dest 43038 When the FSC instruction finds the product ID within the sort_table array the instruction sets the FD bit When the FSC finds a match the POS member indicates the element number within the sort_table array of the match The corresponding LANE member indicates the lane number of the match Based on the POS value the MOV instruction moves the corresponding lane number into the ane tag The controller uses the value of this tag to route the item Tag Name Type lane DINT After the MOV instruction sets the value of the ane tag the RES instruction resets the FSC instruction so it can search for the next product ID Process ASCII Characters 13 9 Reject Bad C
46. You d write IF temp lt 100 THEN stringtagl operator stringtag2 If bar_code and dest are string tags and your specification says If bar_code equals dest then IF bar_code dest THEN Charl operator char2 To enter an ASCII character directly into the expression enter the decimal value of the character If bar_cod e is a string tag and your specification says If bar_code DATA O equals A then IF bar_code DATA 0 65 THEN bool_tag bool_expressions Publication 1756 PM001G EN P March 2004 If count and length are DINT tags done is a BOOL tag and your specification says If count is greater than or equal to ength you are done counting How Strings Are Evaluated done count gt length The hexadecimal values of the ASCII characters determine if one string is less than or greater than another string e When the two strings are sorted as in a telephone directory the order of the strings determines which one is greater ASCII Characters Hex Codes lab 31 61 62 LA a Tb 31962 z r 4 S e A 4 s a AB 41 42 AB lt B e t p 7 B 42 r a 61 a gt B Y ab 61 62 e Strings are equal if their characters match e Characters are case sensitive Upper case A 41 is not equal to lower case a 61 For the decimal value and hex code of a character see the back cover of this manual
47. and click the rest of the steps that you want to select 2 On the SFC toolbar click the button Publication 1756 PM001G EN P March 2004 6 6 Program a Sequential Function Chart 3 Add the transition that follows the simultaneous branch green dot 4 To wire the simultaneous branch to the transition click the top pin of the transition A and then click the horizontal line of the branch B A green dot shows a valid connection point Create a Selection Branch Start a Selection Branch 1 On the SFC toolbar click the button Then drag the new branch to the desired location 2 To add a path to the branch select click the first transition of the path that is to the left of where you want to add the new path Then click the button Step_001 green dot 3 To wire the selection branch to the preceding step click the bottom pin of the step A and then click the horizontal line of the branch B A green dot shows a valid connection point Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 7 End a Selection Branch 1 Select the last transition of each path in the branch To select the transitions you can either e Click and drag the pointer around the transitions that you want to select e Click the first transition Then press and hold Shift and click the rest of the transitions that you want to select m E Tran _004 Tran _005 Tran_006 2 On
48. configure 1 3 controller organizer 1 4 create 1 1 download 1 14 load from nonvolatile memory 17 7 17 12 nonvolatile memory 17 1 number of tasks 4 4 organize routines 1 7 organize tasks 4 2 protect 18 1 18 13 restrict access 18 13 store in nonvolatile memory 17 9 upload 1 12 verify 1 12 protect project 18 1 18 13 routine 18 1 Q qualifier assign 6 17 choose 5 23 read ASCII characters 12 9 registration trigger event task 4 34 relational operators structured text 7 7 remove force 14 3 14 13 rename action 6 16 functin block 9 23 step 6 11 transition 6 14 REPEAT UNTIL 7 25 requested packet interval 2 2 reset action 5 42 SFC 5 46 reset an SFC 5 49 5 51 restart sequential function chart 5 46 routine as transition 5 27 choose programming language 1 8 configure as main routine 1 21 create 1 10 import ladder logic 8 14 nest within sequential function chart 5 49 open 1 11 Index 7 organize 1 7 overview 1 4 protect 18 1 restrict access 18 1 verify 6 29 8 17 9 26 routine source protection 18 1 RPI See requested packet interval RSI Security Server software 18 13 RSLinx configure 1 13 RSLogix 5000 Source Protection tool 18 1 run mode 1 16 rung condition 8 4 S save 1 12 see also store a project save as 1 12 scan delay function block diagram 9 12 scan time 1 29 scope guidelines 3 7 tag 3 5 security protect a project 18 13 protect a routine 18 1 Security Server software
49. controller RSLogix 5000 software lets you update the firmware of the controller as part of the download sequence ATTENTION When you download a project or update firmware all active servo axes are turned off Before you download a project or update firmware make sure that this will not cause any unexpected movement of an axis IMPORTANT To update the firmware of a controller first install a firmware upgrade kit e An upgrade kit ships on a supplemental CD along with RSLogix 5000 software e To download an upgrade kit go to www ab com Choose Product Support Choose Firmware Updates 1 Open the RSLogix 5000 project that you want to download 2 From the Communications menu choose Who Active 3 Expand the network until you see the controller To expand a network one level do Z Workstation one of the following Linx Gateways Ethernet e Double click the network e Select the network and driver press the gt key communication module e Click the sign backplane controller 4 Select the controller 5 Choose Download Getting Started 1 15 6 Which response did the software give If the software indicates Then Download to the controller Go to step 7 Failed to download to the controller The revision of the Go to step 9 offline project and controller s firmware are
50. e You can use any printable character including carriage return tab and space e Descriptions do not download to the controller They remain in the offline project file e Descriptions have these length limitations For tags you can use up to 120 characters For other objects tasks programs modules etc you can use up to 128 characters dimension Specification of the size of an array Arrays can have as many as three dimensions See array DINT A data type that stores a 32 bit 4 byte signed integer value 2 147 483 648 to 2 147 483 647 In Logix5000 controllers use DINTs for integers e Logix5000 controllers execute more efficiently and use less memory when working with 32 bit integers DINTs instead of 16 bit integers INTs or 8 bit integers SINTs e Typically instructions convert SINT or INT values to an optimal data type usually a DINT or REAL value during execution Because this requires additional time and memory minimize the use of the SINT and INT data types Publication 1756 P M001G EN P March 2004 Glossary 13 direct connection A direct connection is a real time data transfer link between the controller and an I O module The controller maintains and monitors the connection with the I O module Any break in the connection such as a module fault or the removal of a module while under power sets fault bits in the data area associated with the module Module Properties L
51. fa Controller Properties Controller _Name Ioj x General Serial Port System Protocol User Protocol Major Faults Minor Faults Date Time Advanced SFC Execution File Execution Control defaut p f Execute current active steps only Execute until FALSE transition You have the option of letting the SFC execute until it reaches a false transition If several transitions are true at the same time this option reduces the time to get to the desired step Use the Execute until FALSE transition option only when 1 You don t have to update JSR parameters before each step Parameters update only when the SFC returns to the JSR See Pass Parameters on page 5 50 2 A false transition occurs within the watchdog timer for the task If the time that it takes to return to a JSR and complete the rest of the task is greater than the watchdog timer a major fault occurs Publication 1756 PM001G EN P March 2004 Pause or Reset an SFC Execution Diagrams Design a Sequential Function Chart 5 51 For a detailed diagram of the execution of each option see Figure 5 9 on page 5 55 Two optional instructions are available that give you further control over the execution of your SFC If you want to Then use this instruction pause an SFC Pause SFC SFP reset an SFC to a specific step or stop Reset SFC SFR Both instructions are available in the ladder logic and structured text programming languages F
52. fault in the controller Monitor the Health of a Module If you do not configure the major fault to occur you should monitor the module status If a module loses its connection to the controller outputs go to their configured faulted state The controller and other I O modules continue to operate based on old data from the module fal Module Properties Local 4 1756 IB16I 1 1 General Connection Module Info Configuration Backplane Requested Packet Interval RPI ms 0 2 750 0 ms P Inhibit Module If the connection times out continue operation without invoking a major fault on the controller If communication with a module times out the controller produces the following warnings e The I O LED on the front of the controller flashes green e A N shows over the I O configuration folder and over the device s that has timed out e A module fault code is produced which you can access through Module Properties window for the module GSV instruction Publication 1756 PM001G EN P March 2004 If you want to determine if LEDStatus communication has timed out with any Get this attribute Communicate with Other Devices 10 7 To monitor the health of your connections use a Get System Value GSV instruction to monitor the MODULE object for either the controller or a specific module Data Type INT For efficiency Description Specifies the current state of the I O LED on
53. statement 2 statement 3 statement 4 ae yes Exit p gt Tt v rest of the routine To stop the loop before the conditions are true use an EXIT statement Fault type Fault code the construct loops too long 6 1 Example 1 If you want this The WHILE DO loop evaluates its conditions first If the conditions are true the controller then executes the statements within the loop This differs from the REPEAT UNTIL loop because the REPEAT UNTIL loop executes the statements in the construct and then determines if the conditions are true before executing the statements again The statements in a REPEAT UNTIL loop are always executed at least once The statements in a WHILE DO loop might never be executed Enter this structured text pos 0 While pos lt 100 lt gt targetvalue do amp structarray pos value pos pos 2 String tag DATA pos SINT_arrayl pos end_while Publication 1756 PM001G EN P March 2004 7 24 Program Structured Text Example 2 If you want this Move ASCII characters from a SINT array into a string tag In a SINT array each element holds one character Stop when you reach the carriage return 1 Initialize Element_number to 0 2 Count the number of elements in S N7_array array that contains the ASCII characters and store the result in SINT_array_size DINT tag 3 If the character at S NT_arrayfelement_number 13 decim
54. string data type e Quantity in stock of the item DINT data type An array of the above structure contains an element for each different item in your inventory You want to search the array for a specific product use its bar code and determine the quantity that is in stock iF 2 3 Get the size number of items of the Inventory array and store the result in nventory_ tems DINT tag Initialize the position tag to 0 If Barcode matches the ID of an item in the array then a Set the Quantity tag Inventory position Qty This produces the quantity in stock of the item b Stop Barcode is a string tag that stores the bar code of the item for which you are searching For example when position 5 compare Barcode to Inventory 5 D Add 1 to position If position is lt to nventory_ltems 1 repeat 3 and 4 Since element numbers start at 0 the last element is 1 less than the number of elements in the array Otherwise stop Program Structured Text 7 21 Enter this structured text SIZE Inventory 0 Inventory Items For position 0 to Inventory Items 1 do If Barcode Inventory position ID then Quantity Inventory position Qty Exit End_if End for Publication 1756 PM001G EN P March 2004 7 22 Program Structured Text WHILE DO Use the WHILE DO loop to keep doing something as long as certain conditions are true Operands Structured Text WHILE bool_expression DO
55. the Done DN bit turns on and stays on time milliseconds until the step becomes active again As an option enter a numeric expression that calculates the time at runtime DN BOOL When the Timer T reaches the Preset PRE value the Done DN bit turns on and stays on until the step becomes active again flag if a step did not execute LimitLow DINT Enter the time in the LimitLow member milliseconds long enough e If the step goes inactive before the Timer T reaches the LimitLow value the AlarmLow bit turns on e The AlarmLow bit stays on until you reset it e To use this alarm function turn on check the AlarmEnable AlarmEn bit As an option enter a numeric expression that calculates the time at runtime AlarmEn BOOL To use the alarm bits turn on check the AlarmEnable AlarmEn bit AlarmLow BOOL If the step goes inactive before the Timer T reaches the LimitLow Publication 1756 PM001G EN P March 2004 value the AlarmLow bit turns on e The bit stays on until you reset it e To use this alarm function turn on check the AlarmEnable AlarmEn bit Design a Sequential Function Chart 5 9 If you want to Thencheckorset Datatype Details this member flag if a step is executing too LimitHigh DINT Enter the time in the LimitHigh member milliseconds long e Ifthe Timer T reaches the LimitHigh value the AlarmHigh bit turns on e The AlarmHigh bit stays on until you reset it e Touse this alarm
56. 0 module Any break in the connection such as a module fault or the removal of a module while under power sets fault bits in the data area associated with the module Module Properties Local 1756 IB16 2 1 Type 1756 IB16 16 Point 10 31 2 DC Inpu Vendor Allen Bradley Parent Local Name a Description A direct connection is any connection zi that does not use the Rack Optimization Comm Format t Comm Format Input Data rack optimized connection For digital 1 0 modules you can select rack optimized communication A rack optimized connection consolidates connection usage between the controller and all the digital 1 0 modules in the chassis or DIN rail Rather than having individual direct connections for each I O module there is one connection for the entire chassis or DIN rail Module Properties Remote_ENB 1756 IB16 2 1 Type 1756 IB16 16 Point 10 31 2 DC Inpu Vendor Allen Bradley Parent Remote_ENB Name l Description E rack optimized connection t Comm Format Rack Optimization Publication 1756 PM001G EN P March 2004 2 4 Communicate with 0 Ownership In a Logix5000 system modules multicast data This means that multiple devices can receive the same data at the same time from a single device When you choose a communication format you have to choose whether to establish an owner or listen only relationship with the module owner contro
57. 13 Export Import Ladder Logic i542 nan ead ena eeeomine 8 14 When You Import RUNS e226 tS ok g 2 Gals doe ns 8 14 EXPO RUNES sees aye Aah pa oe eS 8 15 TIMPO RUNES oo peio os ia bere aa ee eae 8 16 Cheek Aliis TAOS pot br betaine cee Se eet ON edad deg ME i 8 16 Verify the ROWING soo Aa eee RES eee 8 17 Chapter 9 When to Use This Procedures 0x4 goa eile PL Puce Pee KG 9 1 Before You Use This Procedures paso 80 4 oo ye Hed 9 1 How to Use This Procedure eta g not lt iw amp pce wate dud Babys 9 1 Identify the Sheets for the Routine Vac vac s cake ie he 9 2 Communicate with Other Devices Table of Contents vii Choose the Function Block Elements 9 3 Choose a Tag Name for an Element 9 4 Define the Order of EXecuion 2 4 x4 04 0 2d ova had h 9 5 Data Laren esd Fees Do DET ECE EE OES Se 8 eo 9 5 Order OF ExCCutiom io amp dead 4 HOT og he Reena 9 7 Res lve a Loopa e stip o igi a ala p aeons edhe Ade 9 8 Resolve Data Flow Between Two Blocks 9 11 Create a One Scan Delay nnana anaana 9 12 SUMMA a cect state baat aia i a eE Gin e aAA 9 12 Identify any Connectors n naaa aa 9 13 Define Program Operator Control 9 4 3 5 e984 ets Wes 9 14 PASH gota Ba gO Ou Bon EGA Me EM he Uae tle eG 4 9 18 Add a Function Block Element 0 6 064000 0 0a 9 18 Connect Elements adesa e etek ees Ose Aw te te a 9 20 Show or Hide a Pin 2 43 Secale the oe oe BAS 9 20 Wire Eleme
58. 18 13 selection branch assign priorities 6 8 create 6 6 overview 5 15 send ASCII characters 12 14 sequential function chart action assign order 6 22 call a subroutine 6 21 configure 6 17 enter 6 16 overview 5 18 program 6 19 rename 6 16 use of boolean action 5 20 applications for 1 8 automatic reset option 5 38 boolean action 5 20 call a subroutine 6 21 configure execution 6 28 define tasks 5 5 Publication 1756 PM001G EN P March 2004 8 Index document 6 23 don t scan option 5 34 enter anew element 6 3 execution configure 5 50 diagrams 5 51 pause 5 51 force element 14 1 14 9 14 12 last scan 5 32 nest 5 49 numeric expression 6 12 6 18 organize a project 5 6 organize steps 5 12 pause an SFC 5 51 programmatic reset option 5 35 qualifier 5 23 reset data 5 32 SFC 5 46 5 49 5 51 restart 5 46 return to previous step 6 9 selection branch assign priorities 6 8 create 6 6 overview 5 15 sequence 5 14 show or hide documentation 6 26 simultaneous branch create 6 5 overview 5 16 step configure 6 11 define 5 6 organize 5 12 overview 5 6 rename 6 11 step through simultaneous branch 14 9 transition 14 9 step through simultaneous branch 14 9 step through transition 14 9 stop 5 45 text box 6 25 transition overview 5 24 program 6 14 rename 6 14 wire 5 17 serial cable wiring 12 2 configure port for ASCII 12 3 connect an ASCII device 12 2 SFC_ACTION structure 5 20 Publication 17
59. 19 3 running Publication 1756 PM001G EN P March 2004 Summary of Changes 2 Publication 1756 PM001G EN P March 2004 Preface Purpose of this Manual This manual guides the development of projects for Logix5000 controllers It provides step by step procedures on how to perform the following tasks which are common to all Logix5000 controllers e Organize Tasks Programs and Routines e Organize Tags e Design a Sequential Function Chart e Program Routines using ladder logic function block diagram sequential function chart or structured text programming languages e Communicate with Other Controllers e Communicate and Process ASCII Information e Handle Faults The term Logix5000 controller refers to any controller that is based on the Logix5000 operating system such as e CompactLogix controllers e ControlLogix controllers e DriveLogix controllers FlexLogix controllers e SoftLogix5800 controllers This manual works together with user manuals for your specific type of controller The user manuals cover tasks such as e Place and configure I O e Communicate with devices over various networks e Maintain the battery Who Should Use this This manual is intended for those individuals who program Manual applications that use Logix5000 controllers such as e software engineers e control engineers e application engineers e instrumentation technicians Publication 1756 PM001G EN P March 2004 P
60. 2 Click the SFC Execution tab 3 Choose whether or not to return to the OS JSR if a transition is true 4 Choose where to restart the SFC after a transition to run mode or recovery from a power loss 5 Choose what to do on the last scan of a step 6 Choose a Publication 1756 PM001G EN P March 2004 Verify the Routine Program a Sequential Function Chart 6 29 As you program your routine periodically verify your work 1 In the top most toolbar of the RSLogix 5000 window click E 2 If any errors are listed at the bottom of the window a To go to the first error or warning press F4 b Correct the error according to the description in the Results window c Go to step 1 3 To close the Results window press Alt 1 Publication 1756 PM001G EN P March 2004 6 30 Program a Sequential Function Chart Notes Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 31 Notes Publication 1756 PM001G EN P March 2004 6 32 Program a Sequential Function Chart Publication 1756 PM001G EN P March 2004 Chapter When to Use This Chapter Program Structured Text Use this chapter to write and enter structured text for a e structured text routine e action of a sequential function chart SFC e transition of sequential function chart SFC Structured Text Syntax Structured text is a textual programming language that uses statements to define what to e
61. 2 the MESSAGE data type the RemoteElement member stores the tag name or address of the data in the controller that receives the message If the message reads data Then the RemoteElement is the Source Element writes data Message Configuration message Configuration Communication Tag Message Type Source Element cP Data Table Read x lt i Number Of Elements Destination Element flocal_arrayf Index z lt 43052 Message Configuration message Configuration Communication Tag Path Destination Element Tag Name message m essage RemoteElement m essage Remotelndex essage Locallndex essage Channel essage Rack essage Group essage Slot GG A J essage Path Publication 1756 PM001G EN P March 2004 B 2 Send a Message to Multiple Controllers A If you use an asterisk to designate the element number of the array the value in provides the element number B The Index box is only available when you use an asterisk in the Source Element or Destination Element The instruction subustitutes the value of Index for the asterisk Publication 1756 PM001G EN P March 2004 TIP Send a Message to Multiple Controllers B 3 To send a message to multiple controllers e Set Up the I O Conf
62. 3 numeric expression 6 12 6 18 7 4 0 OCON add 9 25 choosing 9 3 enter 9 18 open routine 1 11 operating system C 2 operators order of execution structured text 7 10 order of execution function block diagram 9 5 structured text expression 7 10 OREF choosing 9 3 enter 9 18 organize 1 7 strings 12 8 output processing manually configure 4 15 overview 4 13 programmatically configure 4 16 overlap manually check for 4 10 overview 4 9 programmaticlly check for 4 11 overrun See overlap ownership I O module 2 4 P pass through description 3 21 pause an SFC 5 51 period Publication 1756 PM001G EN P March 2004 define for a task 1 19 periodic task application for 5 5 create 4 54 execution 1 18 overview 4 2 use of 4 2 PLC 5C share data 10 17 postscan sequential function chart 5 32 structured text 7 3 prescan clear a major fault 15 8 prgoram tags use of 3 5 priority assign 4 5 selection branch 6 8 produce large array 11 1 tag 10 9 produced tag connection requirements 10 10 create 10 14 organize 10 12 overview 10 9 program action 5 18 6 19 boolean action 5 20 configure 1 21 create 1 20 main routine 1 21 overview 1 4 portability C 4 scan time 1 29 tags 3 5 transition 6 14 program mode 1 16 program operator control overview 9 14 programmatic reset option 5 35 programming language choose 1 8 IEC61131 3 compliance C 3 RSLogix 5000 software 1 7 project components 1 4
63. 8 Avoid Overlaps ela hsbc DAE ans BO ee N eee Sees 4 9 Manually Check for Overlaps 005 4 10 Programmatically Check for Overlaps 4 11 Configure Output Processing fora Task 4 13 Manually Configure Output Processing 4 15 Programmatically Configure Output Processing 4 16 Ifo Orc kee Task aio eoe oe eee ATA 4 17 Manually Inhibit or Uninhibit a Task 4 17 Programmatically Inhibit or Uninhibit a Task 4 19 Choose the Trigger for an Event Task 4 20 Using the Module Input Data State Change Trigger 4 22 Design a Sequential Function Chart Table of Contents iii How an I O Module Triggers an Event Task 4 22 Make Sure Your Module Can Trigger an Event Task 4 25 Checklist for an Input Event Task 4 x4 ees ew dan 4 26 Estimate Throughput 5s lt ds 4 9 e5bead bop bees oe 4 28 Estimate Throughput 4 52 4 aci 4 o oe Oh RE OS Gee 4 30 Additional Considerations 0 00 000000005 4 31 Using the Motion Group Trigger 0 00005 4 32 Checklist for a Motion Group Task 4 33 Using the Axis Registration Trigger 0 4 34 Checklist for an Axis Registration Task 4 35 Using the Axis Watch Trigger o cc 0o5 00d ehe ed eS ees 4 38 Checklist for an Axis Watch Task 3 Yow by ade eal os 4 39 Using the Consumed Tag Trigger 2 446 fend eee ees 4 42 Maintain the Integrity of D
64. 8 1 Depending on your application you may not need to do all the tasks in this procedure Use the following table to determine where to start If you want to Then go to On page isolate specific information from a bar Extract a Part of a Bar Code 13 2 code search an array for a specific string of Look Up a Bar Code 13 4 characters compare two strings of characters Check the Bar Code 13 10 Characters use a weight from a weigh scale Convert a Value 13 12 decode a message from an operator Decode an ASCII Message 13 14 terminal create a string to send to an operator Build a String 13 18 terminal For additional information on ASCII related instructions refer to Logix5000 Controllers General Instruction Set Reference Manual publication 1756 RMO003 Publication 1756 PM001G EN P March 2004 13 2 Process ASCII Characters Extract a Part of a Bar Code Use the following steps to extract a part of a bar code so you can take action based on its value For example a bar code may contain information about a bag on a conveyor at an airport To check the flight number and destination of the bag you extract characters 10 18 airline origin flight destination date batons DS ees Soe character number 11 12 13 14 15 17 18 19 20 21 22 23 24 e E e 9 characters Steps 1 Enter the following rung MID Middle String Source Oty Start Dest 42808 2 Enter the EM bit of the A
65. A tag that receives the data that is broadcast by a produced tag over a ControlNet network or ControlLogix backplane A consumed tag must be e controller scope e same data type including any array dimensions as the remote tag produced tag See produced tag continuous task The task that runs continuously e The continuous task runs in the background Any CPU time not allocated to other operations such as motion communications and periodic tasks is used to execute the programs within the continuous task e The continuous task restarts itself after the last of its programs finishes e A project does not require a continuous task e If used there can be only one continuous task e All periodic tasks interrupt the continuous task e When you create a project the default MainTask is the continuous task You can leave this task as it is or you can change its properties name type etc See periodic task Glossary 11 Control and Information Protocol Messaging protocol used by Allen Bradley s Logix5000 line of control equipment Native communications protocol used on the ControlNet network controller fault handler The controller fault handler is an optional task that executes when the e major fault is not an instruction execution fault e program fault routine could not clear the major fault faulted does not exist You can create only one program for the controller fault handler Aft
66. CompactFlash card uses a special format e Use only a Logix5000 controller to store a project on a CompactFlash card Do not use a CompactFlash reader to read from or write to the card with a computer e Store only a single Logix5000 project and no other data on a CompactFlash card e When you store a project on a CompactFlash card you overwrite the entire contents of the card In other words you lose everything that is currently on the card IV The CompactFlash card uses the FAT16 file system If the card Then the controller is already formatted for the e Leaves existing data FAT16 file system e Creates folders and files for the project and firmware is not formatted for the FAT16 e Deletes existing data file system e Formats the card for the FAT16 file system e Creates folders and files for the project and firmware Once the CompactFlash card is formatted for the FAT16 file system e The CompactFlash card stores multiple projects and associated firmware e f the CompactFlash card already contains a project with same name a store overwrites the project on the CompactFlash card e The CompactFlash card loads the most recently stored project With a revision gt 12 0 you can also use a CompactFlash reader to read and manipulate the files on a CompactFlash card See Use a CompactFlash Reader on page 17 18 Publication 1756 PM001G EN P March 2004 17 6 Store and Load a Project Using Nonvolatil
67. CompactLogix 15 ControlLogix 15 DriveLogix 15 FlexLogix 15 SoftLogix5800 3 To assign a priority to a task use the following guidelines If you want Then Notes this task to interrupt another task Assign a priority number that is less than e A higher priority task interrupts all higher priority the priority number of the lower priority tasks other task e Ahigher priority task can interrupt a another task to interrupt this task Assign a priority number that is greater than lower priority task multiple times lower priority the priority number of the other task this task to share controller time with Assign the same priority number to both The controller switches back and forth another task tasks between each task and executes each one for 1 ms Publication 1756 PM001G EN P March 2004 4 6 Manage Multiple Tasks Consideration motion planner Additional Considerations As you estimate the execution interrupts for a task consider the following Description The motion planner interrupts all other tasks regardless of their priority e The number of axes and coarse update period for the motion group effect how long and how often the motion planner executes e f the motion planner is executing when a task is triggered the task waits until the motion planner is done e f the coarse update period occurs while a task is executing the task pauses to let the motion planner execute 1 0 task CompactLogix FlexLog
68. Connection Compliance Refer to notes on individual tables above Requirements 55 1 ST Parenthesization expression 55 2 ST Function Evaluation Using non formal form of invocation for built in functions JSR used within ST language to call user developed code 55 3 ST Exponentiation 55 4 ST Negation 55 5 ST Negation NOT 55 6 ST Multiply 55 7 ST Divide 55 8 ST Modulo MOD 55 9 ST Add 55 10 ST Subtract 55 11 ST Comparison lt gt lt gt Publication 1756 PM001G EN P March 2004 IEC61131 3 Compliance C 11 Table Feature Feature Description Extensions and Implementation Notes Number Number 55 12 ST Equality 55 13 ST Inequality lt gt 55 14 ST Boolean AND as amp 55 15 ST Boolean AND 55 16 ST Boolean XOR 55 17 ST Boolean OR 56 ST Assignment 56 2 ST Function Block invocation 56 3 ST RETURN RET with multiple parameters 56 4 ST IF ELSIF ELSE END_IF 56 5 ST CASE OF ELSE END_CASE 56 6 ST FOR END_FOR 56 T ST WHILE DO END_WHILE 56 8 ST REPEATE UNTIL END_REPEAT 56 9 ST EXIT 56 10 ST Empty Statement 57 1 2 Horizontal line LD editor FBD editor 57 3 4 Vertical line LD editor FBD editor 57 5 6 Horizontal Vertical connection LD editor FBD editor 57 7 8 Line crossings without connection FBD editor 57 9 10 Connection and non connection corners LD ed
69. ControlNet networks EtherNet IP network ControlLogix controller ControlNet network values loaded into ae values loaded into ee produced tag produced tag IOT instruction in the l IOT instruction in the l producing controller i i producing controller i H 2 gee ge O event task in the RPI of the produced tag l consuming controller event task in the _ es ee consuming controller io Publication 1756 PM001G EN P March 2004 4 44 Manage Multiple Tasks Maintain the Integrity of Data An event task with a consumed tag trigger provides a simple mechanism to pass data to a controller and ensure that the controller doesn t use the data while the data is changing change in values of a produced tag rd execution of IOT an instruction transmission of the produced i tag event task in the consumer i i controller Description O RPI occurs for the produced tag The produced tag transfers old data to the consuming controller The producer controller starts to update the values of the produced tag RPI occurs again for the produced tag The produced tag transfers a mix of old and new data to the consuming controller The producer controller finishes updating the values of the produced tag SBE ie The producer controller executes an Immediate Output IOT instruction The produced tag immediately transfers all the new data to the consuming c
70. FOR DO 7 19 force avalue 14 1 functions 7 6 IF THEN 7 13 inaction 6 19 logical operators 7 9 non retentive assignment 7 3 numeric expression 7 4 relational operators 7 7 REPEAT UNTIL 7 25 WHILE DO 7 22 subroutine 1 7 overview 1 4 suspend controller 15 13 symbol See alias synchronize controllers 4 45 system data access 1 23 system overhead time slice 1 26 guidelines for multiple tasks 4 8 impact on executon 4 6 T tag Index 9 address 3 23 alias 3 24 array 3 13 assign 8 11 function block diagram 9 22 assign dimensions 3 16 choose name 8 8 9 4 consume 10 15 create 3 9 8 11 create alias 3 26 create using Excel 3 10 data type 3 3 description 3 21 enter 8 11 force 14 6 14 8 guidelines 3 7 guidelines for messages 10 24 I 0 2 7 memory allocation 3 3 name 3 5 organize 3 7 organize for message 10 19 organize produced and consumed tags 10 12 overview 3 1 produce 10 14 produce and consume 10 9 produce large array 11 1 reuse of name 3 5 scope 3 5 string 12 8 trigger event task 4 42 type 3 2 task assign priority 4 5 avoid overlap 4 9 choose event trigger 4 20 choose type 4 2 configure 1 19 create event 4 53 create periodic 4 54 define 5 5 define timeout 4 55 execution 1 18 impact of multiple tasks on communication 4 8 inhibit 4 17 manually check for overlap 4 10 manually configure output processing 4 15 monitor 4 10 4 11 number supported 4 4
71. Fed ee COG 1 20 Greate a Progam sxc ew Rk ee ee eo ae 1 20 Configure a Prosran 4 leary ga e wees Sere eo 1 21 Access Status Information n 6444046 edo 5a eae RASS 1 22 Monitor Status Flags wold aaa aaa 1 22 Get and Set Sysiensdlans 2 ie Los REO Rae 1 23 Adjust the System Overhead Time Slice 1 26 Adjust the System Overhead Time Slice 1 28 View Scan TIME ica wh kk a aa a a mde ae am ede ok Be 1 29 View Task Scan Time o by ass poe ert a w eols es 1 29 View Program Scan Times 2 0 b dt hp 4en tk 40 44 0 1 30 Adjust the Watchdog Time ua sci Goat ve Ged SP aves fete OUR 1 31 Adjust the Watchdog Timer fora Task 1 31 Chapter 2 Using This Chapter ante a ghia kien amp fond aa falda weas 2 1 Configure an I O Module sete 4 clos Sid Gi Edenh RGA ce eh ded 2 1 Requested Packet Interval s j1344 sate kacas a bao kes 2 2 Communication Format a 24 ses fhe git oP eee y BS 2 3 Electronic Keying noon au nauau 2 6 Address I O Dates 4 0 82 pee OY REG Se RE ee 2 7 Buffer Oe Keak ie eae tee SEO a Ee eas Sed 2 8 When to Buffer TO guse end Lach domed 2 Meee eas 2 8 Publication 1756 PM001G EN P March 2004 Table of Contents ii Organize Tags Manage Multiple Tasks Publication 1756 PM001G EN P March 2004 B ffer NOG gik ong nig black amp E e ah Sree WA Gre a 3 2 8 Chapter 3 Usine this Cha pies ai4 0 35 ee Pe Sele es he RDG Sag 3 1 Defining Tags y side oe Gea eee ah decd a
72. Fill a tank to its maximum level and then open a drain valve Use this type of task continuous task Collect and process system parameters and send them to a display continuous task Complete step 3 in a control sequence reposition the bin diverter continuous task Your system must check the position of a field arm each 0 1 s and calculate the average rate of change in its position This is used to determine braking pressure periodic task Read the thickness of a paper roll every 20 ms periodic task A packaging line glues boxes closed When a box arrives at the gluing position the controller must event tas immediately execute the gluing routine In a high speed assembly operation an optical sensor detects a certain type of reject When the event tas sensor detects a reject the machine must immediately divert the reject In an engine test stand you want to capture and archive each analog data immediately after each event tas sample of data Immediately after receiving new production data load the data into the station event tas In a line that packages candy bars you have to make sure that the perforation occurs in the correct event tas location on each bar Each time the registration sensor detects the registration mark check the accuracy of an axis and perform any required adjustment A gluing station must adjust the amount of glue it applies to compensate for changes in the speed of ev
73. From the Device drop down list select Logix 5550 Serial Port C Click Auto Configure ControlNet A Inthe Station Name box type a name that will identify the computer in the RSWho window B Select the interrupt value memory address and I O base address C In the Net Address box type the ControlNet node number that you want to assign to the computer DH A From the Va ue drop down list select the type of interface card that the driver will use B In the Property list select the next item C In the Value box type or select the appropriate value D Repeat steps B and C for the remaining properties Ethernet For each Ethernet device on this network with which you want to communicate e g each 1756 ENB module or PLC 5E controller add a map entry A In the Host Name column type the IP address or host name of the Ethernet device B To communicate with another Ethernet device on this network choose Add New and go to Step A 8 Choose OK and then choose Close Publication 1756 PM001G EN P March 2004 1 14 Getting Started Download a Project to the Controller Publication 1756 PM001G EN P March 2004 Use this procedure to download a project to the controller so you can execute its logic e When you download a project you lose the project and data that is currently in the controller if any e If the revision of the controller does not match the revision of the project you are prompted to update the firmware of the
74. IEC has developed a series of specifications for programmable controllers These specifications are intended to promote international unification of equipment and programming languages for use in the controls industry These standards provide the foundation for Logix5000 controllers and RSLogix 5000 programming software The IEC programmable controller specification is broken down into five separate parts each focusing on a different aspect of the control system e Part 1 General Information e Part 2 Equipment and Requirements Test e Part 3 Programming Languages e Part 4 User Guidelines e Part 5 Messaging Service Specification The controls industry as a whole has focused on part 3 IEC61131 3 Programming Languages because it provides the cornerstone for implementing the other standards and provides the most significant end user benefit by reducing training cost Because of this only IEC61131 3 is addressed here Publication 1756 PM001G EN P March 2004 C 2 _1EC61131 3 Compliance Operating System Data Definitions Publication 1756 PM001G EN P March 2004 The IEC61131 3 programming language specification addresses numerous aspects of programmable controller including the operating system execution data definitions programming languages and instruction set Components of the IEC61131 3 specification are categorized as required by the specification optional or extensions By so doing the IEC61131 3 specificatio
75. Jask_2 and enable the timeout function 1 The first MOV instruction sets Zask_2_Timeout 10000000 us DINT value Then the SSV instruction sets the Rate attribute for Task_2 Task_2_Timeout This configures the timeout value for the task 2 The second MOV instruction sets One 1 DINT value Then the SSV instruction sets the EnableTimeout attribute for Jask_2 One This enables the timeout function for the task S FS MOV Move Source Set System Value Class Name Instance Name Attribute Name 10000000 Dest Task_2_Timeout 10000000 MOV Set System Value Class Name Instance Name Move Source Source Programmatically Determine if a Timeout Occurs Source Task_2 Timeout Attribute Name EnableTimeout TASK Task_2 Rate TASK Task_2 One 1 To determine if an event task executed due to a timeout use a Get System Value GSV instruction to monitor the Status attribute of the task Table 4 5 Status Attribute of the TASK Object Attribute Status Data Type DINT Instruction Description GSV SSV Provides status information about the task Once the controller sets a bit you must manually clear the bit to determine if another fault of that type occurred To determine if Examine this bit An EVENT instruction triggered the task event task only A timeout triggered the task event task only 1 l An overlap occur
76. Keys 1 Open the RSLogix 5000 project that you want to protect 2 From the Tools menu choose Security gt Configure Source Protection 3 Does RSLogix 5000 software prompt you to specify the location for the source key file If Then No Your computer already has the source key file Go to Protect a Routine with a Source Key on page 18 7 Yes Go to step 4 4 Choose Yes Publication 1756 PM001G EN P March 2004 Secure a Project 18 7 Specify Source Key File Location x Source Key File Location N 5 7 p Cancel 5 Click M 6 Select a folder in which to store the file and choose OK 7 Choose OK A dialog box asks if you want to create the source key file sk dat 8 Choose Yes Source Key File C RSLogix 5000 Projects sk dat View Clear location of the source key file sk dat Routines Source Keys Viewable HER MainProgram TEN Dasan A Protect a Routine with a Source Key 1 Open the RSLogix 5000 project that you want to protect 2 From the Tools menu choose Security gt Configure Source Protection fo Source Protection Configuration Source Key File C RSLogix S000 Projects sk dat View Clear Routines Source Keys Viewable Fin Routine _A 4 Routine_B Unprotect B Routine_C E Routine_D x MainProgram Protect 4 Publication 1756 PM001G EN P March 2004 18 8 Secure a Project 3 Select the routine or routines that you want to
77. MSG and DINTs throughout the DINTs throughout the project project This increases the efficiency of your project because Logix5000 controllers execute more efficiently and use less memory when working with 32 bit integers DINTs Refer to Convert Between INTs and DINTs on page 10 28 4 Cache the connected MSGs that Cache the connection for those MSG instructions that execute most frequently up to execute most frequently the maximum number permissible for your controller revision This optimizes execution time because the controller does not have to open a connection each time the message executes 5 If you want to enable more than 16 If you enable more than 16 MSGs at one time some MSG instructions may experience MSGs at one time use some type of management strategy delays in entering the queue To guarantee the execution of each message use one of these options e Enable each message in sequence e Enable the messages in groups e Program a message to communicate with multiple devices For more information see Appendix B e Program logic to coordinate the execution of messages For more information see Appendix A 6 Keep the number of unconnected and uncached MSGs less than the number of unconnected buffers Publication 1756 PM001G EN P March 2004 The controller can have 10 40 unconnected buffers The default number is 10 e fall the unconnected buffers are in use when an instruction leaves the message que
78. March 2004 6 18 Program a Sequential Function Chart Calculate a Preset Time at Runtime To calculate a preset value based on tags in your project enter the value as a numeric expression 1 Click the button of the action 2 Select check the Use Expression check box E Z step_name J browse for a tag choose a function Ale choose an operator create a tag Be off Cancel 4 Type a numeric expression that defines the preset time e Use the buttons alongside the dialog box to help you complete the expression e For information on numeric expressions see Expressions on page 7 4 5 Choose 6 To close the Action Properties dialog box choose Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 19 Mark an Action as a Boolean Action Use a boolean action to only set a bit when the action executes For more information see Use a Boolean Action on page 5 20 1 Click the button of the action ee EE E l step_name i General Action Order Tag l Teano Qualifier i Non Stored oolean 2 Click the Boolean check box 3 Choose Program an Action To program an action you have these options e Enter Structured Text e Call a Subroutine Enter Structured Text The easiest way to program an action is to write the logic as structured text within the body of the action When the action turns on the con
79. Nonvolatile Memory 17 13 42865 4 Choose Load Store Project that is currently in the nonvolatile memory of the controller Project that is currently in the user memory RAM of the controller if any project is there On Power Up Run Remote Only 5 Choose Load gt A dialog box asks you to confirm the load 6 To load the project from the nonvolatile memory choose Yes Publication 1756 PM001G EN P March 2004 17 14 Store and Load a Project Using Nonvolatile Memory During the load the following events occur e On the front of the controller the OK LED displays the following sequence If the load Then the OK LED displays does not include firmware solid red solid green includes firmware flashing red gt solid red solid green e RSLogix 5000 software goes offline When the load is finished you remain offline If you want to be online you must manually go online Check for a Load When the controller loads a project from nonvolatile memory it provides the following information e logs a minor fault type 7 code 49 e sets the FAULTLOG object MinorFaultBits attribute bit 7 If you want your project to flag that it loaded from nonvolatile memory use the following ladder logic On the first scan of the project S FS is on the GSV instruction gets the FAULTLOG object MinorFaultBits attribute and stores the value in minor_fault_bits If bit 7 is on the controller loaded the pro
80. Open the RSLogix 5000 project 2 In the controller organizer right click name_of_task and select Properties 3 Click the Configuration tab 4 In the Watchdog text box type a watchdog time 5 Click OK Numerics 1784 CF64 Industrial CompactFlash card format 17 4 stroage of firmware 17 6 use of CompactFlash reader 17 18 A action 6 19 add 6 16 assign order 6 22 assign qualifier 6 17 boolean 5 20 choose between boolean and non boolean 5 18 configure 6 17 data type 5 20 non boolean 5 18 program 5 18 6 19 qualifier 5 23 rename 6 16 reset 5 42 store 5 42 use expression 6 18 use of structured text 6 19 address assign indirect 3 27 tag 3 23 function block diagram 9 4 I O module 2 7 ladder logic 8 8 8 11 alarm sequential function chart 5 28 6 12 alias create 3 26 show hide 3 25 use of 3 24 arithmetic operators structured text 7 6 array calculate subscript 3 29 create 3 16 index through 3 27 organize 3 7 overview 3 13 produce large array 11 1 ASCII build string 13 18 compare characters 13 4 13 10 configure serial port 12 3 configure user protocol 12 5 connect device 12 2 convert characters 13 12 Index decode message 13 14 enter characters 12 21 extract characters 13 2 look up characters 13 4 manipulate characters 13 1 organize data 12 8 read characters 12 9 structured text assignment 7 4 write characters 12 14 assignment ASCII character 7 4 non retentive 7 3 retentive 7 2 assume data a
81. P March 2004 3 16 Organize Tags Create an Array To create an array you create a tag and assign dimensions to the data type 1 From the Logic menu select Edit Tags Program Tags MainProgram OF x Scope MainProgram 7 Show Show All 7 Sort Tag Name x Base Tag Description s 2 Select a scope for the tag 2 p A If you will use the tag Then select in more than one program within the name_of_controller controller project as a producer or consumer in a message in only one program within the project program that will use the tag 3 Type a name for the tag 4 Assign the array dimensions If the tag is Then type Where one dimension array data_type x data_type isthe type of data that the tag stores two dimension array data_type x y x is the number of elements in the first dimension three dimension array data_type x y z y is the number of elements in the second dimension z is the number of elements in the third dimension Publication 1756 PM001G EN P March 2004 Organize Tags 3 17 Create a User Defined Data User defined data types structures let you organize your data to Type match your machine or process EXAMPLE User defined data type that stores a recipe In a system of several tanks each tank can run a variety of recipes Because the recipe requires a mix of data types REAL DINT BOOL etc a user defined data type is used
82. PM001G EN P March 2004 The instruction set specified by IEC61131 3 is entirely optional The specification lists a limited set of instructions that if implemented must conform to the stated execution and visual representation IEC61131 3 however does not limit the instructions set to those listed within the specification Each PLC vendor is free to implement additional functionality in the form of instructions over and above those listed by the specification Examples of such extended instructions are those needed to perform diagnostics PID loop control motion control and data file manipulation Because extended instructions are not defined by the IEC61131 3 specification there is no guarantee that the implementation between different PLC vendors will be compatible Thus utilization of these instructions may preclude the movement of logic between vendors Logix5000 controllers and RSLogix5000 provide a suite of instructions that execute as defined by the IEC61131 3 specification The physical representation of these instructions maintain their look and feel with existing systems so as to reduce the training cost associated with working with the environment In addition to the IEC61131 3 compliant instructions a full range of instructions from existing products have been brought forward into the environment so that no functionality is lost One of the goals of end users creating programs in an IEC61131 3 compliant environment is the movemen
83. Refresh Publication 1756 PM001G EN P March 2004 18 24 Secure a Project Assign Access to an RSLogix 5000 Project While a project is in the New RSLogix 5000 Resources group the access control list of that group determines the actions that a user can perform on a project To customize the access of a project move it out of the group and assign specific actions E Users Groups 29 Resources Groups 1 In the Configuration explorer select the New RSLogix New RSLogix 5000 Resources 5000 Resources group de ASLOGIX 5000 9 Actions Groups 43075 2 Click the Group Members tab General Access Control List Group Members Available items Member items RSLOGIX 5000 Your 3 In the Member items list select the project and click the lt lt button 4 Choose Apply Users Groups 29 Resources Groups New RSLogix 5000 Resources RSLOGIX 5000 Your_RSLogix5000_Project Actions Groups 5 In the Configuration explorer select the project 43078 6 From the Help menu choose Quick Start Bi Quick Start Help Topics Back Options What do you want to do Add user groups to the system Add workstation groups to the system create a resource create a resource group Group actions Mi Assign access to individuals and groups 7 Follow the steps for this task Assign the actions that you Add Actions reco
84. Text Comments stop p Adda Text Box other element e g selection branch o Add a Tag Description Add Structured Text Comments Use the following table to format your comments To add a comment on a single line at the end of a line of structured text Use one of these formats comment comment comment within a line of structured text comment that spans more than one line comment start of comment end of comment start of comment end of comment Publication 1756 PM001G EN P March 2004 6 24 Program a Sequential Function Chart For more information see Comments on page 7 28 To enter the comments 1 Double click the text area of the action 2 Type the comments 3 To close the text entry window press Ctrl Enter action_name comment statement Add a Tag Description 1 Click the button of the element General Action Order Tag Name 3 p gt Description A i 2 Click the Tag tab 3 Type the description for the element tag 4 Choose 5 Drag the description box to the desired location on the SFC Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 25 Add a Text Box A text box lets you add notes that clarify the function of an SFC element step transition stop etc Or use a text box to capture information that you will
85. The data is truncated e The LEN is unchanged If you make a string data type smaller make a string data type The data and LEN is reset to zero larger 1 Do you want to create a new string data type 3 If no String New String Then Go to Read Characters from the Device on page 12 9 yes Name Description Maximum Characters i 4 42233 Go to step 2 2 In the controller organizer right click Strings and choose New String Type Type a name for the data type Type the maximum number characters that this string data type will store 4 5 Choose OK Publication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 9 Read Characters from the As a general rule before you read the buffer use an ACB or ABL Device instruction to verify that the buffer contains the required characters e An ARD or ARL instruction continues to read the buffer until the instruction reads the required characters e While an ARD or ARL instruction is reading the buffer no other ASCII Serial Port instructions except the ACL can execute e Verifying that the buffer contains the required characters prevents the ARD or ARL from holding up the execution of other ASCII Serial Port instructions while the input device sends its data For additional information on ASCII Serial Port instructions refer to Logix5000 Controllers General Instruction Set Reference Manual pub
86. This ensures that the revision of the project in nonvolatile memory matches the revision of the controller You do not meet all of the conditions listed above Publication 1756 PM001G EN P March 2004 Update the firmware using either e RSLogix 5000 software e ControlFlash software Take these precautions 1 Before you update the firmware lf the controller Then does not use a Save the project to an offline file When you update the firmware CompactFlash card of the controller you erase the contents of the nonvolatile memory revision 10 x or later uses a CompactFlash Either card e Remove the CompactFlash card from the controller e Check the Load Image option of the CompactFlash card If it is set to On Power Up or On Corrupt Memory first store the project with the Load Image option set to User Initiated Otherwise you may get a major fault when you update the firmware of the controller This occurs because the On Power Up or On Corrupt Memory options cause the controller to load the project from nonvolatile memory The firmware mismatch after the load then causes a major fault 2 After you update the firmware store the project again to nonvolatile memory This ensures that the revision of the project in nonvolatile memory matches the revision of the controller Store and Load a Project Using Nonvolatile Memory 17 7 Choose When to Load an Image You have several options for when under what conditions
87. Two Blocks If you use two or more wires to connect two blocks use the same data flow indicators for all of the wires between the two blocks This is OK Neither wire uses the Assume Data Available indicator Assume Data Available indicator Both wires use the Assume Data Available indicator This is NOT OK One wire uses the Assume Data Available indicator while the other wire does not Publication 1756 PM001G EN P March 2004 9 12 Program a Function Block Diagram Create a One Scan Delay To produce a one scan delay between blocks use the Assume Data Available indicator In the following example block 1 executes first It uses the output from block 2 that was produced in the previous scan of the routine Summary In summary a function block routine executes in this order 1 The controller latches all data values in IREFs 2 The controller executes the other function blocks in the order determined by how they are wired 3 The controller writes outputs in OREFs Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 13 Identify any Connectors Like wires connectors transfer data from output pins to input pins Use connectors when e the elements that you want to connect are on different sheets within the same routine e a wire is difficult to route around other wires or elements e you want to disperse data to several points in the routine X Connec
88. When the continuous task completes a full scan it restarts immediately e A project does not require a continuous task If used there can be only one continuous task e ata constant period e g every 100 ms e multiple times within the scan of your other logic Periodic Task A periodic task performs a function at a specific period Whenever the time for the periodic task expires the periodic task e interrupts any lower priority tasks e executes one time e returns control to where the previous task left off You can configure the time period from 0 1 ms to 2000 s e The default is 10 ms e The performance of a periodic task depends on the type of Logix5000 controller and on the logic in the task immediately when an event occurs Event Task An event task performs a function only when a specific event trigger occurs Whenever the trigger for the event task occurs the event task e interrupts any lower priority tasks e executes one time e returns control to where the previous task left off The trigger can be e change of a digital input e new sample of analog data e certain motion operations e consumed tag e EVENT instruction Important Some Logix5000 controllers do not support all triggers See Table 4 1 on page 4 21 Publication 1756 PM001G EN P March 2004 4 4 Manage Multiple Tasks For this example situation Here are some example situations and the type of task that you could use
89. a JSR instruction Program Structured Text 7 19 FOR DO Use the FOR DO loop to do something a specific number of times before doing anything else Operands FOR count initial_value TO Structured Text final value BY increment DO Operand Type Format Description lt statement gt count SINT tag tag to store count position as the END FOR INT FOR DO executes gt DINT initial_ SINT tag must evaluate to a number value INT expression specifies initial value for count DINT immediate final_ SINT tag specifies final value for count which value INT expression determines when to exit the loop DINT immediate increment SINT tag optional amount to increment count INT expression each time through the loop DINT immediate If you don t specify an increment the count increments by 1 IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as IF THEN Description The syntax is FOR count initial value TO final value optional BY increment If you don t specify an increment the loop increments by 1 DO lt Statement gt IF bool expression THEN EXIT lt q If there are conditions when you want to opt
90. a communication bridge module such as a 1756 CNB or 1756 DHRIO module the controller shuts down the connections to the bridge module and to all the modules that depend on that bridge module Inhibiting a communication bridge module lets you disable an entire branch of the I O network When you select to inhibit the module the controller organizer displays a yellow attention symbol A over the module Ifyou are And you And Then offline p p gt The inhibit status is stored in the project When you download the project the module is still inhibited online inhibit a module while you are The connection to the module is closed The modules outputs go to the connected to the module last configured program mode inhibit a module but a connection to the module was not established perhaps due to an error condition or fault gt The module is inhibited The module status information changes to indicate that the module is inhibited and not faulted uninhibit a module clear the check box no fault A connection is made to the module and the module is dynamically occurs reconfigured if the controller is the owner controller with the configuration you created for that module If the controller is configured for listen only it cannot reconfigure the module fault occurs A connection is not made to the module The module status information changes to indicate the fault condition Public
91. actions make up a step Each action performs a specific function such as controlling a motor opening a valve or placing a group of devices in a specific mode Step Actions Do this MIX and do this Each action includes a qualifer When a step is active executing the qualifier determines when the action starts and stops See sequential function chart step qualifier alias tag A tag that references another tag An alias tag can refer to another alias tag or a base tag An alias tag can also refer to a component of another tag by referencing a member of a structure an array element or a bit within a tag or member See base tag ASCII A 7 bit code with an optional parity bit that is used to represent alphanumerical characters punctuation marks and control code characters For a list of ASCII codes see the back cover of this manual Publication 1756 PM001G EN P March 2004 Glossary 2 Publication 1756 PM001G EN P March 2004 asynchronous Actions that occur independent of each other and lack a regular pattern In Logix5000 controllers I O values update asynchronous to the execution of logic e Programs within a task access input and output data directly from controller scoped memory e Logic within any task can modify controller scoped data e Data and I O values are asynchronous and can change during the course of a task s execution e An input value referen
92. an EVENT instruction trigger the task Trigger EVENT Instruction Only No tag is required po Tag nons O ms Interrupt all other tasks Priority j Lower Number Yields Higher Priority Ladder Logic in Program _A If Shut_Down_Line on conditions require a shut down then Execute the Shut_Down task one time Shut_Down Line Shut_Down_Line_One_Shot ONS EVENT Trigger Event Task Task Shut_Down Ladder Logic in Program_B If Shut_Down_Line on conditions require a shut down then Execute the Shut_Down task one time Shut_Down_ Line Shut_Down_Line_One_Shot EVENT Trigger Event Task Task Shut_Down Publication 1756 PM001G EN P March 2004 Create a Task Manage Multiple Tasks 4 53 Create an Event Task To create an event task Fj Controller Controller _1 Controller Tags E3 Controller Fault Handler 9 Power Up Handler E E Tasks a Ea MainTask E MainProgram Program Tags ER MainRoutine 1 In the controller organizer right click the Tasks folder and choose New Task Name Doo O O OK Description a Cancel z Type Even tti i s sS Trigger EVNT Instruction Ony Tag knone gt x IT Execute Task If No Event Occurs Within jooo ms Priority fo a Lower Number Yields Higher Priority Watchdog 500 000 ms Help 2 In the Name text box type a name for the t
93. backslash and stores the final string in msg DTOS INSERT DTOS DINT to String Insert String DINT to String Source msg_num Source msg_new Source msg_node 5 piee Dest msg_num_ascii Source B msg_num_ascii Dest msg_node_ascii 5 e 5 e 2 Start Dest msg_temp 145 CONCAT String Concatenate Source msg_temp 145 Source Bo msgq_node_ascii Dest 16 Te To send the message an AWA instruction sends the msg tag and appends the carriage return CR 42813 Publication 1756 PM001G EN P March 2004 13 22 Process ASCII Characters Notes Publication 1756 PM001G EN P March 2004 Chapter 14 Force Logic Elements When to Use This Use a force to override data that your logic either uses or produces Procedure For example use forces in the following situations e test and debug your logic e check wiring to an output device e temporarily keep your process functioning when an input device has failed Use forces only as a temporary measure They are not intended to be a permanent part of your application How to Use This Procedure If you want to See review the precautions that you should take whenever you add change remove or disable Precautions on page 14 2 forces determine current state of forces in your project Check Force Status on page 14 4 determine which typ
94. bits of the value e The second INT represents the upper 16 bits of the value To convert the separate INTs into one usable value use a Copy COP instruction where In this operand Specify Which means Source first INT of the 2 element pair lower 16 Start with the lower 16 bits bits Destination DINT tag in which to store the 32 bit value Copy the value to the DINT tag Length 1 Copy 1 times the number of bytes in the Destination data type In this case the instruction copies 4 bytes 32 bits which combines the lower and upper 16 bits into one 32 bit value In the following example the COP instruction produces the 32 bit value that represents the amount of free I O memory in 32 bit words EXAMPLE Convert INTs to a DINT e Elements 3 of INT_array is the lower 16 bits of the amount of free I O memory Element 4 is the upper 16 bits e Memory_IO_Free is a DINT tag 32 bits in which to store the value for the amount of free I O memory e To copy all 32 bits specify a Length of 1 This tells the instruction to copy 1 times the size of the Destination 32 bits This copies both element 3 16 bits and element 4 16 bits and places the 32 bit result in Memory_IO_Free co Copy File Source INT_array 3 Dest Memory_IO_Free Length 1 Publication 1756 PM001G EN P March 2004 Purpose When to Use this Appendix How to Use this Appendix Appendix A Manage Multiple Messages This appendix describ
95. communication with other devices Definition A communication link between two devices such as between a controller and an 1 0 module PanelView terminal or another controller Connections are allocations of resources that provide more reliable communications between devices than unconnected messages The number of connections that a single controller can have is limited You indirectly determine the number of connections the controller uses by configuring the controller to communicate with other devices in the system The following types of communication use connections e 1 0 modules e produced and consumed tags e certain types of Message MSG instructions not all types use a connection Publication 1756 PM001G EN P March 2004 10 2 Communicate with Other Devices Term requested packet interval RPI Definition The RPI specifies the period at which data updates over a connection For example an input module sends data to a controller at the RPI that you assign to the module e Typically you configure an RPI in milliseconds ms The range is 0 2 ms 200 microseconds to 750 ms e f a ControlNet network connects the devices the RPI reserves a slot in the stream of data flowing across the ControlNet network The timing of this slot may not coincide with the exact value of the RPI but the control system guarantees that the data transfers at least as often as the RPI path Publication 1756 PM001G EN P
96. complete image of data at one instance in time then produce a copy of the data as shown below This tag stores data to which This tag stores a copy of instructions in the project write Source_Tag at 1 instance in data time Source_Tag CPS Produced_Tag Synchronous Copy File e gt 64784481 Sy Copy 6A7844B1 data from logic gt 3B221D89 p gt 38221089 P 43BB278F l 43BB278F The CPS instruction does not let any controller operation change the data during the copy Tasks that attempt to interrupt the CPS instruction are delayed until the copy is done QO 2 Produced tag properties In the Connection properties of the produced tag select check the following check box s Tag Properties Produced_Tag General Connection Maximum Consumers Check this check box JY Programmatically IOT Instruction Send Event Trigger to Consumers If you leave this box cleared unchecked the producing controller triggers the event task at the end of any task that automatically updates local outputs In other words the task scan will trigger the event in addition to the IOT instruction m 3 IOT instruction Use an IOT instruction at the point in your logic where you want to trigger the event task The IOT instruction overrides the RPI for the tag and immediately sends the event trigger and the data of the tag Publication 1756 PM001G EN P Marc
97. consecutive or trailing underscore characters _ e not case sensitive Q 6 Use mixed case Although tags are not case sensitive upper case A is the same as lower case a mixed case is easier to read These tags are easier to read Than these tags Tank_1 TANK_1 Tank1 TANK1 tank_1 tank1 Q 7 Consider the alphabetical order of RSLogix 5000 software displays tags of the same scope in alphabetical order To make it tags easier to monitor related tags use similar starting characters for tags that you want to keep together Starting each tag for a tank with Otherwise the tags may end up Tank keeps the tags together separated from each other Tag Name Tag Name Tank_North North_ Tank Tank_South lt q other tags that start with the letters o p q etc South_Tank Publication 1756 PM001G EN P March 2004 Organize Tags 3 9 Create a Tag MEg koLogix 5000 software automatically creates tags when you e add an element to a sequential function chart SFC e add a function block instruction to a function block diagram To create a tag you have the following options e Create a Tag Using a Tags Window e Create Tags Using Microsoft Excel e Create a Tag as You Enter Your Logic See the corresponding chapter for the programming language that you are using Create a Tag Using a Tags Window The Tags window lets you create and edit tags using a spreadshe
98. controllers break their connections to the input module all controllers with listen only connections no longer receive multicast data output modules owner An output module is configured by a controller that establishes a connection as an owner Only one owner connection is allowed for an output module If another controller attempts to establish an owner connection the connection attempt is rejected listen only Once an output module has been configured and owned by one controller other controllers can establish listen only connections to that module These controllers can receive multicast data while another controller owns the module If the owner controller breaks its connection to the output module all controllers with listen only connections no longer receive multicast data Publication 1756 PM001G EN P March 2004 2 6 Communicate with 0 Publication 1756 PM001G EN P March 2004 Electronic Keying Matin e careful when you disable electronic keying If used incorrectly this option can lead to personal injury or death property damage or economic loss When you configure a module you specify the slot number for the module However it is possible to place a different module in that slot either on purpose or accidently Electronic keying lets you protect your system against the accidental placement of the wrong module in a slot The keying option you choose determines how closely any module in a slot
99. ctrl K VT 11 0B 43 2B K 75 4B k 107 6B ctrl L FF 12 0C 44 2C L 76 4C l 108 6C ctrl M CR 13 r 0D 45 2D M 77 4D m 109 6D ctrl N SO 14 0E 46 2E N 78 4E n 110 6E ctrl O SI 15 OF 47 2F 0 79 4F 0 111 6F ctrl P DLE 16 10 0 48 30 P 80 50 p 112 70 ctrl Q DC1 17 11 1 49 31 Q 81 51 q 113 71 ctrl R DC2 18 12 2 50 32 R 82 52 r 114 72 ctrl S DC3 19 13 3 51 33 S 83 53 S 115 73 ctrl T DC4 20 14 4 52 34 T 84 54 t 116 74 ctrl U NAK 21 15 5 53 35 U 85 55 u 117 75 ctrl V SYN 22 16 6 54 36 V 86 56 V 118 76 ctrl W ETB 23 17 7 55 37 W 87 57 Ww 119 77 ctrl X CAN 24 18 8 56 38 X 88 58 X 120 78 ctrl Y EM 25 19 9 57 39 Y 89 59 y 121 79 ctrl Z SUB 26 1A 58 3A Z 90 5A Z 122 7A ctrl ESC 27 1B 59 3B 91 5B 123 78 ctrl FS 28 1C lt 60 3C 92 5C 124 7C ctrl GS 29 1D 61 3D 93 5D 125 7D ctrl RS 30 1E gt 62 3E A 94 5E 126 7E ctrl JUS 31 1F 63 3F 95 5F DEL 127 7F Rockwell Automation Rockwell Automation provides technical information on the web to assist you in using our products At http support rockwellautomation com you can Support find technical manuals a knowledge base of FAQs technical and application notes sample code and links to software service packs and a MySupport feature that you can customize to make the best use of these tools For an additional level of technical phone support for installation
100. data which the String Browser window does not show AWS ASCII Write Append E String Browser Channel 0 Source string 1 1 SerialPort Control temp_high_write String Length 5 Characters Sent ne watt 1 Double click the value area of the Source ss _ dollar sign 24 Position 0 Count 0 of 82 The number of characters that you see in the window This is the same as the LEN member of the string tag single quote 27 line feed 0A new line 0D 0A form feed 0C 5 L N E R E T lt Eross x carriage return 0D tab 09 42615 The maximum number of characters that the string tag can hold 2 Type the characters for the string 3 Choose OK Publication 1756 PM001G EN P March 2004 12 22 Communicate with an ASCII Device Notes Publication 1756 PM001G EN P March 2004 Chapter 13 When to Use this Procedure How to Use this Procedure Process ASCII Characters Use this procedure to e interpret a bar code and take action based on the bar code e use a weight from a weigh scale when the weight is sent as ASCII characters e decode a message from an ASCII triggered device such as an operator terminal e build a string for an ASCII triggered device using variables from your application IMPORTANT If you are not familiar with how to enter ladder logic in an RSLogix 5000 project first review Program Ladder Logic on page
101. e faster and easier troubleshooting e direct access to the point in the logic where a machine faulted e easy updates and enhancements How to Use This Procedure Typically the development of an SFC is an iterative process If you prefer you can use RSLogix 5000 software to draft and refine your SFC For specific procedures on how to enter an SFC see Program a Sequential Function Chart on page 6 1 Publication 1756 PM001G EN P March 2004 5 2 Design a Sequential Function Chart Whatisa Sequential A Se function enn SFC similar toa flowchart It uses 9 steps and transitions to perform specific operations or actions Function Chart Figure 5 1 and Figure 5 2 is an example that shows the elements of an SFC Figure 5 1 SFC Example A step represents a major function of your process It contains the actions that occur at a particular time phase or station N El devioes_in_program_mode An action is one of the functions that a step performs conveyor _program_control l fan_program_cortrol l S E fan_on fan_state l initialize_done A transition is the true or false condition that tells the SFC initialise DM fan Devicelitate when to go to the next step A qualifier determines when an action starts and stops q N je conveyor_start conweyor_state l PO conveyor_stop conveyor state 0 A simultaneous branch executes more than 1 step at pa
102. fit the project better If a tag already exists in the project Import Configuration x you can either e Use the existing tag which discards the tag in the library file Type l Description Operation and binds the logic to the existing NA Coo o Coney type onveyo CNT ap Local20 Data SS caro a e Rename the tag which creates a new one BTD Dead TDO Use ing No new 1 0 tags are created If an I 0 tag already exists in the project the import operation uses this tag for any aliases to that tag name Once you import a project make sure you check the alias tags for accuracy Publication 1756 PM001G EN P March 2004 Program Ladder Logic 8 15 Export Rungs 1 Select the rungs to export MainProgram MainRoutine If rungs are Do this jis BI Start_PB SR in sequence Click the first rung and then Shift click the last rung ne Shot Rising Storage Bit Start_PB_Store_ Output Bit Startup_Res out of sequence Click the first rung and then Ctrl click each additional rung CutRung Ctrl x C 2 Right click the selection and choose Export Rung Sopy Rung Guns ajel A FA Paste Ctrl nn Delete Rung Del Add Rung Ctrl R Edit Rung Enter Edit Rung Comment Ctrl D Import Rung Export Rung N Start Pending Rung Edits Export Rung a CountScans L5X a DelayRoutineCompletion L5 a DetectTimeOutO
103. for up to 16 connections e other types of messages for up to 16 connections 12 x or later up to 32 connections Publication 1756 PM001G EN P March 2004 Communicate with Other Devices 10 23 If the MSG instructions are to different devices If several messages go to the same device the messages may be able to share a connection same device Term unconnected buffer And they are Then ew Each MSG instruction uses 1 connection enabled at the same time Each MSG instruction uses 1 connection NOT enabled at the same time The MSG instructions share the connection l e Together they count as 1 connection EXAMPLE Share a Connection If the controller alternates between sending a block transfer read message and a block transfer write message to the same module then together both messages count as 1 connection Caching both messages counts as 1 on the cache list Unconnected Buffers To establish a connection or process unconnected messages the controller uses an unconnected buffer Definition An allocation of memory that the controller uses to process unconnected communication The controller performs unconnected communication when it e establishes a connection with a device including an I O module e executes a MSG instruction that does not use a connection The controller can have 10 40 unconnected buffers e The default number is 10 e To increase the number of unconnected b
104. function turn on check the AlarmEnable AlarmEn bit As an option enter a numeric expression that calculates the time at runtime AlarmEn BOOL To use the alarm bits turn on check the AlarmEnable AlarmEn bit AlarmHigh BOOL If the Timer T reaches the LimitHigh value the AlarmHigh bit turns on e The bit stays on until you reset it e Touse this alarm function turn on check the AlarmEnable AlarmEn bit do something while the step is X BOOL The X bit is on the entire time the step is active executing active including first and last scan Typically we recommend that you use an action with a N Non Stored qualifier to accomplish this do something one time when the FS BOOL The FS bit is on during the first scan of the step step becomes active Typically we recommend that you use an action with a P1 Pulse Rising Edge qualifier to accomplish this do something while the step is SA BOOL The SA bit is on when the step is active except during the first and active except on the first and last scan of the step last scan do something one time on the LS BOOL The LS bit is on during the last scan of the step last scan of the step Use this bit only if you do the following On the Controller Properties dialog box SFC Execution tab set the Last Scan of Active Step to Don t Scan or Programmatic reset Typically we recommend that you use an action with a PO Pulse Falling Edge qualifier to accomplish this Publication 1756
105. instruction in FBD 26 7 XOR BXOR instruction in FBD 26 8 NOT BNOT instruction in FBD 27 1 SELECT SEL instruction in FBD 27 2a Maximum select MAX Functionality contained in ESEL instruction in FBD and ST 27 2b Minimum select MIN Functionality contained in ESEL instruction in FBD and ST Publication 1756 PM001G EN P March 2004 C 8 _1EC61131 3 Compliance Table Feature Feature Description Extensions and Implementation Notes Number Number 27 3 High Low limit LIMIT HLL instruction in FBD and ST 27 4 Multiplexer MUX MUX instruction in FBD 28 5 Comparison greater than GRT instruction in LD and FBD and gt in ST 28 6 Comparison greater than or equal GRE instruction in LD and FBD and gt in ST 28 7 Comparison equal EQU instruction in LD and FBD and in ST 28 8 Comparison less than LES instruction in LD and FBD and lt in ST 28 9 Comparison less than or equal LEQ instruction in LD and FBD and lt in ST 28 10 Comparison not equal NEQ instruction in LD and FBD and lt gt in ST 29 1 String length LEN Contained as parameter of STRING data type 29 4 Middle string MID MID instruction in LD and ST 29 5 String concatenation CONCAT CONCAT instruction in LD and ST 29 6 String insert INSERT INSERT instruction in LD and ST 29 7 String delete DELETE DELETE instruction in LD and ST 29 9 Find string FIND FIND instruction in L
106. item Lane DINT Decimal Destination for the item based on its ID Publication 1756 PM001G EN P March 2004 13 6 Process ASCII Characters Publication 1756 PM001G EN P March 2004 Search for the Characters SIZE Size in Elements Source sort_table 0 776 Dim To Vary Size sort_table_search LEN 1e File Search Compare Control sort_table_search Length 1 Position 0e Mode ALL Expression product_id sort_table sort_table_search POS Product_IB 1 The SIZE instruction counts the number of elements in the sort_table array This array contains the product ID for each item and the corresponding lane number for the item Tag Name Type sort_table PRODUCT_INFO number of items where number of items is the number of items hat you must sort 2 The SIZE instruction counts the number of elements in Dimension 0 of the array In this case that is the only dimension 3 The SIZE instruction sets the Length of the subsequent FSC instruction equal to the size of the sort_table array This ensures that the FSC instruction searches the exact size of the array Tag Name Type sort_table_search CONTROL Process ASCII Characters 13 7 SIZE Size in Elements Source sort_table 0 Dim To Vary Size sort_table_search LEN 1 File Search Compare Control sort_table_search Length 1 Pasition 0e Mode ALL Expression product_id sort_table sort_table_search POS Product_ID 4
107. keyword You can use these key words To determine if Use the value you are storing cannot fit into the destination because it is SV either e greater than the maximum value for the destination e less than the minimum value for the destination Important Each time S V goes from cleared to set it generates a minor fault type 4 code 4 the instruction s destination value is 0 Z the instruction s destination value is negative S N an arithmetic operation causes a carry or borrow that tries to use bits S C that are outside of the data type For example e adding 3 9 causes a carry of 1 e subtracting 25 18 causes a borrow of 10 this is the first normal scan of the routines in the current program S FS at least one minor fault has been generated S MINOR e The controller sets this bit when a minor fault occurs due to program execution e The controller does not set this bit for minor faults that are not related to program execution such as battery low Publication 1756 PM001G EN P March 2004 Getting Started 1 23 Get and Set System Data The controller stores system data in objects There is no status file as in the PLC 5 controller Use the GSV SSV instructions get and set controller system data that is stored in objects e The GSV instruction retrieves the specified information and places it in the destination e The SSV instruction sets the specified attribute with data from the sour
108. location For example Publication 1756 PM001G EN P March 2004 9 20 Program a Function Block Diagram Connect Elements To define the flow of data Show or Hide a Pin Wire Elements Together Mark a Wire with the Assume Data Available Indicator Show or Hide a Pin When you add a function block instruction a default set of pins for the parameters are shown The rest of the pins are hidden To show or hide a pin a lt 1 Click the JJ button of the block Parameters Tag H y Enableln UL Sources 2 Clear or check the Vis check box of the pin If you want to Then hide a pin Clear uncheck its Vis check box show a pin Check its Vis check box 3 Choose Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 21 Wire Elements Together To wire connect two elements together click the output pin of the first element and then click the input pin of the other element A green dot shows a valid connection point For example green dot Mark a Wire with the Assume Data Available Indicator To define a wire as an input right click the wire and choose Assume Data Available input wire _ _ Publication 1756 PM001G EN P March 2004 9 22 Program a Function Block Diagram Assign a Tag To assign a tag to a function block element you have these options Cre
109. must match the configuration for that slot If Then select all information must match Exact Match e type e catalog number e vendor e major and minor revision number all information except the minor revision number Compatible Module no information must match Disable Keying Communicate with 0 2 7 Address 1 0 Data When you add a module to the 1 0 Configuration folder I O information is presented as a set of tags e Each tag uses a structure of data The structure depends on the specific features of the I O module e The name of the tags is based on the location of the I O module in the system Controller Organizer xj E Controller Controller_Name A Controller Tags E3 Controller Fault Handler 9 Power Up Handler B E Tasks E fal MainTask Cy MainProgram 9 Unscheduled Programs EI Motion Groups E Trends 3 Data Types a8 1 O Configuration the software automatically creates controller scoped tags for the module An I O address follows this format Location Slot Type Member SubMember PENE Optional Where Is Location Network location LOCAL same chassis or DIN rail as the controller ADAPTER NAME identifies remote communication adapter or bridge module Slot Slot number of I O module in its chassis or DIN rail Type Type of data input O output
110. name for the AWA instruction and define the data type as SERIAL_PORT_CONTROL Enter the number of characters to send Omit the characters that are appended by the instruction Communicate with an ASCII Device 12 15 EXAMPLE When the temperature exceeds the high limit Gemp_high is on the AWA instruction sends five characters from the string 1 tag to a MessageView terminal e The 74 counts as one character It is the hex code for the Ctrl T character e The instruction also sends appends the characters defined in the user protocol In this example the AWA instruction sends a carriage return 0D which marks the end of the message temp_high AWA ASCII Write Append EN Channel Source string 1 DN gt 1425 1 SerialPort Control temp_high_write ERD String Length 5 Characters Sent 6 42229 8 Go to Enter ASCII Characters on page 12 21 Publication 1756 PM001G EN P March 2004 12 16 Communicate with an ASCII Device 9 Enter the following rung 12 11 10 a ASCII Write Channel Source Aa SerialPort Control SerialPort Control Length Characters Sent 13 14 42236b 10 Enter the input condition s that determines when the characters are to be sent e You can use any type of input instruction e The instruction must change from false to true each time the characters are to be sent 11 Enter 0 12 Enter the tag name that stores the ASCII characters De
111. not compatible 7 Choose Download The project downloads to the controller and RSLogix 5000 software goes online 8 Skip the rest of this procedure 9 Choose Update Firmware Look for Firmware Update Files In d Program Files ControlFL4SH x Revision Update Type File 10 _ gt Installed Firmware Update File Directory d Program Files ControlFLASH n Cancel Help sans 10 Select the required revision for the controller 11 Choose Update A dialog box asks you to confirm the update 12 To update the controller choose Yes The following events occur e The firmware of the controller is updated e The project downloads to the controller e RSLogix 5000 software goes online Publication 1756 PM001G EN P March 2004 1 16 Getting Started Select a Mode for the To change the operating mode of the controller use the keyswitch on Controller the front of the controller IMPORTANT RUN M Ma 1 0 ME RS232 BAT EE EE OK RUN REM PROG e All modes send and receive data in response to a message from another controller e All modes produce and consume tags Do you need to schedule a Yes ControlNet network No B Do you want to execute the Y No logic in the controller i Yes Do you want the logic to Yes control the output devices Do you want to prevent No RSLogix 5000 software from m D changing the mode Ye
112. number of unconnected buffers Source_Array 4 MOV CLR MOV Move Source Clear Dest Source_Array 1 0e Move Source 1 17 Dest Source_Array 0 Dest Source_Array 2 0e 0e CLA MOV Move Source Clear Dest Source_Array 3 12 0e Dest Source_Array 4 oe UCB_Set EN MSG Type CIP Generic Message Control UCB_Set E h gt where Tag Name Type Description UCB_Set MESSAGE Control tag for the MSG instruction Source_Array SINT 8 Source values for the MSG instruction including the number of unconnected buffers that you want Publication 1756 PM001G EN P March 2004 10 28 Communicate with Other Devices Convert Between INTs and DINTs Read 16 Bit Integers Write 16 Bit Integers Publication 1756 PM001G EN P March 2004 In the Logix5000 controller use the DINT data type for integers whenever possible Logix5000 controllers execute more efficiently and use less memory when working with 32 bit integers DINTs If your message is to a device that uses 16 bit integers such as a PLC 5 or SLC 500 controller and it transfers integers not REALs use a buffer of INTs in the message and DINTs throughout the project This increases the efficiency of your project Data from the Buffer of INTs DINTs for use in device the project Word 1 INT_Buffer 0 DINT_Array 0 Word 2 INT Buffer 1
113. of one specific value Description The syntax is specify as many alternative selector values paths as you need optional Publication 1756 PM001G EN P March 2004 CASE numeric expression OF selector1 selector2 selector3 ELSE END_CASE lt statement gt lt q statements to execute when numeric_expression selector lt statement gt lt q statements to execute when numeric_expression selector2 lt statement gt lt q statements to execute when numeric_expression selector3 lt statement gt lt _q statements to execute when numeric_ expression any selector See the table on the next page for valid selector values Program Structured Text 7 17 The syntax for entering the selector values is When selector is Enter one value value statement multiple distinct values value1 value2 valueN lt statement gt Use a comma to separate each value a range of values value1 valueN lt statement gt Use two periods to identify the range distinct values plus a range valuea valueb value valueN lt statement gt of values The CASE construct is similar to a switch statement in the C or C programming languages However with the CASE construct the controller executes only the statements that are associated with the first matching selector value Execution always breaks after the statements of that selector and goes
114. of the OCON 4 Type a name that identifies the connector and press Enter Add an ICON 1 Add an input wire connector CON and place it near the input pin that gets the value from the corresponding OCON 2 Wire the ICON to the input pin 3 Double click the operand area of the ICON 4 Select the name of the OCON that supplies the value to this connector and then click a blank spot on the diagram Publication 1756 PM001G EN P March 2004 9 26 Program a Function Block Diagram Verify the Routine As you program your routine periodically verify your work 1 In the top most toolbar of the RSLogix 5000 window click B 2 If any errors are listed at the bottom of the window a To go to the first error or warning press F4 b Correct the error according to the description in the Results window c Go to step 1 3 To close the Results window press Alt 1 Publication 1756 PM001G EN P March 2004 Chapter 10 Using This Chapter Connections Term connection Communicate with Other Devices Use this chapter to plan your communication between the controller and I O modules or other controllers For this information See page Connections 10 1 Produce and Consume a Tag 10 9 Execute a Message MSG Instruction 10 19 Get or Set the Number of Unconnected Buffers 10 25 Convert Between INTs and DINTs 10 28 A Logix5000 controller uses connections for many but not all of its
115. pe minor_fault_check DN If minor_fault_bits 10 is on then the battery is low minor_fault_bits 10 battery_low_warning EAA AANA 42373 r Publication 1756 PM001G EN P March 2004 Monitor Minor Faults 16 3 The following example checks for a minor fault that is caused by a specific instruction EXAMPLE Check for a minor fault that is caused by an instruction Multiplies value_a by 1000000 and checks for a minor fault such as a math overflow e To make sure that a previous instruction did not produce the fault the rung first clears S MINOR e The rung then executes the multiply instruction e If the instruction produces a minor fault the controller sets S MINOR e If S MINOR is set the GSV instruction gets information about the fault and resets S MINOR S MINOR S MINOR UL Multiply Source vyalue_a pe SouceB 1000000 Dest value_b pe GSV S MINOR Get System Value Class name PROGRAM Instance name THIS Attribute Name MINORFAULTRECORD Dest minor_fault_record Time_Low pe 42373 Publication 1756 PM001G EN P March 2004 16 4 Minor Fault Codes Monitor Minor Faults Use the following table to determine the cause and corrective action for a minor fault The type and code correspond to the type and code displayed in these locations e Controller Properties dialog box Minor Faults tab e PROGRAM object MINORFAULTRECORD attribute Table 16 1 Minor Fault Types and Codes
116. process See action step transition Publication 1756 PM001G EN P March 2004 Glossary 36 A step executes continuously until a logic condition tells the controller to go to the next step Publication 1756 P M001G EN P March 2004 SINT A data type that stores an 8 bit 1 byte signed integer value 128 to 127 Minimize your use of this data type e Typically instructions convert SINT or INT values to an optimal data type usually a DINT or REAL value during execution Because this requires additional time and memory minimize the use of the SINT and INT data types source key A mechanism that limits who can view a routine e You assign a source key to one or more routines e Source keys follow the same rules for names as other RSLogix 5000 components such as routines tags and modules e To assign a source key to a routine protect the routine use RSLogix 5000 software You have to first activate the tool e A source key file sk dat stores the source keys The source key file is separate from the RSLogix 5000 project files acd e To view a routine that is protected by a source key you must have the source key e Without the source key you cannot open a routine RSLogix 5000 software displays Source Not Available e Regardless of whether or not the source key is available you can always download the project and execute all the routines See name step In a sequential function char
117. produced tag and corresponding consumed tag or tags To share tags with a PLC 5C controller use a user defined data type To This Then produce integers Create a user defined data type that contains an array of INTs with an even number of elements such as INT 2 When you produce INTs you must produce two or more only one REAL Use the REAL data type value more thanone Create a user defined data type that contains an array of REALs REAL value consume integers Create a user defined data type that contains the following members Data type Description DINT Status INT x where x is the output size of the data Data produced by a from the PLC 5C controller If you are PLC 5C controller consuming only one INT omit x Limit the size of the tag to lt 500 bytes e f you must transfer more than 500 bytes create logic to transfer the data in packets See chapter 11 e f you produce the tag over a ControlNet network the tag may need to be less than 500 bytes Refer to Adjust for Bandwidth Limitations on page 10 13 Use the highest permissible RPI for your application If the controller consumes the tag over a ControlNet network use a binary multiple of the ControlNet network update time NUT For example if the NUT is 5 ms use an RPI of 5 10 20 40 ms etc Combine data this goes to the same controller If you are producing several tags for the same cont
118. protect 4 Click Protect Apply Source Key x Source Key to apply to selected routines 7 5 Cancel 6 Allow viewing of routine 5 Type a name that you want to use as the source key Or select an existing source key from the drop down list 6 If someone does not have the source key do you want to let them open and view the routine If Then No Clear uncheck the A low viewing of routine check box default Yes Check the Allow viewing of routine check box 7 Choose OK 8 When you have assigned the required source keys to the project click Close 9 From the File menu choose Save Remove Access to a Protected Routine IMPORTANT Before you remove the source key file sk dat from a computer either write down the source keys or make a copy of the file and store it in a secure location 1 Open the RSLogix 5000 project that is protected 2 From the Tools menu choose Security gt Configure Source Protection Publication 1756 PM001G EN P March 2004 Secure a Project 18 9 f Source Protection Configuration x Source Key File C RSLogix 5000 Projects sk dat View Clear 4 3 outines Source Keys Viewable HER MainProgram Protect Routine _A Routine _B Unprotect SI Routine_C Routine_D 3 Click Clear A dialog box asks if you want to delete the source key file sk dat 4 Do you want to remove the source key file from t
119. task Controller Controller_1 Controller Tags 3 Controller Fault Handler 3 Power Up Handler B E Tasks Ba MainTask ome MainProgram oe Program Tags 1 In the controller organizer right click the task and choose Properties 2 Click the Monitor tab fal Task Properties Task number of overlaps since the counter was last reset 3 To close the dialog box choose Lo Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 11 Programmatically Check for Overlaps When an overlap occurs the controller e logs a minor fault to the FAULTLOG object e stores overlap information in the TASK object for the task To write logic to check for an overlap use a Get System Value GSV instruction to monitor either of the following objects If you want to Then access the following object and attribute Object Attribute Data Type Description determine if an overlap occurred FAULTLOG MinorFaultBits DINT Individual bits that indicate a minor fault for any task To determine if Examine this bit An instruction produced a minor 4 fault An overlap occurred for a task 6 l The serial port produced a minor 9 fault The battery is not present or 10 needs replacement determine if an overlap occurred TASK Status DINT Status information about the task Once the controller for a specific task sets one of these bits you must manually clear the bit To determine if E
120. that the step turned on Programmatic Reset Automatic Reset use logic to clear let the controller ae data _ automatically clear data Each option requires you to make the following choices 1 Choose a last scan option 2 Based on the last scan option develop your logic so that the last scan returns data to the desired values Choose a Last Scan Option On the last scan of each step you have the following options The option that you choose applies to all steps in all SFCs of this controller If you want to And on the last scan of a step Then See control which data to clear Execute only P and PO actions and use them to Use the Don t Scan Option page 5 34 clear the required data Execute a actions and use either of these Use the Programmatic Reset Option page 5 35 options to clear the required data e status bits of the step or action to condition logic e P and PO actions let the controller clear data p Use the Automatic Reset Option page 5 38 Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 33 f Controller Properties Controller_Name Publication 1756 PM001G EN P March 2004 5 34 Design a Sequential Function Chart Characteristic The following table compares the different options for handling the last scan of a step During the last scan of a step this option does the following
121. the periodic task interrupts the execution of the continuous task When the periodic task is done control returns to the continuous task For more information on using multiple tasks see chapter 4 Figure 1 2 Example of a Periodic Task That Executes Every 10 ms periodic task 5 10 15 20 25 30 35 40 45 50 elapsed time ms Publication 1756 PM001G EN P March 2004 Getting Started 1 19 Configure a Task To configure the execution of a task use the properties dialog box for the task Controller Controller_1 Controller Tags E3 Controller Fault Handler EI Power Up Handler 6 Tasks DA MainTask 4 aE MainProgram pene Program Tags ER MainRoutine 1 In the controller organizer right click the task that you want to configure and choose Properties 2 Click the Configuration tab fal Task Properties MainTask Periodic 3 From the Type list choose type of execution for the task Only one continuous task is permitted 4 If you chose Periodic in step 3 then type the rate at which you want the task to execute 5 Choose o K Publication 1756 PM001G EN P March 2004 1 20 Getting Started Create Multiple Programs A Logix5000 controller lets you divide your application into multiple programs each with its own data There is no need to manage conflicting tag names between programs This makes it easier to re use both code and tag names in multiple programs
122. the periodic task is done Q 3 Number of event tasks Limit the number of event tasks Each additional task reduces the processing time that is available for other tasks This could cause an overlap QO 4 Automatic Output Processing For an event task you can typically disable automatic output processing default This reduces the elapsed time of the task To verify this decision see Figure 4 1 on page 4 14 Publication 1756 PM001G EN P March 2004 4 40 Manage Multiple Tasks EXAMPLE At the labeling station of a bottling line you want to check the position of the label on the bottle e When the axis reaches the position that is defined as the watch point check the label and perform any required adjustment e Due to the speed of the line you have to arm axis for the watch position within the event task imal Task Properties Task_1 General Configuration Program Schedule Monitor Type Event Let the watch position Trigger Axis Watch for the axis named Axis_1 trigger the event gt Tag Avwis_1 x task IT Execute Task If No Event Occurs within 1000 000 ms This event task interrupts all other tasks Priority fi Lower Number Yields Higher Priority The following logic arms and re arms the axis for the watch position Continuous task If Arm_Watch 1 system is ready to set up a watch position then The ONS instruction limits the execution of the EVENT instructi
123. the SFC toolbar click the button 3 Add the step that follows the selection branch green dot 4 To wire the selection branch to the step click the top pin of the step A and then click the horizontal line of the branch B A green dot shows a valid connection point Publication 1756 PM001G EN P March 2004 6 8 Program a Sequential Function Chart Set the Priorities of a By default the SFC checks the transitions that start a selection branch from left to right If you want to check a different transition first Selection Branch assign a priority to each path of the selection branch For example it is a good practice to check for error conditions first Then check for normal conditions To assign priorities to a selection branch 1 Right click the horizontal line that starts the branch and choose Set Sequence Priorities Set Sequence Priorities x 2 J Use default priorities left to right on routine Prior Seauence Deseo 1 Tran_001 3 p 2 Tran 002 3 Tran_003 4 2 Clear uncheck the Use default priorities check box 3 Select a transition 4 Use the Move buttons to raise or lower the priority of the transition 5 When all the transitions have the desired priority choose When you clear uncheck the Use default priorities check box numbers show the priority of each transition Step_001 m Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6
124. the axis for the watch position Arm LBL Axis_1_MAW EN AW Motion Arm Watch Axis Axis_1 J t b gt Motion Control Axis_1_ MAW Trigger Condition Forward Position The controller does not clear the bits of the Status attribute once they are set To use a bit for new status information you must manually clear the bit If Task_Status 0 1 then clear that bit The OTU instruction sets Task_Status 0 0 The SSV instruction sets the Status attribute of THIS task Zask_1 Task_Status This includes the cleared bit Task_Status 0 Task_Status 0 SV Set System Value Class Name TASK Instance Name THIS Attribute Name Status Source Task_Status 0e Publication 1756 PM001G EN P March 2004 4 42 Manage Multiple Tasks Using the Consumed Tag To trigger an event task based on data from a consumed tag use the Tri gger Consumed Tag trigger fl Task Properties Event_Task General Configuration Program Schedule Monitor Let an event trigger this task Type Event Let a consumed tag trigger the task Trigger Consumed Tag Let this consumed tag trigger the task Tag Consumed Tag 1 7 Execute Task If No Event Occurs within 1 Priority fi Lower Number Yields Higher Priority ms A produced consumed tag relationship can pass an event trigger along with data to a consumer controller Typically you use an Immediate Output COT instruction
125. the front of the controller Note You do not enter an instance name with this attribute This device use a DINT as attribute applies to the entire collection of modules the destination Value data type ae 0 LED off No MODULE objects are configured for the controller there are no modules in the 1 0 Configuration section of the controller organizer 1 Flashing red None of the MODULE objects are Running 2 Flashing green At least one MODULE object is not 3 Solid green All the Module objects are Running determine if FaultCode INT A number which identifies a module fault if one occurs communication has timed out with a For efficiency In the Instance Name choose the device whose connection you want specific device use a DINT as to monitor Make sure to assign a name to the device in the 1 0 the destination Configuration folder of the project data type Publication 1756 PM001G EN P March 2004 10 8 Communicate with Other Devices EXAMPLE Monitor the Health of a Module The GSV instruction continuously sets _O_LED_Status DINT tag status of the I O LED of the controller GSV 1 Get System Value Class Name MODULE Instance Name Attribute Name LedStatus Dest _O_LED_Status oe If _O_LED_Status 2 then communication has timed out faulted with at least one module The GSV instruction sets Module_3_Fault_Code fault code for Module_3 EQU GSV 2 Equal Get System Value Source _O0_LED_Stat
126. the other element B A green dot shows a valid connection point Publication 1756 PM001G EN P March 2004 6 4 Program a Sequential Function Chart Add and Automatically Connect Elements 1 Select click the element to which you want to connect a new element 2 With the element still selected click the toolbar button for the next element Drag and Drop Elements From the SFC toolbar drag the button for the required element to the desired connection point on the SFC A green dot shows a valid connection point 4 ol sl aaa 6 a ol o HIFA SFC green dot Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 5 Create a Simultaneous Start a Simultaneous Branch Branch 1 On the SFC toolbar click the button Then drag the new branch to the desired location 2 To add a path to the branch select click the first step of the path that is to the left of where you want to add the new path Then click the button green dot 3 To wire the simultaneous branch to the preceding transition click the bottom pin of the transition A and then click the horizontal line of the branch B A green dot shows a valid connection point End a Simultaneous Branch 1 Select the last step of each path in the branch To select the steps you can either e Click and drag the pointer around the steps that you want to select e Click the first step Then press and hold Shift
127. the position in the string to start the search e Initially you can use 0 to find the first delimiter e To decode additional data increase this value to search for the next delimiter 9 Enter a tag name to store the location of the delimiter Define the data type as a DINT Publication 1756 PM001G EN P March 2004 13 16 Process ASCII Characters 10 11 IND Find String Source MID Middle String Source Oty Start Search Start Result Dest 42810 12 13 10 Enter the string tag that contains the value 11 Enter the maximum number of characters that this value can contain 12 Enter the tag that stores the position of the delimiter The tag from step 9 13 Enter a tag name to store this value Define the data type as a string 14 Which type of conversion instruction did you use If Then STOR Go to step 15 STOD Go to step 18 Publication 1756 PM001G EN P March 2004 IND MID STOR Find String Middle String String to Real Source Source Source Start Result 15 16 17 Start Result 18 19 20 Search IND Find String Source Search Process ASCII Characters 13 17 15 16 Oty Dest Start Dest 42809 Enter the tag that stores the value The tag from step 13 Enter a tag name to store the value for use in your application Define the data type as REAL Go to step 20
128. the stop the X bit turns on the stop e The X bit clears if you configure the SFCs to restart at the initial step and the controller changes from program to run mode e n a nested SFC the X bit also clears if you configure the SFCs for automatic reset and the SFC leaves the step that calls the nested SFC determine the target of an SFC Reset BOOL An SFC Reset SFR instruction resets the SFC to a step or stop Reset SFR instruction that the instruction specifies e The Reset bit indicates to which step or stop the SFC will go to begin executing again e Once the SFC executes the Reset bit clears determine how many times a Count DINT This is nota count of scans of the stop stop has become active e The count increments each time the stop becomes active e t increments again only after the stop goes inactive and then active again e The count resets only if you configure the SFC to restart at the initial step With that configuration it resets when the controller changes from program mode to run mode Publication 1756 PM001G EN P March 2004 5 48 Design a Sequential Function Chart If you want to Then check or set Data type this member use one tag for the various Status DINT status bits of this stop Publication 1756 PM001G EN P March 2004 Details For this member Use this bit Reset 22 X 31 Design a Sequential Function Chart 5 49 Nest an SFC One method for organizing your project is
129. to create one SFC that provides a high level view of your process Each step of that SFC calls another SFC that performs the detailed procedures of the step nested SFC The following figure shows one way to nest an SFC In this method the last scan option of the SFC is configured for either Programmatic reset or Don t scan If you configure the SFC for Automatic reset then step 1 is unnecessary SFC_a i P1 Action_ooo sfr SFC_b SFC_b Step 1 SFC_a_step_x SFC_b stop x 0 SFC _b stop x 4 SFC_b stp G 1 Reset the nested SFC e The SFR instruction restarts the SFC_b at SFC_b_Step_1 Each time the SFC_a leaves this step and then returns you have to reset the SFC_b e The action also clears the X bit of the stop element 2 Call the SFC_b 3 Stop the SFC_b This sets the X bit of the stop element 4 Use the X bit of the stop element to signal that the SFC_b is done and it is time to go to the next step Publication 1756 PM001G EN P March 2004 5 50 Design a Sequential Function Chart Pass Parameters To pass parameters to or from an SFC place a Subroutine Return element in the SFC Input Parameters Return Parameters x z SFC_b m SBR Subroutine RET Return Configure When to Return By default an SFC executes a step or group of simultaneous steps and then returns to the operating system OS or the calling routine JSR to the OS JSR pee 8 i
130. to load the project back into the user memory RAM of the controller If you want to load it Then select Notes whenever you turn on or cycle the chassis On Power Up e During a power cycle you will lose any online power changes tag values and network schedule that you have not stored in the nonvolatile memory A 1784 CF64 Industrial CompactFlash card may also change the firmware of the controller e This occurs if both the revision of the project on the CompactFlash card and the revision of the controller firmware are gt 12 0 e For more information see Determine How to Handle Firmware Updates on page 17 6 You can always use RSLogix 5000 software to load the project whenever there is no project in the controller On Corrupt Memory For example if the battery becomes discharged and you turn on or cycle the chassis power and the controller loses power the project is cleared from memory When power is restored this load option loads the project back into the controller A 1784 CF64 Industrial CompactFlash card may also change the firmware of the controller e This occurs if both the revision of the project on the CompactFlash card and the revision of the controller firmware are gt 12 0 e For more information see Determine How to Handle Firmware Updates on page 17 6 You can always use RSLogix 5000 software to load the project only through RSLogix 5000 software User Initiated Publication
131. to the END_CASE statement Arithmetic Status Flags not affected Fault Conditions none Publication 1756 PM001G EN P March 2004 7 18 Program Structured Text Example If you want this If recipe number 1 then Ingredient A outlet 1 open 1 Ingredient B outlet 4 open 1 If recipe number 2 or 3 then Ingredient A outlet 4 open 1 Ingredient B outlet 2 open 1 If recipe number 4 5 6 or 7 then Ingredient A outlet 4 open 1 Ingredient B outlet 2 open 1 If recipe number 8 11 12 or 13 th Ingredient A outlet 1 open 1 en Ingredient B outlet 4 open 1 Otherwise all outlets closed 0 Publication 1756 PM001G EN P March 2004 Enter this structured text CASE recipe number OF 1 Ingredient _A Outlet_1 1 Ingredient _B Outlet_4 1 2 3 Ingredient _A Outlet_4 1 Ingredient _B Outlet_2 1 4 7 Ingredient _A Outlet_4 1 Ingredient _B Outlet_2 1 8 11 13 Ingredient_A Outlet_1 1 Ingredient _B Outlet_4 1 ELSE Ingredient A Outlet_1 0 Ingredient A Outlet 4 0 Ingredient _B Outlet_ 2 0 Ingredient _B Outlet 4 0 END_ CASE The tells the controller to also clear the outlet tags whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via
132. use later on For example urn on the fan A 1 Click A text box appears a 2 Drag the text box to a location near the element to which it applies 3 Double click the text box and type the note Then press Ctrl Enter 4 As you move the element on the SFC what do you want the text box to do If you the text box to Then stay in the same spot Stop You are done move with the element to which it Go to step 5 applies Step_002 a a green dot 5 Click the pin symbol in the text box and then click the SFC element to which you want to attach the text box A green dot shows a valid connection point Publication 1756 PM001G EN P March 2004 6 26 Program a Sequential Function Chart Show or Hide Text Boxes or Tag Descriptions Categories El Application Font Color Tag Display Ladder Editor Display Font Color SFC Editor FBD Editor Font Color Publication 1756 PM001G EN P March 2004 Element Naming You have the option of showing or hiding both text boxes and tag descriptions If you choose to show descriptions the SFC window only shows the descriptions for steps transitions and stops not actions To show or hide text boxes or descriptions you have these options e Show or Hide Text Boxes or Descriptions e Hide an Individual Tag Description Show or Hide Text Boxes or Descriptions 1 From the Tools menu choose O
133. values or check if conditions are true or false For example tag1 gt 65 e A simple bool expression can be a single BOOL tag e Typically you use bool expressions to condition the execution of other logic Glossary 7 branch There is no limit to the number of parallel branch levels that you can enter The following figure shows a parallel branch with five levels The main rung is the first branch level followed by four additional branches input instruction output instruction a Kei Nae 7 K N You can nest branches to as many as 6 levels The following figure shows a nested branch The bottom output instruction is on a nested branch that is three levels deep input instruction output instruction Jie il gt Sa 22 CaN o Z HTN N byte A unit of memory consisting of 8 bits Publication 1756 PM001G EN P March 2004 Glossary 8 C cache Depending on how you configure a MSG instruction it may use a connection to send or receive data This type of message Andthis communication method Uses a connection _ CIP data table read or write pe J PLC2 PLC3 PLC5 or SLC all types CIP CIP with Source ID DH y CIP generic your option block transfer read or write p gt J You can connect CIP generic messages But for most applications we recommend you leave CIP generic messages unconnected
134. was encountered 9 5 DF1 slave poll timeout Determine and correct delay for polling The poll watchdog has timed out for slave The master has not polled this controller in the specified amount of time 9 9 Modem contact was lost Correct modem connection to the controller DCD and or DSR control lines are not being received in proper sequence and or state 10 10 Battery not detected or needs to be replaced Install new battery Publication 1756 PM001G EN P March 2004 16 6 Monitor Minor Faults Notes Publication 1756 PM001G EN P March 2004 Chapter 17 Store and Load a Project Using Nonvolatile Memory When to Use This Procedure IMPORTANT Nonvolatile memory stores the contents of the user memory at the time that you store the project e Changes that you make after you store the project are not reflected in nonvolatile memory e If you make changes to the project but do not store those changes you overwrite them when you load the project from nonvolatile memory If this occurs you have to upload or download the project to go online e If you want to store changes such as online edits tag values or a ControlNet network schedule store the project again after you make the changes Use this procedure to store or load a project using the nonvolatile memory of a controller e If the controller loses power and does not have enough battery capacity it loses the project in user memory Nonvolatile memor
135. z 0 3 e You can modify array dimensions when programming offline without loss of tag data You cannot modify array dimensions when programming online application The combination of routines programs tasks and I O configuration used to define the operation of a single controller See project B base tag A tag that actually defines the memory where a data element is stored See alias tag Publication 1756 PM001G EN P March 2004 Glossary 6 Publication 1756 P M001G EN P March 2004 bidirectional connection A connection in which data flows in both directions from the originator to the receiver and from the receiver to the originator See connection unidirectional connection binary Integer values displayed and entered in base 2 each digit represents a single bit Prefixed with 2 Padded out to the length of the boolean or integer 1 8 16 or 32 bits When displayed every group of four digits is separated by an underscore for legibility See decimal hexadecimal octal bit Binary digit The smallest unit of memory Represented by the digits 0 cleared and 1 set BOOL An data type that stores the state of a single bit where e 0 equals off e 7 equals on BOOL expression In structured text an expression that produces either the BOOL value of 1 true or 0 false e A bool expression uses bool tags relational operators and logical operators to compare
136. 0 Data 2 a digital output drill_1_home_limit Local 2 1 Data 2 C Local 2 1 Data 2 C point When the alias tag turns drill_1_on Local 0 0 Data 2 C Local0 0 Data 2 C on the output tag also turns on drill_1_retract Local 0 0 Data 4 C Local 0 0 Data 4 C hole_position A machine_on north_tank is an alias for tanks 0 1 north_tank tanks 0 1 north_tank_drain 42360 The C indicates that the tag is at the controller scope A common use of alias tags is to program logic before wiring diagrams are available 1 Publication 1756 PM001G EN P March 2004 For each I O device create a tag with a name that describes the device such as conveyor for the conveyor motor Program your logic using the descriptive tag names You can even test your logic without connecting to the I O Later when wiring diagrams are available add the I O modules to the I O configuration of the controller I O points or channels Finally convert the descriptive tags to aliases for their respective stop is an alias for Local 2 Data gt gt the stop button on the operator panel conveyor_onis an alias for Local 0 0 Data 0 p the starter contactor for the Organize Tags 3 25 The following logic was initially programmed using descriptive tag names such as stop and conveyor_on L
137. 01G EN P March 2004 In this example the value of tagA is stored at the beginning of the routine s execution The stored value is used when Block_01 executes The same stored value is also used when Blcock_02 executes If the value of tagA changes during execution of the routine the stored value of tagA in the IREF does not change until the next execution of the routine Block_01 This example is the same as the one above The value of tagA is stored only once at the beginning of the routine s execution The routine uses this stored value throughout the routine Block_01 Program a Function Block Diagram 9 7 Starting with RSLogix 5000 software version 11 you can use the same tag in multiple IREFs and an OREF in the same routine Because the values of tags in IREFs are latched every scan through the routine all IREFs will use the same value even if an OREF obtains a different tag value during execution of the routine In this example if tagA has a value of 25 4 when the routine starts executing this scan and Block_01 changes the value of tagA to 50 9 the second IREF wired into Block_02 will still use a value of 25 4 when Block_02 executes this scan The new tagA value of 50 9 will not be used by any IREFs in this routine until the start of the next scan Block_04 Block_02 Order of Execution The RSLogix 5000 programming software automatically determines the order of execution for the function bloc
138. 11 x or later yes DriveLogix5720 various 10 x or later no DriveLogix5730 various 13 x or later yes FlexLogix5433 1794 133 10 x or later no FlexLogix5434 Series B 1794 L34 B 11 x or later no Publication 1756 PM001G EN P March 2004 17 4 Store and Load a Project Using Nonvolatile Memory Prevent a Major Fault During a Load If the major and minor revision of the project in nonvolatile memory does not match the major and minor revision of the controller a major fault may occur during a load Then If the controller does not use a CompactFlash card Make sure that the major and minor revision of the project in nonvolatile memory matches the major and minor revision of the controller The nonvolatile memory of the controller stores only the project It does not store the firmware for the controller uses a CompactFlash card Publication 1756 PM001G EN P March 2004 The CompactFlash card stores the firmware for projects gt 12 0 Depending on the current revision of the controller you may be able to use the CompactFlash card to update the firmware of the controller and load the project See Determine How to Handle Firmware Updates on page 17 6 Format a CompactFlash Card When you store a project to a 1784 CF64 Industrial CompactFlash memory card the controller formats the card if required 11 x Store and Load a Project Using Nonvolatile Memory 17 5 Then If the revision of your project is The
139. 14 6 Force an Input Value oana uaaa 14 7 Force an Output Value a e a is eng ace need caren wr Beet 14 7 Addan VO Fore nepo ae Spiga Sot tb ante dl Ge Gb doch tas Seok Badd 14 8 When to Use Step Through apiotay x 14 eee Dea eeese 14 9 Step Through a Transition or a Force of a Path 14 9 When to Use an SFC Rote 2 5c tis Addo eo aetna Gx 14 9 Force a Wansitioni 2d oh en ae ek tae ee 14 9 Force a Simultaneous Path ovis eaten See 14 11 Add an SFC Force ouaa aaa a 14 12 Remove or Disable Forces nanoa ea eke wees 14 13 Remove an Individual Pore ih 21442 Shek Ged BS 14 13 Disable All I O Forces nonna naaa 4 ae emg 14 14 Remove All I O Forces 8 oa esa wees Ge eek a oe 14 14 Disable All SFC POres shi 54 ba Oe es es 14 14 Remove All SFC Forces 3 tease eee f2 Seabees 8 14 14 Chapter 15 Using this Chapter 5 Sesh re deeds eed hop sede grated al ble nde GB 15 1 Develop a Fault Routine n nanana ts wk oa ry wee Lae 15 1 Choose Where to Place the Fault Routine 15 2 Create a Fault Routine fora Program 15 2 Create a Routine for the Controller Fault Handler 15 3 Create a Routine for the Power Up Handler 15 4 Programmatically Clear a Major Fault 15 5 Create a Data Type to Store Fault Information 15 5 Get the Fault Type and Code onnaa naaa 15 6 Check for a Specific Fault 34k eis pee eee eek 15 7 Clear tie Faults palapa a pie a bod
140. 15 13 Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 59 Notes Publication 1756 PM001G EN P March 2004 4 60 Manage Multiple Tasks Publication 1756 PM001G EN P March 2004 Chapter 5 When to Use This Procedure Design a Sequential Function Chart Use this procedure to design a sequential function chart SFC for your process or system An SFC is similar to a flowchart of your process It defines the steps or states through which your system progresses Use the SFC to e organize the functional specification for your system e program and control your system as a series of steps and transitions By using an SFC to specify your process you gain these advantages e Since an SFC is a graphical representation of your process it is easier to organize and read than a textual version In addition RSLogix 5000 software lets you add notes that clarify steps or capture important information for use later on print the SFC to share the information with other individuals e Since Logix5000 controllers support SFCs you do not have to enter the specification a second time You are programming your system as you specify it By using an SFC to program your process you gain these advantages e graphical division of processes into its major logic pieces steps e faster repeated execution of individual pieces of your logic e simpler screen display e reduced time to design and debug your program
141. 1756 PM001G EN P March 2004 17 8 Store and Load a Project Using Nonvolatile Memory Examples Here are some example uses for the different load options Example Description 1 1 You update the firmware of the controller to the desired revision Ses a Nonvolatile memory pee a Load Image On Power Up 2 You store the project for the controller in nonvolatile memory x Load Mode Program 3 When you turn on power to the controller after installation the S project loads into the controller 4 The controller remains in program mode 2 Nonvolatile memory 1 You store the project for the controller in nonvolatile memory The major and minor revision of firmware in the controller match the Load Image On Corrupt Memor major and minor revision of the project in nonvolatile memory Load Mode Run ee 2 If the battery of the controller becomes completely discharged and SN power to the controller is interrupted the project is cleared from g ae controller memory 3 When power is restored the project automatically loads into the controller and the controller returns to the run mode 3 1 The controller fails 2 You remove the CompactFlash card 3 3 You replace the failed controller with a new controller af Load Image
142. 3 In the Controller Tags window right click the tag that you want to produce and choose Edit Tag Properties i Tag Properties Produced _Tag Produced_Tag 4 Select the Produced option button 5 Click the Connection tab Tag Properties Produced _Tag 6 Type or select the number of controllers that will consume receive the tag 7 Choose o Publication 1756 PM001G EN P March 2004 Communicate with Other Devices 10 15 Consume Data That Is Produced by Another Controller 1 Open the RSLogix 5000 project that will consume the data 2 In the controller organizer VO Configuration folder add the controller that is producing the data the other Logix5000 controller or PLC 5C controller fee Controller Controller_1 Controller Tags EI Controller Fault Handler CI Power Up Handler 3 In the controller organizer right click the Controller Tags folder and choose Edit Tags Only controller scoped tags can consume data 4 In the Controller Tags window right click the tag that will consume the data and choose Edit Tag Properties fa Tag Properties Consumed_Tag General Connection Name Consumed_T ag Description ra I TagType Base Alias Produced 5 we Consumed 6 gw Data Type A Eonigure 5 Select the Consumed option button 6 Make sure the data type is as follows If the producing Then the data type should be con
143. 4 Publication 1756 PM001G EN P March 2004 4 48 Manage Multiple Tasks EXAMPLE As parts move along a production line each station requires production specifications for the part at its station To make sure that a station doesn t act on old data an event task signals the arrival of new data for the next part Producer Controller This controller controls station 24 and produces data for the next station station 25 To signal the transmission of new data the controller uses the following elements Produced Tag Properties fa Tag Properties Produced_Tag_1 General Connection Maximum Consumers f4 Produced_Tag is configured to update its event trigger via an IOT instruction V Programmatically IOT Instruction Send Event Trigger to Consume Ladder Logic If New_Data on then the following occurs for one scan The CPS instruction sets Produced_Tag_1 Source_Tag_ The IOT instruction updates Produced_Tag_7 and sends this update to the consuming controller station 25 When the consuming controller receives this update it triggers the associated event task in that controller New Data TriggerConsumer Fons PS Synchronous Copy File Source Source_Tag_ Dest Produced _Taq_ Length 1 IOT Immediate Output Update Tag Produced_Tag_1 continued on next page Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 49 Consumer Controller The controller at stati
144. 5 export ladder logic 8 14 expression BOOL expression sequential function chart 5 26 6 14 structured text 7 4 calculate array subscript 3 29 numeric expression sequential function chart 6 12 6 18 structured text 7 4 order of execution structured text 7 10 structured text arithmetic operators 7 6 Publication 1756 PM001G EN P March 2004 4 Index bitwise operators 7 10 functions 7 6 logical operators 7 9 overview 7 4 relational operators 7 7 extract ASCII characters 13 2 fault clear 1 17 15 1 communication loss 10 5 create user defined 15 13 develop routine to clear fault 15 1 during load from nonvolatile memory 17 4 during prescan 15 8 I O connection 10 5 indirect address 15 8 major fault codes 15 15 minor fault codes 16 4 monitor minor 16 1 test a fault routine 15 12 feedback loop function block diagram 9 8 file See array firmware update during load from nonvolatile memory 17 6 first scan bit 1 22 FOR DO 7 19 force disable 14 3 14 13 enable 14 2 LED 14 4 monitor 14 4 options 14 6 remove 14 3 14 13 safety precautions 14 2 sequential function chart 14 9 14 12 tag 14 6 14 8 function block diagram add an element 9 18 add sheet 9 18 assign immediate value 9 24 choose elements 9 3 connect elements 9 21 create a scan delay 9 12 force a value 14 1 hide a pin 9 20 latching data 9 5 order of execution 9 5 Publication 1756 PM001G EN P March 2004 organize sheets 9 2 rename a block 9 23 reso
145. 56 PM001G EN P March 2004 SFC_STEP structure 5 8 SFC_STOP structure 5 47 SFP instruction 5 51 SFR instruction 5 46 5 49 5 51 sheet add 9 18 connect 9 25 function block diagram 9 2 shut down the controller 15 13 simultaneous branch 5 16 enter 6 5 force 14 9 14 12 step through 14 9 slot number 1 3 source key 18 1 status force 14 4 memory 19 1 monitor 1 22 1 23 status flags 1 22 step add action 6 16 alarm 5 28 assign preset time 6 11 configure 6 11 configure alarm 6 12 data type 5 8 define 5 6 organize in sequential function chart 5 12 rename 6 11 selection branch 5 15 sequence 5 14 simultaneous branch 5 16 timer 5 28 step through simultaneous branch 14 9 transition 14 9 stop data type 5 47 sequential function chart 5 45 store action 5 42 project 17 9 string compare characters 13 4 13 10 convert characters 13 12 create 13 18 data type 12 8 enter characters 12 21 evaluation in structured text 7 8 extract characters 13 2 manipulate 13 1 organize data 12 8 read characters 12 9 search an array of characters 13 4 write characters 12 14 string data type create 12 8 structure create 3 19 organize 3 7 overview 3 3 SFC_ACTION 5 20 SFC_STEP 5 8 SFC_STOP 5 47 user defined 3 17 structured text applications for 1 8 arithmetic operators 7 6 assign ASCII character 7 4 assignment 7 2 bitwise operators 7 10 CASE 7 16 comments 6 23 7 28 components 7 1 contructs 7 12 evaluation of strings 7 8 expression 7 4
146. 6 P M001G EN P March 2004 Glossary 23 To clear minor faults 1 In the controller organizer right click the Controller name_of_controller folder and select Properties 2 Click the Minor Faults tab 3 Use the information in the Recent Faults list to correct the cause of the fault Refer to Minor Fault Codes on page 16 4 4 Click the Clear Minors button See major fault minor revision The 1756 line of modules have major and minor revision indicators The minor revision is updated any time there is a change to a module that does not affect its function or interface See electronic keying major revision multicast A mechanism where a module can send data on a network that is simultaneously received by more that one listener Describes the feature of the ControlLogix I O line which supports multiple controllers receiving input data from the same I O module at the same time multiple owners A configuration setup where more than one controller has exactly the same configuration information to simultaneously own the same input module Publication 1756 PM001G EN P March 2004 Glossary 24 Publication 1756 P M001G EN P March 2004 name Names identify controllers tasks programs tags modules etc Names follow IEC 1131 3 identifier rules and e must begin with an alphabetic character A Z or a z or an underscore _ e can contain only alphabetic characters numeric characters and underscores e can hav
147. 68 to 32 767 Minimize your use of this data type e Typically instructions convert SINT or INT values to an optimal data type usually a DINT or REAL value during execution Because this requires additional time and memory minimize the use of the SINT and INT data types interface module IFM A pre wired I O field wiring arm listen only connection An I O connection where another controller owns provides the configuration data for the I O module A controller using a listen only connection does not write configuration data and can only maintain a connection to the I O module when the owner controller is actively controlling the I O module See owner controller Publication 1756 PM001G EN P March 2004 Glossary 18 Publication 1756 PM001G EN P March 2004 load To copy a project from nonvolatile memory to the user memory RAM of the controller This overwrites any project that is currently in the controller See nonvolatile memory store main routine The first routine to execute when a program executes Use the main routine to call execute other routines subroutines Glossary 19 major fault A fault condition that is severe enough for the controller to shut down unless the condition is cleared When a major fault occurs the controller 1 Sets a major fault bit 2 Runs user supplied fault logic if it exists 3 If the user supplied fault logic cannot clear the fault the controller goes to faulte
148. 9 Return to a Previous Step To jump to a different step in your SFC e Connect a Wire to the Step e Hide a Wire e Show a Hidden Wire Connect a Wire to the Step 1 Click the lower pin of the transition that signals the jump Then click the top pin of the step to which you want to go A green dot shows a valid connection point Typically the resulting connection orients itself along the center of the flowchart and is hard to see 2 To make the jump easier to read drag its horizontal bar above the step to which the jump goes You may also have to reposition some of the SFC elements For example to go to Step_001 from Tran_003 Drag the horizontal bar here Then click here Click here D green dot Publication 1756 PM001G EN P March 2004 6 10 Program a Sequential Function Chart Publication 1756 PM001G EN P March 2004 Hide a Wire If a wire gets in the way of other parts of your SFC hide the wire to make the SFC easier to read To hide a wire right click the wire and choose Hide Wire location to which the wire goes To see the SFC element to which the wire goes click the grid location on the wire Show a Hidden Wire To show a wire that is hidden right click a visible part of the wire and choose Show Wire hidden wire Program a Sequential Function Chart 6 11 Rename a Step Each step uses a tag to store configuration and status information about the step T
149. A a 5 10 15 20 25 elapsed time ms If the controller only contains a periodic task s the system overhead timeslice value has no effect System overhead runs whenever a periodic task is not running periodic task E en elapsed time ms To change the system overhead time slice 1 Open the RSLogix 5000 project 2 In the controller organizer right click the Controller name _ of _ controller folder and select Properties 3 Click the Advanced tab 4 In the System Overhead Time Slice text box type or select the percentage of overhead time 10 90 5 Click OK Publication 1756 PM001G EN P March 2004 Glossary 44 T tag A named area of the controller s memory where data is stored e Tags are the basic mechanism for allocating memory referencing data from logic and monitoring data e The minimum memory allocation for a tag is four bytes When you create a tag that stores a BOOL SINT or INT which are smaller than four bytes the controller allocates four bytes but the data only fills the part it needs User defined data types and arrays store data in contiguous memory and pack smaller data types into 32 bit words The following examples show memory allocation for various tags start which uses the BOOL data type Memory Bits allocation allocation station_status which uses the DINT data type Memory Bits allocation 31 0 allocation station
150. A sequential function chart SFC called a Remove the jump back to the calling SFC subroutine and the subroutine tried to jump back to the calling SFC Occurs when the SFC uses either a JSR or FOR instruction to call the subroutine 4 83 The data tested was not inside the Modify value to be within limits required limits 4 84 Stack overflow Reduce the subroutine nesting levels or the number of parameters passed 4 89 In a SFR instruction the target routine does not Correct the SFR target or add the missing step contain the target step 6 1 Task watchdog expired Increase the task watchdog shorten the execution time make the priority of this task higher simplify higher priority tasks or move User task has not completed in specified period some code to another controller of time A program error caused an infinite loop or the program is too complex to execute as quickly as specified or a higher priority task is keeping this task from finishing 7 40 Store to nonvolatile memory failed 1 Try again to store the project to nonvolatile memory 2 If the project fails to store to nonvolatile memory replace the memory board 7 42 Load from nonvolatile memory failed because Update the controller firmware to the same revision level as the the firmware revision of the project in project that is in nonvolatile memory nonvolatile memory does not match the firmware revision of the controller 8 1 Attempted to place controller in Run mode
151. A tag that contains a block of multiple pieces of data e An array is similar to a file e Within an array each individual piece of data is called an element e Each element uses the same data type e Anarray tag occupies a contiguous block of memory in the controller each element in sequence e You can use array and sequencer instructions to manipulate or index through the elements of an array e You organize the data into a block of 1 2 or 3 dimensions A subscript s identifies each individual element within the array A subscript starts at 0 and extends to the number of elements minus 1 zero based lo expand an array and 3 display its elements click Program Tags MainProgram the sign Scope MainProgram x Show Show All vj Sot T Tag Name 7 Alias For Base Tag tanks TANK 3 3 E EREI To collapse an array and gt z timer_presets DINT E This array contains six hide its elements click E Fl timer_presets 0 T DINT elements of the DINT the sign ie a o omr ate sonens a sine ene IO _ timer presetsi3 INT timer presets PNT E timer_presets 5 o DINT 4 gt Monitor Tags timer_presets 42367 Publication 1756 PM001G EN P March 2004 3 14 Organize Tags The following example compares a structure to an array
152. Access to a Protected Routine 18 8 Disable Routine Source Protection 18 9 Gain Access to a Protected Routine 18 11 Determine Controller Memory Information Manage Multiple Messages Send a Message to Multiple Controllers Table of Contents xi Use RSI Security Server to Protect a Project 18 13 Install RSI Security Server Software 18 13 Set Up DCOM i ov eck aw alla Fak a Poe hacia 18 14 Enable Security Server for RSLogix 5000 Software 18 14 Import the RSLogix5000Security bak File 18 15 Define the Global Actions for Your Users 18 16 Define the Project Actions for Your Users 18 17 Add Usean 4 28 dois el Peabo Wasa we aah Se RH Geddes yee 18 20 Add User Grouse 514 5 denat deuen age wig amp Suk Seah 18 20 Assign Global Access to RSLogix 5000 Software 18 21 Assign Project Actions for New RSLogix 5000 Projects 18 22 Secure an RSLogix 5000 Project 4 4 64 9 eee Se Rate 18 23 Assign Access to an RSLogix 5000 Project 18 24 Refresh RSLogix 5000 Software If Needed 18 25 Chapter 19 When to Use This Chapter s a dJs seo 8 bd eee ee See 19 1 Determine What Memory Information You Want 19 1 Estimate Memory Information Offline 19 2 View Run Time Memory Information 19 3 Write Logic to Get Memory Information 19 4 Get Memory Information from the Controll
153. Additional Steps for a PLC 5C Controller 10 17 Execute a Message MSG Instruction 10 19 Publication 1756 PM001G EN P March 2004 Table of Contents viii Produce a Large Array Communicate with an ASCII Device Process ASCII Characters Force Logic Elements Publication 1756 PM001G EN P March 2004 MESSABE QUEUE pr gourd gee upt aa Ean gad Be beg eia a 10 21 Cache bisteane Bh oie Oh ea ate Gand aE n wee ee 10 22 Unconnected Buffers onau hae ye hao bas 10 23 Guidelnes 4 a2ais eld Ge 9 3 oie B04 BE OE ee a8 S 10 24 Get or Set the Number of Unconnected Buffers 10 25 Get the Number of Unconnected Buffers 10 25 Set the Number of Unconnected Buffers 10 26 Convert Between INTs and DINTs 10 28 Chapter 11 When to Use this Procedure 4 ii nu nt lovee Sa Oy eine G28 11 1 PROGUCE Large ATAY Gch aN ie FN ee a E 11 2 Chapter 12 When to Use this Procedure lt 2 oi4 4 yt oi Bea ad aha koe 12 1 How to Use This PrOCedure ig 3 0 ue te Es ok Se SESS 12 1 Connect the ASCII Device ice a uaaa 12 2 Configure the Serial Port n a see Hy eK Poe Ste ed 12 3 Configure the User Protocol 4 59 h fecal oo b4G 9 a5 12 5 Create String Data Types via fiw hs WH age LO ae foe 12 8 Read Characters from the Device ie ee we wa we es 12 9 Send Characters to the Device n a auauua aaraa 12 14 Enter ASCI Characters sena eee Rae Gad Rate eae ee 12 21 Chapter 13 Whe
154. Allen Bradley Logix5000 Controllers Common Procedures 1756 ControlLogix 1769 CompactLogix 1789 SoftLogix 1794 FlexLogix PowerFlex 700S with DriveLogix Programming Manual Rockwell 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 ab com manuals gi 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 examples and diagrams No patent liability is assumed by Rockwell Automation Inc with respect t
155. Allen Bradley Marketing Communications 1 Allen Bradley Dr Mayfield Hts OH 44124 9705 Phone 440 646 3176 Fax 440 646 3525 Email RADocumentComments ra rockwell com Publication 1cca 5 21 January 2001 PN 95510782 Other Comments PLEASE FASTEN HERE DO NOT STAPLE PLEASE FOLD HERE BUSINESS REPLY MAIL FIRST CLASS MAIL PERMIT NO 18235 CLEVELAND OH POSTAGE WILL BE PAID BY THE ADDRESSEE Allen Bradley BELIANCE JB ELECTRIC SrA DOGE Rockwell Automation 1 ALLEN BRADLEY DR MAYFIELD HEIGHTS OH 44124 9705 NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATES PLEASE REMOVE ASCII Character Codes Character Dec Hex Character Dec Hex Character Dec Hex Character Dec Hex ctrl NUL 0 00 SPACE 32 20 64 40 96 60 ctrl A SOH 1 01 l 33 21 A 65 41 a 97 61 ctrl B STX 2 02 34 22 B 66 42 b 98 62 ctrl C ETX 3 03 35 23 C 67 43 c 99 63 ctrl D EOT 4 04 36 24 D 68 44 d 100 64 ctrl E ENQ 5 05 37 25 E 69 45 e 101 65 ctrl F ACK 6 06 amp 38 26 F 70 46 102 66 ctrl G BEL 7 07 39 27 G 71 47 g 103 67 ctrl H BS 8 08 40 28 H 72 48 h 104 68 ctrl I HT 9 09 41 29 l 73 49 i 105 69 ctrl J LF 10 I 0A i 42 2A J 74 4A j 106 6A
156. App 5 x File Edit View Favorites Tools Help wy Desktop fa Executive bin A My Documents B Rev_12_Project_1 p5k g My Computer Rev_12_Project_2 p5k E C810W2K C a Rev_12_Project_3 p5k amp Compact Disc D k2 Rev_12_Project_1 xml C810W2K E kej Rev_12_Project_2 xml 1 CompactFlash reader B Removable Disk F ka Rev_12 Project _3 xml EJ Logix projects and firmware Sy es 1 To change the load parameters for a project open the XML file with the same name as the project Use a text editor to open the file Publication 1756 PM001G EN P March 2004 Store and Load a Project Using Nonvolatile Memory 17 21 lt xml version 1 0 encoding UTF 8 gt lt Controller gt lt ExecutiveLoadOption gt lt ExecFile gt Logix CurrentApp Executive bin lt ExecFile gt lt ExecutiveLoadOption gt lt ProgramLoadOption gt lt ProgramLoadMode gt CORRUPT_RAM lt ProgramLoadMode gt lt LoadFile gt Logix CurrentApp Rev_12_Project_2 p5k lt LoadFile gt lt ProgramLoadOption gt lt ControllerModeOption gt lt ControllerMode gt RUN lt ControllerMode gt lt ControllerModeOption gt lt Controller gt 2 Edit the Load Image option of the project If you want to set the Load Image option to Then enter On Power Up ALWAYS On Corrupt Memory CORRUPT_RAM User Initiated USER_INITIATED 3 Edit the Load Mode option of the project doesn t a
157. Channel Destination MV_msg DND SerialPort Control MV_read ERD String Length 12 Characters Read 0 42226 24 Do you want to send data to the device If Then yes Go to Send Characters to the Device on page 12 14 no Stop You are done with this procedure To use the data go to Process ASCII Characters on page 13 1 Publication 1756 PM001G EN P March 2004 12 14 Communicate with an ASCII Device Send Characters to the 1 Device If you Determine where to start And you Then always send the same number want to automatically append one or two Go to step 2 of characters characters to the end of the data do not want to append characters Go to step 9 send different numbers of want to automatically append one or two Go to step 16 characters characters to the end of the data do not want to append characters Go to step 24 2 Enter the following rung Publication 1756 PM001G EN P March 2004 AWA ASCII Write Append Channel Source ND hb SerialPort Control F gt SerialPort Control Lenath Characters Sent 42236a Enter the input condition s that determines when the characters are to be sent e You can use any type of input instruction e The instruction must change from false to true each time the characters are to be sent Enter 0 Enter the tag name that stores the ASCII characters Define the data type as a string Enter a tag
158. Control control examine the ProgOper output If ProgOper is set the instruction is in Program control if ProgOper is cleared the instruction is in Operator control Operator control takes precedence over Program control if both input request bits are set For example if ProgProgReq and ProgOperReq are both set the instruction goes to Operator control Program a Function Block Diagram 9 15 The Program request inputs take precedence over the Operator request inputs This provides the capability to use the ProgProgReq and ProgOperReq inputs to lock an instruction in a desired control For example let s assume that a Totalizer instruction will always be used in Operator control and your user program will never control the running or stopping of the Totalizer In this case you could wire a literal value of 1 into the ProgOperReq This would prevent the operator from ever putting the Totalizer into Program control by setting the OperProgReq from an operator interface device Because the ProgOperReq input is always set pressing the Program button on the faceplate which sets the OperProgReg input has no effect Normally setting OperProgReq puts the TOT in Program control TOT_01 Totalizer Locak1 1 ChOData D E ProgProgReq E ProgOperReq ProgOper D E ProgStartReq RunStop D E ProgStopReq ProgResetDone D Wiring a 1 into ProgOperReq means the user program always want
159. D and ST 32 1 Input read FBD and ST 32 2 Input write FBD and ST 32 3 Output read FBD and ST 32 4 Output write FBD and ST 34 1 Bistable set dominant SETD instruction in FBD and ST 34 2 Bistable reset dominant RESD instruction in FBD and ST 35 1 Rising edge detector OSR instruction in LD and OSRI instruction in FBD and ST 35 2 Falling edge detector OSF instruction in LD and OSFI instruction in FBD and ST 36 1b Up counter Functionality contained in CTU and RES instructions in LD and in CTUD instruction in FBD and ST 37 2a On delay timer Functionality contained in TON instruction in LD and TONR instruction in FBD and ST 37 3a Off delay timer Functionality contained in TOF instruction in LD and TOFR instruction in FBD and ST 38 2 On delay timing Functionality contained in TON instruction in LD and TONR instruction in FBD and ST 38 3 Off delay timing Functionality contained in TOF instruction in LD and TOFR instruction in FBD and ST 40 la SFC Step 40 1b SFC initial Step 40 2a SFC Step Textual Import export step name is specified using the Publication 1756 PM001G EN P March 2004 format Operand step_name IEC61131 3 Compliance c 9 Table Feature Feature Description Extensions and Implementation Notes Number Number 40 2b SFC initial Step textual Import export uses InitialStep parameter and step name is specified usi
160. E running_hours Ee COUNTER structure To collapse a structure gt tunning_seconds TIMER structure and hide its members click the sign members of EE data types of the running_seconds members 42365 See member user defined data type style The format that numeric values are displayed in See ASCI binary decimal exponential float hexadecimal octal Publication 1756 P M001G EN P March 2004 Glossary 41 system overhead time slice Specifies the percentage of controller time excluding the time for periodic tasks that is devoted to communication and background functions system overhead e The controller performs system overhead functions for up to 1 ms at a time e If the controller completes the overhead functions in less than 1 ms it resumes the continuous task e Communication and background functions include the following communicate with programming and HMI devices such as RSLogix 5000 software respond to messages send messages including block transfers re establish and monitor I O connections such as RIUP conditions this does not include normal I O communications that occur during program execution bridge communications from the serial port of the controller to other ControlLogix devices via the ControlLogix backplane e If communications are not completing fast enough increase the system overhead timeslice The following table shows
161. EN DINT number of characters The LEN automatically updates to the new count of characters whenever you in the string e use the String Browser dialog box to enter characters e use instructions that read convert or manipulate a string The LEN shows the length of the current string The DATA member may contain additional old characters which are not included in the LEN count DATA SINT array ASCII characters of the e To access the characters of the string address the name of the tag string For example to access the characters of the string_1 tag enter string_1 e Each element of the DATA array contains one character e You can create new string data types that store less or more characters New string data types are useful in the following situations e If you have a large number of strings with a fixed size that is less than 82 characters you can conserve memory by creating a new string data type e If you must handle strings that have more than 82 characters you can create a new string data type to fit the required number of characters Publication 1756 PM001G EN P March 2004 Glossary 39 Miia Use caution when you create a new string data type If you later decide to change the size of the string data type you may lose data in any tags that currently use that data type If you Then make a string data type e The data is truncated smaller e The LEN is unchanged make a string data type The data and LEN
162. EN member of the AWA instruction The tag from step 20 Publication 1756 PM001G EN P March 2004 12 18 Communicate with an ASCII Device EXAMPLE When alarm is on the AWA instruction sends the characters in adlarm_msg and appends a termination character e Because the number of characters in alarm_msg varies the rung first moves the length of alarm_msg alarm_msg LEN to the length of the AWA instruction alarm_write LEN e In alarm_msg the 14 counts as one character It is the hex code for the Ctrl T character alarm MOV AWA Move ASCII Write Append EN Source alarm_msg LEN Channel 0 5 Source alarm_msg DN gt Dest alarm_write LEN 1425 1 5 SerialPort Control alarm_write ER gt String Length 5 Characters Sent 6 42229 23 Go to Enter ASCII Characters on page 12 21 Publication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 19 24 Enter the following rung 27 26 25 MOV ASCII Write Channel Source Move Source 9 Dest SerialPort Control SerialPort Control Length Characters Sent 29 30 28 42236d 25 Enter the input condition s that determines when the characters are to be sent e You can use any type of input instruction e The instruction must change from false to true each time the characters are to be sent 26 Enter 0 27 Enter the tag name that stores the ASCII characters D
163. FS 30 X 31 The following diagram shows the relationship of the X FS SA and LS bits Publication 1756 PM001G EN P March 2004 step_name X step_name FS step_name SA step_name LS Design a Sequential Function Chart 5 11 i ia first scan I last scan ee ie Publication 1756 PM001G EN P March 2004 5 12 Design a Sequential Function Chart Organize the Steps To Execute 1 or more steps in sequence e One executes repeatedly e Then the next executes repeatedly Once you define the steps of your process organize them into sequences simultaneous branches selection branches or loops Overview Use this structure Sequence With these considerations The SFC checks the transition at the end of the If true the SFC goes to the next step If false the SFC repeats the step e Choose between alternative steps or groups of steps depending on logic conditions e Execute a step or steps or skip the step or steps depending on logic conditions Selection Branch It is OK for a path to have no steps and only a transition This lets the SFC skip the selection branch By default the SFC checks from left to right the transitions that start each path It takes the first true path If no transitions are true the SFC repeats the previous step RSLogix 5000 software lets yo
164. M001G EN P March 2004 Glossary 34 e 1 17549421E to 1 40129846E gt negative values 1 40129846E to 1 17549421E positive values removal and insertion under power RIUP A ControlLogix feature that allows a user to install or remove a module while chassis power is applied requested packet interval RPI When communicating over a the network this is the maximum amount of time between subsequent production of input data e Typically this interval is configured in microseconds e The actual production of data is constrained to the largest multiple of the network update time that is smaller than the selected RPI e Use a power of two times the ControlNet network update time NUT For example if the NUT is 5 ms type a rate of 5 10 20 40 ms etc See network update time NUT routine A set of logic instructions in a single programming language such as a ladder diagram e Routines provide the executable code for the project in a controller similar to a program file in a PLC or SLC controller e Each program has a main routine When the controller triggers the associated task and executes the associated program the main routine is the first routine to execute To call another routine within the program enter a JSR instruction in the main routine e You can also specify an optional program fault routine If any of the routines in the associated program produce a major fau
165. MSG instruction sends the message This ADD instruction increments index This lets the logic load the configuration properties for the next controller into the MSG instruction This ADD instruction increments the Locallndex member of the MSG instruction This lets the logic load the value from the next controller into the next element of local_array Restart the Sequence Equal Source index 0e Source B local_array_length D 1 LR Clear Dest message Locallndex 0e 43051 When index equal local_array_length the controller has sent the message to all the other controllers This CLR instruction sets index equal to 0 This lets the logic load the configuration properties for the first controller into the MSG instruction and start the sequence of messages again This CLR instruction sets the LocalIndex member of the MSG instruction equal to 0 This lets the logic load the value from the first controller into the first element of local_array Publication 1756 PM001G EN P March 2004 B 12 Send a Message to Multiple Controllers Publication 1756 PM001G EN P March 2004 Appendix C Using This Appendix Introduction 1EC61131 3 Compliance For information about See page Operating System C 2 Data Definitions C 2 Programming Languages C 3 Instruction Set C 4 IEC61131 3 Program Portability C 4 IEC Compliance Tables C 5 The International Electrotechnical Commission
166. March 2004 The path describes the route that a connection takes to get to the destination Typically you automatically define the path for a connection when you add the devices to the 1 0 Configuration folder of the controller 1 0 Configuration 0 1756 CNB x Local_CNB 2 0 1756 CNB x chassis_b 1 1756 L55 x peer_controller Inhibit a Connection ATTENTION Inhibiting a module breaks the connection to the module and prevents communication of I O data In some situations such as when initially commissioning a system it is useful to disable portions of a control system and enable them as you wire up the control system The controller lets you inhibit individual modules or groups of modules which prevents the controller from trying to communicate with the modules Inhibit communication with the module Communicate with Other Devices 10 3 fal Module Properties Local 4 1756 IB16I 1 1 General Connection Module Info Configuration Backplane Requested Packet Interval RPI ms 0 2 750 0 ms I Major Fault On Controller If Connection Fails While in Run Mode When you configure an I O module it defaults to being not inhibited You can change an individual module s properties to inhibit a module If you want to Then communicate with the module do not inhibit the module prevent communication with the module inhibit the module When you inhibit
167. Milwaukee WI 53202 5302 USA Tel 1 414 212 5200 Fax 1 414 212 5201 Headquarters for Allen Bradley Products Rockwell Software Products and Global Manufacturing Solutions Americas Rockwell Automation 1201 South Second Street Milwaukee WI 53204 2496 USA Tel 1 414 382 2000 Fax 1 414 382 4444 Europe Rockwell Automation SA NV Vorstlaan Boulevard du Souverain 36 BP 3A B 1170 Brussels Belgium Tel 32 2 663 0600 Fax 32 2 663 0640 Asia Pacific Rockwell Automation 27 F Citicorp Centre 18 Whitfield Road Causeway Bay Hong Kong Tel 852 2887 4788 Fax 852 2508 1846 Headquarters for Dodge and Reliance Electric Products Americas Rockwell Automation 6040 Ponders Court Greenville SC 29615 4617 USA Tel 1 864 297 4800 Fax 1 864 281 2433 Europe Rockwell Automation Brihlstra amp e 22 D 74834 Elztal Dallau Germany Tel 49 6261 9410 Fax 49 6261 17741 Asia Pacific Rockwell Automation 55 Newton Road 11 01 02 Revenue House Singapore 307987 Tel 65 351 6723 Fax 65 355 1733 Publication 1756 PM001G EN P March 2004 PN 957867 41 Supersedes Publication 1756 PM001F EN P June 2003 Copyright 2004 Rockwell Automation Inc All rights reserved Printed in the U S A AB Allen Bra dley Logix5000 Controllers Common Procedures Programming Manual
168. Operand Type Format Enter lt statement gt END WHILE bool_ l BOOL tag BOOL tag or expression that evaluates to 7 expression expression a BOOL value IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time that it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as IF THEN Description The syntax is WHILE bool_expressioni1 DO lt statement gt lt q statements to execute while bool_expression is true IF bool_expression2 THEN EXIT lt q If there are conditions when you want to optional exit the loop early use other statements END_IF such as an IF THEN construct to condition an EXIT statement END WHILE Publication 1756 PM001G EN P March 2004 Program Structured Text 7 23 The following diagrams show how a WHILE DO loop executes and how an EXIT statement leaves the loop early lad BOOL expression ae true statement 1 statement 2 statement 3 statement 4 v rest of the routine While the bool_expression is true the controller executes only the statements within the WHILE DO loop Arithmetic Status Flags not affected Fault Conditions A major fault will occur if false ld BOOL expression ___ true statement 1
169. P instruction See the Logix5000 Controllers General Instruction Set Reference Manual publication 1756 RMO003 See structure Publication 1756 PM001G EN P March 2004 Glossary 48 W Publication 1756 PM001G EN P March 2004 wat chdog Specifies how long a task can run before triggering a major fault e Each task has a watchdog timer that monitors the execution of the task e A watchdog time can range from 1 ms to 2 000 000 ms 2000 seconds The default is 500 ms The watchdog timer begins to time when the task is initiated and stops when all the programs within the task have executed If the task takes longer than the watchdog time a major fault occurs The time includes interruptions by other tasks A watchdog time out fault major fault also occurs if a task triggered again while it is executing periodic task overlap This can happen if a lower priority task is interrupted by a higher priority task delaying completion of the lower priority task You can use the controller fault handler to clear a watchdog fault If the same watchdog fault occurs a second time during the same logic scan the controller enters faulted mode regardless of whether the controller fault handler clears the watchdog fault ATTENTION If the watchdog timer reaches a configurable preset a major fault occurs Depending on the controller fault handler the controller might shut down To change the watchdog time of a task 1
170. PM001G EN P March 2004 5 10 Design a Sequential Function Chart If you want to Thencheckorset Datatype Details this member determine the target of an SFC Reset BOOL An SFC Reset SFR instruction resets the SFC to a step or stop Reset SFR instruction that the instruction specifies e The Reset bit indicates to which step or stop the SFC will go to begin executing again e Once the SFC executes the Reset bit clears determine the maximum time TMax DINT Use this for diagnostic purposes The controller clears this value that a step has been active only when you choose the Restart Position of Restart at initial step during any of its executions and the controller changes modes or experiences a power cycle determine if the Timer T value OV BOOL Use this for diagnostic purposes rolls over to a negative value determine how many times a Count DINT This is nota count of scans of the step step has become active e The count increments each time the step becomes active e t increments again only after the step goes inactive and then active again e The count resets only if you configure the SFC to restart at the initial step With that configuration it resets when the controller changes from program mode to run mode use one tag for the various Status DINT For this member Use this bit status bits of this step Reset 77 AlarmHigh 23 AlarmLow 24 AlarmEn 25 OV 26 DN 27 LS 28 SA 29
171. PM001G EN P March 2004 Organize Tags 3 23 Address Tag Data Where Name An tag name follows this format Name Element Member Element Bit or Index Optional Is Name that identifies this specific tag Element Subscript or subscripts that point to a specific element within an array e Use the element identifier only if the tag or member is an array e Use one subscript for each dimension of the array For example 5 2 8 3 2 7 To indirectly dynamically reference an element use a tag or numeric expression that provides the element number e Anumeric expression uses a combination of tags constants operators and functions to calculate a value For example Tag_1 Tag 2 Tag_3 4 ABS Tag 4 e Keep the value of the tag or numeric expression within the dimensions of the array For example if a dimension of an array contains 10 elements then the value of the tag or numeric expression must be 0 to 9 10 elements Member Specific member of a structure e Use the member identifier only if the tag is a structure e f the structure contains another structure as one of its members use additional levels of the Member format to identify the required member Bit Specific bit of an integer data type SINT INT or DINT Index To indirectly dynamically reference a bit of an integer use a tag or numeric expressi
172. ProgHandReq CasRat o placed in Program control and Auto D Manual mode The StartupCV Manual fp value is used as the loop output Gveirida lo Hand D Operator request inputs to an instruction are always cleared by the instruction when it executes This allows operator interfaces to work with these instructions by merely setting the desired mode request bit You don t have to program the operator interface to reset the request bits For example if an operator interface sets the OperAutoReq input to a PIDE instruction when the PIDE instruction executes it determines what the appropriate response should be and clears the OperAutoReq Program a Function Block Diagram 9 17 Program request inputs are not normally cleared by the instruction because these are normally wired as inputs into the instruction If the instruction clears these inputs the input would just get set again by the wired input There might be situations where you want to use other logic to set the Program requests in such a manner that you want the Program requests to be cleared by the instruction In this case you can set the ProgValueReset input and the instruction will always clear the Program mode request inputs when it executes In this example a rung of ladder logic in another routine is used to one shot latch a ProgAutoReq to a PIDE instruction when a pushbutton is pushed Because the PIDE instruction automatically clears the Program mode requests you do
173. RD instruction that reads the bar code 3 Enter the string tag that contains the bar code 4 Enter the number of characters in the part of the bar code that you want to check 5 Enter the position of the first character in the part of the bar code that you want to check 6 Enter a tag name to store the part of the bar code that you want to check Define the data type as a string Publication 1756 PM001G EN P March 2004 Process ASCII Characters 13 3 In the baggage handling conveyor of an airport each bag gets a bar code Characters 10 18 of the bar code are the flight number and destination airport of the bag After the bar code is read bag_read EM is on the MID instruction copies the flight number and destination airport to the bag_flt_and_dest tag bag_read EM MID aud jo Middle String Source bag_barcode NWA HOP 5058 AMS 02 e Qty 9 Start 10 Dest bag_flt_and_dest 5058 AMS 42808 Publication 1756 PM001G EN P March 2004 13 4 Process ASCII Characters Look Up a Bar Code based on its bar code Use the following steps to return specific information about an item For example in a sorting operation an array of a user defined data type creates a table that shows the lane number for each type of product To determine which lane to route a product the controller searches the table for the product ID characters of the bar code that identify the product
174. Reference Manual publication 1756 RM003 Publication 1756 PM001G EN P March 2004 1 26 Getting Started Adjust the System Overhead 4 Logix5000 controller communicates with a other devices I O Time Slice modules controllers HMI terminals etc at either a specified rate scheduled or when there is processing time available to service the communication unscheduled This type of communication Is update 1 0 data not including block transfers Scheduled Communication produce or consume tags communicate with programming devices e g RSLogix 5000 software Unscheduled Communication communicate with HMI devices execute Message MSG instructions including block transfers respond to messages from other controllers synchronize the secondary controller of a redundant system re establish and monitor I O connections such as Removal and Insertion Under Power conditions this does not include normal 1 0 updates that occur during the execution of logic bridge communications from the serial port of the controller to other ControlLogix devices via the ControlLogix backplane Unscheduled communication is any communication that you do not configure through the I O configuration folder of the project e The system overhead time slice specifies the percentage of time excluding the time for periodic or event tasks that the controller devotes to unscheduled communication e The controller perfo
175. S Write integer values to a PLC 5 controller Yf If Condition_2 1 then Reset the FAL instruction The FAL instruction sets INT_Buffer DINT_Array This converts the values to 16 bit integers INTs ME 2 Control_2 AL File Arith Loaical Control Control_2 Lenath 3 Position o Mode ALL Dest INT_Buffer Control_2 P0S 0 Expression DINT_Array Control_2 PO0S If Control_2 DN 1 FAL instruction has converted the DINTs to INTs And Msg_2 EN 0 MSG instruction is not already enabled then Write the integers in INT_Buffer 3 INTs to the PLC 5 controller iin Control_2 DN pn a EN ian MSG Type PLC5 Typed Write Message Control Msq_2 iJ him Publication 1756 PM001G EN P March 2004 10 30 Communicate with Other Devices Notes Publication 1756 PM001G EN P March 2004 Chapter 11 When to Use this Procedure Produce a Large Array The Logix5000 controller can send as many as 500 bytes of data over a single scheduled connection This corresponds to 125 DINT or REAL elements of an array To transfer an array of more than 125 DINTs or REALs use a produced consumed tag of 125 elements to create a packet of data You can then use the packet to send the array piecemeal to another controller When you send a large array of data in smaller packets you must ensure that the transmission of a packet is complete before the data is moved into the destination array for these reasons e Produced d
176. SERT DTOS CONCAT DINT to String Insert String DINT to String String Concatenate Source Source Source Source Source B Dest Dest Source B Dest Start Dest 42813 2 Enter the input condition s that determines when to build the string 3 Enter the DINT tag that contains the first value for the string 4 Enter a tag name to stores the ASCII representation of the value Define the data type as a string Publication 1756 PM001G EN P March 2004 Process ASCII Characters 13 19 CONCAT String Concatenate Source Tr Source B Dest INSERT Insert String Source DTOS DINT to String Source DTOS DINT to String Source Source B Dest Start Dest 42813 9 10 5 Enter a tag name to store the control and delimiter characters for the string Define the data type as a string 6 Double click the value area of the Source A fy String Browser x p lt T Position 0 Count 0 of 82 Enos gt 42615 7 Type the control character and delimiter and choose OK For a control character type the hex code of the character For a list of hex codes see the back cover of this manual 8 Enter the tag that stores the ASCII representation of the first value The tag from step 4 9 Enter 2 This puts the value after the first character control character in Source A 10 Enter a tag name to s
177. Step_011 at least z E once e get past Tran_011 and execute Step_012 at least once e determine that Tran_012 is Sy Ta_012 bool_tag_2 Publication 1756 PM001G EN P March 2004 Force Logic Elements 14 11 Force a Simultaneous Path To prevent the execution of a path of a simultaneous branch force the path false When the SFC reaches the branch it executes only the un forced paths This path executes This path does not execute If you force a path of a simultaneous branch to be false the SFC stays in the simultaneous branch as long as the force is active installed and enabled e To leave a simultaneous branch the last step of each path must execute at least one time and the transition below the branch must be true e Forcing a path false prevents the SFC from entering a path and executing its steps e When you remove or disable the force the SFC can execute the steps in the path Publication 1756 PM001G EN P March 2004 14 12 Force Logic Elements Add an SFC Force To override the logic of an SFC use an SFC force ATTENTION Forcing can cause unexpected machine motion that could injure personnel Before you use a force determine how the force will effect your machine or process and keep personnel away from the machine area e Enabling SFC forces causes your machine or process to go to a different state or phase e If forces are enabled and you install a force the new force immed
178. V instruction to one scan 2 The SSV instruction sets the InhibitTask attribute of Task_2 0 This uninhibits the task Condition_1 Storage_Bit 1 E ONS ss Set System Value Class Name TASK Instance Name Task_2 Attribute Name InhibitT ask Source Zero pe If Condition_1 1 then do not let Task_2 execute 1 The ONS instruction limits the true execution of the SSV instruction to one scan 2 The SSV instruction sets the InhibitTask attribute of Task_2 1 This inhibits the task SSY Set System Value Class Name TASK Instance Name Task_2 Attribute Name InhibitT ask Source One 1 Condition_1 Storage_Bit 0 TONS Publication 1756 PM001G EN P March 2004 4 20 Manage Multiple Tasks Choose the Trigger for an If configured correctly an event task interrupts all other tasks for the Event Task To trigger an event task when digital input turns on or off minimum amount of time required to respond to the event Each event task requires a specific trigger that defines when the task is to execute Use this trigger With these considerations Module Input Data e Only one input module can trigger a specific event task State Change e The input module triggers the event task based on the change of state COS configuration for the module The COS configuration defines which points prompt the module to produce data if they turn on or off This production of data due to COS tr
179. _Group 1 1 This enables the next group of MSGs Heq_Group 0 Meg _O 0DN Heq_ 1 0 Meg Group 0 Msg _Group 7 Meg _O ER Meq_1 ER Send the Next Group of MSGs If Msg_Group 7 changes from 0 gt 1 then Send Msg_2 Send Msg_3 Msq_Group 1 MSG Type CIP Data Table Read Message Control Msq_2 17 MSG Type CIP Data Table Read Message Control Msq_3 Msg_Group 1 17 Publication 1756 PM001G EN P March 2004 A 4 Manage Multiple Messages Enable the Next Group of MSGs If the MSGs in group 1 are currently enabled Msg_Group 7 1 And Msg_2 is done or errored And Msg_3 is done or errored Then Msg_Group 1 0 This disables the current group of MSGs Msg_Group 2 1 This enables the next group of MSGs Meq_Group 1 Meg 2 0N Meq_3 0N Meg Group Msq_Group 2 T Meq_2 ER Meq_3 ER Send the Next Group of MSGs If Msg_Group 7 changes from 0 gt 1 then Send Msg_2 Send Msg_3 Msq_Group 2 MSG 8 Type CIP Data Table Read Message Control Msq_4 E h gt R gt Msq_Group 2 MSG 9 Type CIP Data Table Read Message Control Msg_5 17 Publication 1756 PM001G EN P March 2004 Appendix B Send a Message to Multiple Controllers Use the following procedure to program a single message instruction to communicate with multiple controllers To reconfigure a MSG instruction during runtime write new values to the members of the MESSAGE data type Tihiie
180. _status mixer which uses a user defined data type Memory Bits allocation 31 24 23 16 15 8 7 0 allocation 1 mixer pressure allocation 2 mixer temp allocation 3 mixer agitate_time allocation 4 unused unused unused bit 0 mixer inlet bit 1 mixer drain bit 2 mixer agitate Publication 1756 PM001G EN P March 2004 Glossary 45 temp_buffer which is an array of four INTS INT 4 Memory Bits allocation 31 16 0 allocation 1 temp_buffer temp_buffer 0 allocation 2 temp_buffer 3 temp_buffer 2 See alias tag base tag consumed tag task A scheduling mechanism for executing a program e By default each new project file contains a pre configured continuous task e You configure additional periodic tasks as needed e A task provides scheduling and priority information for a set of one or more programs that execute based on specific criteria e Once a task is triggered activated all the programs assigned scheduled to the task execute in the order in which they are displayed in the controller organizer e You can only assign a program to one task at a time See continuous task periodic task timestamp A ControlLogix process that records a change in input data with a relative time reference of when that change occurred transition In a sequential function chart SFC a transition is the true or false condition or conditions that determine when to go to the next step unc
181. a Ee p ae PAA t 15 7 Clear a Major Fault During Prescan 30 s yao tas Gods wr cdne an 15 8 Identify When the Controller is in Prescan 15 8 Get the Fault Type and Code n n anaana eee oot baad 15 9 Check for a Specific Fault ve eeu et BRS PH na 15 10 Clear the Fault soi deeds Sine we nie rroan iena 15 11 Testa Fa lt ROUNDS Acca e Pee Pee e Ae 15 12 Create a User Defined Major Fault 15 13 Create a Fault Routine for the Program 15 13 Configure the Program to Use the Fault Routine 15 14 Jump to the Fault Routine 0 15 14 Major Fault Codes i 4 aes e edad a ee Gwe Ree bead 15 15 Publication 1756 PM001G EN P March 2004 Table of Contents xX Monitor Minor Faults Store and Load a Project Using Nonvolatile Memory Secure a Project Publication 1756 PM001G EN P March 2004 Chapter 16 When to Use This Procedites c4 1a ce ee a as 16 1 Monitor Minor Faults jaa 3 84 Goad Ye le Heel Sade 4 16 1 Minor Fault Codes ud a oe ae et wee a we BPA 16 4 Chapter 17 When to Use This Procedure 054 84 2 ohh Ga BS 17 1 How to Use This Procedure ee ky OX PSs ORE eR 17 2 Before You Use Nonvolatile Memory 17 2 Choose a Controller That Has Nonvolatile Memory 17 3 Prevent a Major Fault During a Load 17 4 Format a CompactFlash Card 005 17 4 Determine How to Handle Firmware Updates 17 6 Choose When to Load
182. a Project Assign Project Actions for New RSLogix 5000 Projects To let users perform actions on projects that are in the New RSLogix 5000 Resources group Users Groups 29 Resources Groups 1 In the Configuration explorer select the New RSLogix New RSLogix 5000 Resources 5000 Resources group ge ASLOGIX 5000 9 Actions Groups 43075 2 From the Help menu choose Quick Start Quick Start i oe What do you want to do Add user groups to the system Add workstation groups to the system create a resource create a resource group Group actions Si Assign access to individuals and groups 3 Follow the steps for this task Assign the actions that you Add Actions recorded on Table 18 5 on page 18 19 43076 Publication 1756 PM001G EN P March 2004 Secure a Project 18 23 Secure an RSLogix 5000 Project For new projects the security option is available when you create the project To let Security Server software protect an existing project enable security for the project 1 Open the RSLogix 5000 Project 2 Click the controller properties button 42627 3 Click the Advanced tab lt N RSI Security Server 4 Select RSI Security Server 5 Choose OK and then Yes In the Security Server software the project appears as a member of the New RSLogix 5000 Resources group If Security Server software is already open then from its View menu choose
183. a tag that is based on a structure enter the first member of the tag Tag Name Type major_fault_record FAULTRECORD Handle a Major Fault 15 7 Check for a Specific Fault 1 2 EQU Qu Source major_fault_record Type Source major_fault_record Code De De Source B Source B CLA LA Clear Clear Dest major_fault_record Type Dest major_fault_record Code 0e 0e 42372 1 1 This EQU instruction checks for a specific type of fault such as program I O In Source B enter the value for the type of fault that you want to clear 2 This EQU instruction checks for a specific fault code In Source B enter the value for the code that you want to clear 3 This CLR instruction sets to zero the value of the fault type in the major_fault_record tag 4 This CLR instruction sets to zero the value of the fault code in the major_fault_record tag Clear the Fault Set System Value Class name PROGRAM Instance name THIS Attribute Name MAJORFAULTRECORD Source major_fault_record Time_Low pe 1 The SSV instruction writes new values to the MAJORFAULTRECORD attribute of this program 2 The SSV instruction writes the values contained in the major_fault_record tag Since the Type and Code member are set to zero the fault clears and the controller resumes execution Publication 1756 PM001G EN P March 2004 15 8 Handle a Major Fault Clear a Major Fault During Prescan revision 11
184. a types Logix5000 controllers support the use of the BOOL 1 bit SINT 8 bit integer INT 16 bit integer DINT 32 bit integer and REAL IEEE floating point number elementary data types Additionally the optional derived data types are supported through the creation of user defined structures and arrays The IEC61131 3 specification defines five 5 different programming languages and a set of common elements All languages are defined as optional but at least one must be supported in order to claim compliance with the specification The IEC61131 3 programming language components are defined as follows e Common Language Elements e Common Graphical Elements e Instruction List AL Language Elements e Structured Text Language ST Elements e Ladder Diagram LD Language Elements e Sequential Function Chart SFC Language Elements e Function Block Diagram FBD Language Elements Logix5000 controllers and RSLogix5000 provide support for the common language elements and the Structured Text Ladder Diagram Sequential Function Chart and Function Block Diagram language options Additionally the environment utilizes an ASCII import export format based on the Structured Text language The instruction set and program file exchange features are discussed in detail in the sections that follow Publication 1756 PM001G EN P March 2004 C 4 _1EC61131 3 Compliance Instruction Set 1EC61131 3 Program Portability Publication 1756
185. able All SFC Forces Then choose Yes to confirm Remove All SFC Forces From the Logic menu choose SFC Forcing Remove All SFC Forces Then choose Yes to confirm Chapter 15 Using this Chapter Develop a Fault Routine Handle a Major Fault Use this chapter to develop logic that handles specific fault conditions For this information See page Develop a Fault Routine 15 1 Programmatically Clear a Major Fault 15 5 Clear a Major Fault During Prescan 15 8 Test a Fault Routine 15 12 Create a User Defined Major Fault 15 13 Major Fault Codes 15 15 If a fault condition occurs that is severe enough for the controller to shut down the controller generates a major fault and stops the execution of logic e Depending on your application you may not want all major faults to shut down your entire system e In those situations you can use a fault routine to clear a specific fault and let at least some of your system continue to operate EXAMPLE Use a fault routine In a system that uses recipe numbers as indirect addresses a miss typed number could produce a major fault such as type 4 code 20 To keep the entire system from shutting down a fault routine clears any type 4 code 20 major faults Publication 1756 PM001G EN P March 2004 15 2 Handle a Major Fault Choose Where to Place the Fault Routine A fault routine lets you program logic to take specific action after a fault such as cle
186. abling SFC forces causes your machine or process to go to a different state or phase e Removing forces may still leave forces in the enabled state e If forces are enabled and you install a force the new force immediately takes effect Enable Forces For a force to take effect you enable forces You can only enable and disable forces at the controller level e You can enable I O forces and SFC forces separately or at the same time e You cannot enable or disable forces for a specific module tag collection or tag element IMPORTANT If you download a project that has forces enabled the programming software prompts you to enable or disable forces after the download completes Force Logic Elements 14 3 When forces are in effect enabled a appears next to the forced element Step_001 g MOY Move Source Flow_Valve_1 Dest Local 3 0 ChiData b Re Local 5 1 Data 13 Local 5 0 Data 6 oo forces are in effect enabled state to which the element is forced Disable or Remove a Force To stop the effect of a force and let your project execute as programmed disable or remove the force e You can disable or remove I O and SFC forces at the same time or separately e Removing a force on an alias tag also removes the force on the base tag Changes to forces can cause unexpected machine motion that could ATTENTION injure personnel Before you disable or remove forces determine how the chan
187. ached connection With the MSG instruction an uncached connection instructs the controller to close the connection upon completion of the mSG instruction Clearing the connection leaves it available for other controller uses See connection cached connection Publication 1756 PM001G EN P March 2004 Glossary 46 Publication 1756 P M001G EN P March 2004 unidirectional connection A connection in which data flows in only one direction from the originator to the receiver See connection bidirectional connection upload The process of transferring the contents of the controller into a project file on the workstation If you do not have the project file for a controller you can upload from the controller and create a project file However not everything that is stored in a project file is available from the controller If you upload from a controller the new project file will not contain e rung comments e descriptions for tags tasks programs routines modules or user defined structures e chains of aliases aliases pointing to other aliases Alias chains are not completely reconstructed from the controller If there are several possible names for a data item the firmware and software choose a best fit alias that may not reflect how the alias was specified in the original project See download user defined data type You can also create your own structures called a user defined data type also commonly refer
188. agram Publication 1756 PM001G EN P March 2004 9 24 Program a Function Block Diagram Assign an Immediate Value To assign a constant value instead of a tag value to an input c on stant parameter you have these options lf you want to Then make the value visible on the diagram and reports Use an IREF be able to change the value online without editing the Enter a Value in the Tag of a Block routine Use an IREF 1 Add an IREF 2 Wire the IREF to the input pin that gets the value 3 Double click the operand area of the IREF 4 Type the value and press the Enter key Enter a Value in the Tag of a Block To assign a value to a parameter when on wire connects to its pin 1 Click the button of the block Parameters Tag H 7 Enableln i Sources i 7 SourceB 2 Type the value 3 Choose Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 25 Connect Blocks with an To transfer data between sheets or in complex wiring situations OCON and ICON Add an OCON Add an ICON ICON OCON KI gt a cy apo SUB MUL DIV eano BOR exoR eno7 gt 4 gt Favorites Process A Drives A Filters Select Limit Statistical A Bit 4 Add an OCON 1 Add an output wire connector OCON and place it near the output pin that supplies the value Wire the OCON to the output pin Double click the operand area
189. ags with the same data lay out For example use a user defined data type to store all the parameters for a tank including temperatures pressures valve positions and preset values Then create a tag for each of your tanks based on that data type Q 2 Use arrays to quickly create a group of similar tags An array creates multiple instances of a data type under a common tag name e Arrays let you organize a block of tags that use the same data type and perform a similar function e You organize the data in 1 2 or 3 dimensions to match what the data represents For example use a 2 dimension array to organize the data for a tank farm Each element of the array represents a single tank The location of the element within the array represents the geographic location of the tank Important Minimize the use of BOOL arrays Many array instructions do not operate on BOOL arrays This makes it more difficult to initialize and clear an array of BOOL data e Typically use a BOOL array for the bit level objects of a PanelView screen e Otherwise use the individual bits of a DINT tag or an array of DINTs a 3 Take advantage of program scoped tags If you want multiple tags with the same name define each tag at the program scope program tags for a different program This lets you re use both logic and tag names in multiple programs Avoid using the same name for both a controller tag and a program tag Within a program
190. ains only a single block so execution order does not matter previous scan _ 4 Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 9 If a group of blocks are in a loop the controller cannot determine which block to execute first In other words it cannot resolve the loop To identify which block to execute first mark the input wire that creates the loop the feedback wire with the Assume Data Available indicator In the following example block 1 uses the output from block 3 that was produced in the previous execution of the routine This input pin uses the output j that block 3 produced on the previous scan Assume Data Available indicator The Assume Data Available indicator defines the data flow within the loop The arrow indicates that the data serves as input to the first block in the loop Publication 1756 PM001G EN P March 2004 9 10 Program a Function Block Diagram Do not mark all the wires of a loop with the Assume Data Available indicator This is OK Assume Data Available indicator The Assume Data Available indicator defines the data flow within the loop Publication 1756 PM001G EN P March 2004 This is NOT OK The controller cannot resolve the loop because all the wires use the Assume Data Available indicator Program a Function Block Diagram 9 11 Resolve Data Flow Between
191. al value of the carriage return then stop 4 Set String_taglelement_number the character at SINT_array element_number 5 Add 1 to element_number This lets the controller check the next character in S NT_array 6 Set the Length member of String_tag element_number This records the number of characters in String_tag so far 7 If element_number SINT_array_size then stop You are at the end of the array and it does not contain a carriage return 8 Go to 3 Publication 1756 PM001G EN P March 2004 Enter this structured text element number 0 SIZE SINT_ array 0 SINT_array_size While SINT_array element_number lt gt 13 do String tag DATA element_number SINT_array element_number element number element _number 1 String tag LEN element _number If element_number SINT_array_size then exit end_if end_while Program Structured Text 7 25 REPEAT UNTIL Use the REPEAT UNTIL loop to keep doing something until conditions are true Operands Structured Text REPEAT eee en hss Seta ah Operand Type Format Enter UNTIL bool expression bool BOOL tag BOOL tag or expression that evaluates to expression expression a BOOL value BOOL expression END_REPEAT IMPORTANT Make sure that you do not iterate within the loop too many times in a single scan e The controller does not execute any other statements in the routine until it completes the loop e If the time th
192. all actions on the last scan of the step This lets you execute your normal logic as well as turn off clear devices at the end of a step 1 In the Last Scan of Active Steps property choose the Programmatic reset option 2 Clear the required data using any of the following methods e To your normal logic add logic that clears the required data Use the LS bit of the step or the Q bit of the action to condition the execution of the logic e Use a PO Pulse Falling Edge action to clear the required data Make sure that the PO action or actions are last in the order of actions for the step Publication 1756 PM001G EN P March 2004 5 36 Design a Sequential Function Chart During the last scan of the step the Programmatic reset option executes all assignments and instructions according to logic conditions e The controller does not postscan the assignments or instructions e When the SFC leaves the step all data keeps its current value The following example uses a single action to turn on and off a conveyor The LS bit of the step conditions the execution of the logic See SFC_STEP Structure on page 5 8 EXAMPLE Use the Programmatic Reset Option and the LS Bit When the step is not on its last scan conveyor_fwa LS 0 this statement turns on conveyor_state When conveyor_state turns on the conveyor turns on On the last scan of the step conveyor_fwd LS 1 this statement turns off conveyor_state Wh
193. alog box for the task fe Controller Controller_1 Controller Tags E Controller Fault Handler CI Power Up Handler E Tasks fal Maintask 4 23 MainProgram A Program Tags ER MainRoutine 1 In the controller organizer right click the task and choose Properties 2 Click the Configuration tab Publication 1756 PM001G EN P March 2004 4 18 Manage Multiple Tasks Publication 1756 PM001G EN P March 2004 la Task Properties MainTask Periodic 3 Inhibit or uninhibit the task If you want to let the task execute when its trigger occurs Then Clear uncheck the nhibit Task check box default prevent the task from executing when its trigger occurs 4 Choose o K Select check the nhibit Task check box Manage Multiple Tasks 4 19 Programmatically Inhibit or Uninhibit a Task To write logic to inhibit or uninhibit a task use a Set System Value SSV instruction to access the following attribute of the TASK object for the task Attribute Data Type Instruction Description InhibitTask DINT GSV Prevents the task from executing ssy To Set the attribute to enable the task 0 default inhibit disable the task 1 or any non zero value EXAMPLE Programmatically Inhibit or Uninhibit a Task If Condition_1 0 then let Task _2 execute 1 The ONS instruction limits the true execution of the SS
194. ame x element of a two dimension array tag _name x y element of a three dimension array tag_name x y z element of an array within a structure tag_name member_name x member of an element of an array tag_name x y z member_name where x is the location of the element in the first dimension y is the location of the element in the second dimension z is the location of the element in the third dimension For a structure within a structure add an additional member_name Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 5 Define the Order of You define execution order flow of data by wiring elements together E ti and indicating any input feedback wires if necessary The location xecution of a block does not affect the order in which the blocks execute data flows from output pins to input pins output pin wire input pin output pin wire input pin Wire symbols SINT INT DINT or REAL value BOOLvalue 0 or 1 Data Latching If you use an IREF to specify input data for a function block instruction the data in that IREF is latched for the scan of the function block routine The IREF latches data from program scoped and controller scoped tags The controller updates all IREF data at the beginning of each scan IREF 9 al p Publication 1756 PM001G EN P March 2004 9 6 Program a Function Block Diagram Publication 1756 PM0
195. amp Sugar High high level LS THEN Controls the speed of the recirculation pump The speed depends on the temperature in the tank IF tank temp gt 200 THEN comment Publication 1756 PM001G EN P March 2004 Sugar Inlet 0 close the inlet IF bar_code 65 A THEN Gets the number of elements in the Inventory array and stores the value in the Inventory Items tag SIZE Inventory 0 Inventory Items When to Use This Procedure Before You Use This Procedure How to Use This Procedure Chapter 8 Program Ladder Logic Use this procedure to accomplish the following e develop the logic for a ladder logic routine e enter the logic into the routine Before you use this procedure make sure you are able to perform the following tasks S Navigate the Controller Organizer J Identify the Programming Languages That Are Installed For more information on any of those tasks see Getting Started on page 1 1 To program a ladder logic routine For this information See page Definitions 8 2 Write Ladder Logic 8 5 Enter Ladder Logic 8 10 Assign Operands 8 11 Export Import Ladder Logic 8 14 Verify the Routine 8 17 Publication 1756 PM001G EN P March 2004 8 2 Program Ladder Logic Definitions Before you write or enter ladder logic review the following terms e Instruction e Branch e Rung Condition Instruction You organize la
196. ams of the event task 400 us 5 What is the backplane communication time Same value as step 3 13 us 6 What is the hardware response time of the output module 51 us 7 Add steps 1 through 6 This is the minimum estimated throughput where execution of the motion planner or other tasks do not delay or interrupt the event task 807 us 8 What is the scan time of the motion group 1130 us 9 What is the total scan time of the tasks that have a higher priority than this event task if any 0 us 10 Add steps 7 through 9 This is the nominal estimated throughput where execution of the motion planner or other tasks delay or interrupt the event task 1937 us Publication 1756 PM001G EN P March 2004 Consideration amount of code in the event task Manage Multiple Tasks 4 31 Additional Considerations The following considerations effect the scan time of the event task which effects the speed at which it can respond to the input signal Description Each logic element rung instruction structured text construct etc adds scan time to the task task priority If the event task is not the highest priority task a higher priority task may delay or interrupt the execution of the event task CPS and UID instructions If one of these instructions are active the event task cannot interrupt the currently executing task The task with the CPS or UID communication interrupts The following actions of the contro
197. an 2 The SSV instruction sets the DisableUpdateQutputs attribute of Task_2 1 This prevents the task from automatically processing outputs when it finishes its execution Condition_1 Storage_Bit 0 FYM _ONS Set System Value Class Name TASK Instance Name Task_2 Attribute Name DisableUpdateOutputs Source One 1 Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 17 Inhibit a Task By default each task executes based on its trigger event periodic or continuous As an option you can prevent a task from executing when its trigger occurs G e inhibit the task This is useful to test diagnose or start up your project If you want to Then let the task execute when its trigger occurs Uninhibit the task default prevent the task from executing when its Inhibit the task trigger occurs EXAMPLE Inhibit a Task During the commissioning of a system that uses several task you can first test each task individually 1 Inhibit all the tasks except one and then test that task 2 Once the task meets your requirements inhibit it and uninhibit a different task 3 Continue this process until you have tested all your tasks If a task is inhibited the controller still prescans the task when the controller transitions from program to run or test mode Manually Inhibit or Uninhibit a Task To manually inhibit or uninhibit the execution of a task use the properties di
198. an Image 17 7 EXADIDIGS o 4 6 Sout 6 22S 2 Ed uo La PRONE RSS oS PETES ES 17 8 SLOPES RRO CCb a aae Oy humid sidney ho Mee Ree ime hg he Bag 17 9 Configure the Store Operation 17 9 SiGrethe Projectin ea ged Le PeS PES eco ey 17 11 Save the Online Project nnana 9 eG a Ene eae 17 11 LOAd A PrTOJECH t ae ae Meee a ee AA re Aa i 17 12 Check fora Loads a ween y eai eh E E he KIS 17 14 Clear Nonvolatile Memory 24 se bn 2505 3 eareee ss 2 17 15 Check the Current Load Image Option 17 15 Change the Load Image Option 17 16 Clear the Project from the Controller 5 2 sr tage es 17 16 Store the Empty Image lt n gc ce een Ga bed 17 16 Use a CompactFlash Readetis is vccseedeea ky cas 17 18 Manually Change Which Project Loads from the CompactFlash Card aaau anaa 17 19 Manually Change the Load Parameters for a Project 17 20 Chapter 18 When to Use This Procedur so sac a b4 OA eae A 18 1 Use Routine Source Protection 0 0 0 000000 18 1 Choose the Level of Protection for Each Routine 18 4 Choose the Number of Source Keys 18 4 Define the Source Key or Keys n on nananana aaa 18 5 Choose a File Location in Which to Store the Source Keys 18 5 Activate the RSLogix 5000 Source Protection Feature 18 6 Create a File for the Source Keys 0 t416 e y ks Baas 18 6 Protect a Routine with a Source Key 18 7 Remove
199. and Drives Instructions Reference Manual publication 1756 RM006 e Logix5000 Controllers Motion Instruction Set Reference Manual publication 1756 RM007 Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 39 Here is an example that uses a non retentive assignment to control a conveyor It turns on a conveyor at the start of a step and automatically turns off the conveyor when the step is done EXAMPLE Automatically Clear Data a mi N f conveyor_start conveyor state 1 conveyor_fwd a This action turns on the conveyor When conveyor_state turns on the conveyor turns on Publication 1756 PM001G EN P March 2004 5 40 Design a Sequential Function Chart Keep Something On From How Do You Want to Control the Device Step to Step To provide bumpless control of a device during more than one time or phase step do one of the following Option Use a Simultaneous Branch Make a separate step that controls the device Example Transfer_In Paint Clean Transfr_Out Fan Store and Reset an Action Note the step that turns on the device and the step that turns off the device Later define a Stored and Reset Action pair to control the device Transfer_In Paint Clean Transfr_Out turn on the fan turn off the fan Use One Large Step Us
200. ar the fault and resume execution Where you place the routine depends on the type of fault that you want to handle If you want take specific action clear the fault when Do this See page Condition Fault type The execution of an instruction faults 4 Create a Fault Routine for a Program 15 2 Communication with an I O module fails 3 Create a Routine for the Controller Fault Handler 15 3 Watchdog time for a task expires 6 While a project is downloading to the 8 controller the keyswitch is placed in RUN A motion axis faults The controller powers up in run remote run mode Controller My_Controller 3 8 Tasks MainTask ee Progra 1 Create a Routine for the Power Up Handler 15 4 Create a Fault Routine for a Program Create the Routine 1 Right click the program and choose New Routine 2 Define the routine MainR i it Cut Copy Tl Paste Publication 1756 PM001G EN P March 2004 Name Description Cancel Type B Ladder Diagram In Program MainProgram Help Handle a Major Fault 15 3 Assign the Routine as the Fault Routine F E Controller My_Controller 3 6 Tasks E Maintask 1 Right click the program and choose Properties ome eMainPrograr Progra Finalize All Edits in Program Ea MainRc 2 Specify the fault routine Cancel Apply Help C
201. art How to Use This Procedure To program an SFC Publication 1756 PM001G EN P March 2004 Add an SFC Element Create a Simultaneous Branch Create a Selection Branch Set the Priorities of a Selection Branch Return to a Previous Step Rename a Step Configure a Step Rename a Transition Program a Transition Add an Action Rename an Action Configure an Action Program an Action Assign the Execution Order of Actions Document the SFC Show or Hide Text Boxes or Tag Descriptions Configure the Execution of the SFC Verify the Routine Program a Sequential Function Chart 6 3 Add an SFC Element To add SFC elements use the SFC toolbar start of simultaneous start of selection branch step and transition branch stop step subroutine return transition new path text box q4 Slo j e 8 gt IAA src To add an element to your SFC you have these options Add and Manually Connect Elements Add and Automatically Connect Elements Drag and Drop Elements Add and Manually Connect Elements 1 On the SFC toolbar click the button for the item that you want to add 2 Drag the element to the required location on the SFC For example green dot 3 To wire connect two elements together click a pin on one of the elements A and then click the pin on
202. ask 3 From the Type list choose Event 4 From the Trigger list choose the trigger for the task 5 From the 7ag list choose the tag that contains the triggering data 6 In the Priority text box type the priority for the task 7 In the Watchdog text box type the watchdog time for the task 8 Choose Publication 1756 PM001G EN P March 2004 4 54 Manage Multiple Tasks Create a Periodic Task A periodic task performs a function or functions at a specific rate MEg Ensure that the time period is longer than the sum of the execution times of all the programs assigned to the task e If the controller detects that a periodic task trigger occurs for a task that is already operating a minor fault occurs overlap e Priorities and execution times of other tasks may also cause an overlap E Controller Controller_1 Ej Controller Tags Controller Fault Handler 9 Power Up Handler J E Tasks lt H A MainTask 1 In the controller organizer right click the Tasks folder and choose New Task 2 Name OK Description Cancel 3 Type Periodic gl 4 Period 10 000 ms 5 Priority fio Lower Number Yields Higher Priority 6 watchdog 500 000 ms 2 In the Name text box type a name for the task Help 3 From the Type list choose Periodic default 4 In the Period text box type the period at which you want the task to execute
203. ask j a MainProgram A Program Tags To open a routine double click the routine If a routine is grayed out you ay Routine_4A Routine _B cannot open the routine B Routine_C Routine_D s J E Unscheduled Programs source protection The developer of the routine may have assigned a i Motion Groups source key to the routine The source key limits access to the routine F Trends If the controller organizer lists source protection for a routine then a source Data Tepes key is assigned to the routine Type Ladder Diagram For this routine Description Source Protectio Source Not Available lt q _ This is the protection status If Then Source Not Available To open the routine your computer requires the source key for the routine Source Not Available e You can only open and view the routine Viewable e You cannot make any changes or copy any of contents of the routine Source Available You have full access to the routine Source Available You have full access to the routine Viewable IMPORTANT If the source of a routine is unavailable do not export the project e An export file L5K contains only routines where the source code is available e If you export a project where the source code is not available for all routines you will not be able to restore the entire project TIP If a routine fails to open your computer may not have t
204. at it takes to complete the loop is greater than the watchdog timer for the task a major fault occurs e Consider using a different construct such as IF THEN Description The syntax is REPEAT lt statement gt lt q statements to execute while bool_expression is false IF bool _expression2 THEN EXIT lt q _ _ _ If there are conditions when you want to exit the loop early use other statements such as an IF THEN construct to condition an EXIT statement optional END_IF UNTIL bool _expressioni END REPEAT Publication 1756 PM001G EN P March 2004 7 26 Program Structured Text The following diagrams show how a REPEAT UNTIL loop executes and how an EXIT statement leaves the loop early statement 1 statement 2 statement 3 statement 4 true rest of the routine BOOL expression false While the bool_expression is false the controller executes only the statements within the REPEAT UNTIL loop Arithmetic Status Flags not affected Fault Conditions A major fault will occur if ement 1 ement 2 ement 3 ement 4 sta sta sta sta ad yes Exit no v BOOL expression tug ey false rest of the routine To stop the loop before the conditions are false use an EXIT statement Fault type Fault code the construct loops too long 6 1 Example 1 If you want this The REPEAT UNTIL loop executes the statements in the construct and then det
205. at provide more reliable communications between devices than unconnected messages The number of connections that a single controller can have is limited You indirectly determine the number of connections the controller uses by configuring the controller to communicate with other devices in the system The following types of communication use connections e 0 modules e produced and consumed tags e certain types of Message MSG instructions not all types use a connection requested packet interval RPI The RPI specifies the period at which data updates over a connection For example an input module sends data to a controller at the RPI that you assign to the module e Typically you configure an RPI in milliseconds ms The range is 0 2 ms 200 microseconds to 750 ms e f aControlNet network connects the devices the RPI reserves a slot in the stream of data flowing across the ControlNet network The timing of this slot may not coincide with the exact value of the RPI but the control system guarantees that the data transfers at least as often as the RPI In Logix5000 controllers I O values update at a period that you configure via the I O configuration folder of the project The values update asynchronous to the execution of logic At the specified interval the controller updates a value independently from the execution of logic ATTENTION Take care to ensure that data meson contains the appropriate values throughout a ta
206. ata over the ControlLogix backplane is sent in 50 byte segments e Data transmission occurs asynchronous to program scan The logic that this section includes uses an acknowledge word to make sure that each packet contains new data before the data moves to the destination array The logic also uses an offset value to indicate the starting element of the packet within the array Because of the offset and acknowledge elements each packet carries 123 elements of data from the array as depicted below Producer Consumer array array packet packet offset offset acknowledge acknowledge Publication 1756 PM001G EN P March 2004 11 2 Produce a Large Array In addition the array must contain an extra 122 elements In other words it must be 122 elements greater than the greatest number of elements that you want to transfer e These elements serve as a buffer e Since each packet contains the same number of elements the buffer prevents the controller from copying beyond the boundaries of the array e Without the buffer this would occur if the last packet contained fewer than 123 elements of actual data Produce a Large Array 1 Open the RSLogix 5000 project that will produce the array 2 In the Controller Tags folder create the following tags P Tag Name Type array_ack DINT 2 J array_packet DINT 125 where array is the name for the d
207. ata that you are sending 3 Convert array_dack to a consumed tag For Specify Controller name of the controller that is receiving the packet Remote Tag Name array_ack Both controllers use the same name for this shared data Refer to Consume Data That Is Produced by Another Controller on page 10 15 Publication 1756 PM001G EN P March 2004 Produce a Large Array 11 3 4 In either the Controller Tags folder or the tags folder of the program that will contain the logic for the transfer create the following tags Tag Name Type array DINT x where x equals the number of elements to transfer plus 122 elements array_Ooffset DINT array_size DINT array_transfer_time DINT array_transfer_time_max DINT array_transfer_timer TIMER where array is the name for the data that you are sending 5 In the array_size tag enter the number of elements of real data The value of x from step 4 minus the 122 elements of buffer 6 Create or open a routine for the logic that will create packets of data 7 Enter the following logic Times how long it takes to send the entire array TON Timer On Delay EN Timer array_transfer_timer N Preset 10000000 Accum 0 When the offset value in array_ack O is not equal to the current offset value but array_ack 1 equals 999 the consumer has begun to receive a new packet so the rung moves 999 into the last element of the packet The co
208. ata y ia ced ose ete eek 4 44 Synchronize Multiple Controllers 4 45 Checklist for the Producer Controller 4 46 Checklist for the Consumer Controller 4 47 Producer Controller o554 5 egedsnwtsd Mae aes Pe be 4 4 48 Consumer Controller etd s ake ee oe ee wee Ces 4 49 Using the EVENT Instruction Trigger 4 50 Programmatically Determine if an EVENT Instruction Triggered a Task ea sane the 5 8 cent Raed eee hee 4 51 Checklist for an EVENT Instruction Task 4 51 Credte a Task 22 hn pe 8K GS wre DE OPER LE DL Eee 4 53 Create an Event Task a ghia big ah lh area wr BE A 4 53 Create a Periodic LAS a cae Fn Rah oe PRG Ce nae ea G4 4 54 Define a Timeout Value for an Event Task 4 55 Assign a Timeout Value to an Event Task 4 55 Programmatically Configure a Timeout 4 56 Programmatically Determine if a Timeout Occurs 4 57 Chapter 5 When to Use This Procedure avy o4 vs pach es ee Pee ENG 5 1 How to Use This PFOCEdUbe o s of eign eos ge ad ow era hi weet s 5 1 What is a Sequential Function Chart 5 2 How to Design an SFC Overview ss ivaia kaise Keen oie ks 5 4 Define the TASK Sie orcs te oleae N E ew Oa 5 5 Choose How to Execute the SFC anuau Ale eile tena 5 6 Define the Steps of the Process 0 000000005 5 6 Follow These Guidelines 204 eed oe ey pe eae Aes 5 7 SFC_STEP Structure a 25 ho Se A ey eal betel ev
209. ate a Fault Routine for the Program Does a fault routine already exist for the program If Then Yes Go to Jump to the Fault Routine on page 15 14 No Create a fault routine for the program 1 In the controller organizer right click the program and choose New Routine 2 In the name box type a name for the fault routine name of fault routine 3 From the Type drop down list choose Ladder 4 Choose OK Publication 1756 PM001G EN P March 2004 15 14 Handle a Major Fault Configure the Program to Use the Fault Routine 1 In the controller organizer right click the program and choose New Routine 2 Click the Configuration tab 3 From the Fault drop down list choose the fault routine 4 Choose OK Jump to the Fault Routine In the main routine of the program enter the following rung conditions when the JSR controller should shut Jump To Subroutine down Routine Name Fault Routine Input Par 999 where is Fault _ Routine name of the fault routine for the program x value for the fault code EXAMPLE Create a User Defined Major Fault When Tag_1 0 1 execution jumps to name_of_fault_routine A major fault occurs and the controller enters the faulted mode Outputs go to the faulted state The Controller Properties dialog box Major Faults tab displays the code 999 JSA Jump To Subroutine Routine Name Fault_Foutine Input Par 999 Tag_1 0 Publicat
210. ate and Assign a New Tag Rename the Tag of a Function Block Assign an Existing Tag Create and Assign a New Tag re 1 Double click the operand area 2 Type a name for the tag and press the Enter key 3 Right click the tag name and choose New tag_name 4 Data Type sal Configure Scope MainProgram b 4 Click the button ALARM AxIS_CONSUMED Cancel AXIS_SERVO AXIS_SERVO_DRIVE Help AXIS_VIRTUAL 5 gt H xi Array Dimensions Dim 0 Din Din Z 6 0 0 jo 5 Select the data type for the tag 6 If you want to define the tag as an array type the number of elements in each dimension 7 Choose Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 23 Data Type Gontigure 8 5 Scope MainProgram x 8 Choose the scope for the tag 9 Choose Rename the Tag of a Function Block 1 Click the button of the block 2 Click the Tag tab Y Parameters Tag 3 p gt Name 3 Type the new tag name for the block 4 Choose Assign an Existing Tag Block 01 q 1 Double click the operand area 2 Click the V 3 Select the tag To select a Do this tag Double click the tag name bit number A Click the tag name B To the right of the tag name click M C Click the required bit 4 Press Enter or click a different spot on the di
211. ate new values To Use this operator Optimal data type add DINT REAL subtract negate DINT REAL multiply i DINT REAL exponent x to the power of y a DINT REAL divide DINT REAL modulo divide MOD DINT REAL Arithmetic functions perform math operations Specify a constant a non boolean tag or an expression for the function For Use this function Optimal data type absolute value ABS numeric _ expression DINT REAL arc cosine ACOS numeric expression REAL arc sine ASIN numeric expression REAL arc tangent ATAN numeric expression REAL cosine COS numeric expression REAL radians to degrees DEG numeric expression DINT REAL natural log LN numeric expression REAL log base 10 LOG numeric expression REAL degrees to radians RAD numeric expression DINT REAL sine SIN numeric _ expression REAL square root SORT numeric expression DINT REAL tangent TAN numeric expression REAL truncate TRUNC numeric expression DINT REAL Use this format valuel operator value2 For example Example Program Structured Text 7 7 For this situation If gain_4 and gain_4_adj are DINT tags and your specification says Add 15 to gain_4 and store the result in gain_4_adj You d write gain 4 adj gain_4 15 operator valuel If alarm and high_alarm are DINT tags and your specification says Negate high_alarm and store the result in a
212. ater the tags were converted to aliases for the corresponding I O devices stop start lt Local 2 1 Data 1 gt lt Local 2 1 Data 0 gt E na machine on TPE J E drill 1 on machine on lt Local 0 0 Data 2 gt drill _1 part advance ig eas ES 2 TAE JE S7 JE conveyor on lt Local 0 0 Data 0 gt TE Ic 42351 Display Alias Information To show in your logic the tag to which an alias points 1 From the Tools menu select Options 2 Click the Ladder Display tab 3 Select the Show Tag Alias Information check box 4 Click OK Publication 1756 PM001G EN P March 2004 3 26 Organize Tags Assign an Alias To assign a tag as an alias tag for another tag 1 From the Logic menu select Edit Tags Program Tags MainProgram 2 _ Scope MainProgram 7 Show fShow All ad Sort Tag Name x Alias For Base Tag drill_1 _IDRILL_STATIO drill_1_depth_limit Local 2 1 Data 3 C Local 2 Data 3 C BOOL drill_1_ forward Local 0 0 Data 3 C Local 0 0 Data 3 C BOOL drill_1_home_limit Local 2 Data 2 C Local 2 Data 2 C BOOL drill_1_on Local 0 0 Data 2 C Local 0 0 Data 2 C BOOL drill_1_ retract Local 0 0 Data 4 C Local 0 0 D ata 4 C hole_position machine_on i 4236U 4 2 Select the scope of the tag 3 To the right of the tag name click the Alias For cell The cell displays a V 4 Click the V 5 Select the tag t
213. ating point address it takes two consecutive integers for a total of 32 bits and converts them to a single floating point value Publication 1756 PM001G EN P March 2004 Communicate with Other Devices 10 19 Execute a Message MSG To transfer data between controllers send or receive data you have the following options Instruction ee If the data Then See needs regular delivery at a rate that you Produce and Consume a Tag Page specify i e deterministic 10 9 is sent when a specific condition occurs in your Execute a Message MSG This application Instruction section EXAMPLE Execute a Message MSG Instruction If count_send 1 and count_msg EN 0 MSG instruction is not already enabled then execute a MSG instruction that sends data to another controller count_send count_msg en MSG Ai Type Unconfigured CEND Message Control count_msg amp C DN gt CER gt Publication 1756 PM001G EN P March 2004 10 20 Communicate with Other Devices The following diagram shows how the controller processes Message MSG instructions D Message Queue Cache List Unconnected Buffers 2 oy MSG Cached aoe Ler 16 j Yes gotal Description p destination device O The controller scans the MSG instruction and its rung condition in goes true The MSG instr
214. ation 1756 PM001G EN P March 2004 10 4 Communicate with Other Devices To inhibit or uninhibit a module from logic 1 Use a Get System Value GSV instruction to read the Mode attribute for the module 2 Set or clear bit 2 If you want to Then inhibit the module Set bit 2 uninhibit the module Clear bit 2 3 Use a Set System Value SSV instruction to write the Mode attribute back to the module EXAMPLE Inhibit a Connection If Module_1_Inhibit 1 then inhibit the operation of the 1 0 module named Module _1 1 The GSV instruction sets Module_1_Mode value of the Mode attribute for the module 2 The OTE instruction sets bit 2 of Module_1_Mode 1 This means inhibit the connection 3 The SSV instruction sets the Mode attribute for the module Module_1_Mode Module_1_Inhibit GSV Get System Yalue Class Name MODULE Instance Name Module_1 Attribute Name Mode Dest Module_1_Mode pe Module_1_Mode 2 SY Set System Value Class Name MODULE Instance Name Module_1 Attribute Name Mode Source Module_1_Mode pe Publication 1756 PM001G EN P March 2004 Communicate with Other Devices 10 5 Manage a Connection Failure ATTENTION Outputs respond to the last non faulted state of the controlling inputs To avoid potential injury and damage to machinery make sure this does not create unsafe operation Configure critical I O modules to generate a controller major fault when th
215. ation 1756 PM001G EN P March 2004 4 56 Manage Multiple Tasks 2 Click the Configuration tab TT General Configuration Program Schedule Monitor Type Even O Trigger Module Input Data State Change Tag krns O 3 IV Execute Task If No Event Occurs Within ms lt 4 3 Check the Execute Task If No Event Occurs Within check box 4 Type the timeout value in milliseconds 5 Choose Programmatically Configure a Timeout To programmatically configure a timeout use a Get System Value GSV instruction to access the following attributes of the task Table 4 4 Status Attribute of the TASK Object Attribute Data Type Instruction Description Rate DINT GSV If the task type is Then the Rate attribute specifies the sgy periodic Period for the task Time is in microseconds event The timeout value for the task Time is in microseconds EnableTimeOut DINT GSV Enables or disables the timeout function of an event task sgy To Set the attribute to disable the timeout function 0 default enable the timeout function 1 or any non zero value Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 57 EXAMPLE Programmatically Configure a Timeout To make sure that a timeout value is always defined and enabled for an event task the following logic configures the timeout when the controller enters the run mode If S FS 1 first scan then set the timeout value for
216. broutine With non boolean actions you also have the option to postscan automatically reset the assignments and instructions before leaving a step e During postscan the controller executes the assignments and instructions as if all conditions are false e The controller postscans both embedded structured text and any subroutine that the action calls To automatically reset assignments and instructions see Turn Off a Device at the End of a Step on page 5 32 Design a Sequential Function Chart 5 19 If you want to e execute your logic without additional routines e use structured text assignments constructs and instructions To program a non boolean action you have the following options Then Embed structured text For example S_Open_Outlet oat imis S_Complete_the_Batch Out Lat Progeonnand aL When the S_Complete_the_Batch step is active the S_Open_Outlet action executes The action sets the Qutlet ProgCommand tag equal to 1 which opens the outlet valve e re use logic in multiple steps e use another language to program the action such as ladder logic e nest an SFC Call a subroutine For example N S_Open_Outlet JSR Open Outlet S_Complete_the_Batch When the S_Complete_the_Batch step is active the S_Open_Outlet action executes The action calls the Open_Outlet routine Open_Outlet Routine Outlet ProgCommand When the Open_Outlet routine exec
217. can range from 1 ms to 2 000 000 ms 2000 seconds The default is 500 ms e The watchdog timer begins to time when the task is initiated and stops when all the programs within the task have executed e If the task takes longer than the watchdog time a major fault occurs The time includes interruptions by other tasks e A watchdog time out fault major fault also occurs if a task is triggered again while it is executing task overlap This can happen if a lower priority task is interrupted by a higher priority task delaying completion of the lower priority task e You can use the controller fault handler to clear a watchdog fault If the same watchdog fault occurs a second time during the same logic scan the controller enters faulted mode regardless of whether the controller fault handler clears the watchdog fault Adjust the Watchdog Timer for a Task To change the watchdog time of a task use the properties dialog box for the task sa Controller Controller_1 Controller Tags E3 Controller Fault Handler CI Power Up Handler amp Tasks H E MainTask A MainProgram F Program Tags ER MainRoutine 1 In the controller organizer right click the task and choose Properties 2 Click the Configuration tab Publication 1756 PM001G EN P March 2004 1 32 Getting Started la Task Properties MainTask Periodic 3 Type the watchdog
218. cation on the instruction Assign an Immediate Constant Value 1 Click the operand area of the instruction 2 Type the value and press Enter Publication 1756 PM001G EN P March 2004 8 14 Program Ladder Logic Export Import Ladder Logic If you want to re use ladder logic from another project simply export the logic to an L5X file and import it into the required project The rad RSLogix 5000 software T 13 0 or later L5X file contains all that you need for the logic except I O modules Project A iaix L5X file Gli rungs export Start Reset Buton ir ti lt i mend t tags Local TData 1 gt OSR JE One Shot Rising 0B S FS Dupa at EE data types sF Storage Bi art Store_Bit lt SB gt t Project B AE comments El reed eS fen sael f Run The End Run i r 13 ae i When You Import Rungs When you import rungs RSLogix 5000 software shows a list of the tags and user defined data types that go along with the rungs Use the list to manage the tags and data types that are created during the import operation The Operation column shows what will happen to each tag and data type during the import The software either creates it uses an existing one in the project or discards it does not import it If you place the variables for the rungs in a user defined data type you have less tags to manage If desired you can rename a tag to make it
219. ce ATTENTION Use the SSV instruction carefully Making changes to objects can cause unexpected controller operation or injury to personnel To get or set a system value 1 Open the RSLogix 5000 project 2 From the Help menu select Contents 3 Click the Index tab 4 Type gsv ssv objects and click Display Publication 1756 PM001G EN P March 2004 Publication 1756 PM001G EN P March 2004 5 Click the required object To get or set Click axis of a servo module AXIS system overhead timeslice CONTROLLER physical hardware of a controller CONTROLLERDEVICE coordinated system time for the devices in one CST chassis DF1 communication driver for the serial port DF1 fault history for a controller FAULTLOG attributes of a message instruction MESSAGE status faults and mode of a module MODULE group of axes MOTIONGROUP fault information or scan time for a program PROGRAM instance number of a routine ROUTINE configuration of the serial port SERIALPORT properties or elapsed time of a task TASK wall clock time of a controller WALLCLOCKTIME you want to access 7 Create a tag for the value of the attribute If the data type of the attribute Then is one element e g DINT 6 In the list of attributes for the object identify the attribute that Create a tag for the attribute more than one element e g A Create a user defined data type that DINT 7 matc
220. ced at the beginning of a task s execution can be different when referenced later Tak r nsure that data mem contains th ATTENTION ake care to ensure that data me Oy contains the appropriate values throughout a task s execution You can duplicate or buffer data at the beginning of the scan to provide reference values for your logic Glossary 3 array An array lets you group data of the same data type under a common name e An array is similar to a file e A subscript s identifies each individual element within the array e A subscript starts at 0 and extends to the number of elements minus 1 zero based lo expand an array and display its elements click the sign Program Tags MainProgram tanks To collapse an array and B gt J timer_presets This array contains six hide its elements click timer presets 0 elements of the DINT the sign iamm data type _ timer presets DNT elements of _ timer presets INT timer_presets _ timer presets DNT ene _ timer presets INT Etimer_presets 5 4 gt A Monitor Tags 42367 e An array tag occupies a contiguous block of memory in the controller each element in sequence e You can use array and sequencer instructions to manipulate or index through the elements of an array e An array can have as many as three dimensions This gives you the flexibility to identify an element
221. cer CONTROL timer TIMER Publication 1756 PM001G EN P March 2004 3 4 Organize Tags The minimum memory allocation for a tag is 4 bytes When you create a tag that stores data that requires less than four bytes the controller allocates 4 bytes but the data only fills the part it needs Data type Bits 31 16 15 8 7 1 0 Bool not used Oor1 Sint not used 128 to 127 Int not used 32 768 to 32767 Dint 2 147 483 648 to 2 147 483 647 Real 3 40282347E to 1 17549435E 3 negative valle 1 17549435E to 3 40282347E 8 positive values The COUNTER and TIMER data types are examples of commonly used structures lo expand a structure and display its members click Program Tags MainProgram the sign Scope MainProgram Show Show All v Sot T running_hours 4 COUNTER structure To collapse a structure running_seconds lt lt TIMER structure and hide its members tunning_seconds PRE click the sign members of data types of the running_seconds members 42365 To copy data to a structure use the COP instruction See the Logix5000 Controllers General Instruction Set Reference Manual publication 1756 RMO003 Publication 1756 PM001G EN P March 2004 Organize Tags 3 5 Scope When you create a tag you define it as either a controller tag global data or a program tag for a specific program local data
222. ckets a keyboard key Publication 1756 PM001G EN P March 2004 Press Enter Press the Enter key Getting Started Communicate with 1 0 Table of Contents Chapter 1 Use This Chapter ey nada ee ee Pee ee Ee 1 1 Create a Proje csc ect e a te th pina Bee e yew aay obs 1 1 Create AE IOV ECGs yaa tas oat 5 Dah sca tes Sahl sh hayes 1 2 Configure a Projects aoi i as twr sea wee E a ones 1 3 Explore a Project 50 4 cans see hasan a Pe beh DA BMS 1 4 Controller Organizer oA sg noona aaaea eae Sie seeds ack 8 1 6 Create ROUES o lt 4 6 wernt pied enon Moka dey Mio Sy Mkts 1 7 Define a Routine for Each Section of Your Machine or Process 1 7 Identify the Programming Languages That Are Installed 1 7 Choose a Programming Language for Each Section 1 8 Divide Each Routine Into More Meaningful Increments 1 9 CCAS A ROUUNE meset panei six ah econ a ie Ce ache Beto na Fe 1 10 Opetica ROUNE raa ers See te oe ae E AN 1 11 Verify a Project unaua Bald Wee oe eae ete Bad 1 12 Save Ae BIO CC iris ani Ge anh coe poe oe Ah ply MO oe ai te Hh dealt gh tele 1 12 Configure a Communication Driver 1 13 Download a Project to the Controller yok eee anaua 1 14 Select a Mode for the Controller 1 16 Manually Clear a Major Fault nauau aaua aaa 1 17 Configure the Execution of a Task auaa naaa ae abe 1 18 Configure Taski rier oe e4s Ria RSS OES SO EEEN 1 19 Create Multiple Programs nd eats Rs eh
223. configuration and troubleshooting we offer TechConnect Support programs For more information contact your local distributor or Rockwell Automation representative or visit http support rockwellautomation com Installation Assistance If you experience a problem with a hardware module within the first 24 hours of installation please review the information that s contained in this manual You can also contact a special Customer Support number for initial help in getting your module up and running United States 1 440 646 3223 Monday Friday 8am 5pm EST Outside United Please contact your local Rockwell Automation representative for any States technical support issues New Product Satisfaction Return Rockwell tests all of our products 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 United States Contact your distributor You must provide a Customer Support case number see phone number above to obtain one to your distributor in order to complete the return process Outside United Please contact your local Rockwell Automation representative for States return procedure ControlNet is a trademark of ControlNet International Ltd DeviceNet is a trademark of the Open DeviceNet Vendor Association www rockwellautomation com Corporate Headquarters Rockwell Automation 777 East Wisconsin Avenue Suite 1400
224. controller computes the result of the expression and uses it as the array subscript You can use these operators to specify the subscript of an array Operator Description Operator Description ad MOB Modulo subtract negate NOT complement i multiply OR OR divide SOR square root ABS Absolute value TOD integer to BCD AND AND TRN Truncate FRD BCD to integer XOR exclusive OR Format your expressions as follows If the operator requires Use this format Examples one value tag or expression operator value ABS tag_a two values tags constants or value_a operator value_b e tag_b 5 expressions e tag_cAND tag_d e tag_e 2 MOD tag_f tag_g Publication 1756 PM001G EN P March 2004 3 30 Organize Tags Publication 1756 PM001G EN P March 2004 Chapter 4 Manage Multiple Tasks Using This Chapter The default RSLogix 5000 project provides a single task for all your logic While this is sufficient for many applications some situations may require more than one task This chapter provides the following information to help you use multiple tasks in your project For this information See page Select the Controller Tasks 4 2 Prioritize Periodic and Event Tasks 4 5 Leave Enough Time for Unscheduled Communication 4 8 Avoid Overlaps 4 9 Configure Output Processing for a Task 4 13 Inhibit a Task 4 17 Choose the Trigger for an E
225. cute all the routines e You can regain access to a protected routine from a specific computer using either of the following methods Add the source key file and point RSLogix 5000 software to the location of the file Create the source key file and manually enter the name for the source key Publication 1756 PM001G EN P March 2004 18 2 Secure a Project The controller organizer shows the protection status of a routine C3 Controller Controller_Name E Tasks MainTask 3 63 MainProgram A Program Tags sA Routine_4 Routine_B ie For this routine Routine_D 9 Unscheduled Programs CI Motion Groups C Trends C Data Types Ladder Diagram Source Protectio Source Not Available a This is the protection status If the controller organizer Then displays Source Not Available e A source key is assigned to the routine e To open the routine your computer requires the source key for the routine Source Not Available Viewable e A source key is assigned to the routine e You can only open and view the routine e You cannot make any changes or copy any of contents of the routine Source Available e A source key is assigned to the routine e You have full access to the routine Source Available Viewable e A source key is assigned to the routine e You have full access to the routine e Those who do not have the s
226. cute the logic this bit will always be on Tag Name Type CPU_scanning BOOL Handle a Major Fault 15 9 Get the Fault Type and Code Enter this rung in the fault routine for the program GSV Get System Yalue Class name PROGRAM Instance name THIS Attribute Name MAJORFAULTRECORD Dest major_fault_record Time_Low oe 43064 1 The GSV instruction accesses the MAJORFAULTRECORD attribute of this program This attribute stores information about the fault 2 The GSV instruction stores the fault information in the major_fault_record tag When you enter a tag that is based on a structure enter the first member of the tag Tag Name Type major_fault_record FAULTRECORD Publication 1756 PM001G EN P March 2004 15 10 Handle a Major Fault Check for a Specific Fault Enter this rung in the fault routine for the program CPU_scanning EQU QU Equal Source 4 major_fault_record Code o 20 Equal Source major_fault_record Type 0 4 Source B Source B CLR LR Clear Dest major_fault_record Code 0e Clear Dest major_fault_record Type 0 1 During prescan the bits of all OTE instructions are off and this instruction is true Once the controller begins to execute the logic this instruction is always false 2 This EQU instruction checks for a fault of type 4 which means that an instruction in this program caused the fault
227. cution of the structured text instruction tag_xic JE Channel 0 SerialPort Control setial_control Character Count In structured text if you write this example as IF tag xic THEN ABL 0 sSerial_ control END IF the ABL instruction will execute every scan that fag_xic is set not just when tag_xic transitions from cleared to set Publication 1756 PM001G EN P March 2004 7 12 Program Structured Text If you want the ABL instruction to execute only when tag_xic transitions from cleared to set you have to condition the structured text instruction Use a one shot to trigger execution osri_1 InputBit tag_xic OSRI osri_1 IF osri_1 OutputBit THEN ABL 0 serial_ control END_IF Constructs Constructs can be programmed singly or nested within other constructs If you want to Use this construct Available in these languages See page do something if or when specific IF THEN structured text 7 13 conditions occur select what to do based on a numerical value CASE OF structured text 7 16 do something a specific number of times before FOR DO structured text 7 19 doing anything else keep doing something as long as certain WHILE DO structured text 7 22 conditions are true keep doing something until a condition is true REPEAT UNTIL structured text 7 25 Publication 1756 PM001G EN P March 2004 IF THEN Operands IF bool_expression THEN lt statement gt END_IF Descript
228. d Text Assign an ASCII character to a string Use the assignment operator to assign an ASCII character to an element of the DATA member of a string tag To assign a character specify the value of the character or specify the tag name DATA member and element of the character For example This is OK This is not OK stringl DATA 0 65 stringl DATA 0 A stringl DATA 0 string2 DATA 0 stringl string2 To add or insert a string of characters to a string tag use either of these ASCII string instructions To Use this instruction add characters to the end of a string CONCAT insert characters into a string INSERT Expressions An expression is a tag name equation or comparison To write an expression use any of the following e tag name that stores the value variable e number that you enter directly into the expression immediate value e functions such as ABS TRUNC e operators such as lt gt And Or As you write expressions follow these general rules e Use any combination of upper case and lower case letter For example these three variations of AND are acceptable AND And and e For more complex requirements use parentheses to group expressions within expressions This makes the whole expression easier to read and ensures that the expression executes in the desired sequence See Determine the order of execution on page 7 10 Publication 1756 PM001G EN P March 2004 Prog
229. d mode 4 Sets outputs according to their output state during program mode 5 OK LED flashes red The controller supports two levels for handling major faults e program fault routine Each program can have its own fault routine The controller executes the program s fault routine when an instruction fault occurs If the program s fault routine does not clear the fault or a program fault routine does not exist the controller proceeds to execute the controller fault handler Gf defined e controller fault handler If the controller fault handler does not exist or cannot clear the major fault the controller enters faulted mode and shuts down At this point the FAULTLOG is updated See the next page All non instruction faults I O task watchdog etc execute the controller fault handler directly No program fault routine is called The fault that was not cleared and up to two additional faults that have not been cleared are logged in the controller fault log Publication 1756 PM001G EN P March 2004 Glossary 20 major fault occurs controller logs major fault to current PROGRAM MajorFaultRecord yes instruction fault gt no program fault yes routine exists execute current program s yes fault cleared no continue logic p execution Publication 1756 PM001G EN P March 2004 controller logs major fault
230. data from an input module trigger the task Trigger Module Input Data State Change Let this input tag trigger the task Tag Local 4 1 I Execute Task IF No Event Occurs Within 1000 000 ms Priority fh Lower Number Yields Higher Priority Watchdog 500 000 ms When the task is done do not update digital outputs in the local chassis IV Disable Automatic Output Processing To Reduce Task Overhead How an I O Module Triggers an Event Task The following terms apply to the operation of an input module Term Definition multicast A mechanism where a module sends data on a network that is simultaneously received by more that one listener device Describes the feature of the Logix5000 1 0 line which supports multiple controllers receiving input data from the same I O module at the same time requested packet The RPI specifies the interval at which a module multicasts its data For example an input interval RPI module sends data to a controller at the RPI that you assign to the module e The range is 0 2 ms 200 microseconds to 750 ms e When the specified time frame elapses the module multicasts its data This is also called a cyclic update real time sample The RTS specifies when an analog module scans its channels and multicasts the data RTS update the input data buffer then multicast e The RPI specifies when the module multicasts the current contents of the input data b
231. dder logic as rungs on a ladder and put instructions on each rung There are two basic types of instructions Input instruction An instruction that checks compares or examines specific conditions in your machine or process Output instruction An instruction that takes some action such as turn on a device turn off a device copy data or calculate a value input instructions output instructions Pale aN L emm 4 lt gt Branch A branch is two or more instructions in parallel branch S gt branch Publication 1756 PM001G EN P March 2004 Program Ladder Logic 8 3 There is no limit to the number of parallel branch levels that you can enter The following figure shows a parallel branch with five levels The main rung is the first branch level followed by four additional branches input instruction output instruction gt KF S 7 A 7 D 7 D 2 You can nest branches to as many as 6 levels The following figure shows a nested branch The bottom output instruction is on a nested branch that is three levels deep input instruction output instruction ie Ii OA Nm eee C y ZJ EN Y Publication 1756 PM001G EN P March 2004 8 4 Program Ladder Logic Rung Condition The controller evaluates ladder instructions based on the rung condition preceding the instruction rung condition in input instruct
232. der of Actions 0 6 22 DOCUMENT ANE SEG S mirra od Bn deere Gites othe ee ae 6 23 Add Structured Text Comments 00 6 23 Add a Tag Description nor eG eke eA ee 6 24 Add a Text BOX monia aea wteu kPa ees ATS Roe 6 25 Show or Hide Text Boxes or Tag Descriptions 6 26 Show or Hide Text Boxes or Descriptions 6 26 Hide an Individual Tag Description 6 27 Configure the Execution of the SKC s547 264 25 eee aaa 6 28 Verify th ROULNVE deroa ei pial ow Oe eB eat God ee ae eG ok 6 29 Chapter 7 When to Use This Chaptets 0 40345 4 Giiw oh tke 7 1 Structured Text Syntax as aes ote ae ees ee Sees 7 1 ASSISMINGMUS 0c Sieh Abe ds oft ook 4G Fee ew al hE ads 7 2 Specify a non retentive assignment 7 3 Assign an ASCII character to a string 7 4 EXPRESSIONS anetra 4 Barbed eek 4 Ahk odo GD We BER aes 7 4 Use arithmetic operators and functions 7 6 Use relationdeperstors s jou k 3 ion lank Sade ate eas 7 7 Publication 1756 PM001G EN P March 2004 Table of Contents vi Program Ladder Logic Program a Function Block Diagram Publication 1756 PM001G EN P March 2004 Use logical operators o an aaaea 7 9 Use bitwise operators he aed wee ie a eS 7 10 Determine the order of execution 7 10 IISHUCHONS 2 5 45 6 O56 6S 8 POEMS ba deo Sad 28 Os BS os 7 11 GOR SIEUCUSS ej oath od Seg cy Rpm ihe diy ho See ee AG E
233. der placing the MAR instruction within the event task axis reaches the position that is defined as the watch point Axis Watch e In order for the registration input to trigger the event task first execute a Motion Arm Watch MAW instruction This lets the axis detect the watch position and in turn trigger the event task e Once the watch position triggers the event task execute the MAW instruction again to re arm the axis for the next watch position e f the scan time of your normal logic is not fast enough to re arm the axis for the next watch position consider placing the MAW instruction within the event task motion planner completes its execution Motion Group e The coarse update period for the motion group triggers the execution of Execution both the motion planner and the event task e Because the motion planner interrupts all other tasks it executes first If you assign the event task as the highest priority task it executes after the motion planner specific condition or conditions occur within the logic of a program EVENT instruction Multiple EVENT instructions can trigger the same task This lets you execute a task from different programs Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 21 Here are some example situations for event tasks and the corresponding triggers For this example situation A packaging line glues boxes closed When a box arrives at the gluing position t
234. different remote controller 1 Use the following worksheet to organize the tag names in the local and remote controllers Name of the remote controller Tag or address of the data in the remote controller Tag in this controller local_array 0 local_array 1 local_array 2 local_array 3 2 Create the local_array tag which stores the data in this controller Tag Name Type local_array data_type length where data_type isthe data type of the data that the message sends or receives such as DINT REAL or STRING length is the number of elements in the local array Publication 1756 PM001G EN P March 2004 To create a new data type Right click and choose New Data Type Controller Your_Project Tasks Motion Groups Trends Data Types User Defined a Send a Message to Multiple Controllers B 5 Create the MESSAGE_CONFIGURATION Data Type In this procedure you create a user defined data type to store the configuration variables for the message to each controller e Some of the required members of the data type use a string data type e The default STRING data type stores 82 characters e If your paths or remote tag names or addresses use less than 82 characters you have the option of creating a new string type that stores fewer characters This lets you conserve memory e To c
235. do nothing if conditions are false IF THEN ELSIF JOP groups OF slalemenis Basediony sian detaultstatements fall IF THEN ELSIF ELSE input conditions Arithmetic Status Flags not affected Fault Conditions none Example 1 IF THEN If you want this IF rejects gt 3 then conveyor off 0 alarm on 1 Example 2 IF THEN If you want this If conveyor direction contact forward 1 then light off Otherwise light on The tells conditions are false Enter this structured text IF rejects gt 3 THEN conveyor 0 alarm all 3 END_IF ELSE Enter this structured text IF conveyor direction THEN light 0 ELSE right chsh T END_IF the controller to clear light whenever the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine Publication 1756 PM001G EN P March 2004 via a JSR instruction Program Structured Text 7 15 Example 3 IF THEN ELSIF If you want this If sugar low limit switch low on and sugar high limit switch not high on then inlet valve open on Until sugar high limit switch high off Enter this structured text IF Sugar Low amp Sugar High THEN Sugar Inlet 1 ELSIF NOT Sugar High THEN Sugar Inlet 0 END_IF The
236. does not clear the bits of the Status attribute once they are set e To use a bit for new status information you must manually clear the bit e Use a Set System Value SSV instruction to set the attribute to a different value Checklist for an EVENT Instruction Task For this Make sure you Q 1 EVENT instruction Use a Trigger Event Task EVNT instruction at each point in your logic that you want to trigger the event task QO 2 Task priority Configure the event task as the highest priority task If a periodic task has a higher priority the event task may have to wait until the periodic task is done Q 3 Number of event tasks Limit the number of event tasks Each additional task reduces the processing time that is available for other tasks This could cause an overlap m 4 Automatic Output Processing For an event task you can typically disable automatic output processing default This reduces the elapsed time of the task To verify this decision see Figure 4 1 on page 4 14 Publication 1756 PM001G EN P March 2004 4 52 Manage Multiple Tasks EXAMPLE A controller uses multiple programs but a common shut down procedure Each program uses a program scoped tag named Shut_Down_Line that turns on if the program detects a condition that requires a shut down Event Task Properties fl Task Properties Shut_Down General Configuration Program Schedule Monitor Let an event trigger this task p Type Event Let
237. e Security Server system 4 Select the RSLogix5000Security bak file and then choose Open Publication 1756 PM001G EN P March 2004 18 16 Secure a Project B Resources Groups New RSLogix 5000 Resources s GEER H Actions Groups 43077 Publication 1756 PM001G EN P March 2004 Define the Global Actions for Your Users Global actions are tasks that are not tied to a particular project such as create a new project or update the firmware of a controller The following global actions apply to RSLogix 5000 software Table 18 2 Global Actions To let a user secure any unsecured controller Then grant access to the following actions Secure Controller create a new RSLogix 5000 project open an L5K file in RSLogix 5000 software which creates a project translate a PLC or SLC project to an L5K file New Project use RSLogix 5000 software to start ControlFLASH software and update the firmware of a controller Update Firmware Use the following worksheet to record the global actions that you will permit each group of users to perform Table 18 3 Global actions for each group of users This group of users Requires this access New Project Secure Controller Update Firmware E Users Groups Cy Resources Groups New RSLogix 5000 Resources ge ASLOGIX 5000 Actions Gro
238. e e CompactLogix These controllers do not divide their memory They store all elements in one common memory area e FlexLogix e DriveLogix e SoftLogix5800 1 To communicate with polled tags the controller uses both I O and data and logic memory 2 1756 L55M16 controllers have an additional memory section for logic Publication 1756 PM001G EN P March 2004 19 2 Determine Controller Memory Information Estimate Memory To estimate how much controller memory your project requires use the Memory tab of the controller properties dialog box For each of Information Offline the memory areas of your controller it lets you estimate number of bytes of e free unused memory e used memory e largest free contiguous block of memory Mie i RUN LA 1 Click the controller properties button No Forces gt ve No Edits Air 0 2 Click the Memory tab Controller Properties MyController_1 N lol x Major Faults Minor Faults Date Time Advanced SFC Execution General Serial Port System Protocol ger Protocol 3 For controllers with different File Redundancy Nonvolatile Memory Memory memory options choose the memory Memory Option size e g M12 Estimated 1 0 Memory _____ Estimated Data and Logic Memory 4 View the memory information since E Total 229 376 bytes Total 819 200 bytes z L Free 200 900 bytes C Free 793 208 bytes the last estimate
239. e 5 8 Organize the St ps dra asd so ets are Gta we SiS te ah a aie Oa 5 12 OVERIOW Seira E R Ved Riot ana E E 5 12 Seg ent ee peaa vay E eaa Be BNE a a hoa Beg anh 5 14 Selection Bran h ii 3 sae ra eeta de Genes wind ee ae 5 15 Simultaneous Branelts 44 ok fo deus ea ad ee at 5 16 Publication 1756 PM001G EN P March 2004 Table of Contents iv Program a Sequential Function Chart Publication 1756 PM001G EN P March 2004 Wire to a Previous Sle Dic lt 4 sasaaa Br bap enero Red Grd 5 17 Add Actions for Each Step ic gin k Qk See eee wee ole Re 5 18 How Do You Want to Use the Action 5 18 Use a Non Booledn Action 4 444 3 4 fob es 4 be 2 248445 5 18 Use a Boolean Action 5 ich 4 64 4 8 4 Gh AGG eR Gees 5 20 SFC_ACTION Structure ng ack tide ak sa dee de od 5 20 Describe Each Action in Pseudocode 4 5 21 Choose a Qualifier for an sACKOM 2 6 44 5 9 a4 ood aang a egies 5 23 Define the Transition Conditions 4 5 24 MA SOT AO nce VE Bat os ren bie me eee Ra ei raced 5 26 How Do You Want to Program the Transition 5 26 Use a BOOL EXpression a suc 8d Aes eee a dees 5 26 Call a Subroutine onana Ha ee he eS 5 27 Transition After a Specified Time sei ay eek eee A oR eS 5 28 Turn Off a Device at the End of a Step n n anaana aan 5 32 Choose a Last Scan Option 6 92 Vial wy 69 abe ca ee wa 5 32 Use the Don t Scan Option cis Pio GR BR 5 34 Use the Programmatic Res
240. e BR Mane ee Gee a 3 1 Tao VCs 44 5 oat penta heels kak a ee SST eae eS 3 2 Data Type Oe ee Oe ae Re A OE ae a 3 3 SCOPE naene a naaa d Bh A e Oat AA a 3 5 Guidelines for LACS ies Pata uiti a eSEE a E EA aG 3 7 Create a Tag urei i pite ee ieda as 3 9 Create a Tag Using a Tags Window 3 9 Create Tags Using Microsoft Excel 3 10 Greate Am ANAY pePiag 2h 2a es ea keene ee Pet EGA S 3 13 Create an ATAY Sa fo ind ee hc Re hate ee Nema ae eS 3 16 Create a User Defined Data Type ouaa bead awa eas 3 17 Guidelines for User Defined Data Types 3 19 Create a User Defined Data Type 3 19 Describe a User Defined Data Type 3 21 Turn Pass Through and Append Descriptions On or Off 3 22 Paste a Pass Through Description 3 22 Address T g Datas re deot ata De leh OU eee kt Re i ei 3 23 Assign Alias Tags or au nauau aaa 3 24 Display Alias Information o an anaa 3 25 Assign an Alias fc nile dred ee Pa aw the SSS ode 3 26 Assign an Indirect Address ov ou xc Guach yu x Aedes ae ce ade OA 3 27 EXPTESSIONS ans 3 oti Nd a ha a eR eS A 3 29 Chapter 4 Using This Chapter wa coe aae 4 1 Select the Controller Tasks nc o n naana aana 4 2 Use Caution in the Number of Tasks That You Use 4 5 Prioritize Periodic and Event Tasks 45 4 5 Additional Considerations 000000000 4 6 Leave Enough Time for Unscheduled Communication 4
241. e Controllers B 9 Load the Message Properties for a Controller COP Copy File 2 Source message_configfindex Path Dest message Path 3 Length 1 COP Copy File 4 Source message_configiindex RemoteElement i Dest message RemoteE lement 5 Length 1 MSG Type CIP Data Table Read 6 Message Control message K KD A gt 43051 1 This XIO instruction conditions the rung to continuously send the message Tag Name Type Scope message MESSAGE controller 2 The COP instruction loads the path for the message The value of index determines which element the instruction loads from message_config See Figure B 1 on page B 6 Tag Name Type Scope index DINT any 3 The instruction loads 1 element from message_config 4 The COP instruction loads the tag name or address of the data in the controller that receives the message The value of index determines which element the instruction loads from message_config See Figure B 1 on page B 6 5 The instruction loads 1 element from message_config 6 MSG instruction Publication 1756 PM001G EN P March 2004 B 10 Send a Message to Multiple Controllers MSG Type CIP Data Table Read Message Control message E configuration Configure the Message Although your logic controls the remote element and path for the message the Message Properties dialog box requires an initial IMPORTANT C
242. e For the fastest response use the following modules e For fastest digital response use a 1756 IB32 B module e For fastest analog response use a 1756 IF4FXOF2F module Q 2 1 0 module location Place the module that triggers the event and the modules that respond to the event outputs in the same chassis as the controller Remote modules add network communications to the response time m 3 Number of local modules Limit the number of modules in the local chassis Additional modules increases the potential for backplane delays Q 4 Change of state COS If a digital device triggers the event enable COS for only the point that triggers the event task e Enable change of state for the type of transition that triggers the task either Off gt On On gt Off or both e If you configure COS for both Off gt On and On Off the point triggers an event task whenever the point turns on or off Make sure the duration of the input is longer than the scan time of the task Otherwise an overlap could occur e Disable clear COS for the remaining points on the input module If you configure multiple points on a module for COS each point could trigger the event task This could cause an overlap QO 5 Task priority Configure the event task as the highest priority task If a periodic task has a higher priority the event task may have to wait until the periodic task is done m 6 Motion planner The motion planner inter
243. e Memory If You meet a of the following conditions T The controller uses a 1784 CF64 Industrial CompactFlash card d The project on the CompactFlash card has a revision 12 0 1 The project on the CompactFlash card has a Load Image option On Power Up or On Corrupt Memory L If the controller is a 1756 L63 controller its firmware revision is either J For a controller just out of its box revision gt 1 4 Look for the F W REV on the side of the controller or its box J For a controller already in service revision gt 12 0 Determine How to Handle Firmware Updates The following table outlines the options and precautions for updating the firmware of a controller that has nonvolatile memory Then Update the firmware using either e CompactFlash card e RSLogix 5000 software e ControlFlash software To update the firmware and load the project using the CompactFlash card 1 Install the card in the controller 2 If the Load Image option On Corrupt Memory and the controller contains a project disconnect the battery from the controller 3 Turn on or cycle power to the controller If you use RSLogix 5000 software or ControlFlash software to update the firmware 1 During the update the controller sets the Load Image option of the CompactFlash card to User Initiated To prevent this remove the card from the controller 2 After you update the firmware store the project again to nonvolatile memory
244. e Set Up DCOM e Enable Security Server for RSLogix 5000 Software e Import the RSLogix5000Security bak File e Define the Global Actions for Your Users e Define the Project Actions for Your Users e Add Users e Add User Groups e Assign Global Access to RSLogix 5000 Software e Assign Project Actions for New RSLogix 5000 Projects Once Security Server software is set up for RSLogix 5000 projects complete the following actions to protect a project e Secure an RSLogix 5000 Project e Assign Access to an RSLogix 5000 Project e Refresh RSLogix 5000 Software If Needed Install RSI Security Server Software IMPORTANT If RSLogix 5000 software is already on your computer when you install Security Server software enable security for RSLogix 5000 software when you are prompted See Getting Results with Rockwell Software s Security Server Standalone Edition which ships with the RSI Security Server software Publication 1756 PM001G EN P March 2004 18 14 Secure a Project Set Up DCOM See Getting Results with Rockwell Software s Security Server Standalone Edition which ships with the RSI Security Server software Enable Security Server for RSLogix 5000 Software Did you install Security Server before you installed RSLogix 5000 software Program oe Files ockwell Software RSLogix 5000 language Z version Security
245. e ade Bp 7 12 Eo Dl is SS ene er Reh 7 13 CASE y OFE ceran Se aia Bs EG ECDSA eb SL OK Pee 7 16 FOR ie IDO saris ie hog ae pendua s Ger pega on tke hae pena as FUER ae RLS NS 7 19 WELE lt TOs ols coal ot 8b Suid tava det a dalled b dad wttne Ge he 7 22 REPEAT UNTIL Ass ea o Yah Ate amp 4S ee E A 7 25 COMMITS esei a Ser At igs BU Buea SS yee E E Bald E 7 28 Chapter 8 When to Use This Procedure nnana Ree we a eee 8 1 Before You Use This Procedure nananana we ds 8 1 How to Use This Procedure coy n a aaa aaaea 8 1 Definitions aies aeaa a a a aa A a o i 8 2 TSU CHOI ge 4 aei ices estat fet waa engl A eat e arate Suk Seabees 8 2 BANCO suns 2 kal a aah ae ae Ae A RE Ae 8 2 Rung Condition oasa sith ena os Santa ea we Oe Saree 8 4 Write Ladder LOGIC Gls io taeret me Ben Rah AOE SPP ae 8 5 Choose the Required Instructions 8 5 Arrange the Input Instructions 3 2 4 4 44 4 ear ea4 5h 2S 8 6 Arrange the Output Instructions 8 7 Choose a Tag Name for an Operand 8 8 Entet Ladder bogier poe iy Ok nee NS Sees Bate eek 8 10 Append an Element to the Cursor Location 8 10 Drag and Drop an Element 0 05 8 11 PSSST ODE AES ree ty te tg E E E A 8 11 Create and Assign a New Tacs 4 4 s stiis 4 es pec kG a8 8 11 Choose a Name or an Existing Tag 8 13 Drag a Tag From the Tags Window 8 13 Assign an Immediate Constant Value 8
246. e as many as 40 characters e must not have consecutive or trailing underscore characters _ e are not case sensitive download to the controller network update time NUT The repetitive time interval in which data can be sent on a ControlNet network The network update time ranges from 2ms 100ms nonvolatile memory Memory of the controller that retains its contents while the controller is without power or a battery See load store numeric expression In structured text an expression that calculates an integer or floating point value e A numeric expression uses arithmetic operators arithmetic functions and bitwise operators For example tag1 5 e Often you nest a numeric expression within a bool expression For example tag1 5 gt 65 object A structure of data that stores status information When you enter a GSV SSV instruction you specify the object and its attribute that you want to access In some cases there are more than one instance of the same type of object so you might also have to specify the object name For example there can be several tasks in your application Each task has its own TASK object that you access by the task name Glossary 25 octal Integer values displayed and entered in base 8 each digit represents three bits Prefixed with 8 Padded out to the length of the boolean or integer 1 8 16 or 32 bits When displayed every group of three digits is separated by an underscore fo
247. e controller scans the MSG instruction The MSG instruction attempts to enter the queue The queue has room so the instruction enters the queue The EW bit is set Publication 1756 PM001G EN P March 2004 10 22 Communicate with Other Devices Cache List Depending on how you configure a MSG instruction it may use a connection to send or receive data This type of message And this communication method Uses a connection CIP data table read or write me J PLC2 PLC3 PLC5 or SLC all types CIP CIP with Source ID DH y CIP generic your option 1 block transfer read or write p gt J You can connect CIP generic messages But for most applications we recommend you leave CIP generic messages unconnected If a MSG instruction uses a connection you have the option to leave the connection open cache or close the connection when the message is done transmitting If you Then Cache the connection The connection stays open after the MSG instruction is done This optimizes execution time Opening a connection each time the message executes increases execution time Do not cache the The connection closes after the MSG instruction is done This connection frees up that connection for other uses The controller has the following limits on the number of connections that you can cache If you have this software Then you can cache and firmware revision 11 x or earlier e block transfer messages
248. e does a store or load take If the controller does not use a 1784 CF64 Industrial CompactFlash several seconds card a store may take up to 3 minutes If the controller uses a CompactFlash card the store is considerably faster less than a minute In what controller mode s can store or load a project program mode Can go online with the controller during a store or load no What is the state of the 1 0 during a store or load Publication 1756 PM001G EN P March 2004 1 0 remains in its configured state for program mode Store and Load a Project Using Nonvolatile Memory 17 3 Choose a Controller That Has Nonvolatile Memory The following Logix5000 controllers have nonvolatile memory for project storage Controller Type Catalog Firmware Revision Requires a 1784 CF64 Industrial CompactFlash memory card CompactLogix5320 1769 L20 10 x or later no CompactLogix5330 1769 L30 10 x or later no CompactLogix5331 1769 L31 13 x or later yes CompactLogix5332E 1769 L32E 13 x or later yes CompactLogix5335CR 1769 L35CR 13 x or later yes CompactLogix5335E 1769 L35E 12 x or later yes ControlLogix5555 1756 L55M22 10 x or later no 1756 L55M23 8 x or later no 1756 L55M24 8 x or later no ControlLogix5560M03SE 1756 L60MO3SE 13 x or later yes ControlLogix5561 1756 L61 12 x or later yes ControlLogix5562 1756 L62 12 x or later yes ControlLogix5563 1756 163
249. e example of how tasks interrupt one another 4 7 Choose the Trigger for an Event Task Addition of consumed tag trigger for CompactLogix FlexLogix and 4 20 DriveLogix controllers Export Import Ladder Logic Create a file that contains the ladder logic tags data types parameter 8 14 values and documentation for a specific function operation or process Develop a Fault Routine e Integration of the Power Up Handler information into this section 15 1 This was done to clarify when a major fault occurs during power up and how to handle it if required e Clarification regarding a fault due to a mode change Clear a Major Fault During Prescan Some controllers now automatically clear a fault that is due an array 15 8 subscript that is beyond the range of the array out of range during prescan Create a User Defined Major Fault If you create a user defined major fault use a value between 990 to 999 5 13 for the fault code These codes are reserved for user defined faults Minor Fault Codes Correction to missing fault codes for the GSV SSV instructions 16 4 Choose a Controller That Has Nonvolatile Addition of the following controllers 17 3 Memory e CompactLogix5331 e CompactLogix5332E e CompactLogix5335CR e ControlLogixS560M03SE e DriveLogix5730 Estimate Memory Information Offline Estimate the free and used memory of a controller while still offline 19 2 View Run Time Memory Information View the free and used memory of a controller while the controller is
250. e of a program scoped tag in multiple programs For example both Program_A and Program_B can have a program tag named Tag_4 Publication 1756 PM001G EN P March 2004 3 6 Organize Tags Publication 1756 PM001G EN P March 2004 Avoid using the same name for a both controller tag and a program tag Within a program you cannot reference a controller tag if a tag of the same name exists as a program tag for that program Certain tags must be controller scope controller tag lf you want to use the tag Then assign this scope in more than one program in the project in a Message MSG instruction controller scope controller tags to produce or consume data to communicate with a PanelView terminal none of the above program scope program tags Organize Tags 3 7 Guidelines for Tags Use the following guidelines to create tags for a Logix5000 project Guideline Details m 1 Create user defined data types User defined data types structures let you organize your data to match your machine or process A user defined data type provides these advantages e One tag contains all the data related to a specific aspect of your system This keeps related data together and easy to locate regardless of its data type e Each individual piece of data member gets a descriptive name This automatically creates an initial level of documentation for your logic e You can use the data type to create multiple t
251. e of element to force in your project What to Force on page 14 6 review general information about I 0 forces including which elements you are permitted to When to Use an 1 0 Force on page 14 6 force and how an O force effects your project force an I 0 value Add an 1 0 Force on page 14 8 review general information about stepping through a transition or a simultaneous path When to Use Step Through on page 14 9 step through an active transition Step Through a Transition or a Force of a step through a simultaneous path that is forced false Rain om page ae review general information about SFC forces including which elements you are permitted When to Use an SFC Force on page 14 9 to force and how the forces effect the execution of your SFC force a transition or simultaneous path within an SFC Add an SFC Force on page 14 12 stop the effects of a force Remove or Disable Forces on page 14 13 Publication 1756 PM001G EN P March 2004 14 2 Force Logic Elements Precautions ATTENTION Publication 1756 PM001G EN P March 2004 When you use forces take the following precautions Forcing can cause unexpected machine motion that could injure personnel Before you use a force determine how the force will effect your machine or process and keep personnel away from the machine area e Enabling I O forces causes input output produced or consumed values to change e En
252. e one large step that contains all the actions that occur while the device is on Publication 1756 PM001G EN P March 2004 Paint transfer paint clean transfer control the fan Design a Sequential Function Chart 5 41 Use a Simultaneous Branch A simple way to control a device or devices during one or more steps is to create a separate step for the devices Then use a simultaneous branch to execute the step during the rest of the process Here is an example EXAMPLE A paint operation does the following 1 Transfer the product into the paint shop 2 Paint the product using 3 separate paint guns 3 Clean the guns 4 Transfer the product to the paint ovens During the entire process the system must control the shop fans Solution Transfer_In Paint_Flow Air_Flow Elec_Charg Fan Clean Transfr_Out Publication 1756 PM001G EN P March 2004 5 42 Design a Sequential Function Chart step that starts the action step that stops the action Publication 1756 PM001G EN P March 2004 BI et Step_014 Store and Reset an Action Typically an action turns off stops executing when the SFC goes to the next step To keep a device on from step to step without a bump store the action that controls the device 1 In the step that turns on the device assign a stored qualifier to the action t
253. e the processing of outputs at the Select check the Disable Automatic Output Processing To Reduce end of the task Task Overhead check box 4 Choose Publication 1756 PM001G EN P March 2004 4 16 Manage Multiple Tasks Programmatically Configure Output Processing To write logic to configure output processing for a task use a Set System Value SSV instruction Access the following attribute of the TASK object for the task If you want to Then access this Data Type Instruction Description attribute enable or disable the DisableUpdateOutputs DINT GSV To Set the attribute to processing of outputs at iheserd Gra task Ssv enable the processing 0 of outputs at the end of the task disable the processing 1 or any non zero value of outputs at the end of the task EXAMPLE Programmatically Configure Output Processing If Condition_1 0 then let Task_2 process outputs when it is done 1 The ONS instruction limits the true execution of the SSV instruction to one scan 2 The SSV instruction sets the DisableUpdateOutputs attribute of Task_2 0 This lets the task automatically process outputs when it finishes its execution Condition_1 Storage_Bit 1 E ONS Set System Value Class Name TASK Instance Name Task_2 Attribute Name DisableUpdateOutputs Source If Condition_1 1 then do not let Zask_2 process outputs when it is done 1 The ONS instruction limits the true execution of the SSV instruction to one sc
254. e the transfer time by increasing system overhead time slice but this diminishes the performance of the continuous task Publication 1756 PM001G EN P March 2004 11 8 Produce a Large Array Notes Publication 1756 PM001G EN P March 2004 Chapter 12 Communicate with an ASCII Device When to Use this Procedure Use this procedure to exchange ASCII data with a device through the serial port of the controller For example you can use the serial port to e read ASCII characters from a weigh scale module or bar code reader e send and receive messages from an ASCII triggered device such as a MessageView terminal 42237 How to Use This Procedure Before you use this procedure e Configure the ASCII Device for Your Application To complete this procedure do the following tasks e Connect the ASCII Device e Configure the Serial Port e Configure the User Protocol e Create String Data Types e Read Characters from the Device Publication 1756 PM001G EN P March 2004 12 2 Communicate with an ASCII Device e Send Characters to the Device Connect the ASCII Device 1 For the serial port of the ASCII device determine which pins send signals and which pins receive signals 2 Connect sending pins to corresponding receiving pins and attach jumpers If the communications Then wire the connectors as follows
255. ection Module Info Po 25 0 ms real time sample of inputs RTS 25 0 ms Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 25 Make Sure Your Module Can Trigger an Event Task To use an input module to trigger an event task the module must support event task triggering If the module is in a remote location the associated communication modules must also support event triggering The following table lists Rockwell Automation modules that we have tested for event task triggering Some 3 party modules may also support event task triggering Before you use a 3rd party module check with the supplier to validate the operation of the module Category Module Category Module 1756 Discrete 1756 IA16 1756 Analog 1756 IF16 1756 IA161 1756 IFAFXOF2F A 1756 IA8D 1756 IF6CIS 1756 IB16 1756 IF61 1756 IB16D 1756 IF8 1756 IB161 1756 IR6l 1756 IB32 A 1756 IT6I 1756 IB32 B 1756 IT6I2 1756 IC16 1756 Generic 1756 MODULE 1756 IH16l 1756 Communication 1756 CNB A 1756 IM16l 1756 CNB B 1756 IN16 1756 CNB D 1756 IV16 A 1756 CNBR A 1756 IV32 A 1756 CNBR B 1756 CNBR D 1756 DNB 1756 ENBT A 1756 SYNCH A SoftDNB 1784 PCIDS A 1789 Generic 1789 MODULE Publication 1756 PM001G EN P March 2004 4 26 Manage Multiple Tasks Checklist for an Input Event Task For this Make sure you a ca Input module typ
256. ed by the software Enables the user via the software to prevent incorrect modules or incorrect revisions of modules from being inadvertently used See compatible module disable keying exact match element An addressable unit of data that is a sub unit of a larger unit of data A single unit of an array e You specify an element in an array by its subscript s For this array Specify one dimension array name subscript_0 two dimension array _name subscript_0 subscript_1 three dimension array _name subscript_0 subscript_1 subscript _2 See array exact match An electronic keying protection mode that requires that all attributes vendor catalog number major revision and minor revision of the physical module and the module configured in the software match in order to establish a connection to the module execution time The total time required for the execution of a single program e Execution time includes only the time used by that single program and excludes any time shared used by programs in other tasks performing other operations e When online use the Program Properties dialog box to view the maximum scan time and the last scan time in us for the current program These values are execution times for the program and do not include any time spent waiting for other programs or higher priority tasks See elapsed time Glossary 15 exponential Real values displayed and entered in scientific or exp
257. efine the data type as a string 28 Enter a tag name for the AWT instruction and define the data type as SERIAL_PORT_CONTROL 29 Enter the LEN member of the Source tag The tag from step 27 30 Enter the LEN member of the AWT instruction The tag from step 28 Publication 1756 PM001G EN P March 2004 12 20 Communicate with an ASCII Device EXAMPLE When MV_update is on the AWT instruction sends the characters in MV_msg e Because the number of characters in MV_msg varies the rung first moves the length of MV_msg MV_msg LEN to the length of the AWT instruction WV_write LEN e In MV_msg the 16 counts as one character It is the hex code for the Ctrl V character MOV MV_update Move Source MV_msg LEN 10 Dest MV_write LEN 10 ASCII Write Channel Source SerialPort Control String Length Characters Sent AWT MV_ms 161365 8 1 r MV_write 10 10 31 Go to Enter ASCII Characters on page 12 21 Publication 1756 PM001G EN P March 2004 42229 Enter ASCII Characters If You want logic to create the string Communicate with an ASCII Device 12 21 Determine if you must complete this step Then Go to Process ASCII Characters on page 12 1 You want to enter the characters IMPORTANT Go to step 1 This String Browser window shows the characters up to the value of the LEN member of the string tag The string tag may contain additional
258. el 5 Click 6 Does this computer already have a source key file sk dat If Then Yes A Select the folder that contains the file and choose OK B Choose OK No A Select the folder in which to store the new file and choose OK A dialog box asks if you want to create the source key file sk dat B Choose Yes Publication 1756 PM001G EN P March 2004 18 12 Secure a Project 7 art P z a Source Protection Configuration x Source Key File BRA ET R E ak dat View Clear 7 Click View e If you are prompted to select a program with which to open the file select a word processing program such as Notepad e The sk dat file opens 8 Type the name of the source key To enter multiple keys type each key on a separate line sk dat Notepad key1 key2 key3 9 Save and close the sk dat file Publication 1756 PM001G EN P March 2004 Use RSI Security Server to Protect a Project Secure a Project 18 13 RSI Security Server software lets you control the access that individuals have to RSLogix 5000 projects With this software you customize access to projects based on the e user that is currently logged into the workstation e RSLogix 5000 project that the user is accessing e workstation from which the user is accessing the RSLogix 5000 project Before you use Security Server software for RSLogix 5000 projects set up the software e Install RSI Security Server Software
259. en conveyor_state turns off the conveyor turns off For an action that uses one of the stored qualifiers use the Q bit of the action to condition your logic See SFC_ACTION Structure on page 5 20 EXAMPLE Use the Programmatic Reset Option and the Q Bit When the action is not on its last scan conveyor_start Q 1 this statement turns on conveyor_state When conveyor_state turns on the conveyor turns on On the last scan of the action conveyor_start Q 0 this statement turns off conveyor_state When conveyor_state turns off the conveyor turns off You can also use a PO Pulse Falling Edge action to clear data The following example uses an action to turn on a conveyor at the start of a step A different action turns off the conveyor at the end of the step Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 37 EXAMPLE Use the Programmatic Reset Option and a PO Action N _ conveyor_start conveyor_state 1 PO __ conveyor_stop conveyor state i 0 El conveyor_fwd This action turns on the conveyor When conveyor_state turns on the conveyor turns on Before the SFC leaves the step the PO action turns off the conveyor On the last scan of the step conveyor_state turns off This turns off the conveyor Publication 1756 PM001G EN P March 2004 5 38 Design a Sequential Function Chart Use the Automatic Reset Option
260. ent tas the axis After the motion planner executes check the command speed of the axis and vary the amount of glue if needed In a production line if any of the programs detect an unsafe condition the entire line must shut down event tas The shutdown procedure is the same regardless of the unsafe condition Publication 1756 PM001G EN P March 2004 The number of tasks supported depends on the controller This controller Supports this number of tasks Notes Only one task can be continuous ControlLogix 32 SoftLogix5800 CompactLogix 8 DriveLogix FlexLogix Prioritize Periodic and Manage Multiple Tasks 4 5 Use Caution in the Number of Tasks That You Use Typically each task takes controller time away from the other tasks If you have too many tasks then e The continuous task may take too long to complete e Other tasks may experience overlaps If a task is interrupted too frequently or too long it may not complete its execution before it is triggered again For more information see Avoid Overlaps on page 4 9 Although a project can contain multiple tasks the controller executes only one task at a time If a periodic or event task is triggered while Event Tasks another task is currently executing the priority of each task tells the controller what to do The number of priority levels depends on the controller This Logix5000 controller Has this many priority levels
261. ent task Value This is typically shown in milliseconds Convert it to microseconds us us 2 What is the hardware response time for the input module that triggers the event task Make sure you use the appropriate type of transition Off gt On or On Off See Table 4 2 on page 4 29 us 3 What is the backplane communication time If the chassis size is Use this value worst case A slot 13 us 7 slot 22 us 10 slot 32 us 13 slot 42 us 17 slot 54 us us 4 What is the total execution time of the programs of the event task us 5 What is the backplane communication time Same value as step 3 us 6 What is the hardware response time of the output module us 7 Add steps 1 through 6 This is the minimum estimated throughput where execution of the motion planner or other tasks do not delay or interrupt the event task us 8 What is the scan time of the motion group us 9 What is the total scan time of the tasks that have a higher priority than this event task if any us 10 Add steps 7 through 9 This is the nominal estimated throughput where execution of the motion planner or other tasks delay or interrupt the event task us Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 29 Table 4 2 Use the following table to determine the nominal hardware response times for selected 1756 1 0 modules Module Nominal response ti
262. entage of controller time excluding the time for periodic or event tasks See system overhead on page 4 6 Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 9 Avoid Overlaps An overlap is a condition where a task periodic or event is triggered while the task is still executing from the previous trigger IMPORTANT If an overlap occurs the controller disregards the trigger that caused the overlap In other words you might miss an important execution of the task task trigger event task i Description O Tas Tas trigger occurs exec utes Tas Tas trigger occurs exec utes Tas trigger occurs exec utes Tas Overlap occurs Task is triggered while it is still executing The trigger does not restart the task The trigger is ignored Each task requires enough time to finish before it is triggered again Make sure that the scan time of the task is significantly less than the rate at which the trigger occurs If an overlap occurs reduce the frequency at which you trigger the task lf the type of task is periodic Then increase the period of the task event adjust the configuration of your system to trigger the task less frequently Publication 1756 PM001G EN P March 2004 4 10 Manage Multiple Tasks Manually Check for Overlaps To manually see if overlaps are occurring for a
263. er 19 4 Choose the Memory Information That You Want 19 5 Convert INTs to a DUNT i664 n5 eons ne bed eA GOs 19 6 Appendix A PUT D OSCE ssf ied cite dt a Sout ch Sede tts Ate Alert aA Get tei do Aas A 1 When to Use this Appendix 0 000 000 00 A 1 How to Use this Appendix 0 0 00 00 c eee A 1 Message Manager Logic 0000000 A 2 PIAS the OCIS aS nani einai E Vat oe ee A 2 Restart the Sequence If Required nananana aaa A 2 Send the First Group of MSGs 0 004 A 2 Enable the Next Group of MSGs nananana aaaea A 3 Send the Next Group of MSGs oh ee Me A 3 Enable the Next Group of MSGs 05 A 4 Send the Next Group of MSGs noanoa ow eed a8 es A 4 Appendix B Set Up the I O Configuration ea Se aaaea B 3 Define Your Source and Destination Elements B 4 Create the MESSAGE_CONFIGURATION Data Type B 5 Create the Configuration Array 0 00050 B 6 Get the Size of the Local Array n on aana ee ao B 8 Load the Message Properties for a Controller B 9 Publication 1756 PM001G EN P March 2004 Table of Contents xii 1EC61131 3 Compliance Publication 1756 PM001G EN P March 2004 Configure the Message jis 3c 4cg deg asy bog ain 40g ariel bees B 10 Step to the Next Controller iciy cae ede eee Rd B 11 Restart the Sequence oiucy Sadia hk oid a ts B 11 Appendix C Using This Appendix n ote og ble eae oe BS C 1 ntrod
264. er you create that program you must configure one routine as the main routine e The controller fault program does not execute a fault routine e If you specify a fault routine for the controller fault program the controller never executes that routine e You can create additional routines and call them from the main routine controller scope Data accessible anywhere in the controller The controller contains a collection of tags that can be referenced by the routines and alias tags in any program as well as other aliases in the controller scope See program scope Coordinated System Time CST A 64 bit value that represents the number of microseconds since the CST master controller started counting e The CST value is stored as a DINT 2 array where first element stores the lower 32 bits second element stores the upper 32 bits e You can use the CST timestamp to compare the relative time between data samples Publication 1756 PM001G EN P March 2004 Glossary 12 COUNTER Structure data type that contains status and control information for counter instructions D data type A definition of the memory size and layout that will be allocated when you create a tag of that data type decimal Integer values displayed and entered in base 10 No prefix Not padded to the length of the integer See binary hexadecimal octal description Optional text that you can use to further document your application
265. er the program executes FI Controller Controller _1 Controller Tags E3 Controller Fault Handler 9 Power Up Handler Tasks E MainTask MainProgram Program Tags ER MainRoutine 1 In the controller organizer right click the program that you want to configure and choose Properties 2 Click the Configuration tab fa Program Properties MainProgram Ioj x General Configuration Assigned Routines 3 From the Main list choose the name of the routine that you want to execute as the main routine 4 Choose Publication 1756 PM001G EN P March 2004 1 22 Getting Started Access Status Information Logix5000 controllers do not have a status file as in the PLC 5 controller To access status information you use a keyword or access a specific object If you want to See use specific key words in your logic to monitor specific events Monitor Status Flags on page 1 22 get or set system values Get and Set System Data on page 1 23 Monitor Status Flags The controller supports status keywords you can use in your logic to monitor specific events e The status keywords are not case sensitive e Because the status flags can change so quickly RSLogix 5000 software does not display the status of the flags Q e Even when a status flag is set an instruction that references that flag is not highlighted e You cannot define a tag alias to a
266. erence OREF output wire connector OCON Use the following table to choose your function block elements If you want to supply a value from an input device or tag Then use a input reference IREF send a value to an output device or tag output reference OREF perform an operation on an input value or values and produce an output value or values function block transfer data between function blocks when they are e far apart on the same sheet e on different sheets within the same routine output wire connector OCON and an input wire connector ICON disperse data to several points in the routine single output wire connector OCON and multiple input wire connectors ICON Publication 1756 PM001G EN P March 2004 9 4 Program a Function Block Diagram Choose a Tag Name foran Each function block uses a tag to store configuration and status Element information about the instruction e When you add function block instruction RSLogix 5000 software automatically creates a tag for the block You can use this tag as is rename the tag or assign a different tag e For IREFs and OREFs you have to create a tag or assign an existing tag The following table outlines the format for a tag name For a Specify tag tag name bit number of a larger data type tag name bit_number member of a structure tag name member_name element of a one dimension array tag_ n
267. ermines if the conditions are true before executing the statements again This differs from the WHILE DO loop because the WHILE DO The WHILE DO loop evaluates its conditions first If the conditions are true the controller then executes the statements within the loop The statements in a REPEAT UNTIL loop are always executed at least once The statements in a WHILE DO loop might never be executed Publication 1756 PM001G EN P March 2004 Enter this structured text pos 1 REPEAT pos pos 2 UNTIL pos 101 OR structarray pos value targetvalue end_repeat Example 2 If you want this Move ASCII characters from a SINT array into a string tag In a SINT array each element holds one character Stop when you reach the carriage return 1 Initialize Element_number to 0 2 Count the number of elements in S N7_array array that contains the ASCII characters and store the result in SINT_array_size DINT tag 3 Set String_taglelement_number the character at SINT_array element_number 4 Add 1 to element_number This lets the controller check the next character in S NT_array 5 Set the Length member of String_tag element_number This records the number of characters in String_tag so far 6 If element_number SINT_array_size then stop You are at the end of the array and it does not contain a carriage return 7 If the character at S NT_arrayfelement_number 13 decimal val
268. ers 12 21 force 14 6 14 8 I O 2 7 produce and consume 10 9 data table See tag data type choose 3 3 convert data 10 28 overview 3 3 structure 3 3 data See also tag description structured text 7 28 tag 3 21 user defined data type 3 21 disable force 14 3 14 13 document sequential function chart 6 23 structured text 7 28 tag 3 21 user defined data type 3 21 documentation show or hide in sequential function chart 6 26 don t scan sequential function chart 5 34 download 1 14 driver configure 1 13 E electronic keying 2 6 enable force 14 2 enter action 6 16 address 8 11 ASCII characters 12 21 Index 3 function block element 9 18 ICON 9 25 ladder logic 8 10 OCON 9 25 selection branch 6 6 sequential function chart 6 3 simultaneous branch 6 5 EOT instruction 5 27 Ethernet configure driver 1 13 produce and consume tags 10 9 event task axis registration trigger 4 34 axis watch trigger 4 38 checklist for consumed tag event 4 46 4 47 checklist for input event 4 26 checklist for motion group event 4 33 checklist for registration event 4 35 checklist for watch position event 4 39 choose trigger 4 20 consumed tag trigger 4 42 create 4 53 estimate throughput 4 28 EVENT trigger 4 50 input data trigger 4 22 motion group trigger 4 32 overview 4 2 timeout 4 55 use of 4 2 execute event task 4 20 execution sequential function chart 5 51 6 28 task 1 18 execution order function block diagram 9
269. ervo module out and plug back in If all else fails replace servo module 32 The motion task has experienced an overlap The group s course update rate is too high to maintain correct operation Clear the group fault tag raise the group s update rate and then clear the major fault Publication 1756 PM001G EN P March 2004 15 18 Handle a Major Fault Notes Publication 1756 PM001G EN P March 2004 Chapter 16 When to Use This Procedure Monitor Minor Faults Monitor Minor Faults If a fault condition occurs that is not severe enough for the controller to shut down the controller generates a minor fault e The controller continues to execute e You do not need to clear a minor fault e To optimize execution time and ensure program accuracy you should monitor and correct minor faults To use ladder logic to capture information about a minor fault To check for a Do this periodic task overlap 1 Enter a GSV instructions that gets the FAULTLOG object MinorFaultBits attribute 2 Monitor bit 6 load from nonvolatile 1 Enter a GSV instructions that gets the FAULTLOG object MinorFaultBits attribute memory 2 Monitor bit 7 problem with the serial port 1 Enter a GSV instructions that gets the FAULTLOG object MinorFaultBits attribute 2 Monitor bit 9 low battery 1 Enter a GSV instructions that gets the FAULTLOG object MinorFaultBits attribute 2 Monitor bit 10 problem with an
270. es how to use ladder logic to send groups of Message MSG instructions in sequence This lets them enter and exit the message queue in an ordered fashion Use this appendix if you need to control the execution of a large number of MSGs e To be processed each MSG instruction must enter the message queue e The queue holds 16 MSGs e If more than 16 MSGs are enabled at one time there may not be room on the queue when a MSG is enabled e If this occurs the MSG has to wait until there is room on the queue before the controller can process the MSG On each subsequent scan of the MSG it checks the queue to see if there is room The message manager logic in this appendix lets you control the number of MSGs that are enabled at one time and enable subsequent MSGs in sequence In this way MSGs enter and exit the queue in an ordered fashion and do not have to wait for room on the queue to become available In this appendix the message manager logic sends three groups of MSGs e To make the example easier to follow each groups contains only 2 MSGs e In your project use more MSGs in each group such as 5 e Use as many groups as needed to include all your MSGs The Msg_Group tag controls the enabling of each MSG e The tag uses the DINT data type e Each bit of the tag corresponds to a group of MSGs e For example Msg_Group 0 enables and disables the first group of MSGs group 0 Publication 1756 PM001G EN P March 2004
271. es the force from the associated base tag Force an Input Value Forcing an input or consumed tag e overrides the value regardless of the value of the physical device or produced tag e does not affect the value received by other controllers monitoring that input or produced tag Force an Output Value Forcing an output or produced tag overrides the logic for the physical device or other controller s Other controllers monitoring that output module in a listen only capacity will also see the forced value Publication 1756 PM001G EN P March 2004 14 8 Force Logic Elements Add an I 0 Force To override an input value output value produced tag or consumed tag use an I O force er Forcing can cause unexpected machine motion that could injure personnel Before you use a force determine how the force will effect your machine or process and keep personnel away from the machine area e Enabling I O forces causes input output produced or consumed values to change e If forces are enabled and you install a force the new force immediately takes effect 1 What is the state of the I O Forces indicator Rem Run a he aie I If Then note the following nable Forces gt installed off No I O forces currently exist No Edits a m ie el flashing No 1 0 forces are active But at least one force already exists in your Redundancy j i ined i project When you enable 1 0 forces all existing 1 0 forces will also
272. et Option 5 35 Use the Automatic Reset Option 5 38 Keep Something On From Step to Step 5 40 How Do You Want to Control the Device 5 40 Use a Simultaneous Branch 0 005 5 41 Store and Reset an Action 0 0 0 000005 5 42 Use One Large Steppin Dare gos Pics BERD LOK eS Eee 5 44 MEANINGS fon gd ae Beat fas A Li AA HI GG LAG RSE RG 5 45 At the End of the SFC What Do You Want to Do 5 45 Usea Stop Element rsa waned s Mat eee 5 45 Restart Reset the SFC 0 ke ce ee eee 5 46 SECIS TOP Structure oaao fe only crete Sud ON dh ol 5 47 Nest an SEC s Aorta Biles ee Ye Ee SEG sR tate ae ees 5 49 Pass Parmele sect ten ams PER Oe Eee ed 5 50 Configure When to Return to the OS JSR 5 50 Pause ot Reset am SFC nooruse t hae a Aa db eS 0k 5 51 Fxec ton Diagrams sancan i Pea os ee Rohe aes 5 51 Chapter 6 When to Use This Procedure ouaaa aaoun 6 1 Before You Use This Procedure 0 00005 6 1 How to Use This Procedure 0 0 0c cece eee 6 2 Add an SFC Bleniehls 3 cota asad he eae anru Ree As 6 3 Add and Manually Connect Elements 6 3 Add and Automatically Connect Elements 6 4 Drag and Drop Blements lt vets eed eA 6 4 Create a Simultaneous Branch 44 4 5 54 pes eofe 5 5 SS eo 6 5 Start a Simultaneous Branch o oo ey wee ee a mes 6 5 End a Simultaneous Branch 00005 6 5 Program Str
273. et style view of the tags 1 From the Logic menu select Edit Tags Program Tags MainProgram OF x Scope MainProgram Show Show All 7 Sat Tag Name x TagName Alias For Base Tag Description 2 Select a scope for the tag 2 p If you will use the tag Then select in more than one program within the name_of_controller controller project asa producer or consumer in a message in only one program within the project program that will use the tag Publication 1756 PM001G EN P March 2004 3 10 Organize Tags Program Tags MainProgram OF x Scope MainProgram x Show Show All 7 Sort Tag Name Base Tag Description Type ro 3 Type a name for the tag TagName Alias For 4 Type the data type 5 Type a description optional Create Tags Using Microsoft Excel You can also use spreadsheet software such as Microsoft Excel to create and edit tags This lets you take advantage of the editing features in the spreadsheet software Export the Existing Tags 1 Open the RSLogix 5000 project 2 Create several tags This helps to format the Excel spreadsheet Publication 1756 PM001G EN P March 2004 Organize Tags 3 11 3 From the Tools menu select Export Tags Export Tags The tags are savedin p E Projects fad this folder a gt name_of_controller T ags RSLogix 5000 Import Export File
274. etwork that is connected to the 1756 DNB module in slot 0 To synchronize the inputs with the application the CPS instruction copies the input data to input_buffer e While the CPS instruction copies the data no I O updates can change the data e As the application executes it uses for its inputs the input data in input_buffer CPS Synchronous Copy File Source Local 0 I Data 0 Dest input_buffer 0 Length 20 42578 Publication 1756 PM001G EN P March 2004 Chapter 3 Organize Tags Using this Chapter Use this chapter to organize the data for your Logix5000 controller For this information See page Defining Tags 3 1 Guidelines for Tags 3 7 Create a Tag 3 9 Create an Array 3 13 Create a User Defined Data Type 3 17 Describe a User Defined Data Type 3 21 Address Tag Data 3 23 Assign Alias Tags 3 24 Assign an Indirect Address 3 27 Defining Tags With a Logix5000 controller you use a tag alphanumeric name to address data variables Term Definition tag A text based name for an area of the controller s memory where data is stored e Tags are the basic mechanism for allocating memory referencing data from logic and monitoring data e The minimum memory allocation for a tag is four bytes e When you create a tag that stores data that requires less than four bytes the controller allocates four bytes but the data only fills the part it needs The controller uses the tag name
275. example This address References the input_location as data type location height member of the oad_info structure in the input_location input_location load_info height structure Publication 1756 PM001G EN P March 2004 Glossary 22 e If the structure defines an array use the array tag followed by the position in the array and any substructure and member names array _tag position member or array _tag position substructure name member name For example This address References the conveyor 10 source source member of the 11 element in the conveyor array array elements are zero based conveyor 10 info height height member of the info structure in the 11 element of the conveyor array array elements are zero based See structure memory Electronic storage media built into a controller used to hold programs and data minor fault A fault condition that is mot severe enough for the controller to shut down If this occurs The controller problem with an instruction 1 sets S MINOR 2 logs information about the fault to the PROGRAM object MinorFaultRecord attribute 3 sets bit 4 of the FAULTLOG object MinorFaultBits attribute periodic task overlap sets bit 6 of the FAULTLOG object MinorFaultBits attribute problem with the serial port sets bit 9 of the FAULTLOG object MinorFaultBits attribute low battery sets bit 10 of the FAULTLOG object MinorFaultBits attribute Publication 175
276. execution actions Don t scan Only P and PO actions execute They execute according to their logic Programmatic reset All actions execute according to their logic Automatic reset e P and PO actions execute according to their logic e All other actions execute in postscan mode e On the next scan of the routine the P and PO actions execute in postscan mode retention of data values All data keeps its current values All data keeps its current values e Data reverts to its values for postscan e Tags to the left of assignments clear to zero method for clearing data Use P and PO actions Use either e status bits of the step or action to condition logic e P and PO actions Use either e assignment non retentive assignment e instructions that clear their data during postscan reset of a nested SFC A nested SFCs remains at its current step A nested SFCs remains at its current step Use the Don t Scan Option For the Restart Position property if you choose the Restart at initial step option then e Anested SFC resets to its initial step e The X bit of a stop element in a nested SFC clears to zero The default option for handling the last scan of a step is Don t scan With this option all data keeps its current values when the SFC leaves a step This requires you to use additional assignments or instructions to clear any data that you want t
277. expression BOOL BOOL expression SINT numeric expression INT DINT REAL ends the assignment Publication 1756 PM001G EN P March 2004 Program Structured Text 7 3 The tag retains the assigned value until another assignment changes the value The expression can be simple such as an immediate value or another tag name or the expression can be complex and include several operators and or functions See the next section Expressions on page 7 4 for details Specify a non retentive assignment The non retentive assignment is different from the regular assignment described above in that the tag in a non retentive assignment is reset to zero each time the controller e enters the RUN mode e leaves the step of an SFC if you configure the SFC for Automatic reset This applies only if you embed the assignment in the action of the step or use the action to call a structured text routine via a JSR instruction A non retentive assignment has this syntax tag expression where Component Description tag represents the tag that is getting the new value the tag must be a BOOL SINT INT DINT or REAL is the non retentive assignment symbol expression represents the new value to assign to the tag If tag is this data type Use this type of expression BOOL BOOL expression SINT numeric expression INT DINT REAL ends the assignment Publication 1756 PM001G EN P March 2004 7 4 Program Structure
278. ey lose their connections to the controller Or monitor the status of I O modules If the controller loses communication with a module data from that device does not update When this occurs the logic makes decisions on data that may or may not be correct Loss of communication Controller B requires data from controller A If communication fails between the controllers then controller B continues to act on the last data that it received from controller A If communication with a device in the I O configuration of the controller does not occur for 100 ms the communication times out If this occurs you have the following options If you want the controller to Then fault major fault Configure a Major Fault to Occur continue operating Monitor the Health of a Module Publication 1756 PM001G EN P March 2004 10 6 Communicate with Other Devices Configure a Major Fault to Occur You can configure modules to generate a major fault in the controller if they lose their connection with the controller This interrupts the execution of logic and executes the Controller Fault Handler If the Controller Fault Handler does not clear the fault then the controller shuts down ial Module Properties Local 4 1756 IB16I 1 1 General Connection Module Info Configuration Backplane Requested Packet Interval RPI ms 0 2 750 0 ms P Inhibit Module geese If the connection times out produce a major
279. f 999 in the last element of the packet to verify the transmission of the packet NEQ Not Equal Source A array_packet 123 0 Source B array_ack 0 0 EQU MOV Equal Move Source A array packet 124 Source array packet 123 0 0 Source B 999 Dest array_offset 0 COP Copy File Source array _packet 0 Dest array array_ offset Length 123 MOV Move Source array_packet 123 0 Dest array_ack 0 0 CLR Clear Dest array_ack 1 0 NEQ MOV Not Equal Move Source A array packet 124 Source 999 0 Source B 999 Dest array_ack 1 0 42356 Publication 1756 PM001G EN P March 2004 Produce a Large Array 11 7 Transferring a large array as smaller packets improves system performance over other methods of transferring the data e Fewer connections are used than if you broke the data into multiple arrays and sent each as a produced tag For example an array with 5000 elements would take 40 connections 5000 125 40 using individual arrays e Faster transmission times are achieved than if you used a message instruction to send the entire array Messages are unscheduled and are executed only during the system overhead portion of the Logix5550 execution Therefore messages can take a fairly long time to complete the data transfer You can improv
280. f these formats on a single line comment that spans more than one line start of comment end of comment start of comment end of comment Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 23 Choose a Qualifier for an Each action non boolean and boolean uses a qualifier to determine Action when it starts and stops The default qualifier is Non Stored The action starts when the step is activated and stops when the step is deactivated To change when an action starts or stops assign a different qualifier Table 5 1 Choose a Qualifier for an Action If you want the action to And Thenassignthis Which qualifier means start when the step is activated stop when the step is deactivated N Non Stored execute only once P1 Pulse Rising Edge stop before the step is deactivated or when the L Time Limited step is deactivated stay active until a Reset action turns off this action S Stored stay active until a Reset action turns off this action SL Stored and Time Limited or a specific time expires even if the step is deactivated start a specific time after the step is activated stop when the step is deactivated D Time Delayed ange MEPIS Sulla stay active until a Reset action turns off this action DS Delayed and Stored start a specific time after the step is activated stay active until a Reset action turns off this action SD Stored and even if the
281. fEventTask L5X a FreeRunningCounter L5x a GetMajorFaultRecord L5x a LookForSpecificFault L5X gt 3 Choose a location and name for the file 4 Create the file File name Publication 1756 PM001G EN P March 2004 8 16 Program Ladder Logic Import Rungs ioj x HEEE B Look in E Library z 0e E a CountScans L5 a StartStop L5 d Cut Rung Ctrl x a DelayRoutineCompletion L5x Copy Rung Ctrl C DetectTimeOutOfEventTask L5x Tl Paste Ctrl a FreeRunningCounter L5 B GetMajorFaultRecord L5x Delete Rung Del a LookForSpecificFault L5x Add Rung Ctrl R Edit Rung Enter WO Edit Rung Comment Ctrl D File name E etMajorFaultRecord LE Files of type fammen En Export Rung 1 Right click the location for the rungs and choose Import Rung TagName _ amp fAliasFor Type S E A o oe Im AD Esere poo xja tocar eena aol eao menoon Conveyor C Conveyor C 2 Select the file to import 3 Check for conflicts in names 4 Import the file gt oK Check Alias Tags If you import an alias tag make sure it points to the correct base tag When a tag rungs that you is an alias for a tag that already exists in the project the software sets up the imported relationship between the alias and base tags e e Estop_Disabled e lt Local 1 l Data 0 gt CN1 Motor_RAun CN1 Motor_Fault e P z e If the
282. fig 1 Path Message Properties message_config 1 RemoteElement Steps message we message Path Be message RemoteElement 1 To store the configuration properties for the message create the following array Tag Name Type Scope message_contig MESSAGE_CONFIGURATION number any where number is the number of controllers to which to send the message Publication 1756 PM001G EN P March 2004 Send a Message to Multiple Controllers B 7 2 Into the message_config array enter the path to the first controller that receives the message Tag Name Value message_config level message_config 0 tlovel Message_config 0 Path lt t _ _ Right click and choose Go to Message Path Editor message_config 0 RemoteElement Type the path to the Message Path Browser remote controller p gt Path or peer_controller Browse to the remote p 1 0 Configuration controller 3 Into the message_config array enter the tag name or address of the data in the first controller to receive the message Tag Name Value message_config message_config 0 message_config 0 Path message_config 0 RemoteElement
283. fine the data type as a string 13 Enter a tag name for the AWT instruction and define the data type as SERIAL_PORT_CONTROL 14 Enter the number of characters to send EXAMPLE When the temperature reaches the low limit emp_low is on the AWT instruction sends nine characters from the string 2 tag to a MessageView terminal The 14 counts as one character It is the hex code for the Ctrl T character temp_low AWT ASCII Write Channel 0 Source string 2 142224 01 r SerialPort Control temp_low_write String Length 9 Characters Sent 9 42229 15 Go to Enter ASCII Characters on page 12 21 Publication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 17 16 Enter the following rung MOY AWA ASCII Write Append Channel Source Move Source f Dest SerialPort Control SerialPort Control Length Characters Sent 21 22 20 42235c 17 Enter the input condition s that determines when the characters are to be sent e You can use any type of input instruction e The instruction must change from false to true each time the characters are to be sent 18 Enter 0 19 Enter the tag name that stores the ASCII characters Define the data type as a string 20 Enter a tag name for the AWA instruction and define the data type as SERIAL_PORT_CONTROL 21 Enter the LEN member of the Source tag The tag from step 19 22 Enter the L
284. finition 13 4 REAL LREAL initial value of 0 0 Tag variable definition 13 5 Time initial value of T 0s Tag variable definition reset RES instruction 13 9 Empty String Descriptions and Strings 14 1 Initialization of directly derived types Import export 14 4 Initialization of array data types Import export 14 5 Initialization of structured type elements Import export 14 6 Initialization of derived structured data types Import export 19a 2a Textual invocation non formal Available in ST 20 1 Use of EN and ENO Function present in LD but not labeled Available in FBD 20 2 Usage without EN and ENO Available in FBD 20 3 Usage with EN and without ENO Available in FBD 20 4 Usage without EN and with ENO Available in FBD 21 1 Overloaded functions ADD INT DINT or All overloaded types that are supported are ADD DINT REAL documented with each instruction 22 1 _TO_ conversion function RAD DEG instructions Radians to from Decimal String numeric conversion STOD STOR RTOS DTOS Others not needed because of instruction overloading 22 2 Truncate conversion function TRN instruction in LD and TRUNC function in ST 22 3 BCD to INT Convert FRD instruction in LD Publication 1756 PM001G EN P March 2004 IEC61131 3 Compliance C 7 Table Feature Feature Description Extensions and Implementation Notes Number Number 22 4 INT to BCD Co
285. g and the SFC should go to an error step Figure 5 3 The following diagram shows the action of the timer and associated bits of a step step_name X step_name PRE step_name T step_name DN Description 1 Step becomes active X bit turns on Timer T begins to increment N Timer reaches the Preset PRE value of the step DN bit turns on Timer continues to increment ow Step becomes inactive X bit turns off Timer retains its value DN remains on gt Step becomes active X bit turns on Timer clears and then begins to increment DN bit turns off Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 29 Figure 5 4 The following diagram shows the action of the low and high alarms for a step l l step_name AlarmEn l l l l l step_name X l i step_name LimitHigh l l step_name LimitLow step_name T i step_name AlarmHigh l step_name AlarmLow Soa 00 OO Description 1 AlarmEn is on To use the low and high alarms turn this bit on Turn the bit on via the properties dialog box or the tag for the step 2 Step becomes active X bit turns on Timer T begins to increment 3 Step becomes inactive X bit turns off Timer retains its value Since Timer is less than LimitLow AlarmLow bit tur
286. ge will effect your machine or process and keep personnel away from the machine area Publication 1756 PM001G EN P March 2004 14 4 Force Logic Elements Check Force Status Before you use a force determine the status of forces for the controller You can check force status in the following ways To determine the status of Use any of the following 1 0 forces e Online Toolbar e FORCE LED e GSV Instruction SFC forces Online Toolbar Online Toolbar The Online toolbar shows the status of forces It shows the status of I O forces and SFC forces separately Rem Run AT 1 0 Forces Enabled Forces tab 7 gt Forces De inctalied No Edits amp F SFC Forces Disabled Redundancy m None Installed P i This Means Enabled e f the project contains any forces of this type they are overriding your logic e f you add a force of this type the new force immediately takes effect Disabled Forces of this type are inactive If the project contains any forces of this type they are not overriding your logic Installed At least one force of this type exists in the project None Installed No forces of this type exist in the project Publication 1756 PM001G EN P March 2004 Force Logic Elements 14 5 FORCE LED If your controller has a FORCE LED use the LED to determine the status of any I O forces IMPORTANT The FORCE LED shows only the status of I O forces It does not show tha
287. gix5000 Controllers Process and Drives Instructions Reference Manual publication 1756 RM006 e Logix5000 Controllers Motion Instruction Set Reference Manual publication 1756 RM007 The examples in this chapter use two simple instructions to help you learn how to write ladder logic The rules that you learn for these instructions apply to all other instructions Symbol Name Mnemonic Description T Examine If Closed XIC An input instruction that looks at one bit of data If the bit is Then the instruction rung condition out is on 1 true off 0 false Output Energize OTE An output instruction that controls one bit of data p g p If the instructions to the left Then the instruction turns rung condition in are the bit true on 1 false off 0 Publication 1756 PM001G EN P March 2004 8 6 Program Ladder Logic To check multiple input conditions when all conditions must be met in order to take action For example If condition_1 AND condition_2 AND condition_3 Arrange the Input Instructions Arrange the input instructions on a rung using the following chart Arrange the input instructions In series condition_1 condition_2 condition_3 E ee fe mee any one of several conditions must be met in order to take action For example If condition_1 OR condition_2 OR condition_3 In parallel conditi conditi conditi there is a combination of the above In co
288. h 2004 Manage Multiple Tasks 4 47 Checklist for the Consumer Controller For this Q 1 Buffer of data Make sure you If you want to make sure that the controller does not use data from the consumed tag while the data is changing use a copy of the consumed tag Use the event task to copy the data as shown below This tag stores data that the This tag stores a copy of other controller produces Consumed _Tag Instructions in the project use this data Consumed_Tag CPS Destination_Tag m Synchronous Copy File _ data from gt 64784481 6A7844B1 other B 3B221D89 pe 38221089 controller aspazer 43BB278F The CPS instruction does not let any other instruction use the data during the copy Tasks that attempt to interrupt the CPS instruction are delayed until the copy is done m 2 Task priority Configure the event task as the highest priority task If a periodic task has a higher priority the event task may have to wait until the periodic task is done Q 3 Number of event tasks Limit the number of event tasks Each additional task reduces the processing time that is available for other tasks This could cause an overlap m 4 Automatic Output Processing For an event task you can typically disable automatic output processing default This reduces the elapsed time of the task To verify this decision see Figure 4 1 on page 4 1
289. haracters sort_table_search E sort_table_search DN MOY Move Source Dest 43038 1 If the FSC instruction does not find the product ID within the sort_table array the instruction sets the DN bit 2 When no match is found the MOV instruction moves 999 into the lane tag This tells the controller to reject or reroute the item 3 After the MOV instruction sets the value of the lane tag the RES instruction resets the FSC instruction so it can search for the next product ID Enter the Product IDs and Lane Numbers Into the sort_table array enter the ASCII characters that identify each item and the corresponding lane number for the item Tag Name Value Z sort_table Hach sort_table 0 tocol sort_table 0 Product_ID ASCII characters that identify the first item sort_table 0 Lane lane number for the item sort_table 1 eos sort_table 1 Product_ID ASCII characters that identify the next item sort_table 1 Lane lane number for the item Publication 1756 PM001G EN P March 2004 13 10 Process ASCII Characters Check the Bar Code Characters Publication 1756 PM001G EN P March 2004 In this task you use a compare instruction EQU GEQ GRT LEQ LES NEQ to check for specific characters e The hexadecimal values of the characters determine if one string is less than or greater tha
290. hat controls the device For a list of stored qualifiers see Table 5 1 on page 5 23 2 In the step that turns off the device use a Reset action The following figure shows the use of a stored action Action Name action that you want to execute for more than one step Action Name more steps Action Name same name as the stored action Action _Name When the SFC leaves the step that stores the action RSLogix 5000 software continues to show the stored action as active By default a green border displays around the action This lets you know that the SFC is executing the logic of that action Design a Sequential Function Chart 5 43 To use a stored action follow these guidelines e The Reset action only turns off the stored action It does not automatically turn off the devices of the action To turn off the device follow the Reset action with another action that turns off the device Or use the Automatic reset option described on page 5 38 e Before the SFC reaches a stop element reset any stored actions that you do not want to execute at the stop An active stored action remains active even if the SFC reaches a stop e Use caution when you jump in between a step that stores an action and a step that resets the action Once you reset an action it only starts when you execute the step that stores the action In the following example steps 1 4 require a fan to be on
291. hat the alias will represent To Do this select a tag Double click the tag name select a bit number A Click the tag name B To the right of the tag name click M C Click the required bit 6 Press the Enter key or click another cell Publication 1756 PM001G EN P March 2004 Assign an Indirect Address Organize Tags 3 27 If you want an instruction to access different elements in an array use a tag in the subscript of the array an indirect address By changing the value of the tag you change the element of the array that your logic references When index equals 1 arrayfindex points here array 0 4500 ij array 1 6000 array 2 3000 array 3 2500 When index equals 2 arrayfindex points here The following table outlines some common uses for an indirect address To Use a tag in the subscript and select a recipe from an array of recipes Enter the number of the recipe in the tag load a specific machine setup from an array Enter the desired setup in the tag of possible setups load parameters or states from an array A Perform the required action on the one element at a time first element log error codes B Use an ADD instruction to increment perform several actions on an array element the tag value and point to the next and then index to the next element element in the array Publication 1756 PM001G EN P March 2004 3 28 Organize Tags T
292. he computer prevent future access to the file If Then Yes Choose Yes No Choose No Disable Routine Source Protection IMPORTANT Before you remove the source key file sk dat from a computer either write down the source keys or make a copy of the file and store it in a secure location 1 Open the RSLogix 5000 project that is protected 2 From the Tools menu choose Security gt Configure Source Protection Publication 1756 PM001G EN P March 2004 18 10 Secure a Project Source Protection Configuration HES MainProgram RIGtest Routine_ amp Routine_B Urnprotect 3 Click Disable Ability To Configure Protected Routines A dialog box prompts you to confirm the action 4 Choose Yes A dialog box asks if you want to delete the source key file sk dat 5 Do you want to remove the source key file from the computer prevent future access to the file If Then Yes Choose Yes No Choose No Publication 1756 PM001G EN P March 2004 Secure a Project 18 11 Gain Access to a Protected Routine 1 Open the RSLogix 5000 project that contains the protected routines 2 From the Tools menu choose Security gt Configure Source Protection 3 Does RSLogix 5000 software prompt you to specify the location for the source key file If Then No Go to step 7 Yes Go to step 4 4 Choose Yes Specify Source Key File Location x Source Key File Location 5 7 p Canc
293. he controller must immediately execute the gluing routine Use an event task with this trigger Module Input Data State Change A production line uses a proximity sensor to detect the presence of a part Because the proximity sensor is on for only a very short time pulse the continuous task might miss the off to on transition of the sensor Module Input Data State Change In an engine test stand you must capture and archive each sample of analog data Module Input Data State Change Controller A produces an array of production data for Controller B You want to make sure that Controller B doesn t use the values while Controller A is updating the array Consumed Tag In a line that packages candy bars you have to make sure that the perforation occurs in the correct location on each bar Each time the registration sensor detects the registration mark check the accuracy of an axis and perform any required adjustment Axis Registration 1 or 2 At the labeling station of a bottling line you want to check the position of the label on the bottle When the axis reaches the position that is defined as the watch point check the label Axis Watch A gluing station must adjust the amount of glue it applies to compensate for changes in the speed of the axis After the motion planner executes check the command speed of the axis and vary the amount of glue if needed Motion Group Execution In a production li
294. he following example loads a series of preset values into a timer one value array element at a time EXAMPLE Step through an array The timer_presets array stores a series of preset values for the timer in the next rung The north_tank step tag points to which element of the array to use For example when north_tank step equals 0 the instruction loads timer_presets O into the timer 60 000 ms MOV Move Source timer presets north _tank step 60000 Dest north_tank step_time PRE 60000 north_tank step_time DN TON A F Timer On Delay END Timer north _tank step_time DN Preset 60000 Accum 0 When north_tank step_time is done the rung increments north_tank step to the next number and that element of the timer_presets array loads into the timer north tank step time DN SEEED Source A 1 Source B north tank step 0 Dest north tank step 0 When north_tank step exceeds the size of the array the rung resets the tag to start at the first element in the array The array contains elements 0 to 3 EQU MOV Equal Move Source A north tank step Source 0 0 Source B 4 Dest north _tank step 0 42358 Publication 1756 PM001G EN P March 2004 Organize Tags 3 29 Expressions You can also use an expression to specify the subscript of an array e An expression uses operators such as or to calculate a value e The
295. he parameter 4 To receive a parameter from the routine click the empty Return Parameters text box Then use the down arrow to choose the tag in which to store the parameter from the routine 5 Choose E N action_name step_name SR routine name Publication 1756 PM001G EN P March 2004 6 22 Program a Sequential Function Chart Assign the Execution Order Actions execute in the order in which they appear of Actions Publication 1756 PM001G EN P March 2004 For example E N Lau Action _000 When Step_003 is active its actions execute in this order 1 Action_000 Action _002 2 Action_001 3 Action_002 Step_003 To change the order in which an action executes drag the action to the desired location in the sequence A green bar shows a valid placement location For example z i Step_003 l n aeon 002 Program a Sequential Function Chart 6 23 Document the SFC To document an SFC you have the following options To document this And you want to Do this general information about the SFC Adda Text Box step p Adda Text Box or Add a Tag Description transition download the documentation to the controller Add Structured Text Comments have the option of showing or hiding the Add a Text Box documentation position the documentation anywhere in the ad SFC Add a Tag Description action download the documentation to the controller Add Structured
296. he position of each hole from the leading edge of the book To organize the values into configurations a two dimension array is used The first subscript indicates the hole to which the value corresponds and the second subscript indications how many holes will be drilled Cone to five subscript of second dimension Description 0 1 2 3 4 5 0 1 1 5 25 1 25 1 25 1 25 Position of first hole from leading edge of book ee of 9 8 0 55 3 5 3 5 Position of second hole from leading edge of book dimension 3 975 17 5 5 5 Position of third hole from leading edge of book 4 975 75 Position of fourth hole from leading edge of book 5 9 75 Position of fifth hole from leading edge of book In the Tags window the elements are in the order depicted below Program Tags MainProgram Scope MainProgram x Show Show Al x Sert g Tag Name T E E B ole_position 0 0 AE Ge ole_position 0 1 E ole_position 0 2 resso ole_position 0 4 HH ole_position 0 5 REAL El ole_position 1 0 H ole_position 1 1 J roes L hole postiont a A 42367 The right most dimension increments to its maximum value then starts over When the right most dimension starts over the dimension to the left increments by one This array contains a two dimensional grid of elements six elements by six elements Publication 1756 PM001G EN
297. he required programming language installed e To determine which programming languages are installed on your computer choose Help gt About RSLogix 5000 e To add a programming language see ControlLogix Selection Guide publication 1756 SG001 Publication 1756 PM001G EN P March 2004 1 12 Getting Started Verify a Project As you program your project periodically verify your work 1 In the top most toolbar of the RSLogix 5000 window click 2 If any errors are listed at the bottom of the window a To go to the first error or warning press F4 b Correct the error according to the description in the Results window c Go to step 1 3 To close the Results window press Alt 1 Save a Project As you create logic and make configuration changes save the project To Do this save your changes From the File menu select Save make a copy of the open project but keep 1 From the File menu select Save As the existing name of the controller N Type a name for the project file Use underscores _ in place of spaces Se Click Save make a copy of the project and assign a From the File menu select Save As different name to the controller N Type a name for the project file Use underscores _ in place of spaces 3 Click Save 4 In the controller organizer right click Controller name_of_controller folder and select Properties on Type a new name for the contro
298. he time that the RTS signal turns off dow 10 Click Apply Publication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 5 Configure the User Protocol 1 Click the User Protocol tab o Controller Properties Ascii_examples iof x Major Faults Minor Faults Date Time Advanced File General Serial Port System Protocol User Protocol Protocol miM Buffer Size 82 Bytes Termination Character 1 g 2 FF Append Character 1 Sr 2 FF M XON 0FF I Echo Mode r Delete Mode Ignore C CRT C Printer 42252 2 Select or type a number that is greater than or equal to the greatest number of characters in a transmission Twice the number of characters is a good guideline 3 If you are using ABL or ARL instructions type the characters that mark the end of the data For the ASCII code of a character refer to the back cover of this manual lf the device Then Notes sends one termination A In the Termination Character 1 For printable character text box type the hexadecimal characters such ASCII code for the first as 1 or A type the character character B In the Termination Character 2 text box type FF two termination In the Termination Character 1 and 2 characters text boxes type the hexadecimal ASCII code for each character Publication 1756 PM001G EN P March 2004 12 6 Communicate with an ASCII Device S Controller Properties Ascii_exa
299. head time slice 1 26 task 1 19 user protocol for ASCII 12 5 connection cache 10 22 direct 2 3 failure 10 5 0 fault 10 5 inhibit 10 2 listen only 2 4 monitor 10 6 overview 2 2 produced or consumed tag 10 10 rack optimized 2 3 Publication 1756 PM001G EN P March 2004 reduce the number of 2 3 construct structured text 7 12 consume tag 10 9 consumed tag connection requirements 10 10 create 10 15 maintain data integrity 4 44 organize 10 12 overview 10 9 synchronize controllers 4 45 continuous task execution 1 18 overview 4 2 use of 4 2 controller change properties 1 3 download 1 14 memory information 19 1 mode 1 16 nonvolatile memory 17 1 17 3 number of tasks 4 4 shut down 15 13 suspend 15 13 synchronize 4 45 tags 3 5 triggers supported 4 21 update firmware during load from nonvolatile memory 17 6 controller organizer navigate 1 4 open routine 1 11 controller tags use of 3 5 ControlNet bandwidth limits 10 13 configure driver 1 13 produce and consume data 10 9 convert ASCII characters 13 12 COS See change of state create alias 3 26 consumed tag 10 15 driver 1 13 event task 4 53 periodic task 4 54 produced tag 10 14 program 1 20 project 1 1 routine 1 10 string 13 18 string data type 12 8 tag 3 9 8 11 function block diagram 9 22 tag using Excel 3 10 user defined data type 3 19 D data ASCII 12 8 block See array definitions C 2 enter ASCII charact
300. hes the organization of data that is used by the attribute B Create a tag for the attribute and use the data type from Step A 8 In your ladder logic routine enter the appropriate instruction To Enter this instruction get the value of an attribute GSV set the value of an attribute SSV wall_clock tag which is based on a user defined data type S FS Getting Started 1 25 9 Assign the required operands to the instruction For this operand Class name Select name of the object Instance name name of the specific object e g name of the required I O module task message e Not all objects require this entry e To specify the current task program or routine select THIS Attribute Name name of the attribute Dest GSV tag that will store the retrieved value e f the tag is a user defined data type or an array select the first member or element Source SSV tag that stores the value to be set e f the tag is a user defined data type or an array select the first member or element The following examples gets the current date and time EXAMPLE Get a system value At the first scan gets the DateTime attribute of the WALZICLOCKTIME object and stores it in the GSV Get System Value Class name WALLCLOCKTIME Instance name Attribute Name DateT ime Dest wall_clock pear 2001 42370 For more information see the Logix5000 Controllers General Instruction Set
301. iately takes effect 1 What is the state of the SFC Forces indicator Rem Run AT 1 0 Forces Enabled 7 Forces ms Installed If Then note the following No Edits amp m see off No SFC forces currently exist i ble Redundancy B None Installed flashing No SFC forces are active But at least one force already exists in your project When you enable SFC forces a existing SFC forces will also take effect solid SFC forces are enabled active When you install add a force it immediately takes effect 2 Open the SFC routine 3 Right click the transition or start of a simultaneous path that you want to force and choose either Force TRUE only for a transition or Force FALSE 4 Are SFC forces enabled See step 1 If Then no From the Logic menu choose SFC Forcing Enable All SFC Forces Then choose Yes to confirm yes Stop Publication 1756 PM001G EN P March 2004 Remove or Disable Forces Force Logic Elements 14 13 Changes to forces can cause unexpected machine motion that could ATTENTION injure personnel Before you disable or remove forces determine how the change will effect your machine or process and keep personnel away from the machine area If you want to And Then stop an individual force leave other forces enabled and in effect Remove an Individual Force stop all 1 0 forces but leave all SFC forces leave the I O forces in the project Disable Al
302. ick and choose New B Resources Groups Q New ASLogis 5000 Resources RSLOGIX 5000 43078 43084 2 Type the information for the user and then choose OK Add User Groups A group lets you manage multiple users who require similar privileges 1 From the Help menu choose Quick Start Ej Quick Start Help Topics Back Options What do you want to do Mi add user groups to the system Add workstation groups to the system Create a resource Create a resource group Group actions Assign access to individuals and groups Add Actions 43074 2 Follow the steps for this task Publication 1756 PM001G EN P March 2004 Secure a Project 18 21 Assign Global Access to RSLogix 5000 Software To permit users to perform global actions Users Groups 29 Resources Groups New RSLogix 5000 Resources 1 In the Configuration explorer select the RSLOGIX 5000 e ISLOGI lt 5000 group Actions Groups 43077 2 From the Help menu choose Quick Start Quick Start What do you want to do Add user groups to the system Add workstation groups to the system create a resource create a resource group Group actions Mi Assign access to individuals and groups 3 Follow the steps for this task Assign the actions that you Add Actions recorded on Table 18 3 on page 18 16 43076 Publication 1756 PM001G EN P March 2004 18 22 Secure
303. iggers the event task e Typically enable COS for only one point on the module If you enable COS for multiple points a task overlap of the event task may occur analog module samples data Module Input Data e Only one input module can trigger a specific event task State Change e The analog module triggers the event task after each real time sample RTS of the channels e All the channels of the module use the same RTS controller gets new data via a consumed tag Consumed Tag e Only one consumed can trigger a specific event task e Typically use an IOT instruction in the producing controller to signal the production of new data The IOT instruction sets an event trigger in the producing tag This trigger passes to the consumed tag and triggers the event task e When a consumed tag triggers an event task the event task waits for all the data to arrive before the event task executes registration input for an axis turns on or off Axis Registration 1 e In order for the registration input to trigger the event task first execute or 2 a Motion Arm Registration MAR instruction This lets the axis detect the registration input and in turn trigger the event task e Once the registration input triggers the event task execute the MAR instruction again to re arm the axis for the next registration input e f the scan time of your normal logic is not fast enough to re arm the axis for the next registration input consi
304. iguration e Define Your Source and Destination Elements e Create the MESSAGE_CONFIGURATION Data Type e Create the Configuration Array e Get the Size of the Local Array e Load the Message Properties for a Controller e Configure the Message e Step to the Next Controller e Restart the Sequence To copy the above components from a sample project open the RSLogix 5000 Projects Samples folder Open Import Project Look in Samples m MSG_to_Multiple_Controllers ACD q Open this project 43055 Set Up the 1 0 Configuration Although not required we recommend that you add the communication modules and remote controllers to the I O configuration of the controller This makes it easier to define the path to each remote controller For example once you add the local communication module the remote communication module and the destination controller the Browse button lets you select the destination Message Path Browser Path peer_controller peer_controller 1 0 Configuration 0 1756 CNB x Local_CNB 2 0 1756 CNB x chassis_b 1 1756 L55 x peer_controller g Publication 1756 PM001G EN P March 2004 B 4 Send a Message to Multiple Controllers Define Your Source and Destination Elements In this procedure an array stores the data that is read from or written to each remote controller Each element in the array corresponds to a
305. illisecond ms The IEC61131 3 specification provides access to memory through the creation of named variables IEC61131 3 names for variables consist of a minimum of six characters RSLogix5000 programming software supports a minimum of 1 character starting with an underscore _ or an alpha character A Z followed by one or more characters consisting of an underscore _ alpha character A Z or a number 0 9 Optionally lower case alpha characters a z can be supported as long as they are case insensitive A a B b C c Logix5000 controllers provide full compliance with this definition support the lower case option and extend the name to support up to 40 character names Programming Languages IEC61131 3 Compliance C 3 Data variables in IEC61131 3 may be defined such that they are accessible to all programs within a resource or controller or limited access is provided only to the functions or routines within a single program To pass data between multiple resources or controllers access paths may be configured to define the location of the data within a system Logix5000 controllers provide compliance by providing program scoped controller scoped data and permits the configuration of access paths using produced consumed data The memory interpretation of a variable within IEC61131 3 is defined through the use of either an elementary data type or an optional derived data type that is created from a group of multiple dat
306. in updated data from the channels If the module is in a remote chassis only the RPI determines when the controller receives the data and event trigger over the network Over this network The controller receives the data EtherNet IP close to the RPI on average ControlNet at the actual packet interval lt RPI Publication 1756 PM001G EN P March 2004 4 24 Manage Multiple Tasks Here are some examples that show COS and RTS configurations IMPORTANT If you use a digital module to trigger an event task configure only one point on the module for COS If you configure multiple points a task overlap could occur If you want this Then configure the input module like this point 0 is used as an example only Em Module Properties Local 4 1756 1B32 A 2 point 0 event task SJ A E change of state no change of state for E Module Properties Local 4 1756 IB32 A 2 poito _TL_ y gt Off change of state Vv no change of state for M remaining points gt Rea E C E Module Properties Local 4 1756 1B32 A 2 an wmo I i event task ri change of state no change of state for remaining points gt gt Ea O fal Module Properties Local 0 1756 IF4FXOF2F RTS of analog inputs mor ri ri l l l Output Configuration Output State Limits event task L LTL TL General Conn
307. ined and select New Data Type Publication 1756 PM001G EN P March 2004 3 20 Organize Tags Hi Data Type New UDT2 2 _ Name Size byte s 3 Description e g Members Name Data Type Style Description food dE Ds 2 Type a name for the data type 3 Type a description optional 4 Type the name of the first member 5 Specify the data type for the member Limit any arrays to a single dimension 6 To display the value s of the member in a different style radix select the style 7 Type a description for the member optional 8 Click Apply 9 More members If Then Yes Repeat steps 4 to 8 No Click OK Publication 1756 PM001G EN P March 2004 Organize Tags 3 21 Describe a User Defined Data Type RSLogix 5000 software aa 13 0 or later RSLogix 5000 software lets you automatically build descriptions out of the descriptions in your user defined data types This greatly reduces the amount of time you have to spend documenting your project As you organize your user defined data types keep in mind the following features of RSLogix 5000 software Data Type Tank Name f ank Description Tank pass through of descriptions When possible RSLogix 5000 software looks for an available description for a tag element or member 4 e Descriptions in user defined data types ripple through to the tag
308. ing Started Controller Organizer In RSLogix 5000 software the controller organizer provides a graphical overview of a project When you create a project RSLogix5000 software automatically creates a default task program and routine When you create a project the name of the project is the same as the name of the controller _ gt If you rename the project or controller both names are shown controller organizer ERN To close a folder and hide its contents collapse do one of the following e Double click the folder e Select the folder and press the key e Click the sign To open a folder and display its contents expand do one of the following e Double click the folder e Select the folder and press the key e Click the sign Publication 1756 PM001G EN P March 2004 ff RSLogix 5000 Controller_1 1756 L63 File Edit view Search Logic Communications Tools Window Help Offline fl RUN No Forces b FOK No Edit F BAT scart F 0 4 Ae D M1 Favorites AE Bey Controller Controller_1 Controller Tags E3 Controller Fault Handler C3 Power Up Handler Tasks name of the controller Ga MainTask lt 3 MainProgram Program Tags MainRoutine 9 Unscheduled Programs 5 Motion Groups EI Trends B E Data Types ER User Defined Od Strings ER Predefined ER Module Defined EI 1 0 Configuration default task default program default rou
309. instruction 1 Create a user defined data type that stores the fault information Name the data type FaultRecord N Se and assign the following members Name Data Type Style TimeLow DINT Decimal TimeHigh DINT Decimal Type INT Decimal Code INT Decimal Info DINT 8 Hex o a tag that will store the values of the MinorFaultRecord attribute Select the data type from step 1 Monitor S MINOR 4 If S MINOR is on use a GSV instruction to get the values of the MinorFaultRecord attribute on If you want to detect a minor fault that is caused by another instruction reset S MINOR S MINOR remains set until the end of the scan Publication 1756 PM001G EN P March 2004 16 2 Monitor Minor Faults The following example checks for a low battery warning Check for a minor fault Minor_fault_check times for 1 minute 60000 ms and then automatically restarts itself TON minor_fault_check DN Timer On Delay Timer minor_fault_check ho Preset 60000 Accum l Every minute minor_fault_check DN turns on for one scan When this occurs the GSV instruction gets the value of the FAULTLOG object MinorFaultBits attribute and stores it in the minor_fault_bits tag Because the GSV instruction only executes once every minute the scan time of most scans is reduced GSV Get System Value Class name FAULTLOG Instance name Attribute Name MinorF aultBits Dest minor_fault_bits
310. internally and doesn t need to cross reference a physical address e In conventional PLCs a physical address identifies each item of data Addresses follow a fixed numeric format that depend on the type of data such as N7 8 F8 3 Symbols are required to make logic easier to interpret e In Logix5000 controllers there is no fixed numeric format The tag name itself identifies the data This lets you organize your data to mirror your machinery document through tag names your application as you develop it Publication 1756 PM001G EN P March 2004 3 2 Organize Tags Eis Program Tags MainProgram Scope MainProgram x Show Show All Sort Tag Nar Tag Name 7 Alias For Base Tag Type north_tank_mix BOOL north_tank_pressure REAL analog 1 0 device a north_tank_temp REAL one_shots DINT recipe TANK 3 integer value jm recipe_number DINT storage bit p replace_bit BOOL counter gt gt running_hours COUNTER timer gt running_seconds TIMER start BOOL digital 1 0 device p stop BOOL Monitor Tags Edit Tags 4 When you create a tag you assign the following properties to the tag e Tag Type e Data Type e Scope Tag Type The tag type defines how the tag operates within your project If you want the tag to Then choose this type sto
311. ion optional J optional J Program Structured Text 7 13 Use IF THEN to do something if or when specific conditions occur Structured Text Operand Type Format Enter bool_ BOOL tag BOOL tag or expression that evaluates to expression expression a BOOL value BOOL expression The syntax is IF bool _expressioni THEN lt statement gt statements to execute when bool_expression is true ELSIF bool _expression2 THEN lt statement gt lt q _________ Statements to execute when bool_expressionZ2 is true ELSE lt statement gt lt q Statements to execute when both expressions are false END_IF To use ELSIF or ELSE follow these guidelines 1 To select from several possible groups of statements add one or more ELSIF statements e Each ELSIF represents an alternative path e Specify as many ELSIF paths as you need e The controller executes the first true IF or ELSIF and skips the rest of the ELSIFs and the ELSE 2 To do something when all of the IF or ELSIF conditions are false add an ELSE statement Publication 1756 PM001G EN P March 2004 7 14 Program Structured Text The following table summarizes different combinations of IF THEN ELSIF and ELSE If you want to And Then use this construct do something if or when conditions do nothing if conditions are false IF THEN emus do something else if conditions are false IF THEN ESLE choose from alternative statements
312. ion e When you create a project file the file name is the name of the controller e The controller name is independent of the project file name If you save a current project file as another name the controller name is unchanged e f the name of the controller is different than the name of the project file the title bar of the RSLogix 5000 software displays both names Publication 1756 PM001G EN P March 2004 1 2 Getting Started 6 7 p 8 9 p Names only alphabetic characters A Z or a z numeric characters 0 9 and underscores _ must start with an alphabetic character or an underscore no more than 40 characters no consecutive or trailing underscore characters _ not case sensitive Publication 1756 PM001G EN P March 2004 Create a Project 1 Start the RSLogix 5000 software 2 From the File menu select New New Controller Xx Vendor Allen Bradley Type 1756 L55 ControlLogix5555 Controller Revision Cancel J Redundancy Enabled Name fC O Description m ddi Help Chassis Type 1756 41 0 10 Slot ControlLogis Chassis Slot a Create In CSRS Logix 5000Projects Browse ai 3 Select the type of controller 4 Choose the major revision of firmware for this controller 5 Type a name for the controller 6 Type a description of the operations that the controller performs optional 7 Select the type of chassis number of slots
313. ion 1756 PM001G EN P March 2004 Major Fault Codes Handle a Major Fault 15 15 Use the following table to determine the cause and corrective action for a major fault The type and code correspond to the type and code displayed in these locations e Controller Properties dialog box Major Faults tab e PROGRAM object MAJORFAULTRECORD attribute Table 15 1 Major Fault Types and Codes Type Code Cause Recovery Method 1 1 The controller powered on in Run mode Execute the power loss handler 1 60 For a controller with no CompactFlash card 1 Clear the fault installed the controller 2 Download the project e detected a non recoverable fault 3 Change to remote run run mode e cleared the project from memory If the problem persists 1 Before you cycle power to the controller record the state of the OK and RS232 LEDs 2 Contact Rockwell Automation support See the back of this publication 1 61 For a controller with a CompactFlash card 1 Clear the fault installed the controller 2 Download the project e detected a non recoverable fault 3 Change to remote run run mode e wrote diagnostic information to the If the problem persists contact Rockwell Automation support See CompactFlash card the back of this publication e cleared the project from memory 3 16 A required I O module connection failed Check that the 1 0 module is in the chassis Check electronic keying requirements View the contr
314. ion Qualifier P1 Pulse Rising Edge 45 12 Action Qualifier PO Pulse Falling Edge Publication 1756 PM001G EN P March 2004 C 10 1EC61131 3 Compliance Table Feature Feature Description Extensions and Implementation Notes Number Number 45a 1 Action Control 45a 2 Action Control 46 1 SFC Single Sequence 46 2a SFC Divergence of sequence selection Use of line connections vs asterisk 46 2b SFC Divergence of sequence selection with execution order 46 3 SFC Convergence of sequence selection 46 4a SFC Simultaneous sequence divergence 46 4b SFC Simultaneous sequence convergence 46 5a b c SFC Sequence Skip 46 6a b c SFC Sequence Loop 46 7 SFC Loop directional arrows When wire is hidden 47 1 SFC Graphical representation 47 4 SFC Graphical representation 48 1 SFC Minimal Step Compliance Requirements Refer to notes on individual tables above 48 2 SFC Minimal Transition Compliance Refer to notes on individual tables above Requirements 48 3 SFC Minimal Action Compliance Requirements Refer to notes on individual tables above 48 4 SFC Minimal Action Body Compliance Refer to notes on individual tables above Requirements 48 5 SFC Minimal Action Qualifier Compliance Refer to notes on individual tables above Requirements 48 6 SFC Minimal Branch Compliance Requirements Refer to notes on individual tables above 48 7 SFC Minimal Block
315. ion output instruction l Cay ee Gay rung condition in rung condition out Only input instructions affect the rung condition in of subsequent instructions on the rung e If the rung condition in to an input instruction is true the controller evaluates the instruction and sets the rung condition out to match the results of the evaluation If the instruction evaluates to true the rung condition out is true If the instruction evaluates to false the rung condition out is false e An output instruction does not change the rung condition out If the rung condition in to an output instruction is true the rung condition out is set to true If the rung condition in to an output instruction is false the rung condition out is set to false Publication 1756 PM001G EN P March 2004 Program Ladder Logic 8 5 Write Ladder Logic To develop your ladder logic perform the following actions Choose the Required Instructions Arrange the Input Instructions Arrange the Output Instructions Choose a Tag Name for an Operand Choose the Required Instructions 1 Separate the conditions to check from the action to take 2 Choose the appropriate input instruction for each condition and the appropriate output instruction for each action To choose specific instructions see the following manuals e Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 e Lo
316. ional exit the loop early use other statements END _ IF such as an IF THEN construct to condition an EXIT statement END FOR Publication 1756 PM001G EN P March 2004 7 20 Program Structured Text The following diagrams show how a FOR DO loop executes and how an EXIT statement leaves the loop early Done xnumber yes Done Xnumber yes 7 of times ae of times no no statement 1 statement 1 statement 2 statement 2 statement 3 statement 3 statement 4 statement 4 P Ey yes ka A Exit gt rest of the routine a no The FOR DO loop executes a specific To stop the loop before the count reaches the last number of times value use an EXIT statement v rest of the routine Arithmetic Status Flags not affected Fault Conditions A major fault will occur if Fault type Fault code the construct loops too long 6 1 Example 1 If you want this Enter this structured text Clear bits 0 31 in an array of BOOLs For subscript 0 to 31 by 1 do 1 Initialize the subscript tag to 0 Isib otl ce bs 2 Clear array subscript For example when array LSC ENE Yd S N subscript 5 clear array 5 End for 3 Add 1 to subscript 4 If subscriptis lt to 31 repeat 2 and 3 Otherwise stop Publication 1756 PM001G EN P March 2004 Example 2 If you want this A user defined data type structure stores the following information about an item in your inventory e Barcode ID of the item
317. is reset to zero larger The following example shows the STRING data type and a new string data type 3 5 This tag uses the default STRING Program Tags MainProgram data type Scope MainProgram Show Show All x Tag Name Type bag_flt_dest F flt_dest STRING 20 bag_bar_code STRING_24 AEdit Tags W This tag is an 20 element array of the default STRING data type an This tag uses a new string data type Monitor Tags 42234 e The user named the string data type STRING_24 e The new string data type stores Publication 1756 PM001G EN P March 2004 Glossary 40 structure Some data types are a structure e A structure stores a group of data each of which can be a different data type e Within a structure each individual data type is called a member e Like tags members have a name and data type e You create your own structures called a user defined data type using any combination of individual tags and most other structures e To copy data to a structure use the COP instruction See the Logix5000 Controllers General Instruction Set Reference Manual publication 1756 RMO003 The COUNTER and TIMER data types are examples of commonly used structures lo expand a structure and 3 z display its members click Program Tags MainProgram the sign __ Tag Name Alias For Base Tag gt
318. is step to initialize your process initial step initial transition e To identify a step look for a physical change in your system such as new part that is in position a temperature that is reached a preset time that is reached or a recipe selection that occurs The step is the actions that take place before that change e Stop when your steps are in meaningful increments For example This organization of steps Is produce_solution probably too large set_mode close_outlet set_temperature probably too small open_inlet_a close_inlet_a set_timer reset_temperature open_outlet reset_mode preset_tank add_ingredient_a cook drain probably about right Publication 1756 PM001G EN P March 2004 5 8 Design a Sequential Function Chart SFC_STEP Structure Each step uses a tag to provide information about the step Access this information via either the Step Properties dialog box or the Monitor Tags tab of the Tags window If you want to Thencheckorset Datatype Details this member determine how long a step has T DINT When a step becomes active the Timer T value resets and then been active milliseconds starts to count up in milliseconds The timer continues to count up until the step goes inactive regardless of the Preset PRE value flag when the step has been PRE DINT Enter the time in the Preset PRE member When the Timer T active for a specific length of reaches the Preset value
319. itor FBD editor 57 11 12 Blocks with connections LD editor FBD editor 57 13 14 Connectors FBD editor 58 2 Unconditional jump JMP instruction in LD 58 3 Jump target LBL instruction in LD 58 4 Conditional jump JMP instruction in LD 58 5 Conditional return RET instruction in LD 58 8 Unconditional return RET instruction in LD 59 Left hand power rail LD editor 59 2 Right hand power rail LD editor 60 Horizontal link LD editor 60 2 Vertical link LD editor 61 1 2 Normally open contact XIC instruction in LD 61 3 4 Normally close contact XIO instruction in LD 61 5 6 Positive transition sensing contact P ONS instruction in LD 62 1 Coil _ OTE instruction in LD Publication 1756 PM001G EN P March 2004 C 12 _1EC61131 3 Compliance Table Feature Feature Description Extensions and Implementation Notes Number Number 62 3 Set latch coil Functionality contained in OTL instruction in LD 62 4 Reset unlatch coil Functionality contained in OTU instruction in LD 62 8 Positive transition sensing coil OSR instruction in LD 62 9 Negative transition sensing coil OSF instruction in LD 1 Publication 1756 PM001G EN P March 2004 Table associated with languages other than structured text sequential function chart ladder diagram and function block diagram have been skipped Glossary action In a sequential function chart SFC an action represents a functional division of a step Several
320. ity All other tasks interrupt the continuous task Manage Multiple Tasks 4 7 LEXAMBEE The following example depicts the execution of a project with three user tasks Task Priority Period Execution time Duration motion planner n a 8 ms course update rate 1 ms 1 ms event task 1 1 n a 1 ms 1 to 2 ms periodic task 1 2 12 ms 2 ms 2 to 4 ms 1 0 task n a to ControlLogix and 7 5 ms fastest RPI ims 1 to5ms SoftLogix controllers See page 4 6 system overhead n a time slice 20 1 ms 1 to 6 ms continuous task n a n a 20 ms 48 ms Legend Task executes Task is interrupted suspended fi motion i a a i a a i planner event task 1 i L periodic no E TE au aa om Fo Pon ir on i i se i i J K overhead ovas M A Tie 5 10 15 20 25 30 35 40 45 50 2 OE ee g 9 Description Initially the controller executes the motion planner and the I O task if one exists After executing the continuous task for 4 ms the controller triggers the system overhead The period for periodic task 1 expires 12 ms so the task interrupts the continuous task After executing the continuous task again for 4 ms the controller triggers the system overhead The triggers occurs for event task 1 Event task 1 waits until the motion planner i
321. ix and DriveLogix controllers use a dedicated periodic task to process I O data This 1 0 task Does not show up in the Tasks folder of the controller Does not count toward the task limits for the controller Operates at priority 7 Executes at the fastest RPI you have scheduled for the system Executes for as long as it takes to scan the configured I O modules As you assign priorities to your tasks consider the I O task If you want a task to Then assign one of these priorities interrupt or delay 1 0 processing 1 to6 share controller time with 1 0 processing 7 let I O processing interrupt or delay the task 8 to 15 system overhead System overhead is the time that the controller spends on unscheduled communication e Unscheduled communication is any communication that you do not configure through the 1 0 configuration folder of the project such as Message MSG instructions and communication with HMIs or workstations e System overhead interrupts only the continuous task e The system overhead time slice specifies the percentage of time excluding the time for periodic or event tasks that the controller devotes to unscheduled communication e The controller performs unscheduled communication for up to 1 ms at a time and then resumes the continuous task continuous task Publication 1756 PM001G EN P March 2004 You do not assign a priority to the continuous task It always runs at the lowest prior
322. ject for the task that the instruction is in i e Jask_ 7 GSV Get System Value Class Name TASK Instance Name THIS Attribute Name Status Dest Task_Status 0e continued on next page Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 37 If Task_Status 0 1 then an EVENT instruction triggered the event task In the continuous task the EVENT executes to arm registration for the first time The JMP instruction causes the controller to jump its execution to the Arm LBL instruction This skips all the logic of the routine except the rung that arms registration for the axis Task_Status 0 Arm M e e Other logic e The MAR instruction executes each time the task executes and arms Axis_7 for registration The OTU instruction sets the EN bit of the MAR instruction 0 e The MAR instruction is a transitional instruction e To execute the MAR instruction its rung condition in must go from false to true e By first clearing the EN bit the instruction responds as if its rung condition in changed from false to true The MAR instruction arms the axis for registration Arm MAR Axis_1_MAR EN LBL Motion Arm Registration Axis Axis_1 J h gt Motion Control Axis_1_MAR R gt Trigger Condition Positive_Edge P gt Windowed Registration Enabled ed Min Position Axis_1_MAR_Min_Pos pe Max Position Axis_1_MAR_Max_Pos 3e 1 Input Number The controller does not clear the bi
323. ject from its nonvolatile memory S FS Get System Value Class name FAULTLOG Instance name Attribute Name MinorF aultBits Dest minor_fault_bits 2 0000_0000_0000_0000_0000_0000_0000_0000 minor_fault_bits NVM_load Ee 42867 Where Is minor fault_bits Tag that stores the FAULTLOG object MinorFaultBits attribute Data type is DINT NVM_load Tag that indicates that the controller loaded the project from its nonvolatile memory Publication 1756 PM001G EN P March 2004 Store and Load a Project Using Nonvolatile Memory 17 15 Clear Nonvolatile Memory To remove a project from nonvolatile memory complete the following actions Check the Current Load Image Option Change the Load Image Option Clear the Project from the Controller Store the Empty Image Check the Current Load Image Option 1 Go online with the controller Rem Prog J F Not Running t l No Forces P Seabees tt No Edits e 1 0 OK Redundancy H 2 42627 2 On the Online toolbar click the controller properties button 3 Click the Nonvolatile Memory tab General Serial Port System Protocol User Protocol Maior Faults Minor Faults Date Time Advanced Fie Nonvolatile Memory Image in Nonvolatile Memory Name name_of_controller Type 1756 L55 4 ControlLogix 5555 Controller Revision 8 16 4 Load Image User Initiated Load Mode Remote P
324. ks in a routine when you e verify a function block routine e verify a project that contains a function block routine e download a project that contains a function block routine You define execution order by wiring function blocks together and indicating the data flow of any feedback wires if necessary If function blocks are not wired together it does not matter which block executes first There is no data flow between the blocks Publication 1756 PM001G EN P March 2004 9 8 Program a Function Block Diagram This input pin uses an output that the block produced on the If you wire the blocks sequentially the execution order moves from input to output The inputs of a block require data to be available before the controller can execute that block For example block 2 has to execute before block 3 because the outputs of block 2 feed the inputs of block 3 a eB qe ia F Execution order is only relative to the blocks that are wired together The following example is fine because the two groups of blocks are not wired together The blocks within a specific group execute in the appropriate order in relation to the blocks in that group Resolve a Loop To create a feedback loop around a block wire an output pin of the block to an input pin of the same block The following example is OK The loop cont
325. l 1 0 Forces ACUN remove the I O forces from the project Remove All I O Forces stop all SFC forces but leave all I O forces leave the SFC forces in the project Disable All SFC Forces acuve remove the SFC forces from the project Remove All SFC Forces ATTENTION Remove an Individual Force If you remove an individual force forces remain in the enabled state and any new force immediately takes effect Before you remove a force determine how the change will effect your machine or process and keep personnel away from the machine area 1 Open the routine that contains the force that you want to remove 2 What is the language of the routine If Then SFC Go to step 4 ladder logic Go to step 4 function block Go to step 3 structured text Go to step 3 3 Right click the tag that has the force and choose Monitor If necessary expand the tag to show the value that is forced e g BOOL value of a DINT tag 4 Right click the tag or element that has the force and choose Remove Force Publication 1756 PM001G EN P March 2004 14 14 Force Logic Elements Publication 1756 PM001G EN P March 2004 Disable All 1 0 Forces From the Logic menu choose YO Forcing gt Disable All I O Forces Then choose Yes to confirm Remove All 1 0 Forces From the Logic menu choose VO Forcing Remove All I O Forces Then choose Yes to confirm Disable All SFC Forces From the Logic menu choose SFC Forcing gt Dis
326. l s N amp AND XOR Publication 1756 PM001G EN P March 2004 OR Program Structured Text 7 11 Structured text statements can also be instructions See the Locator Table at the beginning of this manual for a list of the instructions available in structured text A structured text instruction executes each time it is scanned A structured text instruction within a construct executes every time the conditions of the construct are true If the conditions of the construct are false the statements within the construct are not scanned There is no rung condition or state This differs from function block instructions that use EnableIn to trigger execution Structured text instructions execute as if EnableIn is rung condition in to trigger execution Some relay ladder instructions only execute when rung condition in toggles from false to true These are transitional relay ladder instructions In structured text instructions will execute each time they are scanned unless you pre condition the For example the ABL instruction is a transitional instruction in relay ladder In this example the ABL instruction only executes on a scan when fag_xic transitions from cleared to set The ABL instruction does not execute when tag_xic stays set or when tag_xic is cleared ABL ASCII Test For Buffer Line Instructions transition that triggers execution always set This also differs from relay ladder instructions that use exe
327. larm alarm high alarm function numeric_expression If overtravel and overtravel_POS are DINT tags and your specification says Calculate the absolute value of overtrave and store the result in overtravel_POS overtravel POS ABS overtravel valuel operator function value2 value3 2 If adjustment and position are DINT tags and sensor and sensor2 are REAL tags and your specification says Find the absolute value of the average of sensor and sensorZ add the adjustment and store the result in position Use relational operators position adjustment ABS sensorl sensor2 2 Relational operators compare two values or strings to provide a true or false result The result of a relational operation is a BOOL value lf the comparison is The result is true 1 false 0 Use the following relational operators For this comparison Use this operator Optimal Data Type equal 5 DINT REAL string less than lt DINT REAL string less than or equal lt DINT REAL string greater than gt DINT REAL string greater than or equal gt DINT REAL string not equal lt gt DINT REAL string Publication 1756 PM001G EN P March 2004 7 8 Program Structured Text For example Use this format valuel operator value2 Example For this situation If temp is a DINT tag and your specification says If temp is less than 100 then
328. le for other operations like communications and I O This controller ControlLogix SoftLogix5800 Communicate with Other Devices 10 11 Each produced or consumed tag uses the following number of connections And this type of tag produced tag Uses this many connections number of consumers 1 consumed tag 1 CompactLogix DriveLogix FlexLogix produced tag number of consumers consumed tag 1 EXAMPLE Connection Requirements of a Produced or Consumed Tag e A FlexLogix controller producing a tag for 5 controllers consumers uses 5 connections e A ControlLogix controller producing 4 tags for 1 controller uses 8 connections Each tag uses 2 connections 1 consumer 1 2 2 connections per tag x 4 tags 8 connections e Consuming 4 tags from a controller uses 4 connections 1 connection per tag x 4 tags 4 connections Publication 1756 PM001G EN P March 2004 10 12 Guideline Create the tags at the controller scope Communicate with Other Devices Organize Tags for Produced or Consumed Data As you organize your tags for produced or consumed data shared data follow these guidelines Details You can share only controller scoped tags Use one of these data types e DINT e REAL e array of DINTs or REALs e user defined e To share other data types create a user defined data type that contains the required data e Use the same data type for the
329. lement 2 in the preset array within the CLR north_tank tag 4 Clear L Dest north _tank preset 2 0 part_advance member of element 1 in the drill array drill 1 part_advance TE J E 42357 Publication 1756 PM001G EN P March 2004 8 10 Program Ladder Logic Enter Ladder Logic A new routine contains a rung that is ready for instructions cursor blue When you add an instruction or branch it appears to the right of the cursor e When you add a rung it appears gt below the cursor End Use the Language Element toolbar to add a ladder logic element to your routine branch level branch rung XIC XIO OTE OTU OTL 4 Hot teat de gt fo gt 4 gt Favorites BE XTimeriCounter K Input Output K Compare other instructions To add an element Append an Element to the Cursor Location Drag and Drop an Element Append an Element to the Cursor Location 1 Click select the instruction branch or rung that is above or to the left of where you want to add an element 2 On the Language Element toolbar click the button for the element that you want to add Publication 1756 PM001G EN P March 2004 Program Ladder Logic Drag and Drop an Element Drag the button for the element directly to the desired location A green dot shows a valid placement location drop point For example Assign Operands To assign an operand y
330. lication Publication 1756 P M001G EN P March 2004 Glossary 33 qualifier In the action of a sequential function chart SFC a qualifier defines when an action starts and stops See action sequential function chart step rack optimized connection For digital I O modules you can select rack optimized communication A rack optimized connection consolidates connection usage between the controller and all the digital I O modules in the chassis or DIN rail Rather than having individual direct connections for each I O module there is one connection for the entire chassis or DIN rail See direct connection rate For a periodic task the rate at which the controller executes the task from 1 ms to 2 000 000 ms 2000 seconds The default is 10 ms REAL A data type that stores a 32 bit 4 byte IEEE floating point value with the following range e 3 40282347E to 1 17549435E negative values 20 e 1 17549435E to 3 40282347E positive values The REAL data type also stores infinity NAN and IND but the software display differs based on the display format Display Format Equivalent Real infinite 1 infinite 1 NAN 1 QNAN NAN 1 QNAN indefinite 1 IND Exponential infinite 1 INF000e 000 infinite 1 INF000e 000 NAN 1 QNAN00e 000 NAN 1 QNAN00e 000 indefinite 1 IND0000e 000 The software also stores and displays the IEEE subnormal range Publication 1756 P
331. lication 1756 RMO003 IMPORTANT If you are not familiar with how to enter ladder logic in an RSLogix 5000 project first review Program Ladder Logic on page 8 1 1 Which type of device are you reading If the device is a Then bar code reader Go to step 2 weigh scale that send a fixed number of characters message or display terminal Go to step 14 weigh scale that send a varying number of characters 2 Enter the following rung ACB ASCII Chars in Buffer Channel SerialPort Control Character Count 99 42235a 3 Enter 0 The serial port is channel 0 4 Enter a tag name for the ACB instruction and define the data type as SERIAL_PORT_CONTROL 5 Enter the EN bit of the ACB tag The tag from step 4 Publication 1756 PM001G EN P March 2004 12 10 Communicate with an ASCII Device 6 Enter the following rung EQ Grtr Than or Eql A gt B Source ASCII Read Channel Destination Source B ER SerialPort Control SerialPort Control Length Characters Read 42235a 7 Enter the POS member of the ACB tag The tag from step 4 8 Enter the number of characters in the data 9 Enter 0 10 Enter a tag name to store the ASCII characters Define the data type as a string 11 Enter a tag name for the ARD instruction and define the data type as SERIAL_PORT_CONTROL 12 Enter the number of characters in the data P
332. ll occur at the same ef time Control Comms BTs In a heat treating area the temperature ramps up at a specific Sequence rate maintains that temperature for a specific duration and then cools at a specific rate Ramp Maintain Cool At station 12 the machine drills taps and bolts a part The steps Sequence occur one after the other Drill Tap Bolt Step 12 inspects a process for the correct mix of chemicals Wire N start of SFC e f OK then continue with the remaining steps Step 12 e f not OK go to the top of the SFC and purge the system Not 0 OK Publication 1756 PM001G EN P March 2004 5 14 Design a Sequential Function Chart Sequence A sequence is a group of steps that execute one after the other do this THEN this THEN this For a detailed diagram of the execution of a sequence of steps see Figure 5 5 on page 5 52 To override the state of a transition see Force Logic Elements on page 14 1 Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 15 Selection Branch A selection branch represents a choice between one path step or group of steps or another path i e an OR structure e Only one path executes e By default the SFC checks the transitions from left to right The SFC takes the first true path RSLogix 5000 software lets you change the order in which the SFC checks the transitions See
333. ller o Click OK If you make changes to the project while online save the project so that the offline project file matches the online project file If you want to Do this save online changes and data values From the File menu select Save save online changes but not online data values 1 From the Communications menu select Go Offline 2 From the File menu select Save Publication 1756 PM001G EN P March 2004 Getting Started 1 13 Configure aCommunication The RSLogix 5000 software requires a communication driver to Driver communicate with a controller You configure communication drivers using RSLinx software 1 Start RSLinx software 2 From the Communications menu select Configure Drivers 3 From the Available Driver Types drop down list select a driver For this network And this type of computer Select this driver serial p gt RS 232 DF1 Devices DH desktop computer 1784 KT KTX D PKTX D laptop computer 1784 PCMK ControlNet desktop computer 1784 KTC X laptop computer 1784 PCC EtherNet IP p Ethernet devices DeviceNet p gt DeviceNet Drivers 1784 PCD PCIDS 1770 KFD SDNPT drivers 4 Choose Add New 5 If you want to assign a descriptive name to the driver change the default name 6 Choose OK 7 Configure the driver For this driver Do this serial A From the Comm Port drop down list select the serial port that the driver will use B
334. ller The controller that creates the primary configuration and communication connection to a module The owner controller writes configuration data and can establish a connection to the module Module Properties Local 1756 IB16 2 1 Type Vendor Parent Name Description An owner connection is any connection 1756 1B16 16 Point 10 31 2 DC Inpu Allen Bradley Local rm a z that does not include Listen Only in its Comm Format t Comm Format Input Data listen only connection An 1 0 connection where another controller owns provides the configuration data for the 1 0 module A controller using a listen only connection only monitors the module It does not write configuration data and can only maintain a connection to the I O module when the owner controller is actively controlling the 1 0 module Module Properties Local 1756 IB16 2 1 Publication 1756 PM001G EN P March 2004 Type 1756 IB16 16 Point 10 31 2 DC Inpu Vendor Allen Bradley Parent Local Name Description listen only connection j Comm Format Listen Only Input Data Communicate with 0 2 5 If the module is an input module Use the following table to choose the type of ownership for a module And another controller does not own the module And you want to Then use this type of connection owner i e not listen only owns the module maintain communicatio
335. ller interrupt a task regardless of the priority of the task e communication with I O modules Modules that have large data packets have a greater impact such as the 1756 DNB module e serial port communication Publication 1756 PM001G EN P March 2004 4 32 Manage Multiple Tasks Using the Motion Group To couple the execution of an event task with the execution of the Trigger motion planner use the Motion Group Execution trigger fa Task Properties MainTask General Configuration Program Schedule Monitor Let an event trigger this task Type Event 7 Let the motion planner trigger the task Trigger Motion Group Execution x This is the name of the motion group tag Tag Motion Group Execute Task If No Event Occurs Within fi 0 000 ms Priority fi Lower Number Yields Higher Priority Watchdog 500 000 ms IV Disable Automatic Output Processing To Reduce Task Overhead Interrupt all other tasks When the task is done do not update digital outputs in the local chassis The Motion Group Execution trigger works as follows e The coarse update period for the motion group triggers the execution of both the motion planner and the event task e Because the motion planner interrupts all other tasks it executes first If you assign the event task as the highest priority task it executes immediately after the motion planner The following timing diagram shows the rela
336. lt the controller executes program fault routine See program task Publication 1756 P M001G EN P March 2004 Glossary 35 scan time See elapsed time execution time scope Defines where you can access a particular set of tags When you create a tag you assign scope it as either a controller tag or a program tag for a specific program as depicted below Controller example pii tags that all routines and external Controller Tags lt lt devices e g other controllers can CI Controller Fault Handler peers 9 Power Up Handler S Tasks fal MainT ask MainProgram 3 tags that only the routines in 2 Program Tags MainProgram can access MainFoutine 9 C3 Unscheduled Programs 3 Trends Data Types Lp User Defined i Predefined LCa Module Defined C 140 Configuration 42195 You can have multiple tags with the same name e Each tag must have a different scope For example one of the tags can be a controller tag and the other tags can be program tags for different programs Or each tag can be a program tag for a different program e Within a program you cannot reference a controller tag if a tag of the same name exists as a program tag for that program See controller scope program scope sequential function chart A sequential function chart SFC is similar to a flowchart It uses steps and transitions to control a machine or
337. lve a loop 9 8 resolve data flow between blocks 9 11 resolve loop 9 21 show a pin 9 20 function blockdiagram applications for 1 8 functions structured text 7 6 G global data See scope 1 0 buffer 2 8 document See alias impact on execution 4 6 output processing 4 13 synchronize with logic 2 8 throughput for event task 4 28 update period 2 2 1 0 module choose for event task 4 25 communication format 2 3 communication loss 10 5 configure 2 1 configure change of state 4 22 connection fault 10 5 electronic keying 2 6 inhibit 10 2 ownership 2 4 tag address 2 7 trigger event task 4 22 update period 2 2 ICON add 9 25 choosing 9 3 enter 9 18 1EC61131 3 compliance data definitions C 2 instruction set C 4 introduction C 1 operating system C 2 program portability C 4 programming language C 3 tables C 5 IF THEN 7 13 immediate value function block diagram 9 24 ladder logic 8 13 import ladder logic 8 14 index See indirect address indirect address 3 27 clear a major fault 15 8 format 3 23 use of expression 3 29 inhibit connetion 10 2 I O module 10 2 task 4 17 instruction set C 4 IREF choosing 9 3 enter 9 18 latching data 9 5 to assign immediate value 9 24 J jump sequential function chart 5 17 K keying electronic 2 6 L ladder logic applications for 1 8 arrange input instructions 8 6 arrange output instructions 8 7 assign immediate value 8 13 branch 8 2 develop 8 5 enter 8 10 expor
338. mber Yields Higher Priority The EVENT Instruction Only trigger requires that you use a Trigger Event Task EVENT instruction to trigger the task You can use an EVENT instruction from multiple points in your project Each time the instruction executes it triggers the specified event task l l EVENT instruction in program A l EVENT instruction in program B es S S event task SE JE Description O Program A executes an EVENT instruction The event task that is specified by the EVENT instruction executes one time Program B executes an EVENT instruction The event task that is specified by the EVENT instruction executes one time Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 51 Programmatically Determine if an EVENT Instruction Triggered a Task To determine if an EVENT instruction triggered an event task use a Get System Value GSV instruction to monitor the Status attribute of the task Table 4 3 Status Attribute of the TASK Object Attribute Data Type Instruction Description Status DINT GSV Provides status information about the task Once the controller sets a bit you must manually clear the bit to determine if another fault of that type occurred ay To determine if Examine this bit An EVENT instruction triggered the task event task 0 only A timeout triggered the task event task only 1 An overlap occurred for this task 2 The controller
339. mbination For example condition_1 condition_2 If condition_1 AND condition_2 OR If condition_3 AND condition_2 Publication 1756 PM001G EN P March 2004 condition_3 Program Ladder Logic 8 7 TIP The controller executes all instructions on a rung regardless of their rung condition in For optimal performance of a series of instructions sequence the instructions from most likely to be false on the left to least likely to be false on the right instruction most likely instruction least likely to be FALSE to be FALSE se _ 3 When the controller finds a false instruction it executes the remaining instructions in the series with their rung condition in set to false Typically an instruction executes faster when its rung condition in rung is false rather than true Arrange the Output Instructions Place at least one output instruction to the right of the input instructions You can enter multiple output instructions per rung of logic as follows Option Example Place the output instructions in sequence on the rung serial gt _ lt gt Place the output instructions in branches parallel gae Place the output instructions between input instructions as long as JE ie JE c gt the last instruction on the rung is an output instruction Publication 1756 PM001G EN P March 2004 8 8 Program Ladder Logic Choose a Tag Name for an Operand Most instructions requires one o
340. me us 25 C 60 C Off gt On On Off Off On On Off 1756 IB16 265 582 265 638 1756 IB16D 303 613 305 673 1756 IB32 B 330 359 345 378 1756 IV16 257 435 254 489 1756 IV32 381 476 319 536 1756 0B16D 48 519 51 573 1756 OB16E 60 290 61 324 1756 0B32 38 160 49 179 1756 OV16E 67 260 65 326 1756 OV32E 65 174 66 210 Publication 1756 PM001G EN P March 2004 4 30 Manage Multiple Tasks EXAMPLE Estimate Throughput The following example shows the throughput considerations for the system shown below In this example the throughput is the time from when the input turns on to when the output turns on 1756 IB32 B digital input gt N Off gt On transition oro Consideration 1 What is the input filter time of the module that triggers the event task 1756 0B16D digital module 4 Opu module Off On transition Value This is typically shown in milliseconds Convert it to microseconds us 0 us 2 What is the hardware response time for the input module that triggers the event task Make sure you use the appropriate type of transition Off gt On or On Off See Table 4 2 on page 4 29 330 us 3 What is the backplane communication time If the chassis size is Use this value worst case A slot 13 us 7 slot 22 us 10 slot 32 us 13 slot 42 us 17 slot 54 us 13 us 4 What is the total execution time of the progr
341. mples iof x Major Faults Minor Faults Date Time Advanced File General Serial Port System Protocol User Protocol Protec a Buffer Size 82 Bytes Termination Character 1 sr 2 FF 4 Append Character 1 sr Pa SFF 5 f XON 0FF Echo Mode Delete Mode Ignore i C CRT Printer 42252 4 If you are using the AWA instruction type the character s to append to the data For the ASCII code of a character refer to the back cover of this manual To append Then Notes one character A In the Append Character 1 text For printable box type the hexadecimal characters such ASCII code for the first as 1 or A type the character character B In the Append Character 2 text box type FF two characters In the Append Character 1 and 2 text boxes type the hexadecimal ASCII code for each character 5 If the ASCII device is configured for XON XOFF flow control select the XON XOFF check box 6 If the ASCII device is a CRT or is pre configured for half duplex transmission select the Echo Mode check box Publication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 7 7 Select the Delete Mode If the ASCII device is Select Notes CRT CRT e The DEL character 7F and the character that precedes the DEL character are not sent to the destination e f echo mode is selected and an ASCII instruction reads the DEL character the echo returns three characte
342. n t have to write any ladder logic to clear the ProgAutoReq after the routine executes and the PIDE instruction will receive only one request to go to Auto every time the pushbutton is pressed When the TIC101AutoReq Pushbutton is pressed one shot latch ProgAutoReq for the PIDE instruction TIC101 TIC101 has been configured with the ProgValueReset input set so when the PIDE instruction executes it automatically clears ProgAutoReq TICIMAutoRegPB TIC101AutoRegPBOneShot TIC101 Prog4utoReg J E ONS Lo Publication 1756 PM001G EN P March 2004 9 18 Program a Function Block Diagram Add a Sheet To add a sheet to a function block routine 1 2 aggio By el gt Sheet 3 vj of4 A Se 1 Click 2 Type a description of the sheet up to 50 characters Add a Function Block Use the Language Element toolbar to add a function block element to your routine Element IREF OREF ICON OCON function blocks ADD SUB MUL DIV eano BOR exor enor 2 4 gt Favorites Process K Drives AFiters A SelectLint K Statistical KB other function blocks Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 19 To add an element 1 On the Language Element toolbar click the button for the element that you want to add 2 Drag the element to the desired location For example You can also drag the button for the element directly to the desired
343. n Times Elapsed Time maximum scan time of the program Max 0 000000 ms Reset All scan time of the last execution of this program t Last 18 075000 ms 3 To close the dialog box choose Publication 1756 PM001G EN P March 2004 1 30 Getting Started View Program Scan Time To see the scan time of a program display the properties for the program fea Controller Controller _1 Controller Tags E3 Controller Fault Handler 9 Power Up Handler Tasks E MainTask MainProgram Program Tags ER MainRoutine 1 In the controller organizer right click the program whose scan time you want to view and choose Properties 2 Click the Configuration tab ial Program Properties MainProgram oj x General Configuration Assigned Routines Main AEE Fat nno O O Scan Times execution time Max sus Teh foe maximum scan time of the program Last scan time of the last execution of this program 3 To close the dialog box choose Publication 1756 PM001G EN P March 2004 Adjust the Watchdog Time Getting Started 1 31 Each task contains a watchdog timer that specifies how long a task can run before triggering a major fault ATTENTION If the watchdog timer reaches a configurable preset a major fault occurs Depending on the controller fault handler the controller might shut down e A watchdog time
344. n another string e When the two strings are sorted as in a telephone directory the order of the strings determines which one is greater Steps ASCII Characters Hex Codes Jab 31 61 62 L a ft 31862 B r 4 S e A 4 s a AB 41 42 e t i f B 42 r a 61 Y ab 61 62 1 Enter a rung and a compare instruction AB lt B ee a gt B Enter this instruction To see if the string is equal to specific characters FOU not equal to specific characters NEQ greater than specific characters GRT equal to or greater than specific characters GEQ less than specific characters LES LEQ equal to or less than specific characters Process ASCII Characters 13 11 QU Equal Source Source B 4 42808 2 Enter the tag that stores the part of the bar code that you want to check The Destination from Extract a Part of a Bar Code step 6 3 Enter a tag name to store the characters that you want to test against Define the data type as a string 4 Double click value area of Source B E String Browser 7 5 Type the ASCII characters to test against and choose OK bl Position 0 Count 0 of 82 Enos gt gt 42615 6 Enter the required output EXAMPLE When bag_flt_and_dest is equal to gate 1 xfer 1 turns on This routes the bag to the required gate EQU xfer 1 Equal Source baq_fit_and_dest
345. n provides a minimum set of functionality that can be extended to meet end user application needs The downside of this approach is that each programmable control system vendor may implement different components of the specification or provide different extensions The preemptive multitasking operating system OS of Logix5000 controllers complies with the IEC61131 3 definition In IEC61131 3 the programmable controllers OS can contain zero or more tasks that can execute one or more programs each containing one or more functions or routines According to IEC61131 3 the number of each of these components is implementation dependent Logix5000 controllers provide multiple tasks each containing multiple programs and an unlimited number of functions or routines IEC61131 3 provides an option for creating different task execution classifications Tasks may be configured as continuous periodic or event based A continuous task does not need to be scheduled in that it will utilize any left over processing time when other tasks are dormant Periodic tasks are scheduled to operate based on a reoccurring time period The IEC61131 3 specification does not specify a time base for periodic task configuration An IEC61131 3 event based task is triggered upon detection of the rising edge of a configured input Logix5000 controllers support both continuous and periodic tasks Additionally the period for a periodic task is configurable starting as low as 1 m
346. n to Use this Procedures ayaiic acts SiG ROHR Ss 13 1 How to Use this Procedure y 62 4 lal hoe 65 ohn Bak 13 1 Extract a Part of a Bar Code 5 2444 4 eho oo oe es 13 2 Look Up a Bar Gode vc by usta sade ee eee Me RS 13 4 Create the PRODUCT_INFO Data Type 13 5 Search for the Characters 0 0 0 0 000 cece eee 13 6 Identify the Lane Number ouaaa ws Sag Ale cbe ca ae ws 13 8 Reject bad Characters o mii fai ee one IG SATE aK a 13 9 Enter the Product IDs and Lane Numbers 13 9 Check the Bar Code Characters v6 4 po rey tke hoe ad 13 10 Convert Value sy go cet cyst pace oh wad eR aR Mae ea ete 13 12 Decode an ASCII Message ary g23 eke eer eea eS 13 14 Build a SURI 5 he meteng cy ected dete bb ae die G8 eee ade dh Beans 13 18 Chapter 14 When to Use This Procedure 0 000 0000005 14 1 How to Use This Procedtter s 04 sor eee GN ELE 14 1 Precautions nassau enaa a he oad eee Wy BUG ese ae Bedok 14 2 Enable Forces tia 5 Fae 4 nck Se ad cane de Ue go ge 14 2 Disable or Remove a Force 0 00000 0ue 14 3 Handle a Major Fault Table of Contents ix Check Force Status nonoa bagiedamh ah 8a Re bAS nese aes Bohne 14 4 CDi PO OMOAL 2a sie alk vents ne ote Diode dk gees op evita we OR 14 4 FORGE LEDS cock igo baie da ete ka alae ad 14 5 GSV Instruccion erea 2S ee 4h t 25s Sosa te See Ses 14 5 Whatto Forcen atie hatte et et Boh ited Rete eee 14 6 When to Use an I O Force se jsd be Epo anaa
347. n with the module owner i e not listen only if it loses communication with the other conitroll r Use the same configuration as the other owner controller stop communication with the module if it listen only loses communication with the other controller output module does not own the module owner i e not listen only p pe listen only owns the module There is a noted difference in controlling input modules versus controlling output modules This ownership Controlling input modules owner Description An input module is configured by a controller that establishes a connection as an owner This configuring controller is the first controller to establish an owner connection Once an input module has been configured and owned by a controller other controllers can establish owner connections to that module This allows additional owners to continue to receive multicast data if the original owner controller breaks its connection to the module All other additional owners must have the identical configuration data and identical communications format that the original owner controller has otherwise the connection attempt is rejected listen only Once an input module has been configured and owned by a controller other controllers can establish a listen only connection to that module These controllers can receive multicast data while another controller owns the module If all owner
348. n2 expressionl amp If photoeye and photoeye2 are BOOL tags openis a BOOL tag and your specification says If photoeyel and photoeyeZ are both on set open to true open photoeyel amp photoeye2 Publication 1756 PM001G EN P March 2004 7 10 Program Structured Text Use bitwise operators Bitwise operators manipulate the bits within a value based on two values For Use this operator Optimal Data Type bitwise AND amp AND DINT bitwise OR OR DINT bitwise exclusive OR XOR DINT bitwise complement NOT DINT For example Use this format Example For this situation You d write valuel operator value2 If input input2 and result are DINT tags and your result1 input1 AND specification says Calculate the bitwise result of input2 input and input2 Store the result in resu t Determine the order of execution The operations you write into an expression are performed in a prescribed order not necessarily from left to right e Operations of equal order are performed from left to right e If an expression contains multiple operators or functions group the conditions in parenthesis This ensures the correct order of execution and makes it easier to read the expression Order Operation 1 function KK negate NOT MOD subtract lt lt gt gt lt gt gt co co S s a
349. ne if any of the programs detect an unsafe condition the entire line must shut down The shutdown procedure is the same regardless of the unsafe condition EVENT instruction The triggers that you can use for an event task varies depending on your type of Logix5000 controller Tene RSLogix 5000 software may let you configure a trigger for an event task that your controller does not support The project will verify and successfully download but the event task will not execute Table 4 1 Use the following table to determine which Logix5000 controllers support each type of event trigger If you have this Then you can use these event task triggers Controller Module Input Consumed Tag Axis Registration Axis Watch Motion Group EVENT Data State lor2 Execution instruction Change CompactLogix Y Y FlexLogix Y Vv ControlLogix Y Y Y Y Y Y DriveLogix Y Y Y Y Vv SoftLogix5800 vl Vv Y Y Y Y 1 Requires a 1756 I O module or a virtual backplane 2 A SoftLogix5800 controller produces and consumes tags only over a ControlNet network Publication 1756 PM001G EN P March 2004 4 22 Manage Multiple Tasks Using the Module Input To an event task P on data from an input module use the Module Input Data State Change trigger Data State Change Trigger TREC Properties Task_1 General Configuration Program Schedule Monitor Let an event trigger this task Type JE vent Let
350. ng the format Operand step_name 40 3a SFC Step Flag general form Step backing tag 40 4 Step elapsed time general form Step backing tag 41 1 Transition using ST 41 5 Transition textual form Import export with different formatting 41 7 Transition Name Transition Backing Tag 41 7a Transition Set by LD Transition Backing Tag 41 7b Transition Set by FBD Transition Backing Tag 41 7d Transition Set by ST Transition Backing Tag 42 1 Action Boolean Action Backing tag 42 3s Action textual representation Import export 43 1 Step Action association 43 2 Step with Concatenated Actions 43 3 Textual Step body Import export with different formatting 43 4 Action Body Field Embedded ST 44 1 Action Block Qualifier 44 2 Action Block Name 44 3 Action Indicator Tag Extended this to support DINT INT SINT or REAL in addition to BOOL 44 5 Action using ST Supports both embedded ST and JSR to ST routine 44 6 Action using LD Using JSR to LD routine 44 Action using FBD Using JSR to FBD Routine 45 1 Action Qualifier None Default is N when none is explicitly entered 45 2 Action Qualifier N Non stored 45 3 Action Qualifier R Reset 45 4 Action Qualifier S Set Stored 45 5 Action Qualifier L Time Limited 45 6 Action Qualifier D Time Delayed 45 7 Action Qualifier P Pulse 45 8 Action Qualifier SD Stored and Time Delayed 45 9 Action Qualifier DS Delayed and Stored 45 10 Action Qualifier SL Stored and time limited 45 11 Act
351. ng value set the number of unconnected buffers equal to the number of unconnected and uncached messages enabled at one time plus approximately 5 The additional 5 buffers provides a cushion in case you underestimate the number of messages that are enabled at one time To change the number of unconnected buffers of the controller configure a Message MSG instruction as follows On this tab For this item Type or select Configuration Message Type CIP Generic Service Type Custom Service Code 4 Class 304 Instance 1 Attribute 0 Source Element source array where data type SINT 8 In this element Enter source array 0 1 source array l 0 source array 2 17 source_array 3 0 source array 5 0 source array 6 0 source array 0 Source Length bytes 8 Write 8 SINTs Destination destination array where data type SINT 6 Leave all the values 0 Communication Path 1 slot_number_of_controller Publication 1756 PM001G EN P March 2004 Communicate with Other Devices 10 27 EXAMPLE Set the Number of Unconnected Buffers If S FS 1 first scan then set the number of unconnected buffers for the controller Source_Array 0 1 Source_Array 1 0 Source_Array 2 17 Source_Array 3 0 Source_Array 4 12 The number of unconnected buffers that you want In this example we want 12 buffers If UCB_Set EN 0 MSG instruction is not already enabled then MSG instruction sets the
352. ns on Publication 1756 PM001G EN P March 2004 5 30 Design a Sequential Function Chart Description 4 Step becomes active X bit turns on Timer clears and then begins to increment AlarmLow stays on You have to manually turn it off 5 Timer reaches the LimitHigh value of the step AlarmHigh bit turns on Timer continues to increment 6 Step becomes inactive X bit turns off Timer retains its value AlarmHigh stays on You have to manually turn it off Here is an example of the use of the Preset time of a step EXAMPLE Functional specification says a Cook the ingredients in the tank for 20 seconds b Empty the tank Solution Cook Cook PRE 20000 ms Cook_Done Cook DN on 1 Empty_Tank Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 31 Here is an example of the use of the high alarm of a step EXAMPLE Functional specification says a Home 8 devices b If all 8 devices are not home within 20 seconds then shutdown the system Solution Init Init LimitHigh 20000 ms Init_OK _ Init_Not_OK jnit AlarmHigh Step_1 Shutdown Publication 1756 PM001G EN P March 2004 5 32 Design a Sequential Function Chart Turn Off a Device atthe End When the SFC leaves a step you have several options on how to turn ofa Step off devices
353. nsumer waits until it receives the value 999 before it copies the packet to the array This guarantees that the consumer has new data NEQ EQU MOV Not Equal Equal Move Source A array_ack 0 Source A array_ack 1 Source 999 0 o Source B array_packet 123 Source B 999 Dest array_packet 124 0 0 Publication 1756 PM001G EN P March 2004 11 4 Produce a Large Array When the offset value in array_ack O is equal to the current offset value the consumer has copied the packet to the array so the rung checks for more data to transfer If the offset value plus 123 is less than the size of the array there is more data to transfer so the rung increases the offset by 123 Otherwise there is no more data to transfer so the rung resets the offset value logs the transfer time and resets the timer In either case the rung uses the new offset value to create a new packet of data appends the new offset value to the packet and clears the acknowledge element of the packet packet 124 EQU Equal Source A array_ack 0 0 Source B array packet 123 0 CMP Compare Expression array_ack 0 123 lt array_size CMP Compare Expression array_ack 0 123 gt array_size ADD Add Source A array_packet 123 0 Source B 123 Dest array offset 0 CLR Clear Dest array _offset 0
354. nts Tocethien 6500 03 Hosea ate eae Oke 9 21 Mark a Wire with the Assume Data Available Indicator 9 21 ASSO A LAG 840s 8 Yt hp a Gas Hades EPH AE n be ha Bh 9 22 Create and Assign a New Tag 4s etek sa oa eas 9 22 Rename the Tag of a Function Block 9 23 Assign an Existing LAG sg oa heh PORE EO POT ES OS 9 23 Assign an Immediate Value Constant 9 24 Use AR IREF ou tedd nona we Wet Adah he oP Goa eee ee Ae 9 24 Enter a Value in the Tag of a Block v2 02 esa e4e x8 443 9 24 Connect Blocks with an OCON and ICON 9 25 Add a OCON ace eet ridin Binh Re ERG Pad sea e ha 9 25 Add an ICON is rar SG Seah has eee E RA 9 25 Verily THeSROUNNE seegras ote eee ta boot e Ray Oe weak 9 26 Chapter 10 Using This Chapler gt hu t p aie cel bie amp demand od eed 10 1 CONNECHONS Wt de hiur aye Maes eter Ae thts Geshe tt Geek Mee ee Ae 10 1 Inhibit a Connection lt a kyavs 58 Ge Dace Bek PEG ESS 10 2 Manage a Connection Failure naaa anaua 10 5 Produce and Consume a Tage halo dh GP we Bcc Be ES 10 9 Controllers and Networks that Support Produced Consumed BOS eg Bie 8G eB Ge Oey eed tested haat gh ge neat ge tied 10 10 Connection Requirements of a Produced or Consumed Tag 10 10 Organize Tags for Produced or Consumed Data 10 12 Adjust for Bandwidth Limitations 10 13 Produce a TAG coated fee hee ie Ore Ak S ae 10 14 Consume Data That Is Produced by Another Controller 10 15
355. nvert TOD instruction in LD 23 1 Absolute value ABS instruction 23 2 Square root SOR instruction in LD and FBD and SQRT function in ST 23 3 Natural log LN instruction 23 4 Log base 10 LOG instruction 23 6 Sine in radians SIN instruction function 23 7 Cosine in radians COS instruction function 23 8 Tangent in radians TAN instruction function 23 9 Principal arc sine ASN instruction in LD and FBD and ASIN function in ST 23 10 Principal arc cosine ACS instruction in LD and FBD and ACOS function in ST 23 11 Principal arc tangent ATN instruction in LD and FBD and ATAN function in ST 24 12 Arithmetic add ADD instruction in LD and FBD and in ST 24 13 Arithmetic multiplication MUL instruction in LD and FBD and in ST 24 14 Arithmetic subtraction SUB instruction in LD and FBD and in ST 24 15 Arithmetic divide DIV instruction in LD and FBD and in ST 24 16 Modulo MOD instruction LD and ST 24 17 Exponentiation XPY instruction in LD and FBD and in ST 24 18 Value move MOV instruction in LD and in ST 25 Bit shift left Functionality contained in BSL instruction in LD for shift of 1 25 2 Bit shift right Functionality contained in BSR instruction in LD for shift of 1 25 3 Bit rotate left Functionality contained in BSL instruction in LD for shift of 1 25 4 Bit rotate right Functionality contained in BSR instruction in LD for shift of 1 26 5 AND BAND instruction in FBD and amp operator in ST 26 6 OR BOR
356. o use of information circuits equipment or software described in this manual Throughout this manual 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 e identify a hazard e avoid a hazard e recognize the consequence TAATAAN Labels may be located on or inside the drive to alert people that dangerous voltage may be present BURN HAZARD Labels may be located on or inside the drive to alert people that surfaces may be dangerous temperatures Introduction Updated Information Summary of Changes This release of this document contains new and updated information To find new and updated information look for change bars as shown next to this paragraph The document contains the following changes Section Change Page Describe a User Defined Data Type Use the pass through of descriptions to reduce the time it takes to 3 21 document a project Prioritize Periodic and Event Tasks Corrections to th
357. o a task When a task is triggered the scheduled programs within the task execute to completion from first to last When a task executes a program the main routine of the program executes first The main routine can in turn execute subroutines using the JSR instruction e The Unscheduled Programs folder contains programs that aren t assigned to a task e If the logic in the program produces a major fault execution jumps to a configured fault routine for the program e The routines within a program can access the following tags program tags of the program controller tags e Routines cannot access the program tags of other programs See routine task program scope Data accessible only within the current program Each program contains a collection of tags that can only be referenced by the routines and alias tags in that program See controller scope project The file on your workstation or server that stores the logic configuration data and documentation for a controller e The project file has an ACD extension e When you create a project file the file name is the name of the controller e The controller name is independent of the project file name If you save a current project file as another name the controller name is unchanged e If the name of the controller is different than the name of the project file the title bar of the RSLogix 5000 software displays both names See app
358. o connecting steps in sequences simultaneous branches and selection branches you can connect a step to a previous point in your SFC This lets you e loop back and repeat steps e return to the beginning of the SFC and start over For example y go to this step If this condition is true simple loop that repeats the path of a selection branch that returns to a entire SFC previous step Publication 1756 PM001G EN P March 2004 5 18 Design a Sequential Function Chart Add Actions for Each Step Publication 1756 PM001G EN P March 2004 Use actions to divide a step into the different functions that the step performs such as commanding a motor setting the state of a valve or placing a group of devices in a specific mode Step Actions Do this MIX and do this How Do You Want to Use the Action There are two types of actions If you want to Then execute structured text directly in the SFC Use a Non Boolean Action call a subroutine use the automatic reset option to reset data upon leaving a step only set a bit and program other logic to monitor the bit to Use a Boolean Action determine when to execute Use a Non Boolean Action A non boolean action contains the logic for the action It uses structured text to execute assignments and instructions or call a su
359. o rename the tag of the step L step_name LJ 1 Click the button of the step General Action Order Tag 3 gt Name 3 Type the new name for the step tag 4 Choose 2 Click the Tag tab Configure a Step To configure a step you have these options e Assign the Preset Time for a Step e Configure Alarms for a Step e Use an Expression to Calculate a Time Assign the Preset Time for a Step 1 Click the button of the step O m lt step_name UJ Preset A 4 ms Use Expression Defne 2 Type the time for the step in milliseconds 3 Choose When the step is active for the preset time Timer Preset the DN bit of the step turns on To calculate the preset time for a step at runtime see Use an Expression to Calculate a Time on page 6 12 Publication 1756 PM001G EN P March 2004 6 12 Program a Sequential Function Chart O E a step_name UJ Configure Alarms for a Step To turn on an alarm if a step executes too long or not long enough 1 Click the button of the step 2 Check the AlarmEnable check box 2 Alarming y O AlarmHigh V AlarmEnable AlarmLow 3 LimitHigh ms Use Expression Defne 4 LimitLow ms Use Expression Seizes 3 Type the time for the high alarm in milliseconds 4 Type the time for the low alarm in milliseconds 5 Choose To calculate the time for an alarm at
360. o turn off at the end of a step To turn off a device at the end of a step 1 Make sure that the Last Scan of Active Steps property is set to the Don t scan option default Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 35 2 Use a PO Pulse Falling Edge action to clear the required data Make sure that the PO action or actions are last in the order of actions for the step During the last scan of the step the Don t scan option executes only P and PO actions The assignments and instructions of the actions execute according to their logic conditions e The controller does not execute a postscan of assignments or instructions e When the SFC leaves the step all data keeps its current values The following example uses an action to turn on a conveyor at the start of a step A different action turns off the conveyor at the end of the step EXAMPLE Use the Don t Scan Option a This action turns on the conveyor When conveyor_state turns lt q ren Ej N La conveyor_start on the conveyor turns on conveyor state 1 conveyor_fwd PO _ conveyor_stop Before the SFC leaves the step the PO action turns off the conveyor state 0 conveyor On the last scan of the step conveyor_state turns off This turns off the conveyor Use the Programmatic Reset Option An optional method to programmatically turn off clear devices at the end of a step is to execute
361. ocal 1756 IB16 2 1 Type 1756 IB16 16 Point 10 31 2 DC Inpu Vendor Allen Bradley Parent Local Name a Description A direct connection is any connection zi that does not use the Rack Optimization Comm Format t Comm Format Input Data See rack optimized connection disable keying An electronic keying protection mode that requires no attributes of the physical module and the module configured in the software to match and still establishes a connection to the module See compatible module exact match download The process of transferring the contents of a project on the workstation into the controller See upload elapsed time The total time required for the execution of all operations configured within a single task e If the controller is configured to run multiple tasks elapsed time includes any time used shared by other tasks performing other operations e While online you can use the Task Properties dialog box to view the maximum scan time and the last scan time in ms for the current task These values are elapsed time which includes any time spent waiting for higher priority tasks Publication 1756 PM001G EN P March 2004 Glossary Publication 1756 P M001G EN P March 2004 14 See execution time electronic keying A feature of the 1756 I O line where modules can be requested to perform an electronic check to insure that the physical module is consistent with what was configur
362. oller properties Major Fault tab and the module properties Connection tab for more information about the fault 3 20 Possible problem with the ControlBus chassis Not recoverable replace the chassis 3 23 At least one required connection was not Wait for the controller 1 0 light to turn green before changing to established before going to Run mode Run mode 4 16 Unknown instruction encountered Remove the unknown instruction This probably happened due to a program conversion process 4 20 Array subscript too big control structure POS Adjust the value to be within the valid range Don t exceed the or LEN is invalid array size or go beyond dimensions defined 4 21 Control structure LEN or POS lt 0 Adjust the value so it is gt 0 4 31 The parameters of the JSR instruction do not Pass the appropriate number of parameters If too many match those of the associated SBR or RET parameters are passed the extra ones are ignored without any instruction error 4 34 A timer instruction has a negative preset or Fix the program to not load a negative value into timer preset or accumulated value accumulated value 4 42 JMP to a label that did not exist or was Correct the JMP target or add the missing label deleted Publication 1756 PM001G EN P March 2004 15 16 Handle a Major Fault Table 15 1 Major Fault Types and Codes Continued Type Code Cause Recovery Method 4 82
363. on e In the MAW instruction the Trigger Condition operand defines the direction in which the axis must be moving to trigger the event task e Once the axis reaches the watch position and triggers the event task you have to re arm the axis for the next watch position The following timing diagram shows the relationship between the watch position and the event task watch point l l axis position l event task a A l Publication 1756 PM001G EN P March 2004 For this Manage Multiple Tasks 4 39 Checklist for an Axis Watch Task Make sure you Q 1 Watch position Use a MAW instruction to set up a watch position This lets the axis trigger the event task when it reaches the watch position e Initially arm the axis to detect the first watch position e Once the axis reaches the watch position and triggers the event task re arm the axis for the next watch position e Re arm the axis fast enough to detect each watch position If your normal logic is Then fast enough to re arm the axis between Arm the axis within your normal intervals of the watch position logic if desired E g Your normal logic always completes at least 2 scans between watch positions not fast enough to re arm the axis Arm the axis within the event task m 2 Task priority Configure the event task as the highest priority task If a periodic task has a higher priority the event task may have to wait until
364. on 25 uses the data produced by station 24 To determine when new data has arrived the controller uses an event task Event Task Properties fal Task Properties Event_Task General Configuration Program Schedule Monitor Let an event trigger this task Type JE vent Let a consumed tag trigger the task gt Trigger Consumed Tag 7 Let this consumed tag trigger the task p Tag Consumed_Tag_1 Il Execute Task If No Event Occurs within fi 000 000 ms Priority fi Lower Number Yields Higher Priority Ladder Logic in the Event Task When the event task executes the CPS instruction sets Destination_Tag_1 Consumed _Tag_1 the values from the producing controller The remaining logic in this controller uses the values from Destination_Tag_1 PS Synchronous Copy File Source Consumed_Tag_1 Dest Destination_Tag_ Length 1 Publication 1756 PM001G EN P March 2004 4 50 Manage Multiple Tasks Using the EVENT To trigger an event task based on conditions in your logic use the EVENT Instruction Only trigger Instruction Trigger Y trigger TREC Properties Task_1 General Configuration Program Schedule Monitor Let an event trigger this task Type Event Let an EVENT instruction trigger the task Trigger EVENT Instruction Only No tag is required Tag krne o Execute Task If No Event Occurs Within fi 000 000 ms Priority fi Lower Nu
365. on that provides the bit number e A numeric expression uses a combination of tags constants operators and functions to calculate a value For example Tag_1 Tag 2 Tag _3 4 ABS Tag 4 e Keep the value of the tag or numeric expression within the range of bits of the integer tag For example if the integer tag is a Dint 32 bits then the value of the index must be 0 to 31 32 bits Publication 1756 PM001G EN P March 2004 3 24 Organize Tags Assign Alias Tags e Both tags share the same value s An alias tag lets you create one tag that represents another tag e When the value s of one of the tags changes the other tag reflects the change as well Use aliases in the following situations e program logic in advance of wiring diagrams e assign a descriptive name to an I O device e provide a more simple name for a complex tag e use a descriptive name for an element of an array The tags window displays alias information drill_1_depth_lIimitis an alias tor Local 2 Data 3 a digital input point When the input turns on the alias tag also turns on Program Tags MainProgram Scope MainProgram Show fShow All 7 Sort Tag Name drill_1 7 Alias For drill_1_depth_limit Local 2 1 Data 3 C Locak2 Data 3 C drill_1_onis an alias for drill_1_ forward Local 0 0 Data 3 C Local 0 0 Data 3 C Local 0
366. on to one scan The EVENT instruction triggers an execution of Task_1 event task Arm watch Storage 0 F __ONS EVENT Trigger Event Task Task Task_1 Task_1 event task The GSV instruction sets Task_ Status DINT tag Status attribute for the event task In the Instance Name attribute THIS means the TASK object for the task that the instruction is in i e Jask_ 7 GSV Get System Value Class Name TASK Instance Name THIS Attribute Name Status Dest Task_Status o continued on next page Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 41 If Task_Status 0 1 then an EVENT instruction triggered the event task In the continuous task the EVENT executes to set up the watch position for the first time The JMP instruction causes the controller to jump its execution to the Arm LBL instruction This skips all the logic of the routine except the rung that arms the axis for the watch position MAW instruction Task_Status 0 Arm M e e Other logic e The MAW instruction executes each time the task executes and arms Axis_1 for the watch position The OTU instruction sets the EN bit of the MAW instruction 0 e The MAW instruction is a transitional instruction e To execute the MAW instruction its rung condition in must go from false to true e By first clearing the EN bit the instruction responds as if its rung condition in changed from false to true The MAW instruction arms
367. onential format The number is always displayed with one digit to the left of the decimal point followed by the decimal portion and then by an exponent See style faulted mode The controller generated a major fault could not clear the fault and has shut down See major fault float Real values displayed and entered in floating point format The number of digits to the left of the decimal point varies according to the magnitude of the number See style hexadecimal Integer values displayed and entered in base 16 each digit represents four bits Prefixed with 16 Padded out to length of the boolean or integer 1 8 16 or 32 bits When displayed every group of four digits is separated by an underscore for legibility See binary decimal octal immediate value An actual 32 bit signed real or integer value Not a tag that stores a value index A reference used to specify an element within an array Publication 1756 PM001G EN P March 2004 Glossary 16 instruction The controller evaluates ladder instructions based on the rung condition preceding the instruction rung condition in input instruction output instruction l Lo G 3 rung condition in rung condition out Only input instructions affect the rung condition in of subsequent instructions on the rung e If the rung condition in to an input instruction is true the controller evaluates the instruction and sets the rung condition
368. onfiguration Communication Tag Path Browse m eommnancatan Method Cc ir Cc Dirk Branne bt Destinatan Lint r a c IP shin Source Lint Ex Desthation Wode r Jv Gonnected I Cache Connections e 43054 Clear the Cache Connection check box On this tab Type or select If you want to For this item Configuration read receive data from the Message Type the read type that corresponds to the other controllers other controllers Source Element tag or address that contains the data in the first controller Number Of Elements 1 Destination Tag local_array Index 0 write send data to the other Message Type the write type that corresponds to other controllers controllers Fe Source Tag local_array Index 0 Number Of Elements 1 Destination Element tag or address that contains the data in the first controller Communication Path path to the first controller Cache Connections Clear the Cache Connection check box Since this procedure continuously changes the path of the message it is more efficient to clear this check box Publication 1756 PM001G EN P March 2004 Send a Message to Multiple Controllers B 11 Step to the Next Controller message DN Add Source Add Source 1 Source B index Source B message Locallndex Oe Dest Dest message Locallndex 0e 43051 After the
369. only connection path The path describes the route that a message takes to get to the destination If the I O configuration of the controller contains the destination device use the Browse button to select the device This automatically defines the path Message Path Browser peer_controller peer_controller 1 0 Configuration 0 1756 CNB x Local_CNB 2 0 1756 CNB x chassis_b 1 1756 L55 x peer_controller lt q Message Configuration Message_1 Configuration Communication Tag Path peer_controller Browse Publication 1756 PM001G EN P March 2004 Glossary 28 If the I O configuration does not contain the destination device then type the path to the destination using the following format port address port address Where For this Is port backplane from any 1756 controller or module 1 DF1 port from a Logix5000 controller 2 ControlNet port from a 1756 CNB module Ethernet port from a 1756 ENBx or ENET module DH port over channel A from a 1756 DHRIO module DH port over channel B from a 1756 DHRIO module 3 address ControlLogix backplane slot number DF1 network station address 0 254 ControlNet network node number 1 99 decimal DH network 8 followed by the node number 1 77 octal For example to specify the octal node address of 37 type 8 37 EtherNet IP net
370. ontroller When the consumer controller receives all the data it executes its event task Although the producing controller executes the IOT instruction immediately after it loads new data the event task is not triggered Gin the consuming controller until the consuming controller has received all the new data This ensures that the controller operates on a complete packet of new data Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 45 Synchronize Multiple Controllers You can also use the produced consumed tag relationship to synchronize controllers In this case the produced consumed tag serves only as a triggering mechanism logic execution in the producing controller IOT instruction in the producing controller event task in the consuming controller A event task in the consuming controller B Qe D Description O The first controller executes an action with which other controllers need to stay synchronized When the action is done the controller executes an IOT instruction The IOT instruction uses a produced tag as its target When controller A receives the produced tag it executes its event task ORES When controller B receives the produced tag it executes its event task Publication 1756 PM001G EN P March 2004 4 46 Manage Multiple Tasks Checklist for the Producer Controller For this Make sure you QO 1 Buffer of data If you want to send a
371. ontroller on page 10 15 In either the Controller Tags folder or the tags folder of the program that will contain the logic for the transfer create the following tags Tag Name Type array DINT x where x equals the number of elements to transfer plus 122 elements array_offset DINT where array is the name for the data that you are sending Create or open a routine for the logic that will move the data from the packets to the destination array Publication 1756 PM001G EN P March 2004 11 6 Produce a Large Array 13 Enter the following logic When the offset value in array_packet 123 is different than the offset value in array_ack O the controller has begun to receive a new packet of data so the rung checks for the value of 999 in the last element of the packet If the last element of the packet equals 999 the controller has received an entire packet of new data and begins the copy operation e The offset value moves from the packet to array_offset e The COP instructions copies the data from the packet to the destination array starting at the offset value e The offset value moves to array_ack O which signals that the copy is complete e Array_ack 1 resets to zero and waits to signal the arrival of a new packet If the last element of the packet is not equal 999 the transfer of the packet to the controller may not be complete so 999 moves to array_ack 1 This signals the producer to return the value o
372. ontroller example A Controller Tags 3 Controller Fault Handler CI Power Up Handler lt q Tasks Ea MainTask 3 63 MainProgram A Program Tags MainRoutine 42195 Publication 1756 PM001G EN P March 2004 Glossary 31 The Power Up Handler executes as follows Did the controller power up No Controller stays in the in Run mode m current mode y Yes Does the Power Up Handler No Controller stays in Run contain a program mode and executes its logic y Yes Major fault type 1 code 1 occurs Power Up Handler program executes Is the major fault cleared Yes Controller stays in Run mode and executes its logic y Controller enters the faulted mode produced tag A tag that a controller is making available for use by other controllers Produced tags are always at controller scope See consumed tag product defined structure A structure data type that is automatically defined by the software and controller By configuring an I O module you add the product defined structure for that module Publication 1756 PM001G EN P March 2004 Glossary 32 program A set of related routines and tags e Each program contains program tags a main executable routine other routines and an optional fault routine e To execute the routines in a program you assign schedule the program t
373. oose lt Store A dialog box asks you to confirm the store 5 To store the project choose Yes During the store the following events occur e On the front of the controller the OK LED displays the following sequence flashing green gt red gt green e RSLogix 5000 software goes offline e A dialog box tells you that the store is in progress 6 Choose OK When the store is finished you remain offline If you want to be online you must manually go online Publication 1756 PM001G EN P March 2004 17 18 Store and Load a Project Using Nonvolatile Memory Use a CompactFlash Reader Publication 1756 PM001G EN P March 2004 If the revision of the project or projects on your CompactFlash card are gt 12 0 then the card is formatted using the FAT16 file system e Typically you do not have to manage the files on a CompactFlash card The card automatically loads the project that you most recently stored e For additional flexibility the file system also lets you Manually Change Which Project Loads from the CompactFlash Card Manually Change the Load Parameters for a Project Store and Load a Project Using Nonvolatile Memory 17 19 Manually Change Which Project Loads from the CompactFlash Card A CompactFlash card stores multiple projects By default the controller loads the project that you most recently stored according to the load options of that project To assign a different project
374. or Execution Control tran_1 tran_2 executes like this Execute current active steps only step_1 c at return to talse true return to step_1 step_2 1 return to true D false return to step_2 Design a Sequential Function Chart 5 55 Execute until FALSE transition step_1 e D false TPO true step_1 last scan step_2 e D faise return to true step_2 last scan Publication 1756 PM001G EN P March 2004 5 56 Design a Sequential Function Chart Notes Publication 1756 PM001G EN P March 2004 When to Use This Procedure Before You Use This Procedure Chapter 6 Program a Sequential Function Chart Use this procedure to enter a sequential function chart SFC into RSLogix 5000 software Enter the SFC as you design it Or first design the SFC and then enter it To design the SFC see Design a Sequential Function Chart on page 5 1 Before you use this procedure make sure you are able to perform the following tasks J Navigate the Controller Organizer Identify the Programming Languages That Are Installed S For more information on any of those tasks see Getting Started on page 1 1 Publication 1756 PM001G EN P March 2004 6 2 Program a Sequential Function Ch
375. or a subroutine of the program enter the following rung JSR Jump to Subroutine Routine name 444 bbb where is the aaa tag that you will use to initiate the fault Step 1 bbb fault routine of the program 3 To simulate a fault set the input condition EXAMPLE Test a fault routine When test_fault_routine is on a major fault occurs and the controller executes Fault_Routine JSR Jump to Subroutine Routine name Fault_Routine test_fault_routine Publication 1756 PM001G EN P March 2004 Create a User Defined Major Fault Handle a Major Fault 15 13 If you want to suspend shut down the controller based on conditions in your application create a user defined major fault With a user defined major fault e The fault type 4 e You define a value for the fault code Choose a value between 990 to 999 These codes are reserved for user defined faults e The controller handles the fault the same as other major faults The controller changes to the faulted mode major fault and stops executing the logic Outputs are set to their configured state or value for faulted mode EXAMPLE User defined major fault When Tag_1 0 1 produce a major fault and generate a fault code of 999 To create a user defined major fault Create a Fault Routine for the Program Configure the Program to Use the Fault Routine Jump to the Fault Routine Cre
376. or more information use either of the following resources e In RSLogix 5000 software from the Help menu choose Instruction Help Look in the Program Control Instructions category e See Logix5000 Controllers General Instructions Reference Manual publication 1756 RM003 The following diagrams show the execution of an SFC with different organizations of steps or different selections of execution options Use the diagrams if you require a more detailed understanding of how your SFC executes For a diagram of the See page Execution of a Sequence 5 52 Execution of a Simultaneous Branch 5 53 Execution of a Selection Branch 5 54 When parameters enter and exit an SFC 5 54 Options for Execution Control 5 55 Publication 1756 PM001G EN P March 2004 5 52 Design a Sequential Function Chart Figure 5 5 Execution of a Sequence This executes like this step_1 step_1 qe tran_1 step_2 faise return to tran_2 true return to step_1 last scan step 2 lt _____ a return to faise 4 true return to step_2 last scan Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 53 Figure 5 6 Execution of a Simultaneous Branch
377. ou have these options Create and Assign a New Tag Choose a Name or an Existing Tag Drag a Tag From the Tags Window Assign an Immediate Constant Value Create and Assign a New Tag 9 1 Click the operand area of the instruction E 2 Type a name for the tag and press Enter 3 Right click the tag name and choose New tag_name 4 Data Type Bi Scope MainProgram 4 Click the button fontgure Publication 1756 PM001G EN P March 2004 8 12 Program Ladder Logic Dinh BiA 5 Select the data type for the tag 6 If you want to define the tag as an array type the number of elements in each dimension 8 Choose the scope for the tag 9 Choose EE Publication 1756 PM001G EN P March 2004 Equal Source Source B Program Ladder Logic 8 13 Choose a Name or an Existing Tag 9 1 Double click the operand area LE A text entry box opens 2 Click the V 3 Select the name To select a Do this label routine name or Click the name similar type of name tag Double click the tag name bit number A Click the tag name B To the right of the tag name click M C Click the required bit 4 Press Enter or click a different spot on the diagram Drag a Tag From the Tags Window 1 Find the tag in the Tags window 2 Click the tag two or three times until it highlights 3 Drag the tag to its lo
378. ource key can still view the routine none of the above e No source key is assigned to the routine e You have full access to the routine IMPORTANT If the source of a routine is unavailable do not export the project e An export file L5K contains only routines where the source code is available e If you export a project where the source code is not available for all routines you will not be able to restore the entire project Publication 1756 PM001G EN P March 2004 Secure a Project 18 3 To assign and manage source keys perform the following actions Choose the Level of Protection for Each Routine Choose the Number of Source Keys Define the Source Key or Keys Choose a File Location in Which to Store the Source Keys Activate the RSLogix 5000 Source Protection Feature Create a File for the Source Keys Protect a Routine with a Source Key Limit access to the protected No routines from this computer Yes Use this computer to protect other Yes routines No Disable Routine Source Protection Remove Access to a Protected Routine C done Optional Gain Access to a Protected Routine from this computer Publication 1756 PM001G EN P March 2004 18 4 Secure a Project Table 18 1 Routine Protection Options Choose the Level of Protection for Each Routine Sou
379. ous branch of a sequential function chart Add an SFC Force When to Use an 0 Force Use an I O force to accomplish the following e override an input value from another controller G e a consumed tag e override an input value from an input device e override your logic and specify an output value for another controller G e a produced tag e override your logic and specify the state of an output device MASIA Forcing increases logic execution time The more logic values you force the longer it takes to execute the IMPORTANT I O forces are held by the controller and not by the programming workstation Forces remain even if the programming workstation is disconnected When you force an I O value e You can force all I O data except for configuration data e If the tag is an array or structure such as an I O tag force a BOOL SINT INT DINT or REAL element or member e If the data value is a SINT INT or DINT you can force the entire value or you can force individual bits within the value Individual bits can have a force status of no force force on force off Publication 1756 PM001G EN P March 2004 Force Logic Elements 14 7 e You can also force an alias to an I O structure member produced tag or consumed tag An alias tag shares the same data value as its base tag so forcing an alias tag also forces the associated base tag Removing a force from an alias tag remov
380. out the action Access this information via either the Design a Sequential Function Chart 5 21 Action Properties dialog box or the Monitor Tags tab of the Tags window If you want to Thencheck orset Datatype Details this member determine when the action is Q BOOL The status of the Q bit depends on whether the action is a boolean active action or non boolean action If the action is Then the Q bit is boolean on 1 the entire time the action is active including the last scan of the action non boolean on 1 while the action is active but off 0 at the last scan of the action To use a bit to determine when an action is active use the Q bit A BOOL The A bit is on the entire time the action is active determine how long an action T DINT When an action becomes active the Timer T value resets and has been active milliseconds then starts to count up in milliseconds The timer continues to count up until the action goes inactive regardless of the Preset PRE value use one of these time based PRE DINT Enter the time limit or delay in the Preset PRE member The qualifiers L SL D DS SD action starts or stops when the Timer T reaches the Preset value As an option enter a numeric expression that calculates the time at runtime determine how many times an Count DINT This is nota count of scans of the action action has become active e The count increments each time the action becomes active
381. out to match the results of the evaluation If the instruction evaluates to true the rung condition out is true If the instruction evaluates to false the rung condition out is false e An output instruction does not change the rung condition out If the rung condition in to an output instruction is true the rung condition out is set to true If the rung condition in to an output instruction is false the rung condition out is set to false In Logix5000 controllers you can enter multiple output instructions per rung of logic You can enter the output instructions e in sequence on the rung serial e between input instructions as long as the last instruction on the rung is an output instruction Publication 1756 P M001G EN P March 2004 Glossary 17 The following example uses more than one output on a rung EXAMPLE Place multiple outputs on a rung When running_seconds DN turns on running_hours counts up by one and running_seconds resets running seconds DN 15 aay CTU running seconds Count Up CUD CRES gt Counter running hours ON Preset 500 Accum 0 When machine_on turns on turns on drill_1_on When both machine_on and drill 1 part_advance are on turns on conveyor_on machine on drill 1 on drill 1 part_advance ja T conveyor on fe F ee aE Se 42362 rc INT A data type that stores a 16 bit 2 byte integer value 32 7
382. outputs to the tags of a structure for a drill machine EXAMPLE ais The main routine of the program executes the following subroutines in this sequence JSR JSR JSR Jump to Subroutine Jump to Subroutine Jump to Subroutine Routine name map inputs Routine name drill Routine name map_outputs The map_inputs routine copies the values of input devices to their corresponding tags that are used in the drill routine _1791_ 8AC 1I Data 0 0 drill 1 depth limit ii oe ey Ls Set _1791_ 8AC I Data 0 4 drill 1 home_limit The drill routine executes the logic for the drill machine drill 1 part advance one shots 0 drill 1 depth limit drill 1 forward Tons Je 5 F LONS 5 CD drill 1 forward Je IE drill 1 depth_limit drill 1 home_limit drill 1 retract JE 3 E drill 1 retract TE IE The map_outputs routine copies the values of output tags in the drill routine to their corresponding output devices drill 1 forward _1791_ 8AC 0 Data 0 0 Ae GA drill 1 retract _1791 8AC 0 Data 0 1 ae o gt Ay tle XN 42369 Publication 1756 PM001G EN P March 2004 2 10 Communicate with 1 0 The following example uses the CPS instruction to copy an array of data that represent the input devices of a DeviceNet network EXAMPLE o Local 0 I Data stores the input data for the DeviceNet n
383. ow the controller converts data between data types Result The controller truncates the upper portion of the larger integer and generates an overflow For example Decimal Binary DINT 65 665 0000_0000_0000_0001_0000_0000_1000_0001 INT 129 0000_0000_1000_0001 SINT 127 1000_0001 SINT or INT to REAL No data precision is lost DINT to REAL Data precision could be lost Both data types store data in 32 bits but the REAL type uses some of its 32 bits to store the exponent value If precision is lost the controller takes it from the least significant portion of the DINT REAL to integer The controller rounds the fractional part and truncates the upper portion of the non fractional part If data is lost the controller sets the overflow status flag Numbers round as follows e Numbers other than x 5 round to the nearest number e X 5 rounds to the nearest even number For example REAL source DINT result 2 5 2 1 6 2 1 5 2 1 4 1 1 4 1 1 5 2 1 6 2 2 5 2 Publication 1756 P M001G EN P March 2004 Glossary 27 overlap A condition where a task perioidic or event is triggered while the task is still executing from the preivious trigger owner controller The controller that creates the primary configuration and communication connection to a module The owner controller writes configuration data and can establish a connection to the module See listen
384. ows Definition A task provides scheduling and priority information for a set of one or more programs When you create a new project RSLogix 5000 software automatically creates an initial task that is configured to run all the time continuous task When the task completes a full scan it restarts immediately Program Each task requires at least one program e A task can have as many as 32 separate programs each with its own program tags main routine other routines and an optional fault routine e Once a task is triggered activated all the programs assigned scheduled to the task execute in the order in which they are displayed in the controller organizer e You schedule a program in only one task and cannot share a program among multiple tasks Routine Routines provide the executable code for the project in a controller similar to a program file in a PLC or SLC controller Each routine uses a specific programming language such as ladder logic Main Routine When a program executes its main routine executes first Use the main routine to call execute other routines subroutines To call another routine within the program use a Jump to Subroutine JSR instruction Subroutine Any routine other than the main routine or fault routine To execute a subroutine use a Jump to Subroutine JSR instruction in another routine such as the main routine Publication 1756 PM001G EN P March 2004 1 6 Gett
385. pe designation 1 4a Dollar sign Used for description and string control character 1 6a Subscript delimiters Array subscripts 2 1 Identifiers using upper case and numbers Task program routine structure and tag names 2 2 Identifiers using upper case numbers and Task program routine structure and tag names embedded underlines 2 3 Identifiers using upper and lower case Task program routine structure and tag names numbers and embedded underlines 3 1 Comments ST Comments also support Comment and End of line comments 4 1 Integer literal 12 0 12 4 2 Real literal 12 5 12 5 4 3 Real literal with exponents 1 34E 12 1 234E6 4 4 Base 2 literal 2 0101_0101 4 5 Base 8 literal 8 377 4 6 Base 16 literal 16 FFEO 4 7 Boolean zero and one 0 1 5 1A Empty String Descriptions and String Editor 5 1B String of length one containing a character A Descriptions and String Editor 5 1C String of length one containing a space Descriptions and String Editor 5 1D String of length one containing a single quote Descriptions and String Editor character 5 1E String of length one containing a double quote Descriptions and String Editor character 5 1F String of length two containing CR and LF Descriptions and String Editor characters 5 1G String of length one containing the LF character Descriptions and String Editor 0A 5 1H String of length 5 which would print as 1 00 Descriptions and String Editor using 1 00
386. ponents such as routines tags and modules Follow these rules to define the name of a source key must begin with an alphabetic character A Z or a z or an underscore _ can contain only alphabetic characters numeric characters and underscores can have as many as 40 characters must not have consecutive or trailing underscore characters _ are not case sensitive Choose a File Location in Which to Store the Source Keys A source key file sk dat stores the source keys The source key file is separate from the RSLogix 5000 project files acd You can store the source key file in any folder that you choose Publication 1756 PM001G EN P March 2004 18 6 Secure a Project Activate the RSLogix 5000 Source Protection Feature To use the routine source protection feature of RSLogix 5000 software you have to make the following registry entry which activates the feature Key Value Entry Name Type Data HKEY_CURRENT_USER Software Rockwell PTCRoutine DWORD 1 Software RSLogix 5000 ProtectedRoutine To make the registry entry 1 Get your RSLogix 5000 software CD 2 From the CD execute the following file language Tools Source Protection Tool Enable Protected Routine Config reg where language is the language of your software For example for software that is in English open the ENU folder The Enable Protected Routine Config reg file makes the required registry entry Create a File for the Source
387. pply if the Load Image option is User Initiated If you want to set the Load Mode option to Then enter Program Remote Only PROGRAM Run Remote Only RUN Publication 1756 PM001G EN P March 2004 17 22 Store and Load a Project Using Nonvolatile Memory Publication 1756 PM001G EN P March 2004 Chapter 18 Secure a Project When to Use This Use this procedure to control who has access to your project To secure a project these options are available Procedure PA p If you want to Then See page Prevent others from seeing the logic within Use Routine Source 18 1 one or more routines of a project Protection Assign varying levels of access to a project Use RSI Security Server to 18 13 such as let Protect a Project e engineers have full access e maintenance personal make limited changes e operators only view logic and data You may use both options at the same time Use Routine Source To limit who has access to a routine use RSLogix 5000 software to Protection assign a source key to the routine protect the routine e To protect a routine you have to first activate the feature for RSLogix 5000 software e Once you protect a routine a computer requires the source key to edit copy or export the routine e You have the option of making a routine either viewable or not viewable without the source key e Regardless of whether or not the source key is available you can always download the project and exe
388. predefined structure A structure data type that stores related information for a specific instruction such as the TIMER structure for timer instructions Predefined structures are always available regardless of the system hardware configuration See product defined structure Publication 1756 PM001G EN P March 2004 Glossary 30 prescan Prescan is an intermediate scan during the transition to Run mode e The controller performs prescan when you change from Program mode to Run mode e The prescan examines all programs and instructions and initializes data based on the results e Some instructions execute differently during prescan than they do during the normal scan priority Specifies which task to execute first if two tasks are triggered at the same time e The task with the higher priority executes first e Priorities range from 1 15 with 1 being the highest priority e A higher priority task will interrupt any lower priority task e If two tasks with the same priority are triggered at the same time the controller switches between the tasks every millisecond postscan A function of the controller where the logic within a program is examined before disabling the program in order to reset instructions and data power up handler An optional task that executes when the controller powers up in the Run mode To use the Power Up Handler you must create a power up program and associated main routine Shen C
389. progress 3 Choose OK When the store is finished you remain offline Save the Online Project 1 Go online with the controller 2 Save the project Publication 1756 PM001G EN P March 2004 17 12 Store and Load a Project Using Nonvolatile Memory Loada Project In this task you use RSLogix 5000 software to load the project from nonvolatile memory ATTENTION During a load all active servo axes are turned off Before you load a project make sure that this will not cause any unexpected movement of an axis Steps 1 Go online with the controller 2 Did the following dialog box open Connected To Go Online x Options General Date Time Major Faults Minor Faults Nonvolatile Memory Condition The project file ACD was not found in your project directory Connected Controller Controller Name lt no name gt 42873 If Then No a Put the controller in Program mode Rem Program or Program Rem Prog J Not Running No Forces gt E Controller OK z No Edits a Battery OK 140 OK Redundancy heh b b On the Online toolbar click the controller properties button Yes Put the controller in Program mode Rem Program or Program Use either the e General tab of the Connected To Go Online dialog box e keyswitch on the front of the controller 3 Click the Nonvolatile Memory tab Publication 1756 PM001G EN P March 2004 Store and Load a Project Using
390. project does not have the base tag you have to either d CN1_M create the base tag or point the alias to a different base CN1Jam_Fault_Enty_PE CN1 Jam_Fault_Exit_PE lt 22 gt tag 7 i _ 4 Publication 1756 PM001G EN P March 2004 Program Ladder Logic 8 17 Verify the Routine As you program your routine s periodically verify your work 1 In the top most toolbar of the RSLogix 5000 window click 2 If any errors are listed at the bottom of the window a To go to the first error or warning press F4 b Correct the error according to the description in the Results window c Go to step 1 3 To close the Results window press Alt 1 Publication 1756 PM001G EN P March 2004 8 18 Program Ladder Logic Notes Publication 1756 PM001G EN P March 2004 When to Use This Procedure Before You Use This Procedure How to Use This Procedure Chapter 9 Program a Function Block Diagram Use this procedure to accomplish the following e organize a function block routine e develop one or more function block diagrams for the routine e enter the function block diagrams into the routine Before you use this procedure make sure you are able to perform the following tasks Navigate the Controller Organizer S Y Identify the Programming Languages That Are Installed For more information on any of those tasks see Getting Started on page 1 1 To program a function block rou
391. ptions Change the appearance of the Sequential Function Chart Editor Text Box Display Description Box Display M Show Text Boxes JV Show Description Boxes Justification Justification Center ki J Show Tag Alias Information Left v P Auto Scroll During Online Monitoring Structured Text Editor 2 Under SFC Editor choose the Display category 3 Choose the desired option If you want to Then show text boxes or descriptions check the corresponding check box hide text boxes or descriptions 4 Choose clear uncheck the corresponding check box Program a Sequential Function Chart 6 27 Hide an Individual Tag Description To hide the description of a specific element while showing other descriptions 1 Click the button of the element whose description you want to hide 2 Check the Never display description in routine check box 3 Choose To show other descriptions see Show or Hide Text Boxes or Descriptions on page 6 26 Publication 1756 PM001G EN P March 2004 6 28 Program a Sequential Function Chart Configure the Execution of The SFC Execution tab of the controller properties lets you configure the SFC the following e what to do when a transition is true e where to start after a transition to the run mode or recovery from a power loss e what to do on the last scan of a step Offline fl E RUN 1 On the Online toolbar click controller properties button
392. r RTS Send Delay fo x20 ms RTS Off Delay fo x20 ms 42251 5 Select User 6 Select the settings for the ASCII device from step 1 Publication 1756 PM001G EN P March 2004 12 4 Communicate with an ASCII Device If you are not using a modem S Controller Properties Ascii_examples iof x Major Faults Minor Faults Date Time Advanced File General Serial Port System Protocol User Protocol Mode se Baud Rate fisz00 Data Bits je Parity None Stop Bits ho H 7 Control Line 8 9 No Handshake aa fn Continuous arier ATS Send Delay fo x20 ms ATS Off Delay fo x20 ms 7 Select the Control Line option And And this is the Select p No Handshaking 42251 Then Go to step 10 you are using a modem both modems ina point to point link are pe Full Duplex full duplex master modem is master controller Full Duplex TLE Supe Tile slave slave controller Half Duplex Select the Continuous Carrier modem is half duplex check box all modems in the system are half duplex pe Half Duplex Clear the Continuous Carrier check box default 8 Type the amount of delay 20 ms units between the time that the RTS signal turns on high and the time that data is sent For example a value of 4 produces an 80 ms delay 9 Type the amount of delay 20 ms units between the time that the last character is sent and t
393. r fies fPower Up Handler p gt Ey Power_Up_Routin 1 Create a program for the Power Up Handler p E3 Power_Up_Program A Program Tags e E Program Properties Power_Up_Program jox lt lt General Configuration Assigned Routines 3 Configure the routine as the main routine for the program Main EE Fault lt none gt v Publication 1756 PM001G EN P March 2004 Handle a Major Fault 15 5 Programmatically Clear a To clear a major fault that occurs during the execution of your project Major Fault complete the following actions in the appropriate routine See Choose Where to Place the Fault Routine on page 15 2 Step Page Q Create a Data Type to Store Fault Information 15 5 Q Get the Fault Type and Code 15 6 Q Check for a Specific Fault 15 7 Q Clear the Fault 15 7 Create a Data Type to Store Fault Information Logix5000 controllers store system information in objects Unlike PLC 5 or SLC 500 controllers there is no status file Attribute Data Type MajorFaultRecord DINT 11 e To access system information you use a Get System Value GSV or Set System Value SSV instruction e For status information about a program you access the PROGRAM object e For fault information you access the following attribute of the PROGRAM object Instruction Description GSV Records major faults for this program SSV Specify the program name to determine which PROGRAM objec
394. r Fault T Battery OK No Edits a T 1 0 Not Present Redundancy D 1 43057 To correct a major fault 1 Click the button 2 Use the information in the Recent faults list to correct the cause of the fault Refer to Major Fault Codes on page 15 15 3 Click the Clear Majors button You can also clear a major fault by using the TIP keyswitch on the controller Turn the keyswitch to Prog then to Run and then back to Prog Publication 1756 PM001G EN P March 2004 1 18 Getting Started Configure the Execution of When you create a new project RSLogix 5000 software automatically Task creates an initial task that is configured to run all the time continuous a las task When the task completes a full scan it restarts immediately Figure 1 1 Execution of the Continuous Task start of the continuous task end of the continuous task program subroutine A Y main routine task automatically restarts If you are familiar with a DCS application or plan to program your system using a function block diagram you can configure the task to execute at a specific period periodic task This lets you update your function block diagram at a period that you specify e Whenever the time period for the task expires the task executes one time e You configure the period from 1 ms to 2000 s The default is 10 ms e If you use a periodic task in addition to a continuous task
395. r legibility See binary decimal hexadecimal offline Viewing and editing a project that is on the hard disk of a workstation See online online Viewing and editing the project in a controller See offline optimal data type A data type that a Logix5000 instruction actually uses typically the DINT and REAL data types e In the instruction set reference manuals a bold data type indicates an optimal data type e Instructions execute faster and require less memory if all the operands of the instruction use the same data type an optimal data type e If you mix data types and use tags that are not the optimal data type the controller converts the data according to these rules Are any of the operands a REAL value If Then input operands e g source tag in an expression limit convert to Yes REALs No DINTs After instruction execution the result a DINT or REAL value converts to the destination data type if necessary Publication 1756 PM001G EN P March 2004 Glossary 26 Conversion larger integer to smaller integer e Because the conversion of data takes additional time and memory you can increase the efficiency of your programs by using the same data type throughout the instruction minimizing the use of the SINT or INT data types In other words use all DINT tags or all REAL tags along with immediate values in your instructions e The following table summarizes h
396. r more of the following types of operands e tag name variable e immediate value constant e name of a routine label etc The following table outlines the format for a tag name For a Specify tag tag_name bit number of a larger data type tag name bit_number member of a structure tag name member_name element of a one dimension array tag_name x element of a two dimension array tag _name x y element of a three dimension array tag_name x y z element of an array within a structure tag name member_name x member of an element of an array tag_name x y z member_name Publication 1756 PM001G EN P March 2004 where x is the location of the element in the first dimension y is the location of the element in the second dimension z is the location of the element in the third dimension For a structure within a structure add an additional member_name Program Ladder Logic 8 9 EXAMPLE Choose a Tag Name for an Operand To access machine_on tag The tag name looks like this machine on pp koa ails bit number 1 of the one_shots tag one shots 1 e ie ale DN member bit of the running_seconds timer running seconds DN E IE mix member of the north_tank tag north tank mix JE element 2 in the recipe array and element COP 1 1 in the tanks array Copy File Source recipe 2 Dest tanks 1 1 Length 1 e
397. ram Structured Text 7 5 In structured text you use two types of expressions BOOL expression An expression that produces either the BOOL value of 1 true or 0 false e A bool expression uses bool tags relational operators and logical operators to compare values or check if conditions are true or false For example tag1 gt 65 e A simple bool expression can be a single BOOL tag e Typically you use bool expressions to condition the execution of other logic Numeric expression An expression that calculates an integer or floating point value e A numeric expression uses arithmetic operators arithmetic functions and bitwise operators For example tag1 5 e Often you nest a numeric expression within a bool expression For example tag1 5 gt 65 Use the following table to choose operators for your expressions If you want to Then Calculate an arithmetic value Use arithmetic operators and functions on page 7 6 Compare two values or strings Use relational operators on page 7 7 Check if conditions are true or false Use logical operators on page 7 9 Compare the bits within values Use bitwise operators on page 7 10 Publication 1756 PM001G EN P March 2004 7 6 Publication 1756 PM001G EN P March 2004 Program Structured Text Use arithmetic operators and functions You can combine multiple operators and functions in arithmetic expressions Arithmetic operators calcul
398. rce protection protects your project at the routine level You can protect some routines of a project while leaving other routines unprotected accessible to anyone You also have the option of protecting a routine but letting anyone view it If you want to And Then Protect the routine Allow viewing prevent someone from doing this also prevent someone from doing this yes no e edit the routine e open display the routine e change the properties of the e search the routine routine e go to cross references within the e export the routine routine e print the routine no other limitations yes yes let anyone have full access to the p no routine This Choose the Number of Source Keys To protect a routine you assign a source key to the routine You can reuse a source key as often as you like as shown below Gives you one source key for all projects unique source key for each project unique source key for each routine in each project fewest number of source keys easier to manage but less protection greatest number of source keys more difficult to manage but more protection Choose the number of source keys that balances your need for protection verses the level of source key management that you want to undertake Publication 1756 PM001G EN P March 2004 Secure a Project 18 5 Define the Source Key or Keys Source keys follow the same rules for names as other RSLogix 5000 com
399. rded on Table 18 5 on page 18 19 43076 Publication 1756 PM001G EN P March 2004 Secure a Project 18 25 Refresh RSLogix 5000 Software If Needed If an RSLogix 5000 project is open and changes are made in RSI Security Server software that effect the project refresh RSLogix 5000 software From the Tools menu choose Security gt Refresh Privileges Publication 1756 PM001G EN P March 2004 18 26 Secure a Project Notes Publication 1756 PM001G EN P March 2004 Chapter 19 Determine Controller Memory Information When to Use This Chapter Use this chapter to get information about the memory of your Logix5000 controller To See page Determine What Memory Information You Want 19 1 Estimate Memory Information Offline 19 2 View Run Time Memory Information 19 3 Write Logic to Get Memory Information 19 4 Determine What Memory Depending on your type of controller the memory of the controller Information You Want may be divided into several areas If you have this controller Then it stores this In this memory ControlLogix 1 0 tags 1 0 memory produced tags consumed tags communication via Message MSG instructions communication with workstations communication with polled OPC DDE tags that use RSLinx software tags other than 0 produced or consumed tags data and logic memory logic routines communication with polled OPC DDE tags that use RSLinx softwar
400. re a value or values for use by logic Base within the project represent another tag Alias send data to another controller Produced receive data from another controller Consumed If you plan to use produced or consumed tags you must follow additional guidelines as you organize your tags Refer to Communicate with Other Devices on page 10 1 Publication 1756 PM001G EN P March 2004 Organize Tags 3 3 Data Type Term Definition data type The data type defines the type of data that a tag stores such as a bit integer floating point value string etc structure A data type that is a combination of other data types e A structure is formatted to create a unique data type that matches a specific need e Within a structure each individual data type is called a member e Like tags members have a name and data type e A Logix5000 controller contains a set of predefined structures data types for use with specific instructions such as timers counters function blocks etc e You can create your own structures called a user defined data type The following table outlines the most common data types and when to use each Table 3 1 Data Types For Select analog device in floating point mode REAL analog device in integer mode for very fast sample rates INT ASCII characters string bit BOOL counter COUNTER digital 1 0 point BOOL floating point number REAL integer whole number DINT sequen
401. reate a Routine for the Controller Fault Handler 3 6 Controller My_Controller Controller Tags fea Controller Fault Handler 1 Create a program for the Controller Fault Handler Controller_Fault_Program Program Tags p E Controller_Fault_Routine Vo 2 Create a routine for the program ial Program Properties Controller_Fault_Program Ioj x 3 Configure the routine as the main routine for the program General Configuration Assigned Routines Main ER Fault lt none gt Publication 1756 PM001G EN P March 2004 15 4 Handle a Major Fault 2 Create a routine for the program Create a Routine for the Power Up Handler The power up handler is an optional task that executes when the controller powers up in run remote run mode Use the power up handler when you want to accomplish either of the following after power is lost and then restored To Do this Prevent the controller from returning to Leave the routine for the Power Up Handler run remote mode empty When power is restored a major fault type 1 code 1 occurs and the controller enters the Faulted mode When power is restored take specific In the routine for the Power Up Handler actions and then resume normal operation 1 Clear the major fault type 1 code 1 2 Enter the logic for the actions Controller My_Controller A Controller Tags E Controller Fault Handle
402. reate a new string type choose File gt New Component gt String Type e If you create a new string type use it in place of the STRING data type in this procedure To store the configuration variables for the message to each controller create the following user defined data type Data Type MESSAGE_CONFIGURATION Name MESSAGE_CONFIGURATION Description Configuration properties for a message to another controller Members Name Data Type Style Description Path STRING RemoteElement STRING Publication 1756 PM001G EN P March 2004 B 6 Send a Message to Multiple Controllers Create the Configuration Array In this procedure you store the configuration properties for each controller in an array Before each execution of the MSG instruction your logic loads new properties into the instruction This sends the message to a different controller Figure B 1 Load New Configuration Properties Into a MSG Instruction Configuration Array message_config message_config 0 message Message Properties first execution of the message message_config 0 Path message_config 0 RemoteElement message pe message Path message RemoteElement message_config 1 next execution of the message_con
403. red for this task 0 2 Publication 1756 PM001G EN P March 2004 4 58 Manage Multiple Tasks EXAMPLE Define a Timeout Value for an Event Task If a timeout occurs for the event task communication with the triggering device might have failed This requires the process to shut down To shut down the controller the event task calls the fault routine for the program and supplies a user defined fault code 999 in this example 1 The GSV instruction sets Jask_2_Status Status attribute for Task_2 DINT value GSV Get System Value Class Name TASK Instance Name Task_2 Attribute Name Status Dest Task_2 Status 2 0000_0000_0000_0000_0000_0000_0000_0010 2 If Task_2_Status 1 1 then a timeout occurred so shut down the controller and set the major fault code to 999 The JSR instruction calls the fault routine for the program This produces a major fault The major fault code 999 value of the input parameter of 999 Task_2 Status 1 JSR Jump To Subroutine Routine Name Program _Fault_Foutine Input Par 999 3 If Condition_1 1 then clear the bits of the Status attribute for Task_Z The SSV instruction sets the Status attribute of Jask_2 Zero Zero is a DINT tag with a value of 0 Condition_1 Sy Set System Value Class Name TASK Instance Name Task_2 Attribute Name Status Source For more information on shutting down the controller see Create a User Defined Major Fault on page
404. red to as a user defined structure A user defined data type groups different types of data into a single named entity e Within a user defined data type you define the members e Like tags members have a name and data type e You can include arrays and structures e Once you create a user defined data type you can create one or more tags using that data type e Minimize your use of the following data type because they typically increase the memory requirements and execution time of your logic INT SINT Glossary 47 For example some system values use the SINT or INT data type If you create a user defined data type to store those values then use the corresponding SINT or INT data type e If you include members that represent I O devices you must use ladder logic to copy the data between the members in the structure and the corresponding I O tags See Buffer I O on page 2 8 e When you use the BOOL SINT or INT data types place members that use the same data type in sequence more efficient less efficient BOOL BOOL BOOL DINT BOOL BOOL DINT DINT DINT BOOL e You can use single dimension arrays e You can create edit and delete user defined data types only when programming offline e If you modify a user defined data type and change its size the existing values of any tags that use the data type are set to zero 0 e To copy data to a structure use the CO
405. reface 2 When to Use this Manual How to Use this Manual Use this manual when you perform these actions e develop the basic code for your application e modify an existing application e perform isolated tests of your application As you integrate your application with the I 0 devices controllers and networks in your system e Refer to the user manual for your specific type of controller e Use this manual as a reference when needed This manual is divided into the basic tasks that you perform while programming a Logix5000 controller e Each chapter covers a task e The tasks are organized in the sequence that you will typically perform them As you use this manual you will see some terms that are formatted differently from the rest of the text Text that is Identifies For example Means Italic the actual name of an item that you Right click User Defined Right click on the item that is named see on your screen or in an example User Defined bold an entry in the Glossary Type a name If you want additional information refer to name in the Glossary If you are viewing the PDF file of the manual click name to jump to the glossary entry courier information that you must supply Right click You must identify the specific program in based on your application a variable your application Typically it is a name or variable that you have defined name_of program enclosed in bra
406. res other routines to execute independent of the SFC 1 Configure another routine as the main routine for the program The SFC uses boolean actions 2 Use the main routine to call the SFC as a subroutine If the SFC uses boolean actions then other logic must run independent of the SFC and monitor status bits of the SFC Define the Steps of the A step represents a major function of your process It contains the actions that occur at a particular time phase or station Process p k Step Actions A step executes continuously until a Do this transition tells the SFC to go to the A MIX next step and do this Transition Publication 1756 PM001G EN P March 2004 v U e f true go to the next step A transition ends a step The transition defines the physical conditions that must occur or change in order to go to the next step Design a Sequential Function Chart 5 7 Follow These Guidelines As you define the steps of your process follow these guidelines e Start with large steps and refine the steps in several passes first pass second pass third pass Paint Transfer_In Transfer_In Paint Paint_Flow Air_Flow Elec_Charg Clean Clean Transfr_Out Transfr_Out e When you first open an SFC routine it contains an initial step and transition Use th
407. riptions In this example Tank became West Tank RSLogix 5000 software uses different colors for descriptions A description in this color Is a gray pass through description black manually entered description Publication 1756 PM001G EN P March 2004 3 22 Organize Tags Turn Pass Through and Append Descriptions On or Off 1 In RSLogix 5000 software choose Tools gt RS RSLogix 5000 My_Project_1 1756 L63 MainProgram Run_Conveyor Options 2 File Edit View Search Logic Communications Tools Window Help Security X b ASAE y Categories Application rance for RSLogix 50 Tag Description Display Width 20 Tag Description Display Justification Center 5 J Show Pass Through Descriptions IV Append To Base Tag Descriptions J Show Grid Font Color Tag Editor Display a oe FontColor SFC Editor 3 Turn on check or turn off uncheck the desired options Paste a Pass Through Description To use a pass through description as the starting point for a more specific description Controller Tags Pass_Through_Descriptions controller 1 Right click the pass through description and choose Paste Pass Through Tank Tank Ctrl X Ctrl C Paste Ctrl y Paste Pass Through N Delete Del 2 Edit the description and press Ctrl Enter E eao fat West Tank C E Publication 1756
408. rms unscheduled communication for up to 1 ms at a time and then resumes the continuous task The following table shows the ratio between the continuos task and unscheduled communication at various system overhead time slices At this time slice The continuous tasks runs for And unscheduled communication occurs for up to 10 9ms 1 ms 20 4ms 1 ms 33 2ms 1 ms 50 1 ms 1 ms Publication 1756 PM001G EN P March 2004 Getting Started 1 27 At a system overhead time slice to 20 unscheduled communication occurs every 4 ms of continuous task time for 1 ms Legend m Task executes Task is interrupted suspended 1 ms 1 ms 1 ms 1ms 1ms unscheduled communication ii i H H 4 ms 4 ms 4 ms 4 ms 4 ms If you increase the system overhead time slice to 33 unscheduled communication occurs every 2 ms of continuous task time for 1 ms oom i i i i i if M amp 2ms 2ms 2ms 2ms 2ms 2ms 2ms 2ms 2ms continuous task E E HE HE E EHEHEHE H If the controller contains only a periodic task or tasks the system overhead time slice value has no effect Unscheduled communication occurs whenever a periodic task is not running For example if your task takes 50 ms to execute and you configure its update rate to 80 ms the controller has 30 ms out of every 80 ms for unscheduled communication 50 ms 50 ms 50 ms 30 ms 30 ms 30 ms Publication 1756 PM001G EN P March 2004 1 28 Getting Started Adjust the Sy
409. rogram 42865 4 Is the Load Image option set to User Initiated If Then No Go to Change the Load Image Option on page 17 16 Yes Go to Clear the Project from the Controller on page 17 16 Publication 1756 PM001G EN P March 2004 17 16 Store and Load a Project Using Nonvolatile Memory Change the Load Image Option 1 Choose Load Store 2 In the Load Image drop down list select User Initiated 3 Choose lt Store A dialog box asks you to confirm the store 4 To store the project choose Yes A dialog box tells you that the store is in progress 5 Choose OK 6 Wait until the OK LED on the front of the controller is steady green This indicates that the store is finished Clear the Project from the Controller 1 Disconnect the battery from the controller 2 Cycle the power to the chassis 3 Re connect the battery to the controller Store the Empty Image 1 Go online with the controller The Connected To Go Online dialog box opens 2 Click the Nonvolatile Memory tab General Serial Port System Protocol User Protocol Maior Faults Minor Faults Date Time Advanced Fie Nonvolatile Memory Image in Nonyolatile Memory Name name_of_controller Type 1756 L55 4 ControlLogix 5555 Controller 42865 3 Choose Load Store Publication 1756 PM001G EN P March 2004 Store and Load a Project Using Nonvolatile Memory 17 17 Remote Progen o d _ 42874 4 Ch
410. roller e Group the data into one or more user defined data types This uses less connections than producing each tag separately e Group the data according to similar update intervals To conserve network bandwidth use a greater RPI for less critical data For example you could create one tag for data that is critical and another tag for data that is not as Critical Publication 1756 PM001G EN P March 2004 Adjustment Reduce your network update time NUT Communicate with Other Devices 10 13 Adjust for Bandwidth Limitations When you share a tag over a ControlNet network the tag must fit within the bandwidth of the network e As the number of connections over a ControlNet network increases several connections including produced or consumed tags may need to share a network update time NUT e Since a ControlNet network can only pass 500 bytes in one NUT the data of each connection must be less then 500 bytes to fit into the NUT Depending on the size of your system you may not have enough bandwidth on your ControlNet network for a tag of 500 bytes If a tag is too large for your ControlNet network make one or more of the following adjustments Description At a faster NUT less connections have to share an update slot Increase the requested packet interval RPI of your connections At higher RPls connections can take turns sending data during an update slot For a ControlNet bridge module
411. roller performs overhead operations onfigure utpu At the end of k th ll fi head output processing for the I O modules in your system While not the Processing for a Task same as updating the modules this output processing may effect the update of the I O modules in your system As an option you can turn off this output processing for a specific task which reduces the elapsed time of that task feel Task Properties MainTask Periodic Enable or disable the processing of outputs at the end of the task y Publication 1756 PM001G EN P March 2004 4 14 Manage Multiple Tasks To choose how to configure output processing for a task use the following flow chart Figure 4 1 Choose how to configure output processing for a task Disable Automatic Output Processing To Reduce Task Overhead m pController Controller_1 Controller Tags C Controller Fault Handler Cc J Disable Automatic Output Processing 3 Power Up Handler To Reduce Task Overhead A fie Tasks 3 48 MainTask MainProaram How many output modules does this task effect 4 or more write data to l 0 1 2 or 3 A l B Is this the only task in the Tasks folder of the Q Yes Enable automatic output processing project a l No B Is another task configured to enable T No output processing
412. rs BACKSPACE SPACE BACKSPACE 08 20 08 printer Printer e The DEL character 7F and the character that precedes the DEL character are not sent to the destination e f echo mode is selected and an ASCII instruction reads the DEL character the echo returns two characters 2F followed by the character that was deleted None of the above Ignore The DEL character 7F is treated as any other character 8 Click OK Publication 1756 PM001G EN P March 2004 12 8 Communicate with an ASCII Device Create String Data Types Controller name_of_controller Tasks Trends 3 6 Data Types CR User Defined Sa Strings i STRING CR Predefined Ca Module Defined 3 1 0 Configuration 42811 You can use the default STRING data type It stores up to 82 characters IMPORTANT You store ASCII characters in tags that use a string data type Controller name_of_controller Tasks LO Trends Data Types CR User Defined Ca Sie String a w c New String Type E r Prede 2 uR Modi apy I 140 Confi pears Asie Print 42812 or You can create a new string data type to store the number of characters that you define Use caution when you create a new string data type If you later decide to change the size of the string data type you may lose data in any tags that currently use that data type Then e
413. rst step You must tell the SFC what to do when it finishes the last step At the End of the SFC What Do You Want to Do To Do this automatically loop back to an Wire the last transition to the top of the step to which earlier step you want to go See Wire to a Previous Step on page 5 17 stop and wait foracommandto Use a Stop Element restart See Use a Stop Element on page 5 45 Use a Stop Element The stop element lets you stop the execution of an entire SFC or a path of a simultaneous branch and wait to restart When an SFC reaches a stop element the following occurs e The X bit of the stop element turns on This signals that the SFC is at the stop element e Stored actions remain active e Execution stops for part or all of the SFC If the stop element is at the end of a Then sequence entire SFC stops selection branch path within a simultaneous branch only that path stops while the rest of the SFC continues to execute Publication 1756 PM001G EN P March 2004 5 46 Design a Sequential Function Chart EXAMPLE Use a Stop Element last_step m last_tranistion When the SFC reaches ast_step and process_done is true the execution of the SFC stops process_done Restart Reset the SFC Once at the stop element you have several options to restart the SFC If the SFC is And the Last Scan of Active Then Steps option is nested i e another SFC calls this
414. rt_sensor_photorye f the same time Show or hide an action all_stations_done JSR Assembly_Done 0 JSR instruction calls a subroutine continued on next page Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 3 E pallet_not_full Figure 5 2 SFC Example continued from previous page A selection branch chooses between different execution paths pallet_check SY pallet_full P1 pallet_move_reset SFR Pallet_Move pallet_move_Step_001 pallet_move_stop X 0 N pallet_move_procedure JSR Pallet_Move 0 pallet_move_stop X pallet_move ea Determination of whether to continue or p line_status A text box lets you add descriptive text or notes to your SFC shut_down N mitan otr Han state 0 N f devices_in_operator_mode onveyor_program_comtrol 0 an _program_control 0 O stop Astop lets you stop and wait for a command to restart A wire connects one element to another element anywhere on the chart This wire takes you to the conveyor step on Figure 5 1 on the previous page Publication 1756 PM001G EN P March 2004 5 4 Design a Sequential Function Chart How to Design an SFC To design an SFC you perform these tasks Overview Define the Tasks Choose How to Execute the SFC Define the Steps of the Process Organi
415. runtime see Use an Expression to Calculate a Time on page 6 12 Use an Expression to Calculate a Time To calculate a time based on tags in your project enter the time as a numeric expression You can use an expression to calculate the following times e Preset e LimitHigh e LimitLlow To enter a time as an expression O E step_name UJ Publication 1756 PM001G EN P March 2004 1 Click the J button of the step 2 Select check the Use Expression check box Program a Sequential Function Chart 6 13 2 browse for a tag Preset fo ms M Use Expression i 3 Click the Define button choose a function choose an operator create a tag 4 Type a numeric expression that defines the time e Use the buttons alongside the dialog box to help you complete the expression e For information on numeric expressions see Expressions on page 7 4 5 Choose 6 To close the Step Properties dialog box choose Publication 1756 PM001G EN P March 2004 6 14 Program a Sequential Function Chart Rename a Transition Each transition uses a tag to store the status of the transition To rename the tag of the transition 1 Click the button of the transition transition_name 2 Click the Tag tab General Tag 3 p gt Name 3 Type the new name for the transition tag 4 Choose Program a Transition To program a transition you have these options e En
416. rupts all other tasks regardless of their priority e The number of axes and coarse update period for the motion group effect how long and how often the motion planner executes e f the motion planner is executing when a task is triggered the task waits until the motion planner is done e f the coarse update period occurs while a task is executing the task pauses to let the motion planner execute Q 7 Number of event tasks Limit the number of event tasks Each additional task reduces the processing time that is available for other tasks This could cause an overlap m 8 Automatic Output Processing For an event task you can typically disable automatic output processing default This reduces the elapsed time of the task To verify this decision see Figure 4 1 on page 4 14 m co IOT instruction Use an IOT instruction for each output module that you reference in the event task The IOT instruction overrides the RPI for the module and immediately sends the data Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 27 As parts move past a diverter location the controller must decide EXAMPLE whether or not to turn on the diverter Once the diverter is on the controller must also turn it off before the next part is in that position Because of the speed of the line an event task controls the diverter General Configuration Program Schedule Monitor Type Evet o Trigger Module Input Data Sta
417. ry source array 0 Null value source arrayl6 5 Get largest contiguous block of additional free logic memory source _array 0 Null value source arrayl 6 Get largest contiguous block of free 1 0 memory source _arrayl9 0 Null value source arrayl10 7 Get largest contiguous block of free data and logic memory source _array 1 0 Null value Source Length 12 Write 12 bytes 12 SINTs Destination INT_array of type INT 29 Communication Path 1 slot_number_of_controller Publication 1756 PM001G EN P March 2004 Determine Controller Memory Information 19 5 Choose the Memory Information That You Want The MSG instruction returns the following information to INT_array destination tag of the MSG e The controller returns the values in number of 32 bit words To see a value in bytes multiple it by 4 IMPORTANT e If your controller does not divide its memory then the values show up as I O memory e For a 1756 L55M16 controller the MSG instruction returns two values for each logic memory category To determine the free or total logic memory of a 1756 L55M16 controller add both values for the category If you want the Then copy these array elements Description amount of free 1 0 memory 32 bit words INT _array 3 lower 16 bits of the 32 bit value INT arrayl4 upper 16 bits of the 32 bit value amount of free data and logic memory 32 bit words
418. s p Do you want to prevent No p RSLogix 5000 software from e changing the mode e downloading a project e performing online edits Yes p No Turn and t Rem l N he keyswitch to PROG N hen to REM ote Program mode Turn Prog A he keyswitch to PROG es ram mode Turn and t Remote Run mode he keyswitch to RUN hen to REM Turn the keyswitch to RUN Run mode gt A Outputs revert to their configured state for This includes Message MSG instructions Program mode 1 Turn the keyswitch to REM 2 Go online with RSLogix 5000 software and choose Test mode You can also use RSLogix 5000 software to change the mode of the controller 1 On the front of the controller turn the keyswitch to REM 2 Go online with the controller 3 Rem Prog A Not Running No Forces No Edits F Battery OK 1 0 OK a Regundeney fat gt E Controller OK REM 3 On the online toolbar choose the desired mode Publication 1756 PM001G EN P March 2004 Manually Clear a Major Fault The controller is faulted A major fault occurred and the controller is no longer executing its logic Getting Started 1 17 If the controller enters the faulted mode a major fault occurred and the controller stopped executing the logic Faulted FI Not Running No Forces gt E Controlle
419. s i Max Used 51 296 bytes p Max Used 26 408 bytes Largest Block Free 178 024 bytes Largest Block Free 3 676 376 bytes 4 To reset the Max Used values click here Reset All Max Estimate Publication 1756 PM001G EN P March 2004 19 4 Determine Controller Memory Information Write Logic to Get Memory To use logic to get memory information for the controller Information Get Memory Information from the Controller Choose the Memory Information That You Want Convert INTs to a DINT Get Memory Information from the Controller To get memory information from the controller execute a Message MSG instruction that is configured as follows On this tab For this item Type or select Which means Configuration Message Type CIP Generic Execute a Control and Information Protocol command Service Type Custom Create a CIP Generic message that is not available in the drop down list Service Code 3 Read specific information about the controller GetAttributeList service Class 72 Get information from the user memory object Instance 1 This object contains only 1 instance Attribute 0 Null value Source source array Of type SINT 12 Pemeri In this element Enter Which means source _array 0 5 Get 5 attributes source _arrayl 0 Null value source arrayl2 1 Get free memory source _array 3 0 Null value source arrayl4 2 Get total memo
420. s Registration To let the registration input of an axis trigger an event task use the Trigger Axis Registration 1 or 2 trigger lal Task Properties Task_1 General Configuration Program Schedule Monitor Let an event trigger this task Type JE vent x Let registration input 1 Trigger Axis Registration 1 x 0f this axis trigger the task Tag Axis 1 7 Execute Task If No Event Occurs Within fi 000 000 ms Priority fi Lower Number Yields Higher Priority Watchdog 500 000 ms IV Disable Automatic Output Processing To Reduce Task Overhead Interrupt all other tasks When the task is done do not update digital outputs in the local chassis When the specified registration input reaches its trigger condition it triggers the event task e In the configuration of the event task specify which registration input you want to trigger the task Choose either Axis Registration 1 or Axis Registration 2 e You must first arm the registration input using a Motion Arm Registration MAR instruction e In the MAR instruction the Trigger Condition operand defines which transition of the registration input Off gt On or On gt Off triggers the event task e Once the registration input triggers the task you have to re arm the registration input The following timing diagram shows the relationship between the registration input and the event task registration input L S
421. s done Lower priority tasks experience longer delays The continuous task automatically restarts OQ OO OVO Publication 1756 PM001G EN P March 2004 4 8 Manage Multiple Tasks Leave Enough Time for Unscheduled communication occurs only when a periodic or event Unscheduled task is not running If you use multiple tasks make sure that their scan ot 2s times and execution intervals leave enough time for unscheduled Communication communication If you have multiple tasks follow these rules 1 The execution time of a highest priority task is significantly less than its update rate 2 The total execution time of all your tasks is significantly less than the update rate of the lowest priority tasks For example in this configuration of tasks Task Priority Execution time Rate 1 higher 20 ms 80 ms 2 lower 30 ms 100 ms total execution time 50 ms 1 The execution time of the highest priority task Task 1 is significantly less than its update rate 20 ms is less than 80 ms 2 The total execution time of all tasks is significantly less than the update rate of the lowest priority task 50 ms is less than 100 ms This generally leaves enough time for unscheduled communication e Adjust the update rates of the tasks as needed to get the best trade off between executing your logic and servicing unscheduled communication e If your project has a continuous task unscheduled communication occurs as a perc
422. s that use that data type e Description of an array tag ripples through to the elements Members and members of the array S ie ae Level aa Decimal Curent Liters Pressure DINT Decimal Temp REAL Float Agitator Speed DINT Decimal Ingredient_ amp BOOL Decimal Ingredient_B Controller Tags Pass_Through_Descriptions controller Scope Pass_Through_Des 7 Show Show A l Y Sot TagNam Description E Be H T anks 0 Level l Eanksi ETanksfi Level P Tag Name amp Type as Tanks Tankl4 ani ETans Tank Ss T ank Turrent Liters ann H T anks 0 Pressure Tanks 0 Temp za Tanks 0 Agitator Speed _ Tanks 0 Ingredient_ Tanks 0 Ingredient_B append description to base tag RSLogix 5000 software automatically builds a description for each member of a tag that uses a user defined data type It starts with ank Kpa ank Degrees C ank RPM of Agitator naa 7 Add Re the description of the tag and then adds the ank Add Red at kAd Bius description of the member from the data West sa Tot type West Tank Current Liters aio paste pass through description Use West Tank Kpa F mena the data type and array description as a m Tanks 1 Pressure E Tanks 1 Temp Wes est Tank Degrees C basis for more specific desc
423. s the TOT to be in Operator control TargetDew1Flag D TargetDev2Flag A E ProgResetReq TargetFlag D Publication 1756 PM001G EN P March 2004 9 16 Program a Function Block Diagram Publication 1756 PM001G EN P March 2004 Likewise constantly setting the ProgProgReq can lock the instruction into Program control This is useful for automatic startup sequences when you want the program to control the action of the instruction without worrying about an operator inadvertently taking control of the instruction In this example you have the program set the ProgProgReq input during the startup and then clear the ProgProgReq input once the startup was complete Once the ProgProgReq input is cleared the instruction remains in Program control until it receives a request to change For example the operator could set the OperOperReq input from a faceplate to take over control of that instruction The following example shows how to lock an instruction into Program control FuelFlowController PIDE C Enhanced PID g SPProg sP pD g SPCascade PVHHAIarm StartupCV i J RatioProg PVHAlarm f CVProg PVLAlarm D GFF P LLAIarm D g HandFB PVROCPosAlarm StartupSequenceActive p ProgProgReq PVROCNegAlarm D E ProgOperReq DevHHAlarm D E ProgCasRatReq DevHAlarm ProgAutoReq DevLAlarm D L 4 ProgManualReq DevLLAlarm D When StartupSequenceActive ape eee ated is set the PIDE instruction is amp
424. s to compare values or check if conditions are true or false For example tag1 gt 65 Here are some examples of BOOL expressions bool _taga bool tag a amp dint_tag_a gt 8 Publication 1756 PM001G EN P March 2004 bool tag _b Design a Sequential Function Chart 5 27 Call a Subroutine To use a subroutine to control a transition include an End Of Transition EOT instruction in the subroutine The EOT instruction returns the state of the conditions to the transition as shown below i JSR condition 1 condition 2 condition_3 BOOL_tag E Ee Ee BOOL_tag 0 0r If condition 1 amp condition 2 amp condition 3 then BOOL tag 1 Else BOOL tag 0 End_if EOT BOOL tag Call a subroutine Check for the required conditions When those conditions are true turn on a BOOL tag Use an EOT instruction to set the state of the transition equal to the value of the BOOL tag When the BOOL tag is on true the transition is true Publication 1756 PM001G EN P March 2004 5 28 Design a Sequential Function Chart Transition After a Specified Each step of the SFC includes a millisecond timer that runs whenever Time the step is active Use the timer to e signal when the step has run for the required time and the SFC should go to the next step e signal when the step has run too lon
425. same module then together both messages count as 1 connection Caching both messages counts as 1 on the cache list See connection uncached connection change of state COS Any change in the status of a point or group of points on an T O module CIP See Control and Information Protocol communication format Defines how an I O module communicates with the controller Choosing a communication format defines e what configuration tabs are available through the programming software e the tag structure and configuration method compatible module An electronic keying protection mode that requires that the vendor catalog number and major revision attributes of the physical module and the module configured in the software match in order to establish a connection to the module See disable keying exact match Publication 1756 PM001G EN P March 2004 Glossary 10 Publication 1756 P M001G EN P March 2004 connection A communication link between two devices such as between a controller and an I O module PanelView terminal or another controller e Connections are allocations of resources that provide more reliable communications between devices than unconnected messages e The number of connections that a single controller can have is limited e You indirectly determine the number of connections the controller uses by configuring the controller to communicate with other devices in the system consumed tag
426. sk s execution You can duplicate or buffer data at the beginning of the scan to provide reference values for your logic e Programs within a task access input and output data directly from controller scoped memory e Logic within any task can modify controller scoped data e Data and I O values are asynchronous and can change during the course of a task s execution e An input value referenced at the beginning of a task s execution can be different when referenced later e To prevent an input value from changing during a scan copy the value to another tag and use the data from there buffer the values To buffer your I O values see page 2 8 Publication 1756 PM001G EN P March 2004 Term direct connection Communicate with 0 2 3 Communication Format The communication format that you choose determines the data structure for the tags that are associated with the module Many I O modules support different formats Each format uses a different data structure The communication format that you choose also determines e Direct or Rack Optimized Connection e Ownership Direct or Rack Optimized Connection The Logix5000 controller uses connections to transmit I O data These connections can be direct connections or rack optimized connections Definition A direct connection is a real time data transfer link between the controller and an 1 0 module The controller maintains and monitors the connection with the 1
427. stem Overhead Time Slice 1 On the Online toolbar click controller properties button 2 Click the Advanced tab 3 Type or select the system overhead time slice 4 Choose Poy Publication 1756 PM001G EN P March 2004 Getting Started 1 29 View Scan Time A Logix5000 controller provides two types of scan times Each serves a different purpose If you want to determine the Then Notes time that has elapsed from the start of a task View Task Scan Time The scan time of a task includes the time that the to the end of the task in milliseconds task is interrupted to service communications or other tasks time to execute the logic of a program its View Program Scan Time The scan time of a program includes only the main routine and any subroutines that the execution time of the logic It does not include any main routine calls in microseconds interrupts View Task Scan Time To see the scan time of a task display the properties for the task FI Controller Controller_1 Controller Tags E3 Controller Fault Handler CI Power Up Handler E Tasks A MainTask a MainProgram Program Tags Ef MainRoutine 1 In the controller organizer right click the task whose scan time you want to view and choose Properties 2 Click the Monitor tab fal Task Properties Task General Configuration Program Schedule Monitor Sca
428. step is deactivated before this time Time Delayed execute once when the step is activated execute once when the step is deactivated P Pulse start when the step is deactivated execute only once PO Pulse Falling Edge turn off reset a stored action p R Reset e S Stored e SL Stored and Time Limited e DS Delayed and Stored e SD Stored and Time Delayed Publication 1756 PM001G EN P March 2004 5 24 Design a Sequential Function Chart Define the Transition Conditions Publication 1756 PM001G EN P The transition is the physical conditions that must occur or change in order to go to the next step The transition tells the SFC when to go to the next step transition If true go to the next step Transitions occur in the following places For this structure Make sure that sequence A transition is between each step steps Teea transitions selection branch Transitions are inside the horizontal lines E a A transitions l simultaneous branch Transitions are outside the horizontal lines N transitions March 2004 Here are two examples of transitions Design a Sequential Function Chart 5 25 EXAMPLE ooo a Turn on 2 compressors When a compressor is on the Device1State bit is on b When both compressors are on go to the next step Solution Init
429. step or a force of a simultaneous path 1 Open the SFC routine 2 Right click the transition or the path that is forced and choose Step Through To override the logic of an SFC you have the following options If you want to Then override the conditions of a transition each Force a Transition time the SFC reaches the transition prevent the execution of one or more paths Force a Simultaneous Path of a simultaneous branch Force a Transition To override the conditions of a transition through repeated executions of an SFC force the transition The force remains until you remove it or disable forces If you want to Then prevent the SFC from going to the next step force the transition false cause the SFC go to the next step regardless of transition force the transition true conditions Publication 1756 PM001G EN P March 2004 14 10 Force Logic Elements If you force a transition within a simultaneous branch to be false the SFC stays in the simultaneous branch as long as the force is active Gnstalled and enabled e To leave a simultaneous branch the last step of each path must execute at least one time and the transition below the branch must be true e Forcing a transition false prevents the SFC from reaching the last step of a path e When you remove or disable the force the SFC can execute the rest of the steps in the path For example to exit this branch the SFC must be able to e execute
430. t SFC a step represents a major function of a process It contains the events that occur at a particular time phase or station Step Actions Do this MIX and do this A step is organized into one or more actions Each action performs a specific function such as controlling a motor opening a valve or placing a group of devices in a specific mode Glossary 37 See action sequential function chart transition store To copy a project to the nonvolatile memory of the controller This overwrites any project that is currently in the nonvolatile memory See load nonvolatile memory Publication 1756 PM001G EN P March 2004 Glossary 38 string A group of data types that store ASCII characters E E Controller name_of_controller Controller name_of_controller H E Tasks Tasks I Trends 9 Trends 3 6 Data Types 3 6 Data Types Oe User Defined Oe User Defined a Strings Sec Strings gt STRING New String Type E Oe Predefined Oe Preder La Module Defined Ca Mod E E3 1 0 Configuration 42811 E3 140 Confi ES Print 42812 You can use the default STRING data type or You can create a new string data type to store the It stores up to 82 characters number of characters that you define Each string data type contains the following members Name Data Type Description Notes L
431. t you want Or specify THIS to access the PROGRAM object for the program that contains the GSV or SSV instruction Publication 1756 PM001G EN P March 2004 15 6 Handle a Major Fault To simplify access to the MajorFaultRecord attribute create the following user defined data type To create a new data type Data Type FAULTRECORD Name FAULTRECORD Controller Your_Project oe Description Stores the MajorFaultRecord attribute or MinorFaultRecord Tasks attribute of the PROGRAM object Motion Groups Members Trends Name Data Type Style Description Time_Low DINT Decimal lower 32 bits of the fault timestamp value Data Types f Time_High DINT Decimal upper 32 bits of the fault timestamp value User Defined Type INT Decimal fault type program I O etc Code INT Decimal unique code for the fault Right click and choose New Data Type Info DINT 8 Hex fault specific information Get the Fault Type and Code Get System Value Class name PROGRAM Instance name THIS Attribute Name MAJORFAULTRECORD Dest major_fault_record Time_Low pe 42372 1 The GSV instruction accesses the MAJORFAULTRECORD 2 Publication 1756 PM001G EN P March 2004 attribute of this program This attribute stores information about the fault The GSV instruction stores the fault information in the major_fault_record tag When you enter
432. t 8 14 force avalue 14 1 import 8 14 manage messages A 1 override a value 14 1 rung condition 8 4 last scan sequential function chart 5 32 latching data function block diagram 9 5 LED force 14 4 library of logic create and use 8 14 Index 5 load a project 17 12 local data See scope logical operators structured text 7 9 look up a bar code 13 4 main routine use of sequential function chart 5 6 major fault codes 15 15 create user defined 15 13 develop fault routine 15 1 manipulate string 13 1 mark as boolean 6 19 math operators structured text 7 6 memory allocation for tags 3 3 determine amount of free 19 1 types 19 1 message cache connecton 10 22 convert between 16 and 32 bit data 10 28 decode string 13 14 guidelines 10 24 limits 10 21 manage multiple messages A 1 processing 10 20 queue 10 21 to a single controller 10 19 to multiple controllers B 1 unconnected buffer 10 23 10 25 Microsoft Excel export import tags 3 10 minor fault clear 16 1 codes 16 4 logic 16 1 mode controller 1 16 monitor forces 14 4 I O connection 10 6 task 4 10 motion planner impact on execution 4 6 trigger event task 4 32 Publication 1756 PM001G EN P March 2004 6 Index name guidelines for tag 3 7 reuse of tag name 3 5 tag name 8 8 9 4 nonvolatile memory check for a load 17 14 clear 17 15 fault during load 17 4 load a project 17 12 load image options 17 7 overview 17 1 store a project 17 9 supported controllers 17
433. t or portability of programs between controllers developed by different vendors This area is a weakness of IEC61131 3 because no file exchange format is defined by the specification This means that if any program created in one vendor s environment will require manipulation to move it to another vendor s system In order to minimize the effort involved in performing cross vendor portability the RSLogix 5000 programming software for the controllers includes a full ASCII export and import utility Additionally the file format that is utilized by this tool is based on a hybrid of the IEC61131 3 Structured Text language definition Controller operating system and data definitions follow the appropriate IEC61131 3 formats Extensions were implemented in order to convert Ladder Diagram logic into ASCII text since this is not defined by IEC61131 3 For more information on the ASCII export and import utility of RSLogix 5000 programming software see the Logix5000 Controllers Import Export Reference Manual publication 1756 RM084 IEC Compliance Tables IEC61131 3 Compliance C 5 Logix5000 controllers and RSLogix5000 comply with the requirements of IEC61131 3 for the following language features Table Feature Feature Description Extensions and Implementation Notes Number Number 1 2 Lower case letters none 1 3a Number sign Used for immediate value data ty
434. t status of SFC forces If the FORCE LED is Then off e No tags contain force values e 0 forces are inactive disabled flashing e Atleast one tag contains a force value e 0 forces are inactive disabled solid e 0 forces are active enabled e Force values may or may not exist GSV Instruction IMPORTANT The ForceStatus attribute shows only the status of T O forces It does not show the status of SFC forces The following example shows how to use a GSV instruction to get the status of forces GSV Get System Value Class Name MODULE Instance Name Attribute Name ForceStatus Dest Force_Status pe where Force_Status is a DINT tag To determine if Examine this bit For this value forces are installed 0 1 no forces are installed 0 0 forces are enabled 1 1 forces are disabled 1 0 Publication 1756 PM001G EN P March 2004 14 6 Force Logic Elements What to Force You can force the following elements of your project If you want to override an input value output value produced tag or consumed tag Then Add an 1 0 Force override the conditions of a transition one time to go from an active step to the next step override one time the force of a simultaneous path and execute the steps of the path Step Through a Transition or a Force of a Path override the conditions of a transition in a sequential function chart execute some but not all the paths of a simultane
435. tag consumed tag A tag that receives the data of a produced tag The data type of the consumed tag must match the data type including any array dimensions of the produced tag The RPI of the consumed tag determines the period at which the data updates Publication 1756 PM001G EN P March 2004 10 10 Communicate with Other Devices Publication 1756 PM001G EN P March 2004 Controllers and Networks that Support Produced Consumed Tags Use the following table to see the controller and network combinations that let you produce and consume tags This controller Can produce and consume tags over this network Backplane ControlNet EtherNet IP SLC 500 Y PLC 5 Y CompactLogix Y ControlLogix Y Y Y DriveLogix FlexLogix Y SoftLogix5800 Y Usea CompactLogix5335 controller catalog number 1769 L35E For two controllers to share produced or consumed tags both controllers must be attached to the same network such as a ControlNet or Ethernet IP network You cannot bridge produced and consumed tags over two networks Connection Requirements of a Produced or Consumed Tag IMPORTANT If a consumed tag connection fails all of the other tags being consumed from that remote controller stop receiving new data Produced and consumed tags each require connections As you increase the number of controllers that can consume a produced tag you also reduce the number of connections the controller has availab
436. tain its operands Depending on the instruction there can be zero one or multiple instruction operand operands When executed an instruction yields one or more values that are partof instruction operandi a data structure operand2 operand3 an Terminate the instruction with a semi colon Even though their syntax is similar instructions differ from functions in that instructions cannot be used in expressions Functions can only be used in expressions construct A conditional statement used to trigger structured text code i e other IF THEN see page 7 12 statements CASE Terminate the construct with a semi colon FOR DO WHILE DO REPEAT UNTIL EXIT comment Text that explains or clarifies what a section of structured text does comment see page 7 28 e Use comments to make it easier to interpret the structured text e Comments do not affect the execution of the structured text start of comment e Comments can appear anywhere in structured text end of comment start of comment end of comment Assignments Use an assignment to change the value stored within a tag An assignment has this syntax tag expression where Component Description tag represents the tag that is getting the new value the tag must be a BOOL SINT INT DINT or REAL is the assignment symbol expression represents the new value to assign to the tag If tag is this data type Use this type of
437. te Change A photoeye at the diverter position indicates when Tag ocas a part is in the diverter position The input is wired to the module in slot 4 of the local chassis Execute Task If No Event Occurs Within fi 000 000 ms Priority fi 4 Lower Number Yields Higher Priority watchdog 500 000 ms IV Disable Automatic Output Processing To Reduce Task Overhead fal Module Properties Local 4 1756 1B32 A 2 General Connection Module Info iC ra Enable Change of State The diverter photoeye point 0 is configured for change of state for both Off and On This lets the photoeye trigger the event task when it turns on and when it turns off Ts The event task uses the following logic to control the diverter If Diverter_Photoeye 1 part is in the diverter position And Divert_Part 1 divert this part Then Diverter 1 turn on the diverter Otherwise Diverter 0 turn off the diverter Diverter_Photoeye Diverter lt Local4 Data 0 gt Divert_Part lt Local 5 0 Data 9 gt Immediately send the output values to the output module in slot 5 IOT Immediate Output Update Tag Local 5 0 Publication 1756 PM001G EN P March 2004 4 28 Manage Multiple Tasks Estimate Throughput To estimate the throughput time from input to output screw to screw use the following worksheet Consideration 1 What is the input filter time of the module that triggers the ev
438. ter a BOOL Expression e Call a Subroutine Enter a BOOL Expression The simplest way to program the transition is to enter the conditions as a BOOL expression in structured text For information on BOOL expressions see Expressions on page 7 4 transition_name q 1 Double click the text area of the transition 2 Type the BOOL expression that determines when the transition is true or false 3 To close the text entry window press Ctrl Enter transition_name BOOL expression Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 15 The following example shows three transitions that use a BOOL expression EXAMPLE Enter a BOOL Expression E Step_002 E E Step_001 Step_003 tag name of the transition Ef Tran_oo3 dint tag a gt 8 J Tran_o02 bool tag_a amp pjbool tag _b Tran_001 bool tag a BOOL expression that controls when the transition is true or false Call a Subroutine mal transition_name lt a 1 Right click the transition and choose Set JSR JSR Properties Routine 2 Choose the routine that contains the logic for the transition 3 Choose E step_name transition_name JSR routine_name Publication 1756 PM001G EN P March 2004 6 16 Program a Sequential Function Chart Add an Action To add an action to a step Right click the step in which the action execu
439. tes and choose Add Action step_name i L Rename an Action To change the name of an action to something that is specific to your application 1 Click the button of the action 2 Click the Tag tab General Action Order Tag 3 gt Name I E Z step_name D 3 Type the new name for the action tag 4 Choose Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 17 Configure an Action To configure an action you have these options e Change the Qualifier of an Action e Calculate a Preset Time at Runtime e Mark an Action as a Boolean Action Change the Qualifier of an Action A qualifier determines when an action starts and stops The default qualifier is N Non Stored The action starts when the step is activated and stops when the step is deactivated For more information see Choose a Qualifier for an Action on page 5 23 1 Click the button of the action N action_name General Action Order Tag 2 gt Qualifier T Non Stored Tl Boolean 3 gt Preset fo ms Use Expression Define 2 Assign the qualifier for the action 3 If you chose a timed qualifier type the time limit or delay for the action in milliseconds Timed qualifiers include e L Time Limited e SL Stored and Time Limited e D Time Delayed e DS Delayed and Stored e SD Stored and Time Delayed 4 Choose Publication 1756 PM001G EN P
440. that contains the controller not applicable to some controllers 8 Select or type the slot number where the controller is installed not applicable to some controllers 9 To store the file in a different folder other than the default Create In path click Browse and select a folder 10 Choose Getting Started 1 3 Configure a Project To change the configuration of the controller such as name chassis size or slot number use the Controller Properties dialog box Rem Prog Not Running I Controller OK 42627 nange ey isiGti 1756 4 7 Slot ControlLogix Chassis 7 os 2 Make the required changes 3 Choose aa Publication 1756 PM001G EN P March 2004 1 4 Getting Started Explore a Project A project includes the following basic components Legend default required component optional component project controller tags global data 1 0 data system shared data power up handler controller fault handler task tas tas program program program program tags local data other routines main routine fault routine Publication 1756 PM001G EN P March 2004 Project component Task Getting Started 1 5 The components of a project work together as foll
441. the Start value plus the Quantity value is less than or equal to the DATA size of the Source 4 57 The AHL instruction failed to execute because the serial Either port is set to no handshaking e Change the Control Line setting of the serial port e Delete the AHL instruction 6 2 Periodic task overlap Simplify program s or lengthen period or raise relative priority etc Periodic task has not completed before it is time to execute again 7 49 Project loaded from nonvolatile memory Publication 1756 PM001G EN P March 2004 Table 16 1 Minor Fault Types and Codes Continued Monitor Minor Faults 16 5 Type Code Cause Recovery Method 9 0 Unknown error while servicing the serial port Contact GTS personnel 9 1 The CTS line is not correct for the current configuration Disconnect and reconnect the serial port cable to the controller Make sure the cable is wired correctly 9 2 Poll list error Check for the following errors in the poll list A problem was detected with the DF1 master s poll list e total number of stations is greater than the such as specifying more stations than the size of the space in the poll list tag file specifying more then 255 stations trying to index e total number of stations is greater than 255 past the end of the list or polling the broadcast address hs STN 255 current station pointer is greater than the end of the poll list tag e astation number greater than 254
442. the ratio between the continuos task and the system overhead functions At this time slice The continuous tasks runs for And then overhead occurs for up to 10 9ms 1 ms 20 4 ms 1ms 33 2 ms 1ms 50 1 ms 1ms Publication 1756 PM001G EN P March 2004 Glossary 42 At the default time slice of 10 system overhead interrupts the continuous task every 9 ms of continuous task time Legend HEE Task executes Task is interrupted suspended 1ms 1ms system overhead H H 9 ms 9 ms 5 10 15 20 25 elapsed time ms The interruption of a periodic task increases the elapsed time clock time between the execution of system overhead 1 ms 1 ms 1 ms 1ms periodic task E H E B B 1 ms 1 ms system overhead B B 9 ms of continuous task time 9 ms of continuous task time continuous task i ae ae el a E 5 10 15 20 25 elapsed time ms If you increase the time slice to 20 the system overhead interrupts the continuous task every 4 ms of continuous task time 1 ms 1 ms 1 ms 1 ms 1 ms system overhead H Hal lad fal E 4 ms 4 ms 4 ms 4 ms 4 ms cortinuoustask P a a a M 5 10 15 20 25 elapsed time ms Publication 1756 PM001G EN P March 2004 Glossary 43 If you increase the time slice to 50 the system overhead interrupts the continuous task every 1 ms of continuous task time 1ms system overhead lil ai fi ai hil m I a li il is m 1 ms continuous task H A A mi E Ei g H E H E
443. this decision see Figure 4 1 on page 4 14 Publication 1756 PM001G EN P March 2004 4 36 Manage Multiple Tasks EXAMPLE In a line that packages candy bars you have to make sure that the perforation occurs in the correct location on each bar e Each time the registration sensor detects the registration mark check the accuracy of an axis and perform any required adjustment e Due to the speed of the line you have to arm the registration input within the event task fal Task Properties Task_1 i General Configuration Program Schedule Monitor Type Event A registration sensor is wired as registration input 1 gt Trigger Axis Registration 1 for the axis named Axis_1 gt Tag JAwis_1 Execute Task If No Event Occurs Within fi 000 000 ms This event task interrupts all other tasks Priority fi Lower Number Yields Higher Priority The following logic arms and re arms the registration input Continuous task If Arm_Registration 1 system is ready to look for the registration mark then The ONS instruction limits the execution of the EVENT instruction to one scan The EVENT instruction triggers an execution of Task_1 event task Arm Registration Storage 0 EVENT ONS Trigger Event Task Task Task_ Task_1 event task The GSV instruction sets Task_ Status DINT tag Status attribute for the event task In the Instance Name attribute THIS means the TASK ob
444. time for the task in milliseconds 4 Choose o Publication 1756 PM001G EN P March 2004 Chapter 2 Using This Chapter Configure an 1 0 Module Communicate with 1 0 This chapter provides basic information on how a Logix5000 controller communicates with I O modules Configure an 1 0 Module 2 1 Address 1 0 Data 2 7 Buffer 1 0 2 8 To communicate with an I O module in your system you add the module to the I O Configuration folder of the controller Controller Organizer xj E Controller Controller_Name IA Controller Tags E3 Controller Fault Handler C3 Power Up Handler E Tasks MainTask H Cy MainProgram 9 Unscheduled Programs H E Motion Groups EI Trends 9 Data Types Add I O modules here EEEO Configuration When you add the module you also define a specific configuration for the module While the configuration options vary from module to module there are some common options that you typically configure e Requested Packet Interval e Communication Format e Electronic Keying Publication 1756 PM001G EN P March 2004 2 2 Communicate with 0 Term Connection Requested Packet Interval The Logix5000 controller uses connections to transmit I O data Definition A communication link between two devices such as between a controller and an 1 0 module PanelView terminal or another controller Connections are allocations of resources th
445. tine Create Routines Getting Started 1 7 Routines provide the executable code for the project in a controller Define a Routine for Each Section of Your Machine or Process To make your project easier to develop test and troubleshoot divide it into routines subroutines 1 Identify each physical section of your machine or process 2 Assign a routine for each of those sections Description of Your Machine or Process first section routine 1 second section routine 2 oo third section routine 3 Identify the Programming Languages That Are Installed To determine which programming languages are installed on your version of RSLogix 5000 software 1 Start RSLogix 5000 software 2 From the Help menu choose About RSLogix 5000 To add a programming language see ControlLogix Selection Guide publication 1756 SG001 Publication 1756 PM001G EN P March 2004 1 8 Getting Started Choose a Programming Language for Each Section For each section of your machine or process choose an appropriate programming language e Logix5000 controllers let you use the following languages ladder logic function block diagram sequential function chart structured text e Use any combination of the languages in the same project In general if a section of your code represents Then use this language continuous or parallel execution of multiple operations not sequenced ladder logic
446. tine do the following steps Identify the Sheets for the Routine Choose the Function Block Elements Choose a Tag Name for an Element Define the Order of Execution Identify any Connectors Define Program Operator Control Add a Sheet Add a Function Block Element Connect Elements Assign a Tag Assign an Immediate Value Constant Connect Blocks with an OCON and ICON Verify the Routine Publication 1756 PM001G EN P March 2004 9 2 Program a Function Block Diagram Identify the Sheets for the To make it easier to navigate through a function block routine divide Routine the routine into a series of sheets e Sheets help you organize and find your function blocks They do not effect the order in which the function blocks execute e When the routine executes all the sheets execute e In general use one sheet for each device motor valve etc The following example shows a function block routine that controls 4 motors EXAMPLE Identify the Sheets for the Routine Motor Control Routine Sheet 1 of 4 motor 1 Sheet 2 of 4 motor 2 Publication 1756 PM001G EN P March 2004 Program a Function Block Diagram 9 3 Choose the Function Block To control a device use the following elements Elements input reference IREF function block input wire i connector ICON output ref
447. tionship between the motion planner and the event task coarse update period A motion planner event task Motion Group Properties Motion_Group Axis Assignment Attribute Tag The coarse update period for the motion group triggers both the motion planner and the event task _ Coarse Update Period me fin 0 5 increments Auto Tag Update Disabled 7 General Fault Type Non Major Fault x Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 33 Checklist for a Motion Group Task For this Make sure you Q 1 Scan time Make sure the scan time of the event task is significantly less than the course update period of the motion group Otherwise a task overlap could occur OQ 2 Task priority Configure the event task as the highest priority task If a periodic task has a higher priority the event task may have to wait until the periodic task is done Q 3 Number of event tasks Limit the number of event tasks Each additional task reduces the processing time that is available for other tasks This could cause an overlap m 4 Automatic Output Processing For an event task you can typically disable automatic output processing default This reduces the elapsed time of the task To verify this decision see Figure 4 1 on page 4 14 Publication 1756 PM001G EN P March 2004 4 34 Manage Multiple Tasks Using the Axi
448. to controller fault handler PROGRAM MajorFaultRecord controller fault handler exists execute controller ES a yes fault cleared no gt continue logic execution enter faulted mode record FAULTLOG shut down Glossary 21 See faulted state minor fault major revision The 1756 line of modules have major and minor revision indicators The major revision is updated any time there is a functional change to the module See electronic keying minor revision master CST Within a single chassis one and only one controller must be designated as the Coordinated System Time CST master All other modules in the chassis synchronize their CST values to the CST master member An element of a structure that has its own data type and name e Members can be structures as well creating nested structure data types e Each member within a structure can be a different data type e To reference a member in a structure use this format tag name member_ name For example This address References the timer_1 pre PRE value of the timer_1 structure input_load as data type oad_info height member of the user defined input_load structure input_load height e If the structure is embedded in another structure use the tag name of the structure at the highest level followed by a substructure tag name and member name tag name substructure name member name For
449. to load from the CompactFlash card edit the Load xml file on the card LT lox Fie Edit view Favorites Tools Help Current4pp ice Desktop ZN My Documents E g My Computer E C810W2K Cs amp Compact Disc D E CB10W2K E Removable Disk F CompactFlash reader Logix folder al Current4pp lt xml version 1 0 encoding UTF 8 gt lt CurrentApplication gt lt ControlFile gt Logix CurrentApp Rev_12_Project_2 xml lt ControlFile gt lt CurrentApplication gt 1 To change which project loads from the card open Load xmil Use a text editor to open the file 2 Edit the name of the project that you want to load e Use the name of an XML file that is in the CurrentApp folder e In the CurrentApp folder a project is comprised of an XML file and a P5K file Publication 1756 PM001G EN P March 2004 17 20 Store and Load a Project Using Nonvolatile Memory Manually Change the Load Parameters for a Project When you store a project to nonvolatile memory you define e when the project is to load On Power Up On Corrupt Memory User Initiated e mode to which to set the controller Gf the keyswitch is in REM and the load mode is not User Initiated To assign a different project to load from the CompactFlash card edit the Load xml file on the card F Logix Current
450. to send the event trigger to the consumer controller D IOT Immediate Output Update Tag Produced_Tag Produced_Tag pw Consumed_Tag p gt 64784481 6A7844B1 ee gt 38221089 3B221D89 gt 43BB278F 43BB278F yy Event Task Controller A Controller B Description In Controller A logic updates the values of a produced tag Once the update is complete the Controller A executes an IOT instruction to send the data and an event trigger to Controller B Controller B consumes the new data After Controller B updates the consumed tag it executes the event task S Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 43 The type of network between the controllers determines when the consuming controller receives the new data and event trigger via the IOT instruction With this controller Over this network The consuming device receives the data and event trigger ControlLogix backplane immediately EtherNet IP network immediately ControlNet network within the actual packet interval API of the consumed tag connection SoftLogix5800 You can produce and consume tags only over within the actual packet interval API of the a ControlNet network consumed tag connection The following diagrams compare the receipt of data via an IOT instruction over EtherNet IP and
451. tor_A a To use connectors follow these rules e Each OCON requires a unique name e For each OCON you must have at least one corresponding ICON i e an ICON with the same name as the OCON e Multiple ICONs can reference the same OCON This lets you disperse data to several points in your routine Publication 1756 PM001G EN P March 2004 9 14 Program a Function Block Diagram Define Program Operator Control Publication 1756 PM001G EN P March 2004 Several instructions support the concept of Program Operator control These instructions include e Enhanced Select ESEL e Totalizer TOT e Enhanced PID PIDE e Ramp Soak RMPS e Discrete 2 State Device D2SD e Discrete 3 State Device D3SD Program Operator control lets you control these instructions simultaneously from both your user program and from an operator interface device When in Program control the instruction is controlled by the Program inputs to the instruction when in Operator control the instruction is controlled by the Operator inputs to the instruction Program or Operator control is determined by using these inputs Input Description ProgProgReq A program request to go to Program control ProgOperReq A program request to go to Operator control OperProgReq An operator request to go to Program control OperOperReq An operator request to go to Operator control To determine whether an instruction is in Program or
452. tore the partially completed string Define the data type as a string Publication 1756 PM001G EN P March 2004 13 20 Process ASCII Characters DTOS DINT to String Source Publication 1756 PM001G EN P March 2004 INSERT DTOS CONCAT Insert String BINT to String String Concatenate Source Source Source Source B 7 Source B Start l 7 Dest Dest 15 11 Enter the DINT tag that contains the second value for the string 12 Enter a tag name to store the ASCII representation of the value Define the data type as a string 13 Enter the tag that stores the partially completed string The tag from step 10 14 Enter the tag that stores the ASCII representation of the second value The tag from step 12 15 Enter a tag name to store the completed string Define the data type as a string send_msq Process ASCII Characters To trigger a message in a MessageView terminal the controller sends the terminal a message in the following format Ctrl T message address CR When send_msg is on the rung does the following e The first DTOS instruction converts the message number to ASCII characters e The INSERT instruction inserts the message number in ASCID after the control character Ctrl T The hex code for Ctrl T is 14 e The second DTOS instruction converts the node number of the terminal to ASCII characters 13 21 e The CONCAT instruction puts the node number in ASCID after the
453. troller change the path to the controller print a report clear faults change the wall clock time create delete edit and run a trend change the configuration of an 1 0 module change the configuration of a MSG instruction enter enable disable and remove forces change tag values update firmware Maintain Project perform all actions available through p gt Full Access RSLogix 5000 software except unsecure a secured controller unsecure a secured controller p gt Full Access and Unsecure Controller update the firmware of a controller p gt Update Firmware Publication 1756 PM001G EN P March 2004 Secure a Project 18 19 Use the worksheet on page 18 19 to record the project actions that you will permit each user or group of users to perform Table 18 5 Project actions for projects that are in the New RSLogix 5000 Resources group and for individual projects For this project or group of projects New Reso RSLogix 5000 urces This user or group of users Requires this access View Project Go Online Maintain Project Full Access Unsecure Controller Update Firmware New Reso RSLogix 5000 urces New Reso RSLogix 5000 urces New Reso RSLogix 5000 UrCES Publication 1756 PM001G EN P March 2004 18 20 Secure a Project Add Users QQ Users Groups lt 1 Right cl
454. troller executes the structured text l step_name i D 1 Double click the text area of the action 2 Type the required structured text 3 To close the text entry window press Ctrl Enter Publication 1756 PM001G EN P March 2004 6 20 Program a Sequential Function Chart action_name comment statement For information on structured text For this structured text information See general information about assignments operators Program Structured Text on page 7 1 functions instructions or comments information about a specific instruction e ogix5000 Controllers General Instructions Reference Manual publication 1756 RM003 e Logix5000 Controllers Process and Drives Instructions Reference Manual publication 1756 RM006 e Logix5000 Controllers Motion Instruction Set Reference Manual publication 1756 RM007 Publication 1756 PM001G EN P March 2004 Program a Sequential Function Chart 6 21 Call a Subroutine Use a Jump to Subroutine JSR instruction to execute a subroutine when the action is active N action_name 1 In the SFC right click the text entry area of the action and choose Set JSR 2 Routine lt none gt Input Parameters Return Parameters 3 4 2 Choose the routine that you want to call 3 To pass a parameter to the routine click the empty Input Parameters text box Then use the down arrow to choose the tag that contains t
455. troller is Logix5000 controller same data type as the produced tag PLC 5C controller user defined data type with the following members Data type Description DINT Status INT x where x is the output size Data produced by a of the data from the PLC 5C PLC 5C controller controller If you are consuming only one INT omit x 7 Click the Connection tab Publication 1756 PM001G EN P March 2004 10 16 Communicate with Other Devices i Tag Properties Consumed_Tag General Connection 8 _ gt Producer x 9 __ amp gt Remote Data Tag Name or Instance Number 10 w RA l 2 0 750 0 ms 8 Select the controller that produces the data 9 Type the name or instance number of the produced data If the producing Then type or select controller is Logix5000 controller tag name of the produced tag PLC 5C controller message number from the ControlNet configuration of the PLC 5C controller 10 Type or select the requested packet interval RPD for the connection 11 Choose 12 If you consume the tag over a ControlNet network use RSNetWorx for ControlNet software to schedule the network Publication 1756 PM001G EN P March 2004 Communicate with Other Devices 10 17 Additional Steps for a PLC 5C Controller If you are sharing data with a PLC 5C controller perform the following additional actions Action Details In the ControlNet config
456. ts of the Status attribute once they are set To use a bit for new status information you must manually clear the bit If Task_Status 0 1 then clear that bit The OTU instruction sets 7ask_Status 0 0 The SSV instruction sets the Status attribute of THIS task Zask_1 Task_Status This includes the cleared bit Sy Set System Value Class Name TASK Task_Status 0 Task_Status 0 Instance Name THIS Attribute Name Status Source Task_Status o Publication 1756 PM001G EN P March 2004 4 38 Manage Multiple Tasks Using the Axis Watch To let the watch position of an axis trigger an event task use the Trigger Axis Watch trigger fl Task Properties Task_1 General Configuration Program Schedule Monitor Let an event trigger this task Type Event Let the watch position Trigger Axis Watch x 0f this axis trigger the task Tag Axis 1 x IT Execute Task If No Event Occurs Within fi000 000 ms Interrupt all other tasks Priority fi Lower Number Yields Higher Priority Watchdog 500 000 ms IV Disable Automatic Output Processing To Reduce Task Overhead When the task is done do not update digital outputs in the local chassis When the axis reaches the position that is specified as the watch position it triggers the event task e You must first arm the axis for the watch position using a Motion Arm Watch MAW instructi
457. tter in the future Thank you for taking the time to provide us feedback Ty You can complete this form and mail it back to us visit us online at www ab com manuals or email us at RADocumentComments ra rockwell com vr Pub Title Type Logix5000 Controllers Common Procedures Cat No 1756 ControlLogix Pub No 1756 PM001G EN P Pub Date March 2004 PartNo 957867 41 1769 CompactLogix ee 1789 SoftLogix 1794 FlexLogix PowerFlex 700S with DriveLogix Please complete the sections below Where applicable rank the feature 1 needs improvement 2 satisfactory and 3 outstanding Overall Usefulness 1 2 3 How can we make this publication more useful for you c 1 2 3 Can we add more information to help you ompleteness all necessary information procedure step illustration feature is provided nit th example guideline other explanation definition Technical Accuracy 1 2 3 Can we be more accurate all provided information l l is correct text illustration Clarity 1 2 3 How can we make things clearer all provided information is easy to understand Other Comments You can add additional comments on the back of this form Your Name Location Phone Your Title Function Would you like us to contact you regarding your comments No there is no need to contact me Yes please call me Yes please email me at Yes please contact me via Return this form to
458. u change the order in which the SFC checks the transitions Execute 2 or more steps at the same time All paths must finish before continuing the SFC Simultaneous Branch A single transition ends the branch The SFC checks the ending transition after the last step in each path has executed at least once If the transition is false the SFC repeats the previous step Loop back to a previous step Publication 1756 PM001G EN P March 2004 Wire to a Previous Step Connect the wire to the step or simultaneous branch to which you want to go Do not wire into out of or between a simultaneous branch Design a Sequential Function Chart 5 13 Here are some examples of SFC structures for different situations Example situation Example solution Station 45 and 46 of an assembly line work on parts Simultaneous Branch simultaneously When both stations are done the parts move down 1 station Depending on the build code a station either drills or polishes Selection Branch Drill Polish To simplify my programming want to separate communications Simultaneous Branch and block transfers from other control logic A
459. ublication 1756 PM001G EN P March 2004 Communicate with an ASCII Device 12 11 EXAMPLE A bar code reader sends bar codes to the serial port channel 0 of the controller Each bar code contains 24 characters To determine when the controller receives a bar code the ACB instruction continuously counts the characters in the buffer bar_code_count EN ACB ASCII Chars in Buffer Channel 0 N SerialPort Control bar_code_count ER gt Character Count 0 When the buffer contains at least 24 characters the controller has received a bar code The ARD instruction moves the bar code to the bag_bar_code tag GEQ ARD Grtr Than or Eql A gt B ASCII Read EN Source A bar_code_count pos Channel 0 0 Destination bag_bar_code DN gt Source B 24 u SerialPort Control bar_code_read ER gt String Length 24 Characters Read 0 42227 13 Do you want to send data to the device If Then yes Go to Send Characters to the Device on page 12 14 no Stop You are done with this procedure To use the data go to Process ASCII Characters on page 13 1 Publication 1756 PM001G EN P March 2004 12 12 Communicate with an ASCII Device 17 19 Publication 1756 PM001G EN P March 2004 14 15 16 17 18 19 20 21 22 23 Enter the following rung ABL ASCII Test For Buffer Line Channel SerialPort Control Character Count
460. uction 4 hve eh eG oe ROLES AS PER RE eS C 1 Operating System 2 ee C 2 Data Definitions afta eae Boe davai wk Sie De ek EE Se EA ete C 2 Programming Languages 0 00000 C 3 IStHICHOM Set ne oe wed cate haa ate Ges ea RA ys C 4 IEC61131 3 Program Portability ta ak Go ES A C 4 IEC Compliance Lables 46 20h n a8 SS HESSEN SG OES Os C 5 Chapter 1 Getting Started Using This Chapter This chapter provides preliminary information to help you get started with a project for Logix5000 controller For this information or procedure See this page Create a Project 1 1 Explore a Project 1 4 Create Routines 1 7 Verify a Project Save a Project Configure a Communication Driver Download a Project to the Controller Select a Mode for the Controller Manually Clear a Major Fault a a a a a s 1 1 1 1 1 1 1 a a a a a a a loo N o a uw N N Configure the Execution of a Task Create Multiple Programs 1 20 Access Status Information 1 22 Adjust the System Overhead Time Slice 1 26 View Scan Time 1 29 Adjust the Watchdog Time 1 31 Create a Project To configure and program a Logix5000 controller you use RSLogix 5000 software to create and manage a project for the controller Term Definition project The file on your workstation or server that stores the logic configuration data and documentation for a controller e The project file has an ACD extens
461. uction enters the message queue D The MSG instruction comes off the queue and is processed If the MSG instruction Then the MSG instruction does not use a connection or the connection was not previously cached uses an unconnected buffer to establish communication with the destination device uses a connection and the connection is cached does not use an unconnected buffer O Communication occurs with the destination device Publication 1756 PM001G EN P March 2004 Description Communicate with Other Devices 10 21 Message Queue The message queue holds up to 16 MSG instructions including those that you configure as a block transfer read or block transfer write When the queue is full an instruction tries to enter the queue on each subsequent scan of the instruction as shown below rung condition in false true false EN bit off on EW bit off on to to fo o The controller scans the MSG instruction The rung condition in for the MSG instruction is true The EN bit is set The MSG instruction attempts to enter the queue but the queue is full 16 MSG instructions are already enabled The EW bit remains cleared OO The controller scans the MSG instruction The rung condition in for the MSG instruction is false The EN bit remains set The MSG instruction attempts to enter the queue but the queue is full The EW bit remains cleared Th
462. uctured Text Table of Contents v Create a Selection Branch n anaa aaa Med ER aot He 6 6 Start a Selection Branch n o aana God meee ed am 4 6 6 End a Selection Branch Vu thw anaa aaea 6 7 Set the Priorities of a Selection Branch n sas ao 8 2s 6 8 Return to a Previous Step unio 66 fete aaua 6 9 Connect a Wire to the Step 0 0 0 0 0 00 02 eee 6 9 PS AW 10S anidia nike Reh dO Pa DEK ILS Se BAN Rate 6 10 Show a Hidden Wire aru ot lel essa eed wea er eee 6 10 RENAME A SID edna tua tak wd ot a e dodo dee be 6 11 Configure ASt As ovat e a a tton ska ohana 6 11 Assign the Preset Time for a Step 05 6 11 Configure Alarms for a Step iw 4 4 4 e Te eo ade eat x 6 12 Use an Expression to Calculate a Time 6 12 Rename a Transitions o se oep aha See wate Arg tes tek 6 14 Program a Transition 6 oti o Rohe She he et aoe S85 6 14 Enter a BOOL Expression oona aana 6 14 Calla Sirois oa aa a N G Vane 6 15 Adadan AcGOtires s i pae iapa T aa E Pls wind oa E burg 6 16 Rename an ACION noona aaa a 6 16 Configure an ACION 7 aoaaa aceite A eo BS 6 17 Change the Qualifier of an Action 6 17 Calculate a Preset Time at Runtime 6 18 Mark an Action as a Boolean Action 6 19 Programi an Action enose Enoy ker oA es BSE EES Cee 6 19 Enter Structured Text noanoa uaaa 6 19 Calla Subroutines neet anie od Fey BOLTS o eee he ed 6 21 Assign the Execution Or
463. ue the instruction errors and does not transfer the data e You can increase the number of unconnected buffers 40 max but continue to follow guideline 5 e To increase the number of unconnected buffers see page 10 25 Get or Set the Number of Unconnected Buffers On this tab Configuration For this item Communicate with Other Devices 10 25 To determine or change the number of unconnected buffers use a MSG instruction e The range is 10 40 unconnected buffers e The default number is 10 e Each unconnected buffers uses 1 1K bytes of memory Get the Number of Unconnected Buffers To determine the number of unconnected buffers that the controller currently has available configure a Message MSG instruction as follows Type or select Message Type CIP Generic Service Type Custom Service Code 3 Class 304 Instance 1 Attribute 0 Source Element source array where data type SINT 4 In this element Enter source _arrayl0 1 source _array 0 source arrayl2 17 source array 3 0 Source Length bytes 4 Write 4 SINTs Destination destination array where data type SINT 10 Leave all the values 0 destination_array 6 current number of unconnected buffers Communication Path 1 slot_number_of_controller Publication 1756 PM001G EN P March 2004 10 26 Communicate with Other Devices Set the Number of Unconnected Buffers As a starti
464. ue of the carriage return then stop Otherwise go to 3 Program Structured Text 7 27 Enter this structured text element _number 0 SIZE SINT_ array 0 SINT_array_size Repeat String tag DATA element_ number SINT_array element_number element number element _number 1 String tag LEN element _number If element_number SINT _array_size then exit end_if Until SINT_array element_number 13 end_repeat Publication 1756 PM001G EN P March 2004 Program Structured Text Comments Format comment To make your structured text easier to interpret add comments to it e Comments let you use plain language to describe how your structured text works e Comments do not affect the execution of the structured text To add comments to your structured text To add a comment Use one of these formats on a single line comment at the end of a line of structured fex comment comment within a line of structured text comment comment that spans more than one line start of comment end of comment start of comment end of comment For example Example At the beginning of a line Check conveyor belt direction IF conveyor direction THEN At the end of a line ELSE If conveyor isn t moving set alarm light light 1 END_IF comment Sugar Inlet 1 open the inlet IF Sugar Low low level LS
465. uffer without scanning updating the channels e The module resets the RPI timer each time and RTS transfer occurs Publication 1756 PM001G EN P March 2004 Term change of state COS Manage Multiple Tasks 4 23 Definition The COS parameter instructs a digital input module to multicast data whenever a specified input point transitions from On Off or Off On e You enable COS on a per point basis e When any point that is enabled for COS receives the specified change the module multicasts the data for all its points e By default COS is enabled for both On Off and Off On changes for all points e You must specify an RPI regardless of whether you enable COS If a change does not occur within the RPI the module sends its data at the RPI The following table summarizes when an input module multicasts its data and triggers an event task within its own chassis Ifthe inputmodule And Then it multicasts data And it triggers an event task is digital COS is enabled for any e when any point that is enabled for COS when any point that is enabled for point on the module receives the specified change COS receives the specified change e at the RPI COS is not enabled for at the RPI never any point on the module analog RTS lt RPI at the RTS newly updated channel data at the RTS for the module RTS gt RPI e at the RTS newly updated channel data at the RTS for the module e at the RPI does not conta
466. uffers execute a MSG instruction that reconfigures the number of unconnected buffers Refer to Get or Set the Number of Unconnected Buffers on page 10 25 e Each unconnected buffers uses 1 1K bytes of memory e f all the unconnected buffers are in use when an instruction leaves the message queue the instruction errors and data does not transfer If a MSG instruction uses a connection the instruction uses an unconnected buffer when it first executes to establish a connection If you configure the instruction to cache the connection it no longer requires an unconnected buffer once the connection is established Publication 1756 PM001G EN P March 2004 10 24 Communicate with Other Devices Guidelines As you plan and program your MSG instructions follow these guidelines Guideline Details 1 For each MSG instruction create a Each MSG instruction requires its own control tag controltag e Data type MESSAGE e Scope controller e The tag cannot be part of an array or a user defined data type 2 Keep the source and or destination data A MSG instruction can access only tags that are in the Controller Tags folder controller at the controller scope scope 3 If your MSG is to a device that uses If your message is to a device that uses 16 bit integers such as a PLC 5 or SLC 500 16 bit integers use a buffer of INTsin controller and it transfers integers not REALs use a buffer of INTs in the message and the
467. ups 43075 J Users Groups 29 Resources Groups New RSLogix 5000 Resources RSLOGIX 5000 Your_RSLogix5000_Project Actions Groups 43078 Secure a Project 18 17 Define the Project Actions for Your Users Project actions let you perform specific tasks on a specific project or group of projects e When you enable security for an RSLogix 5000 project or create a new project with security turned on it becomes a member of the New RSLogix 5000 Resources group Users who work with projects in this group require the appropriate access We recommend that you grant Full Access to anyone who has access to create a project e To customize the access of a project move it out of the New RSLogix 5000 Resources group and assign privileges that are specific to that project Publication 1756 PM001G EN P March 2004 18 18 Secure a Project Table 18 4 Project Actions To let a user e open a project offline e copy components from a project e export the tags of a project The following actions apply to a secured RSLogix 5000 project or group of projects And And Grant this action p gt View Project go online and p gt Go Online monitor a project save a project save a project as a different ACD file open an older revision of a project compact a project export a project download or upload a project change the mode of the con
468. uration Ifthe PLC 5C This Then in RSNetWorx software a a produces integers In the ControlNet configuration of the PLC 5C controller insert a ge Send Scheduled Message consumes integers In the ControlNet configuration of the PLC 5C controller A Insert a Receive Scheduled Message B In the Message size enter the number of integers in the produced tag REALs In the ControlNet configuration of the PLC 5C controller A Insert a Receive Scheduled Message B In the Message size enter two times the number of REALs in the produced tag For example if the produced tag contains 10 REALs enter 20 for the Message size If the PLC 5C controller When you produce REALs 32 bit floating point values for a PLC 5C controller the PLC 5C stores the consumes REALs reconstruct data in consecutive 16 bit integers the values e The first integer contains the upper left most bits of the value e The second integer contains the lower right most bits of the value e This pattern continues for each floating point value See the following example on page 10 18 Publication 1756 PM001G EN P March 2004 10 18 Communicate with Other Devices The following example shows how to re construct a REAL floating point value in the PLC 5C controller EXAMPLE Re construct a floating point value The two MOV instructions reverse the order of the integers as the integers move to a new location Because the destination of the COP instruction is a flo
469. us Class Name MODULE 0e Instance Name Module_3 Source B 2 Attribute Name FaultCode Dest Module_3_Fault_Code 16 0000_0000 If Module_3_Fault_Code is NOT equal to 0 then communication has timed out faulted with Module_3 The OTE instruction sets Module_3_Faulted 1 Module_3_Faulted EQ Not Equal Source Module_3_Fault_Code 16 0000_0000 0 Source B Publication 1756 PM001G EN P March 2004 Produce and Consume a Tag Communicate with Other Devices 10 9 To transfer data between controllers send or receive data you have the following options If the data Then See needs regular delivery at an interval that you Produce and Consume a Tag This specify i e deterministic section is sent when a specific condition occurs in Execute a Message MSG Instruction Page 10 19 your application Term produced tag A Logix5000 controller lets you produce broadcast and consume receive system shared tags controller_1 controller_2 produced tag p gt consumed tag controller_3 H consumed tag controller _4 L consumed tag Definition A tag that a controller makes available for use by other controllers Multiple controllers can simultaneously consume receive the data A produced tag sends its data to one or more consumed tags consumers without using logic The produced tag sends its data at the RPI of the consuming
470. using one two or three subscripts coordinates Publication 1756 PM001G EN P March 2004 Glossary 4 e In an array with two or three dimensions the right most dimension increments first in memory Program Tags MainProgram TagName Alias For Base Tag_ E hole_posiion P REALf6 6 lt This array contains a two dimensional grid of elements six elements by six elements SS bs aS l 42367 The right most dimension increments to its maximum value When the right most dimension then starts over starts over the dimension to the left increments by one Publication 1756 PM001G EN P March 2004 Glossary 5 e The total number of elements in an array is the product of each dimension s size as depicted in the following examples This array Stores data like For example one dimension Tag name Type Dimension Dimension Dimension 2 one_d_array DINT 7 7 total number of elements 7 valid subscript range DINT x where x 0 6 two dimension Tag name Type DimensionO Dimension1 Dimension 2 two_d_array DINT 4 5 4 5 total number of elements 4 5 20 valid subscript range DINT x y where x 0 3 y 0 4 three dimension Tag name Type DimensionO Dimension Dimension 2 three_d_array DINT 2 3 4 2 3 4 ue total number of elements 2 3 4 24 valid subscript range DINT x y z where x 0 1 y 0 2
471. utes the OTE instruction sets the Outlet ProgCommand tag equal to 1 which opens the outlet valve You cannot reuse a non boolean action within the same SFC except to reset a stored action Only one instance of a specific non boolean action is permitted per SFC Publication 1756 PM001G EN P March 2004 5 20 Design a Sequential Function Chart Publication 1756 PM001G EN P March 2004 Use a Boolean Action A boolean action contains no logic for the action It simply sets a bit in its tag SFC_ACTION structure To do the action other logic must monitor the bit and execute when the bit is on With boolean actions you have to manually reset the assignments and instructions that are associated with the action Since there is no link between the action and the logic that performs the action the automatic reset option does not effect boolean actions Here is an example B N f _Open_Outlet S_Complete_the_Batch When the S_Complete_the_Batch step is active the S_Open_Outlet action executes When the action is active its Q bit turns on S_Open_Outlet Q JSR Jump To Subroutine Routine Name Open_QOutlet A ladder logic routine monitors the Q bit S_Open_Outlet Q When the Q bit is on the JSR instruction executes and opens the outlet valve You can reuse a boolean action multiple times within the same SFC SFC_ACTION Structure Each action non boolean and boolean uses a tag to provide information ab
472. vailable 9 8 9 11 9 12 9 21 automatic reset sequential function chart 5 38 bar code extract characters 13 2 search fora match 13 4 test characters 13 4 13 10 bitwise operators structured text 7 10 block transfer guidelines 10 24 block See array BOOL expression sequential function chart 5 26 6 14 structured text 7 4 boolean action 5 20 6 19 program 5 20 branch ladder logic 8 2 sequential function chart 5 12 6 5 buffer for unconnected message 10 23 10 25 I 0 2 8 C cache connection 10 22 CASE 7 16 change of state configure for 1 0 module 4 22 chassis size 1 3 clear major fault 1 17 15 1 Publication 1756 PM001G EN P March 2004 2 Index minor fault 16 1 nonvolatile memory 17 15 codes major fault 15 15 minor fault 16 4 comments structured text 7 28 communicate other controllers 10 1 with multiple controllers B 1 communication execution 1 26 guidelines for unscheduled communication 4 8 I O module 2 2 impact on execution 4 6 Message instruction 10 19 system overhead time slice 1 26 CompactFlach card use of reader 17 18 compare ASCII characters 13 4 13 10 compliance tables C 5 configure action 6 17 alarm 6 12 controller 1 3 driver 1 13 electronic keying 2 6 execution of sequential function chart 5 50 6 28 I O module 2 1 10 2 load from nonvolatile memory 17 7 17 12 main routine 1 21 output processing for a task 4 13 project 1 3 serial port for ASCII 12 3 step 6 11 system over
473. vent Task 4 20 Using the Module Input Data State Change Trigger 4 22 Using the Motion Group Trigger 4 32 Using the Axis Registration Trigger 4 34 Using the Axis Watch Trigger 4 38 Using the Consumed Tag Trigger 4 4 Using the EVENT Instruction Trigger 4 50 Create a Task 4 53 Define a Timeout Value for an Event Task 4 55 Publication 1756 PM001G EN P March 2004 4 2 Manage Multiple Tasks Select the Controller Tasks A Logix5000 controller lets you use multiple tasks to schedule and Publication 1756 PM001G EN P March 2004 prioritize the execution of your programs based on specific criteria This balances the processing time of the controller among the different operations in your application e The controller executes only one task at one time e A different task can interrupt a task that is executing and take control e In any given task only one program executes at one time Manage Multiple Tasks 4 3 If you want to execute a section of your logic all of the time A Logix5000 controller uses three types of tasks Use the following table to choose the appropriate type of task for each section of your logic Then use this type Description of task Continuous Task The continuous task runs in the background Any CPU time not allocated to other operations such as motion communications and periodic or event tasks is used to execute the programs within the continuous task e The continuous task runs all the time
474. ves and temperature loops The project uses an SFC to control the process EXAMPLE Define the Tasks H Controller Controller_Name This task periodic uses function block diagrams to turn on or J Tasks off motors and open or close valves The SFC in Main Task Devices_Task commands the state for each device The function block 3 Motors _Program diagrams set and maintain that state A Program Tags 2A Motors age Valves_Program A Program Tags This task periodic uses function block diagrams to configure n valves and regulate temperature loops The SFC in MainTask w ak H E Temperatures_T commands the temperatures The function block diagrams set Temperatures_Program and maintain those temperatures Ej Program Tags EF 2h Temperatures fa _MainTask This task continuous executes the sequential function MainProgram chart SFC The SFC commands the specific state or A Program Tags temperature for each device or temperature loop dit SFC Publication 1756 PM001G EN P March 2004 5 6 Design a Sequential Function Chart Choose How to Execute the To execute an SFC either configure it as the main routine for a SFC program or call it as a subroutine If The SFC is the only routine in the program Then Configure the SFC as the main routine for The SFC calls a the other routines of the program the program The program requi
475. with Wait for the download to complete and clear fault keyswitch during download 1 Actual position has exceeded positive Move axis in negative direction until position is within overtravel overtravel limit limit and then execute Motion Axis Fault Reset 2 Actual position has exceeded negative Move axis in positive direction until position is within overtravel overtravel limit limit and then execute Motion Axis Fault Reset 3 Actual position has exceeded position error Move the position within tolerance and then execute Motion Axis tolerance Fault Reset 4 Encoder channel A B or Z connection is broken Reconnect the encoder channel then execute Motion Axis Fault Reset 5 Encoder noise event detected or the encoder Fix encoder cabling then execute Motion Axis Fault Reset signals are not in quadrature 6 Drive Fault input was activated Clear Drive Fault then execute Motion Axis Fault Reset 7 Synchronous connection incurred a failure First execute Motion Axis Fault Reset If that doesn t work pull servo module out and plug back in If all else fails replace servo module Publication 1756 PM001G EN P March 2004 Table 15 1 Major Fault Types and Codes Continued Handle a Major Fault 15 17 Type Code Cause Recovery Method 11 8 Servo module has detected a serious Replace the module hardware fault 9 Asynchronous Connection has incurred a First execute Motion Axis Fault Reset If that doesn t work pull failure s
476. work See connection Publication 1756 PM001G EN P March 2004 You can specify a module on an EtherNet IP network using any of these formats IP address e g 130 130 130 5 IP address Port e g 130 130 130 5 24 DNS name e g tanks DNS name Port e g tanks 24 Glossary 29 periodic task A task that is triggered by the operating system at a repetitive period of time e Use a periodic task for functions that require accurate or deterministic execution e Whenever the time expires the task is triggered and its programs are executed e Data and outputs established by the programs in the task retain their values until the next execution of the task or they are manipulated by another task e You can configure the time period from 1 ms to 2000 s The default is 10 ms r Ensure that the time period is longer than the sum of the execution times of all the programs assigned to the task If the controller detects that a periodic task trigger occurs for a task that is already operating a minor fault occurs e Periodic tasks always interrupt the continuous task e Depending on the priority level a periodic task may interrupt other periodic tasks in the controller See continuous task periodic task overlap A condition that occurs when a task is executing and the same task is triggered again The execution time of the task is greater than the periodic rate configured for the task See periodic task
477. x or earlier If the controller faults immediately after you switch it to the Run mode then examine the prescan operation for the fault Depending on the revision of your controller an array subscript that is beyond the range of the array out of range during prescan may or may not produce a fault Then During prescan an array subscript that is beyond the range of the array out of range produces a major fault 12 x See the release notes for the firmware of your controller 13 0 or later If your controller is Publication 1756 PM001G EN P March 2004 During prescan the controller automatically clears any faults due to an array subscript that is beyond the range of the array out of range To clear a major fault that occurs during prescan Identify When the Controller is in Prescan Get the Fault Type and Code Check for a Specific Fault Clear the Fault Identify When the Controller is in Prescan In the main routine of your program enter the following rung CPU_scanning 0 i mA 43063 1 Enter this rung as the first rung in the main routine of the program 2 The fault routine of this program uses the status of this bit to determine if the fault occurred during prescan or normal scan of the logic e During prescan this bit is off During prescan the controller resets all bits that are referenced by OTE instructions e Once the controller begins to exe
478. xamine this bit An EVENT instruction triggered 0 the task event task only A timeout triggered the task 1 event task only An overlap occurred for this task 2 determine the number of times TASK OverlapCount DINT Valid for an event or a periodic task that an overlap occurred To clear the count set the attribute to 0 Publication 1756 PM001G EN P March 2004 4 12 Manage Multiple Tasks EXAMPLE Programmatically Check for Overlaps 1 The GSV instruction sets Jask_2_Status Status attribute for Task_2 DINT value GSV Get System Value Class Name TASK Instance Name Task_2 Attribute Name Status Dest Task_2_ Status 2 0000_0000_0000_0000_0000_0000_0000_0100 2 If fask_2_Status 2 1 then an overlap occurred so get the count of overlaps The GSV instruction sets Task_2_Overlap_Count DINT tag OverlapCount attribute of Task_2 Task_2_Status 2 GSV Get System Value Class Name TASK Instance Name Task_2 Attribute Name OverlapCount Dest Task_2_Overlap_Count 28 3 If Condition_1 1 then clear the bits of the Status attribute for Task_2Z The SSV instruction sets the Status attribute of Task_2 Zero Zero is a DINT tag with a value of 0 Condition_1 SV Set System Value Class Name TASK Instance Name Task_2 Attribute Name Status Source Zero 0e Publication 1756 PM001G EN P March 2004 Manage Multiple Tasks 4 13 t the end of a task the cont
479. xecute e Structured text is not case sensitive e Use tabs and carriage returns separate lines to make your structured text easier to read They have no effect on the execution of the structured text Structured text can contain these components Term Definition Examples assignment Use an assignment statement to assign values to tags tag expression see page 7 2 The operator is the assignment operator Terminate the assignment with a semi colon expression An expression is part of a complete assignment or construct statement see page 7 4 An expression evaluates to a number numerical expression or to a true or false state BOOL expression An expression contains tags A named area of the memory where data is stored valuel BOOL SINT INT DINT REAL string immediates A constant value 4 operators A symbol or mnemonic that specifies an operation tagl tag2 within an expression tagl gt valuel functions When executed a function yields one value Use function tag1 parentheses to contain the operand of a function Even though their syntax is similar functions differ from instructions in that functions can only be used in expressions Instructions cannot be used in expressions Publication 1756 PM001G EN P March 2004 7 2 Program Structured Text Term Definition Examples instruction An instruction is a standalone statement instruction see page 7 11 An instruction uses parenthesis to con
480. y lets you keep a copy of your project on the controller The controller does not need power to keep this copy e You can load the copy from nonvolatile memory to the user memory of the controller on every power up whenever there is no project in the controller and it powers up anytime through RSLogix 5000 software Publication 1756 PM001G EN P March 2004 17 2 Store and Load a Project Using Nonvolatile Memory How to Use This Procedure If you want to See review preliminary information on how to use nonvolatile memory Before You Use Nonvolatile Memory on page 17 2 store a project in the nonvolatile memory of the controller Store a Project on page 17 9 overwrite the current project in the controller with the project that is stored in the Load a Project on page 17 12 nonvolatile memory of the controller load the project after a power loss cleared the memory because there was no battery use ladder logic to flag that your project loaded from nonvolatile memory Check for a Load on page 17 14 remove a project from the nonvolatile memory of the controller Clear Nonvolatile Memory on page 17 15 e assign a different project to load from a CompactFlash card Use a CompactFlash Reader on page 17 18 e change the load parameters for a project on a CompactFlash card Before You Use Nonvolatile 4A store or load has the following parameters Memory Parameter How much tim
481. you cannot reference a controller tag if a tag of the same name exists as a program tag for that program Certain tags must be controller scope controller tag lf you want to use the tag Then assign this scope in more than one program in the project in a Message MSG instruction controller scope controller tags to produce or consume data to communicate with a PanelView terminal none of the above program scope program tags Publication 1756 PM001G EN P March 2004 3 8 Organize Tags Guideline Details m 4 For integers use the DINT data To increase the efficiency of your logic minimize the use of SINT or INT data types type Whenever possible use the DINT data type for integers e A Logix5000 controller typically compares or manipulates values as 32 bit values DINTs or REALs e The controller typically converts a SINT or INT value to a DINT or REAL value before it uses the value e f the destination is a SINT or INT tag the controller typically converts the value back to a SINT or INT value e The conversion to or from SINTs or INTs occurs automatically with no extra programming But it takes extra execution time and memory Q 5 Limit a tag name to 40 characters Here are the rules for a tag name e only alphabetic characters A Z or a z numeric characters 0 9 and underscores _ e must start with an alphabetic character or an underscore e no more than 40 characters e no
482. ze the Steps Add Actions for Each Step Describe Each Action in Pseudocode Choose a Qualifier for an Action Define the Transition Conditions Transition After a Specified Time Turn Off a Device at the End of a Step Keep Something On From Step to Step End the SFC Nest an SFC Configure When to Return to the OS JSR Pause or Reset an SFC The remaining sections of this chapter describe in detail how to perform each task Publication 1756 PM001G EN P March 2004 Design a Sequential Function Chart 5 5 Define the Tasks The first step in the development of an SFC is to separate the configuration and regulation of devices from the commands to those devices Logix5000 controllers let you divide your project into one continuous task and multiple periodic tasks and event tasks 1 Organize your project as follows These functions Go here configure and regulate devices periodic task command a device to a specific state SFC in the continuous task sequence the execution of your process 2 For those functions that go in a periodic task group the functions according to similar update rates Create a periodic task for each update rate For example your 2 state devices may require faster updates than your PID loops Use separate periodic tasks for each The following example shows a project that uses two periodic tasks to regulate motors val

Download Pdf Manuals

image

Related Search

Related Contents

  Samsung DVD-C601 Manuel de l'utilisateur  充電式 車夏也をり出して!! - JEMA 一般社団法人 日本電機工業会  A Users Guide to EnergyPLAN  SYSTEM MANUAL COLOMBI SPRING COILING  Kenroy Home 32680ORB Installation Guide  Cover 1110251284.indd  Nobo Elipse Enamel Drywipe Board 35x50cm  User`s Manual (with Warranty)  Philips Hard case with silicone DLA63044  

Copyright © All rights reserved.
Failed to retrieve file