beautypg.com

Exercise #2 – controlling speed in host mode – Rockwell Automation 2098-DSD-xxx Ultra3000 Host Commands for Serial Interface User Manual

Page 169

background image

Publication 2098-RM003A-EN-P October 2001

Using Host Commands

C-5

Exercise #2 – Controlling
Speed in Host Mode

This exercise issues a host command to set the speed of the motor. It
builds on the Ultra family command previously issued to place the
drive in velocity set point control mode. The command string
parameters to set the motor speed to 500 rpm are:

Note: The numbers are hexadecimal.

1. Convert 500 rpm to an 8 character, hexadecimal value. Assume a

standard encoder with 2000 lines per revolution (8000 counts/rev)
to calculate the hexadecimal data value:

2. Calculate the checksum and convert to hexadecimal by subtracting

760 from 256 (256 - 760 = -504), and converting -504 to hex
(0xFFFFFE08).

3. Prefix the string with a colon and append the two least significant

digits of the hex value (08) to the end of the command string.

4. Type the command string into Hyperterminal followed by the

Enter key. The motor will rotate at 500 rpm when the drive is
enabled.

5. Stop the motor using the same command by setting the speed to

zero (0) rpm.

Command String

:0006D100012EBCcc

Parameters

cc

Checksum

00012EBC

Data

1

Function

06D

Parameter

00

Drive Address

Encoder Conversion

1 rpm

=

8000 counts/minute

or

155 counts/second

Hex Conversion

500 rpm

=

77,500 counts/second

or

0x12EBC hex

Hex Character

0

0

0

6

D

1

0

0

0

1

2

E

B

C

c

c

ASCII Value

48

48

48

54

68

49

48

48

48

49

50

69

66

67

ASCII Sum

96

144 198 218 267 315 363 411 508 558 627 693 760

Hex Conversion

256 -

760 =

0xFFFFFE08 Hex

Command String

:0006D100012EBC08