This example shows how to generate a device logic using AOIs and information from the project tree.


Objectives:

Create ControlLogix-Routines for Motors based on Motor Elements defined in the Project Tree.


Requirements:

1) Creation of Motor Routines in the Main Task of the ControlLogix Controller.

2) Creation of Motor Alarm and Conditions Blocks in Motor Routines.

3) Automatic assignment of IO signals to Motor Blocks


Step 1

Project Interface



Step 2

Enter all the needed information (name, status, etc.) and save the Project Element (PRJ001)



Step 3

Right-click on the Project Element and select "Import Branch"



Step 4

Point to the import file "Device logic generation from tree.kiptr"

              

(go to the end of this page to find attachments)



Step 5

Navigate to Document element (with tag PRJ001-PSEC001-UMTR001-SCRIPT001-DOC001)



Step 6

Attach the L5X file "Umotor.L5X"


(go to the end of this page to find attachments)



Step 7

Navigate to Document element (with tag PRJ001-PSEC001-UMTR001-SCRIPT001-DOC002)



Step 8

Attach the L5X file "Umotor_Alarms.L5X"


(go to the end of this page to find attachments)



Step 9

Navigate to Document element (with tag PRJ001-PSEC001-UMTR001-SCRIPT001-DOC003)



Step 10

Attach the L5X file "Condition_List.L5X"


(go to the end of this page to find attachments)



Step 11

Navigate to the motor elements (tag PRJ001-PSEC001-UMTR001 and tag PRJ001-PSEC001-UMTR002) and change the IO points and the number of desired interlocks to match your HW configuration.



Step 12

Navigate to the script element (tag PRJ001-PSEC001-UMTR001-SCRIPT001 and tag PRJ001-PSEC001-UMTR002-SCRIPT001) and click "Run Script".



Step 13

Save the auto-generated project file, open it in Logix Designer and check the created code



Note: Keep in mind that scripts may create errors if something goes wrong. Errors are shown in the browser console. To open the console, right-click anywhere on the web page and select "Inspect element" or "Inspect". Once the tools pane opens navigate to the "Console" tab. The procedure may be different depending on the browser you use.