Scaling-Register (R35) IP5209

The scaling register sets the scaling or interpolation of the module. It should be adjusted to the used measuring hardware.

By scaling, the counter value can optimally be adapted to the application. Therefore a calculating in the user program is not needed.

The value in R35 sets the number of bits that are represented in the quarter period (Default: 0x0008).

The following graph shows the sinusoidal signal.

With the default setting R35 = 0x0008 the counter value D3/D2/D1/D0 of the sine/cosine input device is represented in the following way:

Bit

31 ... 10

9

8

7

6

6

4

3

2

1

0

Name

Number of signal periods

zero crossings

resolution within the quarter period

Comment

4.194.304 periods

1024 steps  within one period

 

e.g. the counter value with a R35 = 0x0004:

Bit

31 ... 6

5

4

3

2

1

0

Name

Number of signal periods

zero crossings

resolution within the quarter period

Comment

67,108,864 periods

64 steps  within one period

Calculation sample

Sine/Cosine-measuring device 2 µm signal period,

Default setting R35: 0x0008

Counter value set to zero in the released status of the input device (Control-Byte = 0x0004),

Input device pushed over the whole measuring scale.

Result:

Byte

D3

D2

D1

D0

Value

0x00

0x63

0x34

0x00

Calculation into a "real world" value:

value = input data x input_device_period / (4 x 2R35)

value = 0x633400 x 2 µm / (4 x 28)

value = 6,501,376 x 2 µm / (4 x 256) = 0.012698 m = 12.698 mm

The measured value corresponds to the data of the input device, that gives an overall measuring range of 12 mm.