From: Rolf K. <rol...@ci...> - 2004-03-03 14:04:06
|
Hello all, I have just uploaded the first release V1.01 of a VI library with associated user space dll and NT device driver to allow access of the Port IO address space on x86 systems. The CVS module name is "portIO". Packaging is not yet done and I would prefer some people with CVS access using this library first on different systems. It has been tested on NT4, 2000, and XP to work as suspected ;-) The way this works is that the user space DLL decides if the system is NT based and opens, and if necessary, installs the device driver on the system. Each function should be able to perform this check but in general it is a good idea to first call once the PORT IO Get Version.vi. For this to work you need to have administrator rights the first time when it is attempting to install the device driver. Then the PORT IO Read and Write functions have basically two modes. A normal mode where they access the device driver to let it read or write the actual value (this is the same as what the current LabVIEW distributed IO library does), and a fast mode where they will directly perform the according IO port access in the user space DLL. (For Windows 9x/ME systems there is no difference between these two modes as no device driver is needed to access Port IO from user space.) In order for the user space library to be able to access the port directly on NT based systems you need however to enable that port or port range first with the PORT IO Enable Range.vi function. Just pass in the base address and the number of consecutive port addresses you want to have access to and you should be able to access these ports in fast mode. ==> Watch out writing randomly to IO ports in your system will most probably result in a crash and eventually damage your hardware and/or software. Save address ranges are usually 0x220-0x22F (unless you use a GPIB card), 0x300-0x33F (prototype range), and 0x378-0x37F (LPT1), but your mileage may vary. Tests on my Pentium 3 Mobile 866 MHz system show that to read 1000 times 8 registers uses around 750 ms in traditional (device driver access) mode whereas it performs the same operation in 20 ms in the fast mode. Depending on time and motivation I may also try to upload the necessary source code and shared library to perform these same operations transparently on Linux systems. Enjoy 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... |