beautypg.com

Read / write target profile „s“ (53h), Direct positioning „sd – Baumer N 152 User Manual

Page 12

background image

N 152

www.baumer.com

12

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

This command is utilized to read the presently active target (profile value) respectively to read or write a specific
target. Data are composed by profile number (2 bytes) and target (6 bytes). Note: Negative targets are
transmitted as 5-digit number (see example 3). Please consider that SPA targets comprise 5 digits only.

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

SOH

Adr

Cmd

EOT

CRC

Transmission

01h

20h

53h

04h

2A

SOH

Adr

Cmd Profile no. = 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 Profile no= FFh

Target = FFFFFFh

EOT

CRC

Response

01h

20h

53h

3Fh

3F

3Fh

3Fh

3Fh

3Fh

3Fh

3Fh

04h

2Ah


Example 2: Read specific target (profile number = 17; target = 12.50)

SOH

Adr

Cmd Profile no. = 17 EOT

CRC

Transmission

01h

20h

53h

31h

37h

04h

16h

SOH

Adr

Cmd Profile no. = 17

Target = 12.50

EOT

CRC

Response

01h

20h

53h

31h

37h

30h

30h

31h

32h

35h

30h

04h

BCh


Example 3: Write specific target (profile number = 17; target = -12.50)

s

SOH

Adr

Cmd Profile no. = 17

Target = -12.50

EOT

CRC

Transmission

01h

20h

53h

31h

37h

2Dh

30h

31h

32h

35h

30h

04h

FBh

SOH

Adr

Cmd Profile no. = 17

Target = -12.50

EOT

CRC

Response

01h

20h

53h

31h

37h

2Dh

30h

31h

32h

35h

30h

04h

FBh


Note: Instead of command „S“ also command „SP“ may be utilized. The function is fully identical to command
“S”. If command SD is utilized it might be easier to apply command SP due to their identical protocol length.
Please consider that with anterior or other multicon devices command „SP“ maybe is not available.

Example 4: As in example 3 but utilizing command „SP“

SOH Adr Cmd Sub

Profile no.=17

Target = -12.50

EOT CRC

Transmission

01h 20h 53h

50h 31h

37h 2Dh 30h

31h

32h

35h

30h

04h 29h

SOH Adr Cmd Sub Profile no.=17

Target = -12.50

EOT CRC

Response

01h 20h 53h

50h 31h

37h 2Dh 30h

31h

32h

35h

30h

04h 29h



Direct positioning „SD“

This command may be utilized for direct positioning operations. Only the target less any profile number is
transmitted to SPA. The profile number after the command “S” is replaced by sub command “D” ( = dimension).
Motor start enable requires transmitting in addition motor start command “D”.

Example 4: Write position value for direct positioning operation (less profile)

SOH Adr Cmd Sub

Position value = 278.25

EOT CRC

Transmission

01h 20h 53h

44h 30h 32h 37h

38h 32h 35h

04h 6Bh

SOH Adr Cmd Sub

Position value = 278.25

EOT CRC

Response

01h 20h 53h

44h 30h 32h 37h

38h 32h 35h

04h 6Bh

Note: The position value is saved in the non-volatile memory and will be retained in case of power failure. In this
case the previously selected profile is utilized again.