Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni 6602 Card, Configuration in Register Level Programming

Hello,

I want to do register level programming with the NI 6602 card .

I want to use an x4 encoder reader and I want to use the continuous
frequency generation.

so i got the following tool to map the kernel space to the user space, so
a simple shell script will do the job.

http://www.linux.it/~rubini/software/phob/phob.html

and than just using the provided function phob_io

to programm the registers in a shell script:

#!/bin/bash

# shell script for init 6602 card with prf and encoder counter

# set prf

../phob_io ''0:048=0000'' # Input Select Register
../phob_io ''0:00C=1109'' # Command Register
../phob_io ''0:038=00ffffff'' # Load A Register
../phob_io ''0:03C=00ffffff'' # Load B Register
../phob_io ''0:
034=9218'' # Mode Register

But don"t get any output as i expect, what is wrong?

Do i have to set some othe registers, or write somthing to the PCI-Config?

Does anyone has some sample configuration?

Thanks

Mario Behn

--

Mario Behn
Microwave Remote Sensing Laboratory Room 104
University of Massachusetts
Knowles Engineering Building
Amherst, MA 01003-4410

phone (413) 545-4675
fax (413) 545-4652
email behn@mirsl.ecs.umass.edu
0 Kudos
Message 1 of 4
(3,087 Views)
Hello;

All the documentation and examples there are on Register Level Applications can be on our web site by typing +register +level on the search field of our home page.
Also, there is a RLP toolkit you can find information at Products & Services> Measurement Hardware> Data Aquisition (DAQ) Hardware> Software for DAQ> Measurement Hardware Driver Development Kit (DDK).

Regards
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,087 Views)
A typical project for one of the 660x RLP examples needs to include the following source code files:

../OSinterface/osiBus.cpp - generic register I/O interface used by the example code
../OSinterface/Linux/osiUserCode.cpp - OS specific adapter used by osiBus to access registers on the hardware in the specific OS
../ChipObjects/tTIO.cpp - abstraction of the chips and registers on the hardware into C++ classes and properties

and one of the examples files, e.g.

../Examples/gpct_ex1.cpp - implementation of a specific operation, including all initialization of the hardware

(The same is true for the examples for other boards although the names of the ChipObject and examples will be different.)

Each of these files needs to be compiled to give y
ou object files, and then all of the object files need to be linked together to build an application (executable binary). The errors you list seem to indicate that you are not using all of these files.

There is more information on the RLP example architecture in the attached PDF document.
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 3 of 4
(3,087 Views)
In addition to setting specific registers on the TIO chip on the 660x card, you do need to initialize the card by setting a couple of registers on the MITE chip. These register accesses are shown in each of the example code files in the MH DDK.

Note: The MITE chip is located at BAR0 on the board while the TIO(s) is/are located at BAR1.
authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
0 Kudos
Message 4 of 4
(3,087 Views)