From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Pci e 6251 RPL Programming with DDK

Hi.

 

I want to use PCIe 6251 M series daq board in real time in linux.

For that i have  started with ni ddk.

 

But when i try to compile the downloaded nimhddk_linuxdevmem with provided makefile it

sayes

make: Nothing to be done for `all'.

 

 For this i tried to setup source dir in vpath in makefile. bur problem did not get solved.

 

Please give me solu if any one had tried it.

 

Thanks 

sgm 

0 Kudos
Message 1 of 11
(9,447 Views)

Hi sgm-

 

In order to build the MHDDK as shipped , you need to have the proper OSInterface, device examples, and (optionally) dma alongside each other in your working directory.  To build, you need to invoke 'make' from the device examples directory (for example, nimseries).  If you want to move the files around from this recommended directory structure, be sure to update the path location for the osinterface and dma components in the Makefile from the device examples directory.

 

Hopefully this helps-

 

 

Tom W
National Instruments
0 Kudos
Message 2 of 11
(9,418 Views)

Hi Tom,

 

 Thanks for yr reply.

It helped me.

 

Now i can compile and execute dio with given example with nimhddk_linuxdevmem shipped.

But I am uanble to use it with kernel module shipped which is nimhddk_linux26.

 

If i run any example lsdaq or serialnumber it says nirlp.ko kernal module not insrted.

 

Even in nimhddk_linux26 i do following

./configure

make

./install.sh

 

but it is not able to compile. gives so many error.

 

Please help.

As i would need to write driver in linux as kernel module.

If this works then my work will be reduced a lot

 

Thanks,

sgm 

0 Kudos
Message 3 of 11
(9,402 Views)

Hi sgm-

 

What kind of errors are you seeing?  Which kernel version are you using?  Can you post the output if you just run 'make clean && make' from the nirlpk directory?

 

Thanks-

Tom W
National Instruments
0 Kudos
Message 4 of 11
(9,398 Views)

Hi Tom,

 

I have tried make clean and make from nirlpk directory.Output of this i have attched in output.txt file.

 

I am using suse 10.3 open

Kernel version is 2.6.22.5-31.

 

regards, 

sgm 

 

 

0 Kudos
Message 5 of 11
(9,386 Views)

Hi sgm-

 

Do you have your kernel source installed and configured properly?  Did you try the suggestion from those errors to 'make oldconfig && make prepare' on the kernel source directory?  Also, the driver must be build as su.  Are you doing all these steps?

Tom W
National Instruments
0 Kudos
Message 6 of 11
(9,372 Views)

Hi, Tom

 

Thamks for all yr support.

 

Some how i could manage to compile and execute ni kernel code as well as other example in Enterprise linux server as well as fedora core 9.

 

I can run dio examples wich are provided in nimseries downloads.

 

i have gone through the ni kernel module code.

 

But my main concern is to directly access card from kernel space itself.

for that i need to map pci memory in kernel space itself not in user space .

 

If you can help me in this regard?

 

Regards,

sgm

 

 

Message Edited by sgm on 08-29-2008 12:19 AM
0 Kudos
Message 7 of 11
(9,338 Views)

Hi sgm-

 

You first need to map the cardspace memory using something like pci_iomap() (example here).  You can then read/write registers on the device using iowrite... and ioread... calls.  This type of operation is outside the scope of the MHDDK support provided on this forum.

 

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 8 of 11
(9,292 Views)

Hi Tom,

 

I have temp decided to have data aquisition from user space(Linux fedora 9) only.I am facing problem while aquiring data.

What I am doing is I am giving sine wave input to analog input 0 and same i am sending to analog output.

I am giving 1 v p-p sine wave  using function generator.

 

What is happning is that if I have  u32 samplePeriodDivisor = 200; then there is constant delay(phase diff) between analog input 0 and wave from on analog output 0 with any   frequency sine wave .

But if I make  u32 samplePeriodDivisor = 20; then anlog outout is having variable phase difference with ref to given input  .

 

Complete code is attached


Please tell me if there is any setting problem in the above code.

Code is only mix of aiex2 and aiex3 in nihddk example.

I am doing data aquision in contineous mode.

 

 

And please tell me if there is any doc which explains about data aquisition part.

 

 

Regards,

sgm

 

 

0 Kudos
Message 9 of 11
(9,123 Views)

Hi sgm-

 

The jitter you are seeing between AI and AO is probably related to the fact that your AI is running at some fixed, hardware-timed (and relatively fast) rate while the AO is strictly software-timed.  Is there some reason you need to re-generate the same signal you are acquiring?  If this is for a PID or single-point processing loop, you should use the "On Demand" AI method shown in aiex1.cpp instead.

Tom W
National Instruments
0 Kudos
Message 10 of 11
(9,114 Views)