Extended Counter sample block (not recommended)
Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use.
To open this library, type
xpcobsoletelib in the Command
This block outputs a count not limited to the number of bits on the board encoder counter register. It receives as input the output of an encoder block.
Enter the number of rollover counts. This is the number at which
the rollover occurs. This value should normally be
n is the number of bits in the encoder counter
register. Each rollover equals this number.
Enter the starting value with which the encoder block begins. This value should match the value in the encoder mask.
Enter a rollover threshold value. This subsystem infers when a rollover occurs by comparing successive outputs from an encoder block. When the difference between outputs is extremely large, a rollover has occurred. Enter a value that is
Larger than the worst-case difference between successive outputs (to prevent declaring a rollover when it was just a large step)
Less than the maximum count value minus the worst-case difference (to prevent missing a rollover)
Ideally, enter the value
the number of bits in the encoder counter register. The default is