Host Command Reference Rev I

Host Command Reference Rev I

Host Command Reference

Conditional Testing (CR, TR)

(Q drives only)

When constructing complex programs it is usually necessary to do some conditional processing to affect program flow. Two commands are available for evaluating a data register for conditional processing, the TR (Test

Register) and CR (Compare Register) commands. The TR command will compare the “First” value of a given data register against a “Second” immediate value. The CR command compares the “First” value of a given data register against the “Second” value of another data register. When using the TR and CR commands an internal

“Condition” register is set with the result. The result can be:

“True” the “First” value is either positive or negative

“False”

“Zero”

“Positive”

“Negative” the “First” value is not a value (it’s zero) the “First” value equals “0” the “First” value is “positive” the “First” value is “negative”

“Greater Than” the “First” value is more positive than the “Second” value

“Less Than” the “First” value is more negative than the “Second” value

“Equal to”

“Unequal to” the “First” and “Second” values are equal the “First” and “Second’ values are not equal

NOTE: The QJ (Queue Jump) command is designed to use the “Condition Codes” above for jumping. The

Condition Code can also be accessed via the “h” register.

Data Register Assignments

What follows is a listing of all the data registers available with Applied Motion drives. In the tables below,

“Ch.” denotes the data register’s character assignment, and “Description” gives the name of the data register. The column “3-digit” denotes the register’s 3-digit equivalent numerical assignment (see PR command, bit 5); “Data

Type” designates whether the data register is a 16-bit word (Short) or a 32-bit word (Long); “Units” shows how a data register’s contents are used by the drive; and, “Compatibility” shows which drives can make use of the given register.

NOTE: When programming a Q drive with the Q Programmer software only the character assignment of the register can be used. When communicating to a Q drive via one of its serial ports, either the character assignment or the 3-digit numerical assignment can be used.

Read-Only data registers: a - z

Many of the Read-Only data registers can be read with a specific command. In the tables below, associated commands are shown in parentheses in the “Description” column.

Ch. Description

a

Analog Command value (IA)

3-digit Data Type Units

049 Short

BLu, SV, STAC6, ST-Q/Si:

32760 = +10V; -32760 = -10V

ST-S, STM:

16383 = +5V; 0 = 0V*

Compatibility

All drives

*Note that the “a” register is affected by the AV (Analog Offset) command, so the range may vary beyond 0 to 16383.

b

Queue Line Number 050 Short Line # 1 - 62 Q drives only

229

920-0002 Rev. I

2/2013

Host Command Reference

c d

Current Command (IC)

Relative Distance (ID)

051

052

Short

Long

Servo: 0.01 amps RMS

Stepper: 0.01 amps, peak-ofsine

Servo: encoder counts

Stepper: steps

All drives

All drives

BLu, STAC6

The “d” register (as well as the ID command) contains the relative move distance used in the last move.

This means that the “d” register is only updated at the end of every relative move.

SV, ST-Q/Si, ST-S, STM

The “d” register (as well as the ID command) contains the immediate relative distance moved since the start of the last or current relative move. This means the “d” register is updated during relative moves and can therefore be polled during a move to see where the motor is with respect to the overall relative move distance.

e

Encoder Position (IE, EP) 053 Long encoder counts

Servo drives and stepper drives with encoders

The “e” register can be zeroed by sending the command EP0.

f g

Alarm Code (AL)

Sensor Position

054

055

Long

Short hexadecimal equivalent of binary Alarm Code word

(See AL command for details)

Servo: encoder counts

Stepper: steps

All drives

All drives

The “g” register contains the absolute position of the point at which the input condition is met during moves like FS, FE, SH, and other “sensor-type” moves. It is common practice to use the EP and SP commands to establish known absolute positions within an application or program, which will make the value of the “g” register most meaningful. Otherwise, the absolute position of the motor is zeroed at every power-up of the drive.

h

Condition Code 056 Short decimal equivalent of binary word (see below)

Q drives only

The response to the “RLh” command will be the decimal equivalent of the condition code’s binary word. Bit assignments and examples are shown below.

Description

TRUE (non-zero)

Bit #

0

FALSE (zero) 1

POSITIVE 2

NEGATIVE 3

GREATER THAN 4

LESS THAN

EQUAL TO

UNEQUAL TO

5

6

7

2

4

Decimal Value

1

8

16

32

64

128

920-0002 Rev. I

2/2013

230

Host Command Reference

Example:

Command

RLh

Drive Sends

RLh=149

Notes

Bits 7 (UNEQUAL TO), 4 (GREATER THAN), 2

(POSITIVE) and 0 (TRUE) are set. Within a Q program the programmer will often have more than one condition to choose from when using the QJ command. The condition

FALSE in Q Programmer is represented by bit 0 = 0

(opposite of TRUE).

i

Driver Board Inputs (ISX) 057 Short decimal equivalent of binary bit pattern (see below)

All drives

Details when executing the “RLi” command:

BLu, STAC6

The bit pattern of the “i” register breaks down as follows: bit 0 is the state of the encoder’s index (Z) channel, also known as input X0; bits 1 - 7 represent the states of driver board inputs X1 - X7, respectively; bits 8 - 10 represent the states of driver board outputs Y1 - Y3, respectively; and, bits 11 - 15 are not used. For bits

0 - 7 (inputs X0 - X7), a state of “1” means the optically isolated input is open, and a state of “0” means the input is closed. It is the exact opposite for bits 8 - 10 (outputs Y1 - Y3), for which a state of “1” means the optically isolated output is closed, and a state of “0” means the output is open.

SV, ST-Q/Si

The bit pattern of the “i” register breaks down as follows: bits 0 - 7 represent inputs X1 - X8, respectively; bits 8 - 11 represent outputs Y1 - Y4, respectively; and, bit 12 is the encoder index channel (if present). For bits 0 - 7 and 12 (inputs X1 - X8 and the Index), a state of “1” means the optically isolated input is open, and a state of “0” means the input is closed. It is the exact opposite for bits 8 - 11 (outputs Y1 - Y4), for which a state of “1” means the optically isolated output is closed, and a state of “0” means the output is open.

ST-S, STM

The bit pattern of the “i” register breaks down as follows: bit 0 represents the encoder index channel (if present), bit 1 represents the STEP input, bit 2 the DIR input, and bit 3 the EN input. Bit 8 represents the drive’s single output, OUT. For bits 0 - 3 (Index, STEP, DIR, and EN inputs), a state of “1” means the optically isolated input is open, and a state of “0” means the input is closed.

X

0

X

0 x not used

X

0

X

0

X

0

X

0 outputs

Y2

0

Y1

0 not used

X

0

X

0

X

0

X

0 inputs

X4

0

X3

0

X2

0

X1

0

231

920-0002 Rev. I

2/2013

Host Command Reference

j

SVAC3, STAC5

The bit pattern of the “i” register breaks down as follows: bits 0-3 represent inputs X1-X4, respectively; bits 8 and 9 represent outputs Y1 and Y2, and bit 14 represents the encoder index channel (if present). represents the STEP input, bit 2 the DIR input, and bit 3 the EN input. Bit 8 represents the drive’s single output, OUT. For bits 0-3 and 14 (X1-X4 and the Index), a state of “1” means the optically isolated input is open, and a state of “0” means the input is closed.

Analog Input 1 (IA1) 058 Short raw ADC counts, 0 - 32760

16383 = 0 volts for BLu, SV,

STAC6, ST-Q/Si drives

All drives

k l

Analog Input 2 (IA2)

Immediate Absolute Position

059

060

Short

Long raw ADC counts, 0 - 32760

16383 = 0 volts

Encoder counts (servo), or motor steps (stepper).

BLu, SV, STAC6,

ST-Q/Si only

All drives

m

Command Mode (CM)

n

Velocity Move State

061

062

Short

Short

Mode #

State # (see below)

All drives

All drives

Response details to the “RLn” command:

Description Decimal Value Comment

WAITING

RUNNING

0

1

In velocity mode waiting for a command

Doing a velocity move (jogging)

FAST STOPPING

STOPPING

ENDING

2

3

4

Stopping a velocity move (ST or SK with no parameter)

Stopping a velocity move (SJ, STD, or SKD)

Clean up at end of move (1 PWM cycle, 62 usec)

o

Point-to-Point Move State 063 Short State # (see below) All drives

NOTE: The Point-to-Point Move State is only defined during FL, FP, and FS commands.

Details when using “RLo” command:

Description Decimal Value Comment

WAITING

WAITING ON BRAKE

0

1

In position mode waiting for command

Waiting for brake to release

CALCULATING

ACCELERATION

CHANGE VELOCITY

AT_VELOCITY

2

3

4

5

Doing the calculations for the move

Accelerating up to speed

Changing the speed (accel or decel)

At the desired speed

DECELERATION

FAST DECELERATION

POSITIONING

6

7

8

Decelerating to a stop

Doing a fast deceleration (ST or SK)

Clean up at end of move (1 PWM cycle, 62 usec)

p

Segment Number

q

Actual Motor Current (IQ)

r

Average Clamp Power

064

065

066

Short

Short

Short

Segment # 1 - 12

0.01 Amps

Watts

Q drives only

Servo drives only

BLuAC5, STAC6

920-0002 Rev. I

2/2013

232

Host Command Reference

s t u v

Status Code (SC)

Drive Temperature (IT)

Bus Voltage (IU)

Actual Velocity (IV0)

w

Target Velocity (IV1)

067

068

069

070

071

Short

Short

Short

Short

Short hexadecimal equivalent of binary Status Code word

(See SC command for details)

0.1 o

C

0.1 Volts

All drives

All drives

0.25 rpm

0.25 rpm

All drives

Servo drives and stepper drives with encoder

All drives*

*For stepper drives, the “w” register is only updated when Stall Detection or Stall Prevention is turned on.

x

Position Error (IX) 072 Long encoder counts

Servo drives and stepper drives with encoder

BLu, STAC6

y

Expanded Inputs (IS) 073 Short bit pattern

Details when executing the “RLy” command:

BLu, STAC6, SVAC3 and STAC5 drives

The bit pattern of the “y” register breaks down as follows: bits 0 - 7 represent the states of top board inputs 1

- 8, respectively; bits 8 - 11 represent the states of driver board outputs 1 - 4, respectively; and, bits 12 - 15 are not used. For all I/O bits 0 - 11 (inputs 1 - 8 and outputs 1 - 4), a state of “1” means the optically isolated input or output is open, and a state of “0” means the input or output is closed. Bit 15 represents the ID bit, which simply holds a 1 if the IN/OUT2 or screw terminal I/O board is present and a 0 of it’s not. In other words, for SE, QE and Si drives the ID bit will equal 1. For S and Q drives the ID bit will equal 0.

For example, if top board inputs 3 and 5 and top board outputs 1 and 2 were all closed, the response of the drive to the command “RLi” would be “RLi=-29461” (1000 1100 1110 1011). For a more efficient use of the

“y” register it is recommended to mask off the ID bit and the other three not used bits. This can be done by using the R& (Register AND) command with the “y” register and a User Defined register set with the value

4095 (0000 1111 1111 1111 1111). Following a register AND operation (&), this will reject the top 4 bits, leaving the rest of the data untouched. For example, the command sequence would look like this.

RL14095

R&y1

RL0

Load User Defined register “1” with the value 4095

Register AND the “y” and “1” registers

Request the value stored in the Accumulator register “0” to which the drive’s response would be RL0=3307.

z

Phase Error 074 Short encoder counts Servo drives only

233

920-0002 Rev. I

2/2013

Host Command Reference

Read/Write data registers: A - Z

Many of the Read/Write data registers are associated with a specific command. In the tables below, associated commands are shown in parentheses in the “Description” column.

NOTE: When using registers pay attention to units. In the case of some Read/Write registers, the units of the register when using the RL and RX command are different than when using the same register’s associated command. For example, the “V” register uses units of 0.25 rpm, but its associated command, VE, uses revs/sec

(rps). The reason for this difference is that all registers operate with integer math. On the other hand, when using commands it is often possible to include decimal places which allow for more user-friendly units.

Ch. Description

A

Acceleration (AC)

3-digit Data Type Units

017 Short 10 rpm/sec

Compatibility

All drives

The “A” register units are 10 rpm/sec, which means that the value of the “A” register is equal to 6 times the

AC command value. In other words, to achieve an acceleration value of 100 rev/sec/sec send the command

RLA600.

NOTE: Take care to ensure that this register is never set to zero. The drive may become stuck in a command mode or program loop and/or refuse to move. See the RL, RM, and RX commands.

B

Deceleration (DE) 018 Short 10 rpm/sec All drives

The “B” register units are 10 rpm/sec, which means that the value of the “B” register is equal to 6 times the

DE command value. In other words, to achieve a deceleration value of 100 rev/sec/sec send the command

RLB600.

NOTE: Take care to ensure that this register is never set to zero. The drive may become stuck in a command mode or program loop and/or refuse to move. See the RL, RM, and RX commands.

C

D

E

Change Distance (DC)

Distance (DI)

Position Offset

019

020

021

Long

Long

Long counts counts counts

All drives

All drives

Drives with encoder feedback option

The “E” register contains the difference between the encoder count and the motor position. This value is most useful with servo drives (Blu / SV) where the resolution of the motor and encoder are the same, and this offset can be useful when working with absolute positions. The register contains the difference in counts between the “e” register and the value set by the “SP” command.

F

Other Flags 022 Long bit pattern (see below) All drives

BLu

The value of the “F” register is a hexadecimal sum of various drive states, as shown below.

Description

DISTANCE LIMIT FLAG

Hex Value

0x0001

Decimal Value

1

SENSOR FOUND FLAG

LOWSIDE OVERCURRENT

HIGHSIDE OVERCURRENT

0x0002

0x0004

0x0008

Clear flags by sending “RLF0” to the drive.

2

4

8

SV

The value of the “F” register is a hexadecimal sum of various drive states, as shown below.

920-0002 Rev. I

2/2013

234

Host Command Reference

Description

DISTANCE LIMIT FLAG

SENSOR FOUND FLAG

LOWSIDE OVERCURRENT

HIGHSIDE OVERCURRENT

OVER CURRENT READING

BAD CURRENT OFFSET - Phase A

BAD CURRENT OFFSET - Phase B

BAD FLASH ERASE

BAD FLASH SAVE

Clear flags by sending “RLF0” to the drive.

Hex Value

0x0001

0x0002

0x0004

0x0008

0x0010

0x0020

0x0040

0x4000

0x8000

Decimal Value

1

2

4

8

16

32

64

16384

32768

STAC6

The value of the “F” register is a hexadecimal sum of various drive states, as shown below.

Description

DISTANCE LIMIT FLAG

Hex Value

0x0001

Decimal Value

1

SENSOR FOUND FLAG

HARDWARE OVERCURRENT

SOFTWARE OVERCURRENT

BAD CURRENT OFFSET - Phase A

0x0002

0x0004

0x0008

0x0010

2

4

8

16

BAD CURRENT OFFSET - Phase B

OPEN WINDING - Phase A

OPEN WINDING - Phase B

Clear flags by sending “RLF0” to the drive.

0x0020

0x0040

0x0080

32

64

128

ST-Q/Si, ST-S, STM

The value of the “F” register is a hexadecimal sum of various drive states, as shown below.

Description

DISTANCE LIMIT FLAG

Hex Value

0x0001

Decimal Value

1

SENSOR FOUND FLAG

LOWSIDE OVERCURRENT

HIGHSIDE OVERCURRENT

OVER CURRENT READING

0x0002

0x0004

0x0008

0x0010

2

4

8

16

BAD CURRENT OFFSET - Phase A

BAD CURRENT OFFSET - Phase B

OPEN WINDING - Phase A

OPEN WINDING - Phase B

LOGIC SUPPLY

GATE SUPPLY

BAD FLASH ERASE

BAD FLASH SAVE

Clear flags by sending “RLF0” to the drive.

0x0020

0x0040

0x0080

0x0100

0x0200

0x0400

0x4000

0x8000

32

64

128

256

512

1024

16384

32768

G

Current Command (GC)

H

Analog Velocity Gain

023

024

Short

Short

0.01 Amps

+/- 32767 ADC counts

Servo drives only

BLu servo drives only

The “H” register in BLu servo drives is similar to the AG command in all other drives. The “H” register is used to set the motor speed at a given DC voltage in analog velocity mode. It is recommended to make this setting in

Quick Tuner

, where it is labeled Speed in rev/sec at xx Volts, under the Velocity > Analog

Operating Mode.

I

Input Counter 025 Long counts per edge Q drives only

235

920-0002 Rev. I

2/2013

Host Command Reference

J

Jog Velocity (JS) 026 Short 0.25 rpm All drives

The “J” register units are 0.25 rpm, which means that the value of the “J” register is equal to 240 times the

JS command value. In other words, to achieve a jog speed value of 7 rev/sec send the command RLJ1680.

K

RESERVED

L

RESERVED

027

028 -

-

-

-

-

-

M

N

Max Velocity (VM, servo)

Accel/Decel Current (CA,

STM Integrated Stepper)

Continuous Current (CC, servo)

Running Current (CC, stepper)

029

030

Short

Short

Servo: 0.01 amps RMS

Stepper: 0.01 amps, peak-ofsine

Servo: 0.01 amps RMS

Stepper: 0.01 amps, peak-ofsine

O

Peak Current (CP, servo)

Idle Current (CI, stepper)

031 Short

P

Absolute Position Command 032 Long

Q

RESERVED

R

Steps per Rev*

033

034

-

Short

-

Servo: 0.01 Amps RMS

Stepper: 0.01 amps, peak-ofsine counts counts

* Note: R = EG for servo drives. R = EG/2 for stepper drives.

Servo drives and STM

Integrated Steppers

All drives

All drives

-

All drives

All drives

S

Pulse Counter 035 Long counts All drives

The “S” register counts pulses coming into the STEP/X1 and DIR/X2 inputs of the drive. This is particularly useful when in Command Mode 7 (see CM command) or executing an FE (Follow Encoder) command. To zero the “S” register send the command RLS0.

T

Total Count 036 Long (see below)

The “T” register is automatically saved at power down and restored at power up.

Q drives only

U

Change Velocity (VC) 037 Short 0.25 rpm All drives

The “U” register units are 0.25 rpm, which means that the value of the “U” register is equal to 240 times the

VC command value. In other words, to achieve a change velocity value of 7 rev/sec send the command

RLU1680.

V

Velocity (VE) 038 Short 0.25 rpm All drives

The “V” register units are 0.25 rpm, which means that the value of the “V” register is equal to 240 times the

VE command value. In other words, to achieve a velocity value of 7 rev/sec send the command RLV1680.

W

Time Stamp 039 Short 0.001 sec Q drives only

920-0002 Rev. I

2/2013

236

X

Analog Position Gain (AP) 040 Short

Y

Analog Threshold (AT)

Z

Analog Offset (AV)

041

042

Short

Short

Host Command Reference

Servo: ADC counts/encoder count

Stepper: ADC counts/step raw ADC counts raw ADC counts

All drives

All drives

All drives

237

920-0002 Rev. I

2/2013

Host Command Reference

User-Defined data registers: 0 - 9, other characters

Ch. Description 3-digit Data Type Units

0

Accumulator 000 Long integer

Compatibility

Q drives only

The Accumulator register “0” is, aside from being a User-defined data register, the register in which the result of every register math function is placed. For example, if the drive executes the register addition command “R+D1” the result of this operation (i.e. the sum of the values in data registers “D” and “1”) will be placed in the Accumulator “0” register.

1

User-defined

2

User-defined

3

User-defined

4

User-defined

5

User-defined

6

User-defined

7

User-defined

8

User-defined

9

User-defined

:

User-defined

;

User-defined

<

User-defined

=

User-defined

>

User-defined

?

User-defined

@

User-defined

[

RESERVED

\

RESERVED

]

RESERVED

^

RESERVED

_

RESERVED

`

RESERVED integer integer integer integer integer integer integer integer integer integer integer integer integer integer integer

-

-

-

-

-

integer

Long

Long

Long

Long

Long

Long

Long

Long

Long

Long

Long

Long

Long

Long

Long

-

-

-

-

-

-

Long

011

012

013

008

009

010

014

015

001

002

003

004

005

006

007

045

046

047

016

043

044

048

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

Q drives only

-

-

-

-

-

-

Q drives only

920-0002 Rev. I

2/2013

238

Host Command Reference

Appendices

The following appendices detail various special topics in working with Applied Motion motor drives.

Appendix A: Non-Volatile Memory in Q drives

Appendix B: Host Serial Communications

Appendix C: Host Serial Connections

Appendix D: The PR Command

Appendix E: Alarm and Status Codes

Appendix F: Working with Inputs and Outputs

Appendix G: Troubleshooting

Appendix H: EtherNet/IP Communications

239

920-0002 Rev. I

2/2013

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement

Table of contents