I'm looking for the quadrature encoder in the DAQ Signal Pad.
I Must setting a Virtual Knob in the same position of the real knob.
For this I've wire the Channel A of the quadrature encoder with the Timer 0 Source.
I used the functions in the Easy I/O Library:
On application starts:
CounterEventOrTimeConfig (1, "0", ONE_COUNTER, USE_COUNTER_SOURCE,
COUNT_CONTINUOUSLY, COUNT_ON_RISING_EDGE,
UNGATED_SOFTWARE_START, &taskID);
CounterStart (taskID);
on Timer:
Variables
short overflow;
long counts;
Code:
CounterRead (taskID, &counts, &overflow);
SetCtrlVal (gui, PANEL_NUMERICKNOB, counts);
break;
It counts only up but not down when I rotate it clockwise.
I use the DAQPad-6020E
From The Manual:
E Series DAQ Devices
Connect phase A to the SOURCE of counter 0. Internally, phase B is
connected to DIO6, which is the up/down line for counter 0. Do not
wire the phase B terminal when using the quadrature encoder with an
E Series DAQ device. If you configure counter 0 for hardware up/down
counting, counter 0 will count up when the up/down line is high and
count down when the up/down line is low.
For example, if counting on the rising edge of phase A, as shown in
Figure 4, the up/down line (phase B) is low when the quadrature
encoder is rotated clockwise and high when it is rotated counterclockwise.
Can someone help me?
Thanks
Message Edited by MaTy on 05-12-2005 10:26 AM