| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
xPC Target Library for Incremental Encoder/Utilities
This block outputs a count that is not bound by 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 2^n, where 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 2^(n-1), where n is the number of bits in the encoder counter register. The default is 2^15.
![]() | Digital I/O Bit-Unpacking | Rollover Counter | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |