How to read multiple quadrature encoders using data acquisition tool box?
3 次查看(过去 30 天)
显示 更早的评论
Hello,
I want to read 3 encoders in matlab using NI USB 6343. I am using data acquisition tool box in matlab. These are the steps that i followed:
1. Daq session created
s = daq.createSession('ni');
2. Channels defined
ch = addCounterInputChannel(s, 'Dev1', [0 1 2], 'Position');
3. Read angles using
inputSingleScan(s) * 360/1000
ans =
0 0 13.3200
Now the probem is that I only receive updated value of the last encoder i.e encoder 2. First and second values are always '0'. Same is the case when I add two encoder channels. Only the last one gets updated. I have checked each encoder individually (they works fine). When I keep only encoder it always gives the required updated value on giving command inputSingleScan(s).
I have interfaced three encoders simultaneously in LabView they work fine.
Can someone identify the mistake or propose a possible approach ??
Regards
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Acquisition Toolbox Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!