LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Driver development for custom PCI card

Hi friends,
I've a PCI card developed in-house. How to prepare a driver for the same in LabVIEW? Can I develop drivers in VISA? I don't have a manufacture id. Is there any other method to develop a driver for PCI card? Once developed, can I use them for other platforms like VC++? My OS is Windows 9X/NT & 2000. I need a driver to use for all these. Lot of querries! hope I made it clear.
0 Kudos
Message 1 of 13
(4,282 Views)
You need write a kernel mode device driver for your PCI card,
and its wrapper DLL. Then use 'call library' feature from within
LabVIEW.

Makoto

"G Sudheer" wrote in message
news:50650000000800000074410000-1016899309000@exchange.ni.com...
> Hi friends,
> I've a PCI card developed in-house. How to prepare a driver for the
> same in LabVIEW? Can I develop drivers in VISA? I don't have a
> manufacture id. Is there any other method to develop a driver for PCI
> card? Once developed, can I use them for other platforms like VC++? My
> OS is Windows 9X/NT & 2000. I need a driver to use for all these. Lot
> of querries! hope I made it clear.
0 Kudos
Message 2 of 13
(4,282 Views)
Hi G. Sudheer,

There is no easy answer to your questions.
First get a driver running in CVI, C++, or whatever language you prefer. Break the various required operations down into nice little pieces that can be called when need. Create a .dll and then wrap it up in an appropriate VI wrapper and you have got what you are looking for (minus the VISA request).

WARNING: SHAMELESS PLUG FOLLOWS!
We have done similar projects when NI just didn't sell the hardware we needed to accomplish some task (i.e. High speed SDLC protocol analysis). If you would like to contract this project out, check out dsautomation.com .
END OF SHAMELESS PLUG

Otherwise, schedule a couple of weeks, brace yourself for some rather ugly crashes, and start posting questions as you go.


Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 13
(4,282 Views)
If you have a very simple pci device then VISA could be the way to go.
Open MAX 2.2 and in tools\visa\options enable to see all pci devices (not only the registered ones with visa)
You should find your device after refreshing with max.
Then point to your device and select open VISA session.
This should open a tab where you see how to address this device, do a peek or a poke etc.
for testing ideal, even for production nice.
Be careful: do not address any device you really do not know ! You can do all forbidden and dangerous things.
greetings from the Netherlands
Message 4 of 13
(4,282 Views)
THE ANSWER IS THAT YES YOU CAN DO THIS IN NI-VISA!

Some have said that you need a kernel driver. This is partially true in that a PXI or PCI card (they are the same as viewed by the OS) must have a kernel driver. NI-VISA provides one for you.

You said that you do not have a manufacturer ID. This is a requirement of all PCI cards and no kind of driver will work until the card has one. Once you have this ID, run the VISA PXI Driver Development Wizard and it will generate an INF for you for all supported NI-VISA environments that support PXI/PCI. Read the instructions in the appropriate INF file for how to install it into the system so that the OS will attach NI-VISA to your device. It's really simple. NI-VISA supports PXI/PCI on Windows 95, 98, ME, NT
4, 2000, XP, and LabVIEW RT.

Some have said that MAX will just show you all PXI/PCI devices in your system. Your device will not show up until NI-VISA can see it, and that won't happen until you generate an INF as described above.

Since the INF file associates NI-VISA itself to your card, the ADE you use does not matter. NI-VISA supports PXI/PCI in LabVIEW, CVI, MSVC, Visual Basic, or any other ADE that normally works with VISA.

NI-VISA works well even with more advanced devices because we support all types of register accesses (config, I/O, memory) as well as interrupt handling. Just look at the visa.h that NI ships in the VXIpnp directory. If you are using C/C++, make sure you define NIVISA_PXI before including visa.h. If you use LabVIEW, you need to use the address space numbers as defined in visa.h.

Good luck.

Dan Mondrik
Senior Software Engineer, NI-VISA
National Instruments
Message 5 of 13
(4,282 Views)
Hi Dan,
i also require some help in the same regard.
I am working on win3.11 OS. i want to use NI 6014 for my application. Unfortunately, NI DAQ doesn't have support for NI 6014 in win3.11 OS.
I am having NI CVI 5.0.1 with which NI VISA 1.1 came. Can i use the above configuration to write the drivers for NI 6014.

regards,

Amit Kumar
Project Engineer,
AED, ARAI
Pune, India.
amit.aed@araiindia.com OR karle.aed@araiindia.com
0 Kudos
Message 6 of 13
(4,282 Views)

Hello Dan, 

 

do you mean that for a PCI device, it must have PCI Device ID ?

 

Thank you,

Yan

0 Kudos
Message 7 of 13
(3,003 Views)

10 years ladies and gentlemen.  If this isn't a record it must be close to one.

0 Kudos
Message 8 of 13
(2,994 Views)

That's the power of Internet...

Smiley Happy

 Do you know the answer for my question ?

0 Kudos
Message 9 of 13
(2,983 Views)
Wasn't Dan's answer absolutely clear on that?
0 Kudos
Message 10 of 13
(2,981 Views)