Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ9184 for angular position measurement..

Solved!
Go to solution
Hi,
 
We have NI cDAQ-9184 chassis and NI 9411 digital input module for angular position measurement by using an quadrature incremental encoder with over 100000 pulses per revolution..
 
Do you have a C# or VB.NET example how to configure the position measurement task?
 
BR,
Ilkka
0 Kudos
Message 1 of 7
(5,004 Views)

Hi Ilkka,

 

Have a look at the "MeasAngularPositionBufferedCont_ExtClk" Example which will be installed with DAQmx:

C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.5\Counter\Measure Position\MeasAngularPositionBufferedCont_ExtClk\CS

 

Regards

Christian

Christian
CLA, CTA, CLED
0 Kudos
Message 2 of 7
(4,973 Views)

Hi Christian,

 

Hi, what I put to the Sample clock source?

 

I can run the angular position measurement task in NI MAX with “1 Sample (On Demand)” timing settings but not in the “Continuous Samples” mode.

 

BR,

Ilkka

0 Kudos
Message 3 of 7
(4,968 Views)

Hi Ikka,

 

you can also use the internal sample clock by using Empty value for signal source parameter:

http://zone.ni.com/reference/en-XX/help/370473H-01/mstudiowebhelp/html/154a9ce4/

 

Regards

Christian

Christian
CLA, CTA, CLED
0 Kudos
Message 4 of 7
(4,957 Views)

Hi Christian,

 

The internal sample clock is not accepted, when the data acquisition is run in the continuous buffered mode:

 

Untitled1.png

 

BR,

Ilkka

0 Kudos
Message 5 of 7
(4,937 Views)

Hi,

 

I am playing with this test bench again.

 

The continuous buffered data acquisition is working if I defined the PFI0 as the sample clock source.

 

BUT; we need to control the sampling rate programmatically and work together with NI 9205 analog input module. I have created an own task for the analog inputs which internal clock and tried to give different External clock sources for the angular position measurement. But not succeeded.. Just the PFI0 worked which is actually the incremental encoders channel A.

 

What to do? Do we need to make an external cable for routing some external clock signal to angular position measurement or can we use the same sample clock as the AI task. I have tried “/XXX/AI/SampleClock” but it was not working either..

 

BR,

Ilkka

0 Kudos
Message 6 of 7
(4,857 Views)
Solution
Accepted by Yltsä

Hi,

 

This works now.. Thanks for NI customer support. The angular position measurement can use an internally generated signal by using a counter ("/cDAQ1/Ctr1InternalOutput"). 

 

BR,

Ilkka

 

 

0 Kudos
Message 7 of 7
(4,826 Views)