Appendix d: the pr command, The pr command in detail, Bit 0 - default (“standard scl”) – Applied Motion RS-232 User Manual

Page 249

Advertising
background image

249

920-0002 Rev. I

2/2013

Host Command Reference

Appendix D: The PR Command

Because of the intense nature of serial communications required in host mode applications, you are allowed

to adjust a drive’s serial communications protocol to best fit your application. This adjusting of a drive’s serial
communications protocol is done using the PR command.

Typically the PR command is used one time when configuring a drive and saved as part of the startup

parameters (use SA command to save startup parameters). However, it can be changed at any time to
dynamically alter the serial communications.

The PR command works by sending the decimal equivalent of a 6-bit binary “word”. Each bit in the word

represents a different setting of the serial communications protocol. These settings are additive, meaning when
you set a bit to “1”, or turn it on, you are adding the functionality of that setting to the serial protocol. Think of this
6-bit word as a bank of 6 dip switches. You can turn each dip switch on or off, and in doing so add or subtract a
particular setting from the overall protocol.

The PR command in detail

The diagram to the right shows the assignments

of each of the 6 bits in the protocol word. Remember
that when you use the PR command the parameter
that you send along with the command code (PR) is
the decimal equivalent of this binary word. Below are
the details of each of the bits and the settings they
are assigned to.

Bit 0 - Default (“Standard SCL”)

PR cannot be set to 0, so if no other bits in the PR word are set to 1 then at least bit 0 must be set to

1. Setting Bit 0 to 1 when any other bits are also set to 1 has no effect on the communications protocol. For
example, PR4 (bit 2 set to 1) is the same as PR5 (bits 0 and 2 set to one). With only bit 0 set to 1, when
commands that do not request returned data are received by the drive no other response is sent from the drive. In
other words, the drive will only send a response to commands that require a response.

Send data Examples:

Command

Drive Sends

Notes

DI8000

-

Global set distance to 8000 counts or steps

1DI8000

-

Drive with address “1” set distance to 8000 counts or steps

Request data Examples:

Command

Drive Sends

Notes

DI

DI=8000

Global distance request

1DI

1DI=8000

Drive with address “1” responds with distance

Bit 1 - Address Character (always send address character)

With this option set (Bit 1=1) a drive’s address character will always be included in the response packet

along with any requested data.

Send data Examples:

Command

Drive Sends

Notes

VE50

-

Global set velocity to 50 rps

1VE50

-

Drive with address “1” set velocity to 50 rps

Request data Examples:

Command

Drive Sends

Notes

VE

1VE=50

Drive responds with address “1” and velocity to global

Advertising
This manual is related to the following products: