Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI6503的驱动开发是否需要发送什么命令打开设备?

最近在QNX下写PCI6503的驱动,程序可以搜索到设备,也能取得设备信息,但是内存映射后,就是无法对映射内存进行操作,我想可能是应该将设备打开或者取得什么操作权限之类的,但是我不知道怎么写?希望高手指点!
0 Kudos
Message 1 of 4
(7,625 Views)

Hello-

Apologies, but the DDK forum is only supported by English-speaking National Instruments engineers.  If you are comfortable with and able to repost your question in English I will be glad to help out.

Thanks-

Tom W
National Instruments
0 Kudos
Message 2 of 4
(7,605 Views)

Hi, I am writing code in C# with .Net and used the below code to access the DAQmx drivers. Everthing worked but I found talking to the 6503 ports was quite slow about 300ms per port access.  Are there other drivers available that are quicker or will I have to learn how to do direct register programming of the card?  The PCI bus is fast so it must be the software that is slowing things up.

Best Regards,

Ivan

Below just a snippet of code to access port 0

using (Task TaskWritePort0 = new Task()

{

TaskWritePort0.DOChannels.CreateChannel("Dev1/port0", "port0", ChannelLineGrouping.OneChannelForAllLines);

DigitalSingleChannelWriter writePort0 = new DigitalSingleChannelWriter(TaskWritePort0.Stream);

writePort0.WriteSingleSamplePort(

true, (UInt32)bCrateNo); //rt.Text += "Crate No(Hex): " + bCrateNo.ToString("X") + "\n";

}

0 Kudos
Message 3 of 4
(7,587 Views)

Hello Ivan-

There are several changes you can make to increase your loop performance with NI-DAQmx. 

First, the creation of the DO task and channel only needs to be done once at the beginning of operation.  These can be persisted throughout the execution of your application and simply referenced by the Write() methods.  This should speed up your loop rate from a software perspective.

Second, if you want to write several times in a loop you may want to consider explicitly calling the DAQmx Start() method and then use autoStart=False with the Write() method.  This will speed up your loop rate from a hardware perspective by allowing for faster write cycles.  In this case, only the register access required to update the data register is necessary rather than having to repeatedly arm and disarm the device.

Hopefully this helps-

Tom W
National Instruments
0 Kudos
Message 4 of 4
(7,577 Views)