Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6602 counter/timer card

Hi,

following question:

i am using the x4 encoder application on an ni 6602 card.
and also i am using a gated signal generation on it.
both things are working without any problem.

My intention is to read the counter value of the encoder on every rising
edge of the signal and write the value into an array in the pcmemory.

Is this possible, how?

Is it possible to create an interupt on rising edge, and signal the
programm, >read the encoder reader value

I'm using the 6602 card with the HDDK in Linux, well i also have the
register level manual.

Thanks a lot

Mario

--

Mario Behn
345 Lincoln Avenue Apt. 1025
Amherst, MA, USA

Tel.: +1-413-546-6656
0 Kudos
Message 1 of 3
(3,006 Views)
Hi Mario,

I would like to tell first that interrupts do not work with PCI-6602.

I would also suggest you to take a look at the examples on Encoder Measurements:

Examples

The Quadrature Encoder with DAQ-STC cards example shows the property that you can use to count.

Please do let me know if you need more help.

Sincerely,
Sastry Vadlamani
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,006 Views)
Hello,

thanks for your answer, well my problem is slightly different, so let me
explain:

I got from NI the following the files for the NI 6602 Counter/Timer Card to
work with Linux:

http://sine.ni.com/apps/we/nioc.vp?cid=11737〈=US

one is the common driver.

The other are the sample programms.

However, every programm except the one which uses the
interupt/dma works(gpct_ex8.cpp).

Here is the errormessages:

*******************************************************************
[root@proto OSinterface]# ls
gpct_ex1.cpp gpct_ex4.cpp gpct_ex7.cpp osiBus.cpp osiUserCode.cpp
tTIO.cpp
gpct_ex2.cpp gpct_ex5.cpp gpct_ex8.cpp osiBus.h trace.h
tTIO.h
gpct_ex3.cpp gpct_ex6.cpp gpct_ex9.cpp osiTypes.h tStatus2.h
tTIO.ipp
[root@proto OSinterface]# g++ gpct_ex8.cpp osiBus.cpp osiUserCode.cpp
tTIO.cpp
In file included from osiBus.h:9,
from gpct_ex8.cpp:15:
osiTypes.h:39:1: warning: "NULL" redefined
In file included from /usr/include/_G_config.h:14,
from /usr/include/libio.h:32,
from /usr/include/stdio.h:72,
from gpct_ex8.cpp:14:
/usr/lib/gcc-lib/i386-redhat-linux/3.2/include/stddef.h:366:1: warning: this
is
the location of the previous definition
gpct_ex8.cpp: In function `void test(iBus*)':
gpct_ex8.cpp:112: `class tTIO' has no member named `G0_DMA_Control_Register'
gpct_ex8.cpp:113: `class tTIO' has no member named `G0_DMA_Control_Register'
gpct_ex8.cpp:136: `class tTIO' has no member named `G0_DMA_Status_Register'
gpct_ex8.cpp: In function `void gpct_ISR(tTIO*)':
gpct_ex8.cpp:154: `class tTIO' has no member named `G0_DMA_Status_Register'
[root@proto OSinterface]#
*******************************************************************

So the question is, when there is a general driver system and example
programms, than they should work?

Who can help my with this ?

If you can't, could you forward my question at NI to someone, who is
responsible for the Measurement Hardware Driver Development Kit (DDK) and
can help me?

I have Redhat-Linux 8.0 and kernel 2.4.18.

Thank you

Mario Behn

----- Original Message -----
From: "Sastry V."
Newsgroups: natinst.public.daq.general
Sent: Friday, January 10, 2003 16:44
Subject: Re: NI 6602 counter/timer card


> Hi Mario,
>
> I would like to tell first that interrupts do not work with PCI-6602.
>
> I would also suggest you to take a look at the examples on Encoder
> Measurements:
>
> >
http://zone.ni.com/devzone/devzone.nsf/webcategories/75CA12ECD25F39A78625679
000743752?opendocument&...

>
> The Quadrature Encoder with DAQ-STC cards example shows the property
> that you can use to count.
>
> Please do let me know if you need more help.
>
> Sincerely,
> Sastry Vadlamani
> Applications Engineer
> National Instruments
0 Kudos
Message 3 of 3
(3,006 Views)