Simulink Encoder Block outputting pulses only?
17 ビュー (過去 30 日間)
古いコメントを表示
The Simulink "Encoder Input" block (Real-Time Windows Target toolbox) seems to output pulses only when the encoder is turned. It should be keeping track of full position and outputting accumulated ticks. How can the block be configured to output accumulated quadrature ticks?
I'm using an NI PXI-6221 DAQ card, with the appropriate wiring. I'm using counter0, which is encoder input 1.
0 件のコメント
採用された回答
Jan Houska
2014 年 8 月 20 日
Your expectations about the output signal of the Encoder Input block are correct. It is indeed supposed to output accumulated quadrature ticks. There is no configuration necessary, this is the only mode the block works in.
If you experience a different behavior, I would recommend to double-check the wiring. Namely, please make sure that the reset (index) pin of the data acquisition board is either properly connected to the encoder, or to a fixed logical signal that will disable its functionality (high or low). If this pin is left unconnected, it may be sensitive to crosstalk or noise and may reset the encoder at random times.
0 件のコメント
その他の回答 (1 件)
John
2014 年 8 月 20 日
編集済み: John
2014 年 8 月 20 日
1 件のコメント
Jan Houska
2014 年 8 月 22 日
Input channels (and vector elements) in Simulink are always numbered starting from one. On the other hand, vendors often number the hardware channels starting from zero. Channel 1 is the first one, even if named Counter 0 by the manuacturer.
参考
カテゴリ
Help Center および File Exchange で Target Computer Setup についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!