Uploading (rl, ru), Writing storage registers (rw) (q drives only), Reading storage registers (rr) (q drives only) – Applied Motion RS-232 User Manual

Page 228: Moving data registers (rm) (q drives only), Incrementing/decrementing (ri, rd) (q drives only), Counting (rc, “i” register) (q drives only)

Advertising
background image

228

920-0002 Rev. I
2/2013

Host Command Reference

Uploading (RL, RU)

Uploading data registers can only be done from a host command line, not within a program. There are

two commands available for uploading register values. RL is used to upload one register value at a time, while
RU can be used to upload a single register value or an array of register values. Both RL and RU are immediate
commands, and therefore can be executed while a program is running. The RU command can request up to 10
data register values in sequence back from the drive. This is great when an array of information is required at one
time.

Writing Storage registers (RW) (Q drives only)

Writing a data register allows the user to store data register values in non-volatile memory. To write a data

register we use the RW (Register Write) command. There are 100 storage locations for data registers in NV
memory. Note that the user must keep track of where data registers are stored because the NV memory locations
are not associated with any specific data register.

Reading Storage registers (RR) (Q drives only)

Reading a data register allows the user to move data previously saved in NV memory into a data register.

To read a data register we use the RR (Register Read) command. Reading is typically done in the midst of a Q
program.

The following sub-sections describe additional usage of data registers within Q drives only.

Moving data registers (RM) (Q drives only)

Data register values can be moved from one register to another. This is done with the RM (Register Move)

command. When executing an RM command, the contents of the originating data register are retained. Contents
of read-only registers can be moved into read/write registers and user-defined registers. However, as implied by
its label, no register values can be moved into read-only registers. Attempting to do so will have no effect and no
error code is generated.

Incrementing/Decrementing (RI, RD) (Q drives only)

Read/write and user-defined registers can be incremented and decrmented by “1”. Two commands are used

for these functions: the RI (Register Increment) and RD (Register Decrement) command. NOTE: Incrementing
past the range of a data register will cause the value to wrap around.

Counting (RC, “I” register) (Q drives only)

A special data register, the “I” register (Input Counter), is designated for counting input transitions and

input state times of a selected digital input. The “I” register is a read/write register that can be used with all other
register functions including math and conditional testing.

The RC (Register Counter) command is used to assign digital inputs to register counting. There are four

different input states that can be chosen and that have different effects on input counting. When using the “high”
or “low” level states the counter acts as a “timer” with a resolution of 100 microseconds (SV servo drives and all
stepper drives) or 125 microseconds (BLu servo drives). Edge type states like “falling” or ‘”rising” are used for
input counting. (See details of the RC command in the Q Command Reference).

Math & Logic (R+, R-, R*, R/, R&, R|) (Q drives only)

Math and logic functions can be performed on data registers. Math is limited to integer values. Some of the

math functions are also limited to 16-bit values. When doing math only one operation can be done per instruction.
Math and logic results are stored in the Accumulator register, “0”. This register is part of the user-defined register
set. Math functions include Add, Subtract, Multiply and Divide. Logic functions include Logical AND and Logical
OR.

Advertising
This manual is related to the following products: