From: Jim K. <ji...@ji...> - 2004-03-05 17:23:06
|
Very nice work, Rolf. I downloaded and tested on my WinXP laptop, but I couldn't get it to = work. My laptop doesn't have a parallel port, which might be the problem (no hardware at 0x378). When I run the test VI, regardless of what I set = the "write value" to, the "written value" (read value) is always 255. I'll see if I can get some other folks to do some further testing. It = might be nice to do some speed benchmarks in a real-world application. I know someone with a Parallel Port I2C/SPI driver board. The device driver = for the board currently uses NI's PortIO driver. A speed boost would be = really useful for this person's application since chip test folks always want = to do things *faster* :-) =20 Also, I'll volunteer to create an MNU file for this package so that we = can integrate it into the palettes. -Jim > -----Original Message----- > From: ope...@li...=20 > [mailto:ope...@li...]=20 > On Behalf Of Rolf Kalbermatter > Sent: Wednesday, March 03, 2004 6:00 AM > To: ope...@li... > Subject: First release of Port IO library for Windows=20 > 9x/ME/NT/2000/XP/2003 >=20 >=20 > Hello all, >=20 > I have just uploaded the first release V1.01 of a VI library=20 > with associated user space dll and NT device driver to allow=20 > access of the Port IO address space on x86 systems. The CVS=20 > module name is "portIO". >=20 > Packaging is not yet done and I would prefer some people with=20 > CVS access using this library first on different systems. It=20 > has been tested on NT4, 2000, and XP to work as suspected ;-)=20 >=20 > The way this works is that the user space DLL decides if the=20 > system is NT based and opens, and if necessary, installs the=20 > device driver on the system. Each function should be able to=20 > perform this check but in general it is a good idea to first=20 > call once the PORT IO Get Version.vi. For this to work you=20 > need to have administrator rights the first time when it is=20 > attempting to install the device driver. >=20 > Then the PORT IO Read and Write functions have basically two=20 > modes. A normal mode where they access the device driver to=20 > let it read or write the actual value (this is the same as=20 > what the current LabVIEW distributed IO library does), and a=20 > fast mode where they will directly perform the according IO=20 > port access in the user space DLL. (For Windows 9x/ME systems=20 > there is no difference between these two modes as no device=20 > driver is needed to access Port IO from user space.) >=20 > In order for the user space library to be able to access the=20 > port directly on NT based systems you need however to enable=20 > that port or port range first with the PORT IO Enable=20 > Range.vi function. Just pass in the base address and the=20 > number of consecutive port addresses you want to have access=20 > to and you should be able to access these ports in fast mode. >=20 > =3D=3D> Watch out writing randomly to IO ports in your system=20 > will most probably result in a crash and eventually damage=20 > your hardware and/or software. >=20 > Save address ranges are usually 0x220-0x22F (unless you use a=20 > GPIB card), 0x300-0x33F (prototype range), and 0x378-0x37F=20 > (LPT1), but your mileage may vary. >=20 > Tests on my Pentium 3 Mobile 866 MHz system show that to read=20 > 1000 times 8 registers uses around 750 ms in traditional=20 > (device driver access) mode whereas it performs the same=20 > operation in 20 ms in the fast mode. >=20 > Depending on time and motivation I may also try to upload the=20 > necessary source code and shared library to perform these=20 > same operations transparently on Linux systems. >=20 > Enjoy >=20 > Rolf Kalbermatter > CIT Engineering Nederland BV tel: +31 (070) 415 9190 > Treubstraat 7H fax: +31 (070) 415 9191 > 2288 EG Rijswijk http://www.citengineering.com > Netherlands mailto:rol...@ci... > =20 >=20 >=20 |