beautypg.com

2 reading/writing any data areas, Manual eks electronic-key adapter profibus-dp – EUCHNER EKS FSA with Profibus-DP Interface User Manual

Page 30

background image

Manual EKS Electronic-Key Adapter Profibus-DP

8.6.2 Reading/writing any data areas

Each time an Electronic-Key is inserted, the Electronic-Key user data area from byte no. 0 defined by the
parameters via the GSD file is always transferred first from the EKS to the input area of the bus master. It is
then possible to read or write any data area in the next step. This arbitrary area of the user data on the
Electronic-Key is defined in the output area of the bus master.

Information!

On Electronic-Keys read/write with 116 bytes, the memory is organized in 4-byte blocks. This means a
multiple of 4-byte sized blocks must always be written.

The start address must be given in the range byte number 0 to byte number 112, always in 4-byte steps
(byte number 0, 4, 8 ... 112)!

However, during reading it is possible to access the memory byte-by-byte without the above-mentioned
restriction for writing.

For this purpose the following transfer message is sent from the bus master to the EKS:

Output area of the bus master

Byte no.

Description

Function

0

Command byte

(see below)

1 Start

address

First byte in the memory area of the Electronic-Key that is read or
written as per the command byte.
Number of bytes that are read or written as per the command byte.
Max. number of bytes of user data (4/12/28/44/60/116 bytes)
dependent on the module selected from the GSD file.

2

Number of bytes

3 Not

used

4

If bit no. 7 in the command byte is set to 1, the content of this byte is
written to the Electronic-Key starting from the start address.

:

Transmit data

Max. number of bytes of user data (4/12/28/44/60/116 bytes)
dependent on the module selected from the GSD file.

119

In the command byte it is defined whether data is read from the Electronic-Key or written to the Electronic-Key.

Command byte

Bit no.

Description (active with bit = 1)

Function

0
1
2
3

Reserve

4
5
6 Read

Electronic-Key

7 Write

Electronic-Key

If bit no. 6 and bit no. 7 are set at the same time, data is read from
the key.

Information!

To transfer the data on reading an arbitrary data area:
After sending the transfer message from the output area of the bus master to the EKS, the data
requested are read from the Electronic-Key by the EKS as per the area defined and transferred to the
input area of the bus master (see section 8.6.1).

To transfer the data on writing an arbitrary data area:
After sending the transfer message from the output area of the bus master to the EKS, the transmit data
are written to the Electronic-Key by the EKS as per the area defined. After data is successfully written to
the Electronic-Key, the area written is automatically read again and the data transferred to the input
area of the bus master (see section 8.6.1).

092009-03-10/07

Subject to technical modifications

Page 30

/

36

This manual is related to the following products: