Discussion:
Read counter input channels by using NI PCI-6220
(too old to reply)
rentscde
2006-11-09 13:10:10 UTC
Permalink
Hello,

 

I am using a NI PCI-6220 M Series DAQ Card on a Linux-Suse 10.0 Kernel 3.6.15 operating system to read the three TTL (0 or 5V) signals A, B and Z from an Odometer.

To read the Odometer-angle use the ansi-c programs, provided by NI.

 

PIN assignment:

 

A          37        PFI8                4096 increments

B          48        PFI10              increments 90 degrees phase-delayed

Z           3           PFI9               one increment per rotation

 

The position is measured on the counter?s A, B and Z input terminals. If I use the Example ANSI-C code from NI ?AngularPosition-Buff-Cont.c?, carry the makefile out and start the program - nothing happens up to the timeout.

 

We measured the Odometer signal with an oscilloscop and they are ok and if we use this port like a normal counter it works, but not together with an odometer.

 

What can be wrong and that can be the solution for this problem.

 

 

 

Thanks for your help.

Rentsch
rentscde
2006-11-13 16:40:13 UTC
Permalink
Hello,

 

We want to buffer 150 increments from an Odometer with NI-PCI6220. The Odometer sends 3 TTL signals A, B and Z. We connect the Odometer with the PCI-6220 board on:

 

A-->PFI 8

B-->PFI  10

Z-->PFI  9

 

If we use the odometer in this configuration, it does not work.

But if I connect the odometer to the counter-pins, it works correctly.

 

How can we use the odometer in the buffered mode (150 Increments)? We need the direction information too. How does it work?

 

What is the right PIN assignment?

 

Is it possible to get an adapted C source code?

 

PFI 8 is the PIN for the source, which we know. How affect the B (course) and Z (one increment per rotaion) the function?

 

Thanks Rentsch

 

 

 

_______________________________________________________________________________________________

Re: Read counter input channels by using NI PCI-6220

Hi Rentsch,if you are using buffered event counting, the counter is counting all the time, but don't write the data to the buffer. You need a trigger signal, to tell the counter, when the counted events should be written to the buffer.The Sample Clock Source determines when a sample will be inserted into the buffer.In this example you use the signal to count as trigger signal for writting data to the buffer."DAQmxCfgSampClkTiming" is used to set this trigger intern.If you use Samples to read = 1 and rate = 1 you will see directly the counting of the device."clockSource" should be PFI8 of your 6220.RegardsDippi

National InstrumentsTechnical Support

 

Continue reading on narkive:
Search results for 'Read counter input channels by using NI PCI-6220' (Questions and Answers)
4
replies
Voltage readings from a hall sensor. How do I send them to the computer through USB?
started 2009-12-08 18:39:50 UTC
engineering
Loading...