Indirect Reference Resigsters

Discuss Stepper motors, Drivers, Controllers, GUI's and related Accessories here.
Post Reply
Posts: 5
Joined: Thu Sep 12, 2019 1:04 pm

Indirect Reference Resigsters

Post by om_tech_support_CF » Fri Feb 21, 2020 2:34 pm

Q: I am trying to use the Indirect Reference Address Settings to read from different registers via RS-485 Modbus RTU on my AZD-KD. I would like to read the Driver Output Status and the Detection Position. How can I do this?

A: Indirect Reference Address Settings can be used to read / write to registers whose addresses are not consecutive, simultaneously.

So for this example we want to read the Driver Output Status and the Detection Position. The register addresses for the corresponding commands are 126 and 204 (in decimal). Normally, we would have to read / write from both registers (so 2 separate times) to get these values, but with Indirect Reference, we can read / write from multiple registers in one message to get both values.

In order to read the Driver Output Status and the Detection Position, we will have to enter their addresses (126 & 204) into 2 of the Indirect Reference Registers. This can be set via RS-485 Modbus RTU or our free software, MEXE02.

When using this Indirect Reference method to read / write registers, it is required to take the UPPER register address of the register that will be entered in the Indirect Reference (in decimal) and divide it in half.

For more information about Indirect Reference Settings, see page 295 and 299 in the AZ Function Manual ... 262-6E.pdf
Image 1.png
Image 1.png (17.54 KiB) Viewed 905 times
Image 2.png
Image 2.png (20.4 KiB) Viewed 905 times
Image 3.png
Image 3.png (24.35 KiB) Viewed 905 times

Using MEXE02
Looking at the screenshot below, we took the upper register address, 126 for Driver Output Status and divided it in half. So 63 is the value that should be entered on line 38 in the Communication & I/F tab in MEXE02. Then, the Detection Position upper register is 204. Half of that is 102. This value will go on line 39.
Image 4.png
Image 4.png (9.21 KiB) Viewed 905 times
Image 5.png
Image 5.png (74.32 KiB) Viewed 905 times
Image 5 above shows the addresses of where the register values are being stored in MEXE02. We will use these register addresses later on for setting via Modbus RTU.

(More registers can be found on page 297 in the AZ function Manual)

Now, we can read from the Indirect Reference Area for the corresponding number.

Image 6.png
Image 6.png (33.76 KiB) Viewed 905 times
(More registers can be found on page 298 in the AZ function Manual)

In order to read the desired values, we will read from register address 1340h or 4928 in decimal and read 4 registers. This will give us the current Detection Position and Motor Status consecutively.

Using Modbus RTU
In order to set the desired registers via Modbus RTU, we will use a free software called ComTest Pro which can be found on Google.
Image 7.png
Image 7.png (141.55 KiB) Viewed 905 times

ComTest Pro uses decimal values for the register address. So in this case we want to assign Driver Output Status to Indirect Reference Address Setting (0). We will write a value of 63 (126/2) to register 4865.

The address for Indirect Reference Setting (0) as seen in the manual is 1300h or 4864 in decimal. We need to write our value to the lower register, so we will use 4865 as our register value.

See Image 5 for register addresses, as stated earlier.

Next we will assign Detection Position to Indirect Reference Address Setting (1). We will write a value of 102 (204/2) to register 4867.
Image 8.png
Image 8.png (138.69 KiB) Viewed 905 times
Now that the register values are set, we can read from Indirect Reference Area 0 (1340h or 4928 in decimal). If we wish to read from multiple registers we can get the desired values from the registers that were assigned. Looking at the screenshot below, we can observe the following values:

Driver Output Status: 0140h (320 in decimal)
This means that my R06 and R08 Remote Outputs are on. Using binary, the 7th and 9th outputs add up to 320.

Detection Position: 42F14h (274,196 in decimal)
This is the current position my motor is at.
Image 9.png
Image 9.png (133.82 KiB) Viewed 905 times

Should you have any further questions please contact us at [email protected] or call at 1-800-GO VEXTA.

Post Reply