08-19-2008 03:59 AM
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
08-20-2008 04:26 PM
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-
08-22-2008 06:14 AM
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
08-22-2008 09:52 AM
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-
08-25-2008 12:19 AM
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
08-25-2008 01:07 PM
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?
08-29-2008 12:18 AM - edited 08-29-2008 12:19 AM
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
09-03-2008 09:40 AM
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-
09-26-2008 06:21 AM
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
09-26-2008 09:33 AM
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.