Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

two encoders with 9361

Hello All,

 

This might seem like a very simplistic question, but I've come to the end of my knowledge and require expert assistance.  I'm trying to get two quadrature encoders (single ended) working by modifying the Counter - Read Encoder example, however when I add them both to the same task, only the second added channel is read, and the results are displayed for both channels.  Individually they work fine, and if I create separate tasks for each encoder, then I run into the reserved error and it won't work either.

 

I know it's simple, the answer just eludes me a present.  I've attached my VI as it stands, any input is greatly appreciated.

 

Thanks!

Steve

0 Kudos
Message 1 of 2
(3,542 Views)

Figured it out, the DAQmx Channel properties that I was setting outside of the channel configuration sub-VI for my second channel was overwriting the properties of the first one.  Added in an element at the top of the list, made it ActiveChans and tied it to the previously defined channel.

 

Updated VI attached for clarity.

 

Now everything works perfectly!

0 Kudos
Message 2 of 2
(3,523 Views)