Difference of the Command "RdIndexRg" for the PCD2.H31x modules
FAQ #100391
The value returned on the command RdIndexRg (Read Index Register) of the FB Exec is depending on the major version of the FB's.
While old FB's versions returned the value divided by the machines mechanical factor, the recent FB versions don't apply this division any more.
Symptom
The value returned by the FB Exec called with the command code RdIndexRg (Read Index Register) is not the same as it was with the old FB verison.
Reason
In the new FB versions (from V10.01 on), the read value of the index register isn't divided by the mechanical factor. This was the case in the old FB version (V2.1). (Therefore the result was returned in user units in the old FB's)
Workaround if same behaviour is required
The attached example code can be used in order to convert the read value (Index impulses) into user units.
Note
Note that in this case this (multiplied) index register (not to be confused with the PCD's index register) cannot be used as error check as described in the manual.
Categories
PCD2 / Hxxx
Last update: 04.04.2015 18:53
First release: 29.06.2005 09:35
Views: 1407