Routines

  • Logix supports four controller programming languages: Ladder, Function Block Diagram, Structured Text, and Sequential Function Chart.
  • To simultaneously display logic in multiple routines, select Window -> New Window and then arrange the windows manually. Or select Window -> Tile Horizontal.
  • Multiply the number of words in a PLC/SLC program times 18 to estimate the amount memory (in bytes) needed in a Logix controller.
  • To display context-specific instruction help, select an instruction or element and press F1.
  • The Language Element browser is a shortcut to adding logic. In the any of the language editors: use Alt+Insert, type the instruction mnemonic, and press Enter. You can also invoke this browser by pressing the Insert key in the LD, SFC and FBD editors. This short cut can be much quicker than using the instruction toolbar.
  • You can find all occurrences of a tag by right-clicking the tag in logic and choosing "Find All ".
  • You can use the Go To dialog (Ctrl+G) to quickly navigate to routines called by the current routine and to routines that call the current routine.
  • You can drag and drop from the instruction toolbar in any of the language editors. In SFC editor, the elements auto-connect.
  • Use the CPS instruction to provide buffering of communications and I/O data to minimize impact of asynchronous data arrival.
  • For tables of bits (BOOL), use a DINT array to ensure full access via the file and diagnostic instructions COP, DDT, FBC, etc.
  • Controller tags apply to the entire controller and can be referenced by any program. Program tags apply only to individual programs. This means program tags can have the same names in more than one program, allowing programs to be copied and reused.
  • In the Sequential Function Chart Editor, you can use the Routine Overview (Ctrl+B) tool to view your entire SFC and help navigate to a specific area of your chart.
  • Logix controllers perform a prescan of logic on startup to perform initialization. A tag used as an index can cause a startup fault if its value is larger than the array length. Use a Fault routine to detect and reset this condition.
  • In the Sequential Function Chart Editor, you can use the indicator tag field in an action to specify a tag value to monitor during execution.
  • In the Sequential Function Chart Editor, you can select multiple SFC elements and use the Layout SFC Elements feature to automatically rearrange the selected elements as needed to provide adequate spacing, avoid page boundaries, and left or center justify branches.
  • In the Sequential Function Chart Editor, you can change the order in which selection branch legs are evaluated from the Set Sequence Priorities dialog.
  • Refer to the Online Help for the Action Properties dialog - General Tab Overview for a useful timing diagram that explains how the various action qualifiers affect the execution of an action.
  • You can customize the auto-naming of Sequential Function Chart Steps, Actions, Transitions, and Stop elements from the Workstation Options and Routine Properties dialogs.
  • You can attach text boxes to language elements in FBD and SFC logic to maintain their relative positions if you move logic.
  • You can use Ctrl+Space to invoke the Tag browser from within the ST editor.
  • Comments in Structured Text are downloaded to the controller. This includes comments in Structured Text routines and embedded Structured Text in SFC routines.
  • In the Structured Text Editor, you see the words colored to indicate keywords, tag names, and other recognized words. You can change the colors used by the editor by choosing Options from the Options menu.
  • In the Structured Text Editor, you can configure the instruction's parameters by right-clicking an instruction name and choosing "Instruction Properties".
  • You can use instructions available in Ladder and Function Block Diagram routines also in Structured Text routines.
  • You can configure the sheet size for your Function Block Diagram or Sequential Function Chart routines from the Routine Properties dialog.
  • In the Function Block Editor, you can configure the block's parameters by clicking the Browse (...) button on the upper right side of the block.
  • RSLogix 5000 supports pending edits on multiple rungs when online editing ladder logic.
  • When editing ladder routines, you can create logic using ASCII (for example: "XIC MYTAG") by either typing when a rung is selected, pressing the Enter key when a rung is selected, or double clicking to the left of a rung.
  • In the Ladder Diagram Editor, you can insert a branch level above the current level by right clicking the left side of the branch and select Add branch. To insert a branch level below the current level, right click the right side of the branch and select Append New Level.
  • Partial import of rungs works in all ladder routines, including Add-On Instructions.
  • When performing a partial import of rungs, change tag names to create new tags in the imported logic.
  • Once you do a partial import of rungs, add-on instructions, or user-defined data types, you can't undo the import. If the import didn't work as expected, close the project without saving.
  • On a partial import of rungs, the exported data values are also imported. This includes configured message instructions. Partial imports/exports can save time versus copying and pasting since copying and pasting does not copy data values.
  • Copy pieces of logic into other applications like Microsoft Word in a bitmap or metafile format.
  • If you want a subroutine to execute every scan, copy the first instruction and paste it right next to the original instruction. Use the same tags on the duplicate instruction as on the first instruction. Then insert an AFI instruction before the duplicate.
  • To copy a group of rungs to paste into another routine later, select the rungs and drag them to the desktop. This copies the rungs into a file that you can later drag into another routine.
  • You can drag components from the Controller Organizer into the Ladder Editor instruction.
  • Double click or press Enter at the end of a ladder rung to create and start a textual edit of that rung.
  • To drag a language element from one routine to another, drag the element over the routine tabs at the bottom of the editor to switch the routine.