Create a routine
    Create a routine to break up a large or complex program into multiple routines, such as a
        main routine, a fault routine, and a subroutine. By default, each program contains a main
        routine. Create up to 1000 routines. 
- On the explorer bar, select Systemand expand the FactoryTalk Smart Objects. Systemand expand the FactoryTalk Smart Objects.
- Right-click the program and selectNew routine.
- InNew routine, inName, enter a namefor the routine.
- (optional) InDescription, enter a description of the routine.
- Configure the routine as either:- Main routine. UnderSelect as Main Routine, position the switch to Onto make the routine a main routine and execute the logic in a routine when a program triggers. Position the switch to Onto make the routine a main routine and execute the logic in a routine when a program triggers. Position the switch to Offto make the routine a fault routine.IMPORTANT: All main routines must use the Namemain. Changing the name of a main routine after it has been created removes its designation as a main routine. Offto make the routine a fault routine.IMPORTANT: All main routines must use the Namemain. Changing the name of a main routine after it has been created removes its designation as a main routine.
- Fault routine. UnderSelect as Fault Routine,position the switch to Onto make the routine a fault routine and execute fault handling logic when a program fault occurs. Position the switch to Onto make the routine a fault routine and execute fault handling logic when a program fault occurs. Position the switch to Offto make the routine a main routine. Offto make the routine a main routine.
 
- InRoutine Type, select the type:- Ladder Diagram
- Structured Text
 
- (optional) SelectOpen New Routineto open the routine for editing after you create the routine.
- SelectCreate. The routine appears inSystemunder the selected program and is preceded by or or . .
Provide Feedback