Import Control/CompactLogix Predefined Data Types

Topic: CM133

There are many predefined data types in the Allen-Bradley ControlLogix and CompactLogix PLC. A predefined data type is a data type that exists in the RS Logix 5000 software when you start a new project. Some common predefined data types are TIMER and COUNTER.

The complication of importing a predefined data type is that there are many predefined data types in the RS Logix 5000 software and within many of these data types, there are many different members. Many of these predefined data types and members, while useful in the PLC application, are not needed in the C-more project. So the issue is to decide which predefined data types and members of these data types you should or should no import.

Determine Which Predefined Data Types to Import

You can modift the file L5KPreDefined.txt (located inside the Documents\AutomationDirect\C-more\Settings folder ) to determine which data types and their members you should import. The image below shows where to find the L5KPreDefined.txt file.

If you open the L5KPreDefined.txt file it looks like the image below.

By default, the C-more programming software imports the TIMER and COUNTER predefined data types.

To add more predefined data types, type them in using the format shown above or you can open the master template file called: L5KPreDefine_template.txt located in the same folder.

Add More Data Types to Import — Example

  1. Open the L5KPreDefine_template.txt file (located inside the Documents\AutomationDirect\C-More\Settings folder) and scroll down to the DATATYPE CAMSHAFT_MONITOR heading as shown below.

  1. Highlight the entire section for the CAMSHAFT_MONITOR data type beginning at DATATYPE and ending at END_DATATYPE.

  1. Right-click and select Edit and then Copy to copy the highlighted area.
  2. Click in the L5KPreDefine.txt file and scroll to the end.
  3. Right-click and select Edit and then Paste to make the L5KPreDefine file look like the illustration below:

To import all the members of the CAMSHAFT_MONITOR data type shown above, save and close the L5KPreDefine.txt file and re-start the C-more programming software.

You can also remove the members of the data type that are needed in the C-more project as shown below:

It is important to remember the format required in the L5KPreDefine.txt file:

  • DATATYPE Desired data type name as shown in RS Logix 5000
  • Memory type (IE BOOL, DINT, etc…) member name (as shown in RS Logix);
  • END_DATATYPE

The semicolon is necessary after each member name of the data type.