04-22-2015 11:01 AM
Hello,
I am using Windows XP on Labview 8.
I was setting up a simple VI but when I clicked test on the DAQ Assist, the values only count up.
From what I understand, X4 (quadrature encoding) increments or decrements depending if channel A or B is leading.
On the encoder I am rotating the track clockwise(CW) and counterclockwise(CCW). If I rotate CW, the numbers should go up and CCW the numbers should go down. I would think channel A leads during CW and channel B during CCW. Am I thinking about this correctly?
Below are some screenshots and attached is the VI.
Any information is greatly appreciated.
Thank you,
SparkEE
04-22-2015 01:42 PM
04-22-2015 01:51 PM
I am using the PXI-6602 card with the SCB-68 connector block.
I called up NI and they said I would need two counters for 1 encoder but that doesn't seem right. An issue I run with that is that there can only be one counter in the DAQ assist. The connections are good, I've double and triple checked it because I thought maybe I just did it wrong
04-22-2015 02:14 PM
@SparkEE wrote:
I am using the PXI-6602 card with the SCB-68 connector block.
I called up NI and they said I would need two counters for 1 encoder but that doesn't seem right. An issue I run with that is that there can only be one counter in the DAQ assist. The connections are good, I've double and triple checked it because I thought maybe I just did it wrong
No need for 2 counters. I'm using a quadrature encoder with an NI-9401 cdaq module and I defined the task in MAX with setting similar to yours (althought decoding type X1 and rate 50Hz) and it works fine. Are you sure you connected your signals to terminal 2 and 40 on the terminal block?
Ben64
04-22-2015 02:35 PM
Hey Ben,
Yes I have channel A on pin 2 and channel B on pin 40.
What do you mean you defined the task in MAX? to try and simulate my parameters?
SparkEE
04-23-2015 09:08 AM
@SparkEE wrote:
Hey Ben,
Yes I have channel A on pin 2 and channel B on pin 40.
What do you mean you defined the task in MAX? to try and simulate my parameters?
SparkEE
For a setup I've created a task in MAX called LLLT_LP using these settings:
When I press the run button and move the encoder shaft I observe value increase and decrease depending on the direction of the rotation. Thse settings are similar to the one you are using. So your settings seems to be ok and you are connected to the right pins of the PXI board.
Now are you sure you are connecting the good encoder wires (A and B, not Z)? Is your encoder damaged?
To check this you can create simple counter task with encoder A signal and verify if it's counting up, do the same thing with encoder signal B. If both are counting up then you are using the good wires and your encoder is probably not damage.
Side note: When you define a task in MAX you can run it in LabVIEW like this (simplified version):
Ben64
04-24-2015 10:22 AM
Hey Ben,
Since I am using Labview 8, when I create the simple task and choose continuous samples, it asks me what I want to use for a clock source.
I see that on your version it might be under advanced timing.
Thanks for helping out.
SparkEE
04-24-2015 11:18 AM
I also verified that each signal counts up, which is good because the encoder works.