ichweiss wrote:
> I have a problem, I need to detect my parallel port register address
> using a vi, I mean, I know that in my machine the base address is
> 0x378, but I must find it from a program in labview. In C the code is:
> base_address=*(unsigned int far *)0x00000408;
> and it returns 0x378 to base_address.
This C code only works under DOS. Windows applications have no
possibility to directly access the physical memory address range. In
fact physical address 0x00408 is not even mapped into a Windows process
space and even if it would, the actual linear address to use in the
application would be entirely different. Also trying to do that from an
application directly would most probably cause a General Protection
Error as physical memory access is prote
cted under any modern OS.
You would need a device driver which can access physical adresses and
return you that value. While LabWindows CVI has a device driver to do
that and the PortIO VIs use the same driver to access the IO port
addresses there are no VIs shipping with LabVIEW to access physical
memory. You could try to search on the NI site for the AccessHW library
which provided the PortIO functions before they got included into
LabVIEW. I seem to remember that they also had a VI or two to access a
physical memory address, but am not sure about that.
Rolf Kalbermatter
Rolf Kalbermatter
My Blog 
DEMO, Electronic and Mechanical Support department, room 36.LB00.390