DOCA0258EN-00

PKW Objects

Overview

The LTMT main unit supports PKW. The PKW feature consists of:

  • Four input words mapped in input assembly objects 111, 112, and 113

  • Four output words mapped in output assembly objects 101, 102, and 103

These four words tables enable a EtherNet/IP scanner to read or write any register using I/O messaging.

As shown in the table below, the PKW area is located at the beginning of the corresponding assembly objects 112, 113, 102, and 103.

PKW OUT Data

PKW OUT data requests from the EtherNet/IP scanner to the LTMT main unit are mapped in assembly objects 101, 102, and 103.

To access registers, select one of the following function codes:

  • R_REG_16 (0x25) to read 1 register

  • R_REG_32 (0x26) to read 2 registers

  • W_REG_16 (0x2A) to write 1 register

  • W_REG_32 (0x2B) to write 2 registers

Word 1

Word 2

Word 3

Word 4

MSB

LSB

Register address

Toggle bit (bit 15)

Function bits (bits 8 - 14)

Not used (bits 0 - 7)

Data to write

Register number

0 / 1

R_REG_16Code 0x25

0x00

R_REG_32Code 0x26

W_REG_16Code 0x2A

Data to write in register

W_REG_32Code 0x2B

Data to write in register 1

Data to write in register 2

Any change in the function code triggers the handling of the request (unless function code [bit 8 to bit 14] = 0x00).

NOTE: The highest bit of function code (bit 15) is a toggle bit. It is changed for each consecutive request.

This mechanism enables the request initiator to detect that a response is ready by polling bit 15 of the function code in word 2. When this bit in the OUT data becomes equal to the response emitted toggle bit in the IN data (when starting the request), then the response is ready.

PKW IN Data

PKW IN data response from the LTMT main unit to the EtherNet/IP scanner are mapped in assembly objects 111, 112, and 113.

The LTMT main unit echoes the same register address and function code or, eventually, a detected error code.

Word 1

Word 2

Word 3

Word 4

MSB

LSB

Register address

Toggle bit (bit 15)

Function bits (bits 8 - 14)

Not used (bits 0 - 7)

Data to write

Same register number as in the request

Same as in the request

ErrorCode 0x4E

0x00

Error code

R_REG_16Code 0x25

R_REG_32Code 0x26

Data read in register

W_REG_16Code 0x2A

Data read in register 1

Data read in register 2

W_REG_32Code 0x2B

If the initiator tries to write a TeSys Tera object or register to an unauthorized value, or tries to access an inaccessible register, a detected error code is returned (Function code = toggle bit + 0x4E). The detected error code can be found in words 3 and 4. The request is not accepted and the object/register remains at the old value.

To re trigger exactly the same command, you need to:

  1. Reset the function code to 0x00.

  2. Wait for the response frame with the function code equal to 0x00.

  3. Reset it to its previous value.

This is useful for a limited primary like an HMI.

Another way of re-triggering exactly the same command is to invert the toggle bit in the function code byte.

The response is valid when the toggle bit of the response is equal to the toggle bit written in the answer (this is a more efficient method, which requires higher programming capabilities).

PKW Detected Error Codes

Case of a detected write error:

Detected Error Code

Detected Error Name

Explanation

3

FGP_ERR_REGISTER_NOT_FOUND

Register not managed (or the request needs super user access rights)

7

FGP_ERR_INVALID_FUNCTION_OR_ADDRESS

Using an undefined PWK function code or read/write to an undefined register address.

Case of a detected read error:

Detected Error Code

Detected Error Name

Explanation

3

FGP_ERR_REGISTER_NOT_FOUND

Register not managed (or the request needs super user access rights)

7

FGP_ERR_NOT_ALL_REGISTER_FOUND

One or both registers cannot be found

Class Code

The PKW Object class code is 0xC5, vendor specific definition.

Class Attributes

Attribute ID

Name

Access

Description

0x01

Revision

The PKW Object implementation revision.

Returns 0x01.

0x02

Maximum instance

Returns 0x01 to represent a single instance.

0x03

Number of instances

The number of object instances.

Returns 0x01.

0x06

Maximum class attribute

The largest class attribute value.

Returns 0x07.

0x07

Maximum instance attribute

The largest instance attribute value.

Returns 0x02.

Class Services

Service Code

Name

Description

0x01

Get attribute all

Returns the value of all class attributes.

0x0E

Get attribute single

Returns the value of the specified attribute.

Instance Codes

Only one instance is implemented: Instance 1.

Instance Attributes

Attribute ID

Name

Access

Description

0x01

Request object

Array of eight bytes to represent the PKW request.

0x02

Response object

Array of eight bytes to represent the PKW response.

Instance Services

Service Code

Name

Description

0x0E

Get attribute single

Returns the value of the specified instance attribute.

0x10

Set attribute single

Modifies the instance attribute value with the access type of RW.

QR Code is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

Was this helpful?