LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining the direction of quadrature encoder in Labview

Highlighted

Hello people.

I am having a bit of trouble with Labview.

I have my quadrature encoder, my DAQ-board, and two TCST1103 optical switches. The encoder is placed on a motor (look at the attached pictures) and spins when the motor spins.

I have been told that by using the two TCST1103 optical switches, both the velocity AND direction of the encoder / the motor can be determined.

However, I don't know how to do this in Labview, or rather, I don't know how to program Labview to tell me. Should I use "DAQ-assistant" and select "counter input" and then "edge count" or??

If someone could show or tell me how to determine the velocity and direction of the quadrature encoder in Labview I would be very happy.

I have also attached my VI, where I try to determine the direction of the quadrature encoder by utilizing D-flip flops and edge counts. However, it requires a lot of cables and is very clumsy.

0 Kudos
Message 1 of 12
(235 Views)

What DAQ card are you using? It may be as simple as going into NI MAX and setting up a quad encoder virtual channel. It will depend on what DAQ card you are using.

 

Do you understand how a quad encoder works?

Tim
GHSP
0 Kudos
Message 2 of 12
(209 Views)

I am not quite sure what a DAQ-card is. I have attached a picture of a DAQ-board, a long blue board with analog inputs, outputs and lots of other things. Is that what you refer to as a "DAQ-card"?

0 Kudos
Message 3 of 12
(199 Views)

What are you connecting this to? That is the DAQ card. The picture you provided is the breakout board. That is the connections to the DAQ card. It should connect to something.

Tim
GHSP
0 Kudos
Message 4 of 12
(193 Views)

I am not sure how to answer your question. I am sitting at my university's desk right now, and the only thing related to Labview on this desk, is that "breakout board". 

I am not sure what DAQ-card we are using, however, I would assume it's pretty "up-to-date".

In other words, the breakout-board is the only thing I can get my hands on, that involves Labview.

0 Kudos
Message 5 of 12
(189 Views)

It doesn't matter how up to date the DAQ card is. The capabilities are what matters. Open NI Max and find connected devices and tell me what you see.

Tim
GHSP
0 Kudos
Message 6 of 12
(183 Views)

t should look something like this:

 

Example.png

Tim
GHSP
Message 7 of 12
(181 Views)

Well for direction you need to determine if A (or A') or B (or B') is leading.

 

As for speed it's just a matter of counting revolutions over a fixed time period and calculating the speed.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
Message 8 of 12
(169 Views)

Also the frequency of any of the quadrature pulse trains will be directly related to the speed.

-------------------------------------------------------------------
Unfortunately, most readers of this Forum, including some real Experts, have not mastered the skill of being able to read the code that Posters fail to post. If we cannot see "what you did wrong", we are unable to tell you how to fix it. (Bob Schor 28 August 2018)
0 Kudos
Message 9 of 12
(139 Views)

I found this (look at the attached pictures).

Is this my DAQ-card?

DAQ-card 2.PNG

And to how do I do that in Labview?

0 Kudos
Message 10 of 12
(93 Views)