The text of a manual · part 19 of 33
PowerFlex ControlNet Adapters 20-COMM-C (Coax), 20-COMM-Q (Fiber) User Manual: Chapter 6, pages 149 to 158
Pages 149 to 158 of 270, from PowerFlex ControlNet Adapters 20-COMM-C (Coax), 20-COMM-Q (Fiber) User Manual
The original document is the PDF (6.7 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Allen-Bradley 20-COMM-C
Page 149
Using Explicit Messaging
6-21
Figure 6.22 Example Scattered Write Response Data for PowerFlex 7-Class Drive
The PowerFlex 750-Series drive uses 32-bit integer and REAL parameters. A COP command must be used to copy the 32-bit integer and REAL values to the Scattered_Write_Request integer array. Figure 6.23 shows the ladder logic used for this example. If the parameter data type is a REAL, then the source tag is a REAL. If the parameter data type is a 32-bit integer, then the source tag is a DINT. See the drive documentation to determine the parameter data type (32-bit integer or REAL). Figure 6.23 Example Ladder Logic to Copy Request Data for PowerFlex 750-Series Drive
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 150
6-22
Using Explicit Messaging
Figure 6.24 Example Scattered Write Request Data for PowerFlex 750-Series Drive
The results of the explicit message appear in the destination tag Scattered_Write_Response (Figure 6.25). Values of ‘0’ indicate no errors occurred. Figure 6.25 Example Scattered Write Response Data for PowerFlex 750-Series Drive
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 151
Using Explicit Messaging
PLC-5 Controller Examples
6-23
The ControlNet I/O Transfer (CIO) instruction is used to send explicit messages. For PLC-5/xxC controllers, Series F, revision B or earlier, the available services you should use are Get Attribute Single, Get Attribute All, Set Attribute Single, or Set Attribute All using a CIP Generic communication command. PLC-5/xxC controllers, Series F, revision C or later, provide available message services for Get Attributes Scattered and Set Attributes Scattered using a Generic Bi-Directional communication command.
PLC-5 Controller Example Ladder Logic Program to Read a Single Parameter A read message is used to read a single parameter. The specific N40:0 address shown in this read message example reads the value of parameter 003 - [Output Current] in a PowerFlex 7-Class drive. Figure 6.26 Example Ladder Logic to Read a Single Parameter
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 152
6-24
Using Explicit Messaging
PLC-5 Controller – Formatting a Message to Read a Single Parameter Figure 6.27 Read Single Message Configuration Screen
The following table identifies the data that is required in each box to configure a message to read a single parameter. General Tab
Example Value
Description
Communication Command Service Code Class Number Instance Number (1) Attribute Number PLC-5 Data Table Address
CIP Generic e (Hex.) 93 or 9F (Hex.) (2) 3 (Hex.) 9 (Hex.) N40:0 (3)
Size in Elements
2 (3)
Port Number Local ControlNet Node
2 2
Command type for controller to read data from the drive. Code for the requested service. Class ID for the DPI Parameter Object. Instance number is the same as parameter number. Attribute number for the Parameter Value attribute. An unused controller data table address containing the message instruction. This address is the starting word of the destination file. Number of elements (words) to be transferred. Each element size is a 16-bit integer. Controller port to which the network is connected. The node address of the adapter connected to the drive.
(1) The instance is the parameter number in the drive (Port 0). To read a parameter in another port, see DPI Parameter Object on page C-16
(Class code 0x93) or Host DPI Parameter Object on page C-30 (Class code 0x9F) to determine the instance number. For example, to read parameter 4 of a peripheral in Port 5 of a PowerFlex 750-Series drive, the instance would be 21504 + 4 = 21508 or 5404 (Hex). (2)
See Table 6.A on page 6-2 for limitations of PowerFlex 7-Class and PowerFlex 750-Series drives when using DPI Parameter Object Class code 0x93 or Host DPI Parameter Object Class code 0x9F for explicit messaging.
(3)
In this example, Output Current is a 32-bit integer parameter requiring the Size in Elements field to be set to ‘2’. If the parameter being read is a 16-bit integer, the Size in Elements must be set to ‘1’. When using a PowerFlex 700S or PowerFlex 750-Series drive, Output Current is a REAL (floating point) parameter. You must still write this data to an integer file with Size in Elements set to ‘2’. The following page shows ladder logic to convert the data into a floating point.
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 153
Using Explicit Messaging
6-25
PLC-5 Controller Example Single Read Response Data In this specific N40:0 message example, we use the data table address in Figure 6.28 to store the response value (0.13 amps) that was read from drive parameter 003 - [Output Current]. To determine the data type for the parameter and its required scaling, see the specific drive documentation. Figure 6.28 Example Single Read Response Data File
Figure 6.29 shows example ladder logic to correctly format the three possible data types for read messages of different parameter types in the PLC-5 controller. Figure 6.29 Example Ladder Logic to Format Parameter Data Types for Reads
For 16-bit Integer Parameters – All PowerFlex 7-Class Drives
For 32-bit Integer Parameters – All PowerFlex 7-Class Drives
For 32-bit REAL (Floating Point) Parameters – PowerFlex 700S and PowerFlex 750-Series Drives
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 154
6-26
Using Explicit Messaging
PLC-5 Controller Example Ladder Logic Program to Write a Single Parameter A write message is used to write to a single parameter. The specific N50:0 address shown in this write message example writes a value to parameter 140 - [Accel Time 1] in a PowerFlex 7-Class drive. Figure 6.30 Example Ladder Logic to Write a Single Parameter
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 155
Using Explicit Messaging
6-27
PLC-5 Controller – Formatting a Message to Write a Single Parameter Figure 6.31 Write Single Message Configuration Screen
The following table identifies the data that is required in each box to configure a message to write a single parameter. General Tab
Example Value
Description
Communication Command Service Code Class Number Instance Number (1) Attribute Number (2) PLC-5 Data Table Address
CIP Generic 10 (Hex.) 93 or 9F (Hex.) (3) 8c (Hex.) 9 or A (Hex.) N50:0 (4)
Size in Elements
1 (4)
Port Number Local ControlNet Node
2 2
Command type for controller to write data to the drive. Code for the requested service. Class ID for the DPI Parameter Object. Instance number is the same as parameter number. Attribute number for the Parameter Value attribute. An unused controller data table address containing the message instruction. This address is the starting word of the source file. Number of elements (words) to be transferred. Each element size is a 16-bit integer. Controller port to which the ControlNet network is connected. The node address of the adapter connected to the drive.
(1)
The instance is the parameter number in the drive (Port 0). To write to a parameter in another port, see DPI Parameter Object on page C-16 (Class code 0x93) or Host DPI Parameter Object on page C-30 (Class code 0x9F) to determine the instance number. For example, to write to parameter 51 of a peripheral in Port 5 of a PowerFlex 750-Series drive, the instance would be 21504 + 51 = 21555 or 5433 (Hex). In this example, Accel Time 1 is parameter 140 or 8C (Hex.).
(2)
Setting the Attribute value to ‘9’ will write the parameter value to the drive’s Nonvolatile Storage (EEPROM) memory, which retains the parameter value even after the drive is power cycled. Important: When set to ‘9’, the EEPROM may quickly exceed its life cycle and cause the drive to malfunction. Setting the Attribute value to ‘A’ will write the parameter value to temporary memory, which deletes the parameter value after the drive is power cycled. When frequent write messages are required, we recommend using the ‘A’ setting.
(3)
See Table 6.A on page 6-2 for limitations of PowerFlex 7-Class and PowerFlex 750-Series drives when using DPI Parameter Object Class code 0x93 or Host DPI Parameter Object Class code 0x9F for explicit messaging.
(4)
In this example, Accel Time 1 is a 16-bit integer parameter requiring the Size in Elements field to be set to ‘1’. If the parameter being written to is a 32-bit integer, the Size in Elements must be set to ‘2’. When using a PowerFlex 700S or PowerFlex 750-Series drive, Accel Time 1 is a REAL (floating point) parameter. You must still write this data to an integer file with Size in Elements set to ‘2’. The following page shows ladder logic to convert floating point data into integer files.
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 156
6-28
Using Explicit Messaging
PLC-5 Controller Example Single Write Response Data In this specific N50:0 message example, we use the data table address in Figure 6.32 to store the request value (10.0 sec.) that was written to drive parameter 140 - [Accel Time 1]. To determine the data type for the parameter and its required scaling, see the specific drive documentation. Figure 6.32 Example Single Write Response Data File
Figure 6.33 shows example ladder logic to correctly format the three possible data types for write messages of different parameter types in the PLC-5 controller. Figure 6.33 Example Ladder Logic to Format Parameter Data Types for Writes
For 16-bit Integer Parameters – All PowerFlex 7-Class Drives
For 32-bit Integer Parameters – All PowerFlex 7-Class Drives
For 32-bit REAL (Floating Point) Parameters – PowerFlex 700S and PowerFlex 750-Series Drives
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 157
Using Explicit Messaging
6-29
PLC-5 Controller – Explanation of Request and Response Data for Read/Write Multiple Messaging The data structures in Figure 6.34 and Figure 6.35 use 16-bit words and can accommodate up to 22 parameters in a single message. In the Response Message, a parameter number with the high bit set indicates that the associated parameter value field contains an error code (parameter number in response data will be negative). Important: See Table 6.A on page 6-2 for limitations of PowerFlex 7-Class and PowerFlex 750-Series drives when using Class code 0x93 or Class code 0x9F for explicit messaging. Figure 6.34 Data Structures for Scattered Read Messages Word 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Request (Source Data) Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word
Word 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Response (Destination Data) Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW
...
...
63 Parameter Number 64 Pad Word 65 Pad Word
63 Parameter Number 64 Parameter Value LSW 65 Parameter Value MSW
Figure 6.35 Data Structures for Scattered Write Messages Word 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Request (Source Data) Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW Parameter Number Parameter Value LSW Parameter Value MSW
Word 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Response (Destination Data) Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word Parameter Number Pad Word Pad Word
...
...
63 Parameter Number 64 Parameter Value LSW 65 Parameter Value MSW
63 Parameter Number 64 Pad Word 65 Pad Word 20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P
Page 158
6-30
Using Explicit Messaging
PLC-5 Controller Example Ladder Logic Program to Read Multiple Parameters A Generic Bi-Directional scattered read message is used to read the values of multiple parameters. This read message example reads the values of these five parameters. PowerFlex 7-Class Drive
PowerFlex 750-Series Drive
• Parameter 001 - [Output Freq] • Parameter 003 - [Output Current] • Parameter 006 - [Output Voltage] • Parameter 012 - [DC Bus Voltage] • Parameter 017 - [Analog In1 Value]
• Parameter 001 - [Output Freq] • Parameter 007 - [Output Current] • Parameter 137 - [Open Loop Fdbk] • Parameter 21581 - [Port 5: Analog Out 0 Data] • Parameter 260 - [Analog In0 Value]
See DPI Parameter Object on page C-16 (Class code 0x93) or Host DPI Parameter Object on page C-30 (Class code 0x9F) for parameter numbering. Important: See Table 6.A on page 6-2 for limitations of PowerFlex 7-Class and PowerFlex 750-Series drives when using DPI Parameter Object Class code 0x93 or Host DPI Parameter Object Class code 0x9F for explicit messaging. Figure 6.36 Example Ladder Logic to Read Multiple Parameters
20-COMM-C/Q ControlNet Adapter User Manual Publication 20COMM-UM003F-EN-P