This example shows how to generate a device logic using AOIs and information from Excel file.


Objectives:

Create ControlLogix-Routines for Motors based on Motor Elements defined in Excel.


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 Excel file.kiptr"

              

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



Step 5

Navigate to Document element (with tag PRJ001-PSEC001-DOC001-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-DOC001-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-DOC001-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 Document element PRJ001-PSEC001-DOC001.

Attach your own file or the file "Umotor gen.xlsx" we created for you (you can modify it and add more motors if you want).


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



Step 12

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



Step 13

Save the file(s) (L5X routine). Import the routine(s) into your Program 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.