Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure encoder's position with NI PCI-6024E/CB-68LP Academic Starter Kit

Hi all,

It's my first time using LabView and DAQ. I'm currently using the NI PCI-6024E/CB-68LP Academic Starter Kit. I have a motor with an encoder attached to it, which is used to drive a camera on a linear slider.

I've found this VI from ni.com (http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B502F6C044483F0FE034080020E74861&p_node=201233&p_source=external)

However, I tried to test this VI with two digital output lines controlled by two buttons. I ran the VI and press the buttons one after another to simulate the signals coming out of the encoder. But i'm not getting any counts back. Does it work only if the two signals are exactly 90 degrees out of phase (therefore I can't test it with two buttons?)

What would be the best way to make a counter for my encoder with the kit I have, so that I know where is my camera on the slider?

Thanks alot!
Ken
0 Kudos
Message 1 of 3
(3,313 Views)
I'm using LabView 7.0 and when running the VI, I get this error message below:

Error -200137 occurred at DAQmx Start Task.vi

Possible reason(s):

Initial delay, high time, and low time property values are inconsistent with one or more counter timebase properties.

The conflicting properties must satisfy the following restraint:
2 / Counter Timebase Rate <= X <= Counter Maximum Count/ Counter Timebase Rate, where X = Initial Delay, High Time, and Low Time and where Counter Timebase Rate = Master Timebase Rate / Counter Timebase Master Timebase Divisor or is inferred from the Counter Timebase Source selection.

Property: CO.Pulse.HighTime
Corresponding Value: Inf

Property: CO.Pulse.LowTime
Corresponding Value: Inf

Property: CO.Pulse.Time.InitialDelay
Corresponding Value: 0.0

Property: CO.CtrTimebaseSrc
Corresponding Value: MasterTimebase

Property: CO.CtrTimebaseRate
Corresponding Value: 20000000.0

Property: CO.CtrTimebaseMasterTimebaseDiv
Corresponding Value: 1

Property: MasterTimebase.Rate
Corresponding Value: 20000000.0

Possible Internal Timebase Rates: 20000000.0, 100000.0
Counter Maximum: 16777215
Channel Name: Dev1/ctr1

Task Name: _unnamedTask<3>
0 Kudos
Message 2 of 3
(3,309 Views)
That was the error message I got when I try to use the Econder simulator VI available at ni.com (http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=BCB3ED1857176AABE034080020E74861&p_node=200509&p_submitted=N&p_rank=&p_answer=&p_source=External)

Thanks all, please help me.
0 Kudos
Message 3 of 3
(3,301 Views)