Description of commands, 1 general information, 2 operating commands – Baumer N 155 User Manual

Page 6: 1 read current value „r“ (52h), Read / write target (profile) „s“ (53h)

Advertising
background image

N 155

www.baumer.com

6

4. Description of commands

4.1 General

information

The following is describing the individual interface commands broken down into the four groups below:

-

operating commands [ commands required during operation ]

-

parameter commands [ commands serving for parameterization ]

-

identifier commands [ commands for indication or alteration of the device identifier (address)]

-

specific commands [ commands for specific functions as device reset or read version number]


The following abbreviations will be applied:

SOH = Start of header (header token)
EOT = End of transmission (footer token)
Adr = device identifier including offset 20h
Cmd

= Command

data = data being sent or received

4.2 Operating

commands

4.2.1 Read current value „R“ (52h)

This command is for reading the 5-digit current value (lower display line). Data volume is always 6 bytes. In case
of a negative value, the negative “-“ sign (2Dh) together with 5 data bytes will be returned. Positive values are
depicted by 6 data bytes without sign. Values of less than 5 (4) digits will come with preceding zeroes. Please
note that the current value is always of 5 digits (refer also to chapter “Special features in data transfer”).

Example 1: Read current value (current value = -32.50

SOH

Adr

Cmd

EOT

CRC

Send

01h

20h

52h

04h

40h

SOH

Adr

Cmd

current value = -32.50

EOT

CRC

Response

01h

20h

52h

2Dh

30h

33h

32h

35h

30h

04h

54h



Example 2 Programming the current value (new current value = 75.50)

SOH

Adr

Cmd

current value = 75.50

EOT

CRC

Send

01h

20h

52h

30h

30h

37h

35h

35h

30h

04h

C9h

SOH

Adr

Cmd

current value = 75.50

EOT

CRC

Response

01h

20h

52h

30h

30h

37h

35h

35h

30h

04h

C9h


4.2.2. Read / write target (profile) „S“ (53h)

This command is for reading the presently active target or for programming respectively reading a specific tar-
get. The data are composed of profile number (2 bytes) and target (6 bytes). Important: Negative targets are
transferred as 5 digit numbers (see example no. 3). Please consider that the targets are always of 5 digits only.

Example 1: Read active target (current profile number = 12; target = 12.50)

SOH

Adr

Cmd

EOT

CRC

Send

01h

20h

53h

04h

2Ah

SOH

Adr

Cmd Profil-Nr. = 12

target = 12.50

EOT

CRC

Response

01h

20h

53h

31h

32

30h

30h

31h

32h

35h

30h

04h

3E

Response upon clearing all targets:

SOH

Adr

Cmd Profil-Nr. = FFh

target = FFFFFFh

EOT

CRC

Response

01h

20h

53h

3Fh

3Fh

3Fh

3Fh

3Fh

3Fh

3Fh

3Fh

04h

2Ah




Advertising