Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

6602 quadrature encoder with c code

I need to implement a quadrature encoder on the 6602 board usinng c language.

I found some good function, for example  DAQmxBaseCreateCIAngEncoderChan, but i think this function is only for DaqmxBase,

is there some similar function for Daqmx, or have i to do it myself?

From where can i start?

 

Thank you in andvance



There are 10 kinds of people. Those who understand binary notation, and those who do not.
0 Kudos
Message 1 of 4
(6,156 Views)

Hi Blacksocket,

 

I want to suggest you this tutorial

http://zone.ni.com/devzone/cda/epd/p/id/194

 

It is implemented in Labview but you can download it freeware (for a month) from http://www.ni.com/trylabview/i/ and see how it si built up.

 

Hope this helps,

 

M

Matteo Brunella
Application Engineer
NI Italy
0 Kudos
Message 2 of 4
(6,131 Views)

Solved my problem.

I installed the daqmx version on CD and it was old.

Now i installed the new version daqmx 9.0 , that i toke from the site.

This version has the function i need  DAQmxCreateCIAngEncoderChan,

it compiles , now i have only to attach my encoder.

 

Thank you lo stesso

Message Edited by blacksocket on 02-08-2010 05:32 AM


There are 10 kinds of people. Those who understand binary notation, and those who do not.
0 Kudos
Message 3 of 4
(6,129 Views)

Ok it works, now i have to generate a pulse for an assigned number of encoder ticks.

It seems the Ctrsxinternalout works only on the z signal of the encoder.

Is there a way to generate a pulse (with another crt or port) on a defined number of encoder tick?

 

 

 

 

 



There are 10 kinds of people. Those who understand binary notation, and those who do not.
0 Kudos
Message 4 of 4
(6,086 Views)