Frequency - limit - Register (R36, R37) IP5209

To control the linear or rotary velocity of a sine/cosine input device, the input frequency can be checked.

The check consists of a time frame, represented in R36, and a limit value in R37. Within this certain time, the zero crossings of the signal are counted. If they exceed the parameterized value of R37, an error bit in the Status byte is set!

R36: Frequency time frame

Default: [1600]

This time frame has a resolution of 0,0625µs/digit. The default setting is 1600dec, therefore 1600 x 0,0625 µs = 100 µs = 0,1 ms.

R37: Max limit of quarter periods

Default: [41]

This register is set to he maximum number of quarter periods per time frame, that the user will allow. If the counted number reaches the register value, FRQ_ERR in the Status byte is set! The reset of the error bit  can only be done via the RS_FRQ_ERR in the Control byte. The internal maximum counting  frequency of the sine/cosine module is 400 kHz. Due to the quadrature evaluation this results in a maximum input device frequency of 100 kHz.

f  =  R37 / ( R36 x 0,0625µs x 4 )

e.g. per default

f  =  41  / ( 1.600 x 0,0625µs x 4 ) = 102,500 Hz, that means 40 quarter periods are still ok, f = 40/ (1600 x 0,0625µs x 4) = 100 KHz. If 41 quarter periods are counted, it is a frequency of 102.5 KHz and therefore to much!

Example 1

The result should be the maximum speed with that the input device rod can be actuated.

Input device with a signal period of 2µm.

max. velocity = max_input_frequency x signal_period

max. V = 100 kHz x 2 µm = 0,2 m/s = 200 mm/s

The maximum speed for this input device is 200 mm/sec. With the registers set at default, the module will generate an error if the sensor is driven at a higher speed.

Example 2

At what value should the registers be set for a given sensor with a signal period of 10 µm and a maximum speed of 50 mm/s?

f = max_input_frequency = max. velocity / signal_period

f = 50mm/s / 10µm = 5000 Hz = 5 KHz

e.g. R36 = 25600 (just to make a reasonable time frame that gives room for more than a few zero crossings)

R37 = f x R36 x 0,0625µs x 4

R37 = 5000 Hz x 25600 x 0,0625µs x 4 = 32

R37 has to be set to the next higher value 33, R36 has to be set to 25600. Both values depend on each other, if you change one, recalculate the other.