Create a routine

Create a routine for ladder diagram to break up large or complex ladder diagrams into multiple routines, such as the main routine, a fault routine, and a subroutine. By default, each program contains a main routine. Create up to 1000 routines.
  1. On the explorer bar, select System icon
    System
    and expand the FactoryTalk Smart Objects.
  2. Right-click the program and select
    New routine
    .
  3. In
    New routine
    , in
    Name
    , enter a name
    for the routine.
  4. (optional) In
    Description
    , enter a description of the routine.
  5. Configure the routine as either:
    • Main routine. Under
      Select as Main Routine
      , position the switch to Toggle On icon
      On
      to make the routine a main routine and execute the logic in a routine when a program triggers. Position the switch to Toggle Off icon
      Off
      to make the routine a fault routine.
      IMPORTANT: All main routines must use the Name
      main
      . Changing the name of a main routine after it has been created removes its designation as a main routine.
    • Fault routine. Under
      Select as Fault Routine
      ,
      position the switch to Toggle On icon
      On
      to make the routine a fault routine and execute fault handling logic when a program fault occurs. Position the switch to Toggle Off icon
      Off
      to make the routine a main routine.
  6. In
    Routine Type
    , select the type:
    • Ladder Diagram
  7. (optional) Select
    Open New Routine
    to open the routine for editing after you create the routine.
  8. Select
    Create
    . The routine appears in
    System
    under the selected program and is preceded by Ladder icon.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.