필터 지우기
필터 지우기

NI Instruments USB 6251 - Edge Counter

조회 수: 3 (최근 30일)
Christos
Christos 2012년 4월 1일
Hi all!
I am trying to get the Edge Counter value from ni usb 6251 data aquisition card using analog session based interface in MATLAB R2011b. I always get the value zero from variable count. I have written the following code:
ai = analoginput('nidaq','Dev1');
hwinfo = daqhwinfo(ai);
hwinfo.DifferentialIDs;
hwinfo
daq.getVendors();
s = daq.createSession('ni');
s.addCounterInputChannel('Dev1','ctr0','EdgeCount');
count = s.inputSingleScan;
count
I have been used the driver software and i got the Edge Counter value successfully.
Thank you a lot.

답변 (1개)

Christos
Christos 2012년 4월 10일
I have found the answer from myself. the defualt bin is PFI8 and i used PFI7 so i changed the wire to correct bin on ni board
Thanks a lot

카테고리

Help CenterFile Exchange에서 Simultaneous and Synchronized Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by