IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On...

13
IAIA-EN-I-2015-001-01 IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided UDT’s and AOI’s are for the IAI controllers listed above, operating in Full-Direct communication mode only. They are saved as exported .L5X files from RSLogix 5000 version 17, and can be imported into any RSLogix 5000 program that is version 17 or later. To use the UDT’s and AOI’s, configure your ACON, PCON, SCON, or MSEP-C for Full-Direct mode communication and assign an IP address with the PC Interface Software for RC and cable. If you are using an MSEP-C controller, the Gateway Parameter Setting Tool software is also required. These procedures are not covered in these instructions; please refer to the IAI manual for the controller you have, and IAI manual ME0278, for Ethernet/IP communication. 1. Add the IAI Controller Driver to RSLogix 5000 1.1. Right-click the Ethernet network below the PLC’s Ethernet Port, in the I/O Configuration folder of the Controller Organizer and select New Module… Figure 1-1 1.2. Select Communications in the Select Module pop-up window. Figure 1-2

Transcript of IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On...

Page 1: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-CControllers

The provided UDT’s and AOI’s are for the IAI controllers listed above, operating in Full-Direct communication mode only. They are saved as exported .L5X files from RSLogix 5000 version 17, and can be imported into any RSLogix 5000 program that is version 17 or later.

To use the UDT’s and AOI’s, configure your ACON, PCON, SCON, or MSEP-C for Full-Direct mode communication and assign an IP address with the PC Interface Software for RC and cable. If you are using an MSEP-C controller, the Gateway Parameter Setting Tool software is also required. Theseprocedures are not covered in these instructions; please refer to the IAI manual for the controller you have, and IAI manual ME0278, for Ethernet/IP communication.

1. Add the IAI Controller Driver to RSLogix 50001.1. Right-click the Ethernet network below the PLC’s Ethernet Port, in the I/O Configuration folder of the

Controller Organizer and select New Module…

Figure 1-1

1.2. Select Communications in the Select Module pop-up window.

Figure 1-2

Page 2: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

1.3. Navigate to Generic Ethernet Module and click the OK or Create button, depending on the version of RSLogix that you are using (Figure 3).

Figure 1-3

1.4. Fill in the parameters of the New Module window. Name can be any valid RSLogix name. IP Addressshould be an address that is appropriate for your network. Be sure to select Data – INT as the CommFormat. The Input, Output, and Configuration settings are critical.

1.4.1. For ACON, PCON and SCON controllers: enter the same Connection Parameters shown in Figure 1-4.

Figure 1-4

Page 3: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

1.4.2. For MSEP-C controllers: the Assembly Instances are the same but the Input and Output Sizes are different, and they depend on how many axes are configured on the MSEP-C (this is done using the Gateway Parameter Setting Tool; refer to the MSEP manual). The MSEP-Cgateway uses 8 words and each axis uses 8 words. If you are using all 8 axes, Sizes = 8 axes x 8 words + 8 gateway words = 72 words.

The table at right shows the Size required, by number of configured axes; the input and output sizes are equal.

Figure 5 shows the MSEP settings for 8 axes.

Figure 1-5

You can uncheck the Open Module Properties checkbox (Figure 1-4); there are no additional parameters that need to be set.

Click OK when done. The new module should be present in the Ethernet network, with the name that you entered.

Figure 1-6

RSLogix will have created Controller Tag arrays for the module using the name that you entered (tags for this example are shown in Figure 1-7). Data from the controller is stored in the “:I” array and data to the controller is in the “:O” array.

Figure 1-7

Number of axes Size

1 16

2 24

3 32

4 40

5 48

6 56

7 64

8 72

Page 4: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

2. Import the UDT’s and AOI’s

2.1. Download the UDT and/or AOI files to your PC. If you are installing the AOI’s there is no need to download or install the UDT files because the AOI files contain the UDT’s.

2.2. If you are installing the AOI’s:

2.2.1. Right-click Add-On Instructions in the Controller Organizer and select Import Add-On Instruction…

Figure 2-1

2.2.2. Navigate to the folder that contains the AOI files and select the auto AOI file (.L5X) for thiscontroller, and then click the Import button.

Figure 2-2

2.2.3. The Import Configuration window will open. Click the OK button to continue.

Figure 2-3

Page 5: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

2.2.4. The AOI will be added below the Add-On Instruction folder and the UDT’s will be added to the Data Types folder (Figure 2-4).

Figure 2-4

2.2.5. Repeat steps 2.2.1 through 2.2.4 but select the manual AOI file for the controller instead of the auto file.

2.2.6. Figure 2-5 shows the completed AOI’s and UDT’s for this example, an ACON controller.

Figure 2-5

2.3. If you are installing only the UDT’s:

2.3.1. Right click the User-Defined folder in the Controller Organizer and click Import Data Type…

Figure 2-6

2.3.2. Navigate to the folder that contains the UDT files and select one of the UDT files (.L5X) that you need for this controller, then click the Import button.

Figure 2-7

Page 6: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

2.3.3. The Import Configuration window will open. Click the OK button to continue.

Figure 2-8

Page 7: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

2.3.4. The UDT will be added to the Data Types folder:

Figure 2-9

If we double-click ACON_Inputs, we can see the contents, or Members, that make up this data type. The members are internal tags of various data types (Figure 2-10).

Figure 2-10

2.3.5. Repeat steps 2.3.1 through 2.3.4 but select the other file(s) for this controller. ACON, PCON and SCON controllers require an Input and an Output file. MSEP-C controllers require an Axis Input file, an Axis Output file, a Gateway Input file, and a Gateway Output file.

3. Create Tags to Use the UDT’s and AOI’s

3.1. Create tag names that will uniquely identify the input and output data for the axis controller. For the Data Type, select one of the new UDT’s that you imported. Figure 3-1 shows input and output tags for an ACON controller; the Data Types are the imported ACON UDT files.

Figure 3-1

Page 8: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

3.2. Data from a controller needs to be moved (mapped) from the controller input array to the newly-created input tag. This is typically done with a Synchronous Copy File (CPS) instruction.

Figure 3-2

The Destination tag of an instruction determines its Length. The ACON:I is an array of 16 integer words. It is being copied to a single tag, M101_ACON_Inputs, so the Length = 1. Since tag M101_ACON_Inputsis a UDT that contains members that require 16 integers worth of data, all 16 words in the ACON:I array get copied.

The members of a UDT can be used individually or the entire contents of the tag can be used by an AOI. For example, to move the actual position of this controller to a Human-Machine Interface (HMI), we could copy only that member:

Figure 3-3

3.3. The command data to the controller needs to be moved from a UDT to the controller output array, which is also accomplished by a CPS instruction. In our example, the PLC code manipulates the members of output UDT M101_ACON_Outputs and that tag is moved to the output array ACON:O. In this instruction the Length is 16 because the Destination is an array of 16 words.

Figure 3-4 The CPS for the inputs should be programmed before the ladder logic that uses the input data, and the CPS that writes to the outputs should be located after the code. The general rule is: read the inputs, solve the logic, and then write the outputs.

Page 9: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

3.4. The AOI’s provided by IAI provide convenient methods to program the standard controller functions.

Installed AOI’s are inserted in ladder logic like any other instruction; they are located at the bottom of the list in the Add Ladder Element popup window. Click the + symbol to open Add-On and select the AOI that you want.

Figure 3-5

3.5. The Axis Manual AOI is designed to perform start-up, shut-down, and jogging functions. It contains code to reset the controller, turn the servo on and off, home the actuator, and jog or inch forward and reverse.

The Axis Auto AOI commands the controller to move to a position and supplies the motion parameters for the move. It allows absolute or incremental moves.

Both AOI’s have tags for status conditions and actual data from the controller. The enable coils (EN) are true whenever the instruction is true.

For our example, the UDT’s we created are entered at the bottom of the instructions, as shown in Figure 3-6. These fields are question marks when the instruction is first created.

The AOI fields with question marks must be filled in with tag names or constants. You can enter 100 in the Speed field, for example, if you always want the actuator to move at 100 mm/second. These tags are manipulated or examined by the ladder logic. Some tags supply data to the AOI and some are data from the AOI, available for use in the ladder logic. Constants cannot be used for outputs from the AOI.

The tables below show which tags are inputs to the AOI and which are outputs from it.

Manual AOI Tags

Inputs Data Type Outputs Data Type

Reset_Axis BOOL Actual_Position DINT

Servo_On BOOL Homed BOOL

Home BOOL Alarm_Code INT

INCH_JOG_mode BOOL

Jog_Forward BOOL

Jog_Reverse BOOL

Page 10: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

Auto AOI Tags

Inputs Data Type Outputs Data Type

Go_To_Position BOOL Actual_Position DINT

Pause BOOL Axis_Moving BOOL

Increment_Mode BOOL Movement_Complete BOOL

Position_Width DINT Pressing_Current DINT

Speed DINT Pressing BOOL

Accel INT Press_and_Miss BOOL

Decel INT

Push_On BOOL

Push_Forward BOOL

Push_Limit INT

Tags must be created for the ACON_Axis_Manual and ACON_Axis_Auto fields in our example. The tag names in black on the left side of the instructions are members of these tags. In Figure 3-7, the full name for Reset_Axis is actually ACON_Axis_Manual.Reset_Axis.

Figure 3-6

Page 11: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

Figure 3-7 is an example of a manual AOI being used with an HMI. The HMI buttons and data entryobjects are written to an input UDT and the displayed data is read from an output UDT. No additionalladder logic is needed to get the data from the HMI or to send data to it.

Figure 3-7

4. MSEP Gateway and Programming DifferencesMSEP-C controllers have up to 8 axes which communicate through a common module called a Gateway. In addition to axis data, the MSEP-C sends and receives data and commands for the Gateway, so the PLC must have UDT’s for this data.

4.1. These two files must be downloaded for MSEP-C controllers in addition to the axis UDT’s or AOI’s: MSEP_Gateway_Input_UDT.L5X and MSEP_Gateway_Output_UDT.L5X.

AOI’s are not needed for the MSEP Gateway because there is very little interaction needed with it. The Gateway input UDT has status bits for each axis and for the controller in general. This data can be read from a UDT and used in the ladder logic directly.

The output UDT has a bit that can be used to reset a communication error and most importantly, a bit that places the MSEP-C in Remote Control mode (.Control_Remote). The PLC must turn this bit on or the MSEP will ignore any commands that it receives.

4.2. The MSEP Gateway is configured using the IAI Gateway Parameter Setting Tool software. See the MSEP-C/LC manual for information on setting up the Gateway.

4.3. The PLC will copy the MSEP Gateway and axis data to/from the same input and output array. Figure 4-1 shows 144 bytes (72 INT words) of data in each array, for an MSEP-C with 8 axes. The first 8 words of each array is the Gateway data. These files will be shorter than 144 bytes if the MSEP is configured for less than 8 axes.

Figure 4-1

Page 12: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

4.4. Separate Synchronous Copy File (CPS) instructions must be used for the Gateway data and the axis data, since the UDT’s have different formats. Figure 4-2 shows a rung with a CPS that copies 8 words from MSEP:I.Data[0] to a UDT named MSEP_Gateway_Inputs. The second CPS copies 64 words from the same array, but starts with word #8. It copies them to an array of 8 UDT’s, from MSEP_Input_Axis[0] to MSEP_Input_Axis[7]. The Length is 8 because the destination is 8 UDT’s.

Figure 4-2

Figure 4-3 shows the 8 elements of the input axis array in this example. Each one is a UDT with its own members. Part of axis [0] is shown expanded in Figure 4-4.

Figure 4-3

Figure 4-4

You can copy each axis into its own UDT if you want to give them unique names instead of using array numbers; you just need a CPS for each axis. Axis 0 starts at word MSEP:I.Data [8], axis 1 at [16], axis 2 at [24], etc.

4.5. Command data from the PLC to the controller requires CPS instructions also. Figure 4-5 shows the corresponding CPS instructions for the example used in Figure 4-2. The Gateway UDT is copied into 8 words starting at MSEP:O.Data[0] and the 8 axis UDT’s are copied to 64 words starting at MSEP:O.Data[8].

Figure 4-5Again, if you don’t use a UDT array for the axes, you need a CPS for each one.

Page 13: IAI User-Defined Data Types (UDT) and Add-On … IAI User-Defined Data Types (UDT) and Add-On Instructions (AOI) installation for ACON, PCON, SCON and MSEP-C Controllers The provided

IAIA-EN-I-2015-001-01

5. Communication Errors

5.1. Since the controllers are configured as I/O modules, the PLC monitors their communication status. You can use a Get System Value (GSV) instruction to retrieve the fault code and turn on a fault tag if it does not equal zero. Figure 5-1 shows one way to program this. MSEP_Comm_Status and MSEP_Comm_Fault are tags created for this rung; they are not members of a UDT.

Figure 5-1