Host Command Reference Rev I

Host Command Reference Rev I

Host Command Reference

power up, these values can be loaded back into the User-Defined registers from the Storage registers (called

Reading). Each Storage register can save one data register value, and the Storage registers are numbered 1 to

100. See the RR, RW, and SA commands as well as the Appendix for more information on accessing this section of memory.

Using Data Registers

The diagram below shows how a drive’s serial port accesses the different volatile (Read-Only, Read/Write,

User-Defined) and non-volatile (Storage) data registers within a drive. The user can Load and Upload data register values using the RL, RX, and RU commands via the drive’s serial port(s). Read-Only data registers can be uploaded but not loaded. For Q drives only, non-volatile memory is available for data registers in the form of Storage registers. Moving the contents of the volatile data registers back and forth between the non-volatile

Storage registers is done with the RW and RR commands. See below for more details.

Loading (RL, RX)

Accessing data registers is done by Loading data into a register, and Uploading data from a register.

Loading a data register can be done from a host command line or from a line in a program. To load a register from a host command line use the RL (Register Load) command. This command can be executed at any time, even while a drive is running a program. The RL command is an immediate command. To load a register within a

Q program use the RX command, which is a buffered version of Register Load.


920-0002 Rev. I


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


920-0002 Rev. I



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


Table of contents