LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Has anyone seen this behaviour of AccessHW In Port?

Yesterday I was trying to check the operation of a plug-in PCMCIA parallel port, specifically I wanted to know if there were any timing issues with this device on an XP machine, so I thought I would try the AccessHW In and Out functions in Labview. I installed an old copy of Labview 6.1 (It was 5:50PM and I wanted to do this fast!) and tried it.
Reading the memory location where the device's status port was supposed to be just returned zero. Strange, I thought, so I tried some other addresses in the I/O range. I got zero from every single one. I tried the same on my own laptop, which is also XP, and I was getting sensible numbers from addresses in I/O space.
Has anyone seen this behaviour? The machine has McAffee on-access protection running, which cannot be disabled (company IT policy), and I have a suspicion that this might be blocking accesses to low memory, is this possible?
 
0 Kudos
Message 1 of 10
(3,309 Views)
Are you using a VI that was written in LV6.1 on another machine using a predecessor to XP? such as Win-2000...
 
I recall XP changing something with the parallel port..  It's been a few years, so I do not remember the details.  MS added security to the parallel port (although that never made sense to me... 😞  ).
 
RayR
0 Kudos
Message 2 of 10
(3,299 Views)

Both machines are XP. The routine I used to read the ports was written in LV6.1. It works on one machine, but apparently not the other.

MS did make it illegal to access the I/O ports in Windows XP, which was why the normal In Port and Out Port vi's ceased to function. NI brought out the AccessHW versions of these to work around this problem.

Yes, I also resent some jumped up operating system telling me which bits of my PC I can have access to!

 

0 Kudos
Message 3 of 10
(3,291 Views)
Have you checked the addressing of the parallel port?  Are they the same on both PC's?
 
RayR
0 Kudos
Message 4 of 10
(3,281 Views)
>Have you checked the addressing of the parallel port?  Are they the same on both PC's?
 
Yes, and no. The new PC has a plug-in parallel port. Its address is something like FF78. However, as I said, every address I read from returns zero, and I tried a lot, in the 0 - 1000h range. That can't be right.
 
0 Kudos
Message 5 of 10
(3,279 Views)

Sorry... my mind is not working well this morning 😞  You had mentionned that in your original post and the fact that it is a PCMCIA parallel port.

As for the address location, I have seen addresses in the 0x2000 region for add-on parallel ports (not PCMCIA).

I haven't used a PMCIA device with Win-XP.  Does the address info for that port appear under properties when you look at the HW devices within the Control Panel's System.  From what I can recall, you can change the PCMCIA serial port number within the HW device, so maybe the properties will list the address.. 

Have you checked this?

RayR.

 



Message Edited by JoeLabView on 07-02-2008 11:20 AM
0 Kudos
Message 6 of 10
(3,275 Views)
It may have been 1F78, I don't have access to the laptop or my notes now. This was listed as the I/O range in Device Manager /  Printer Port / Properties / Resources / I/O range.
 
The point is, when I randomly read addresses between 0 and 1000 on my laptop, I get some non-zero values. On the new laptop, I only ever get zero. That makes me think it is not just a problem with the PCMCIA printer port.
 
We have another program that accesses the printer port directly. I just found out that that doesn't work either.
I contacted the manuf. of the device, and they said that "in theory" it should be possible to access it directly.
 
0 Kudos
Message 7 of 10
(3,271 Views)

If the address is 1F78, then that would be the start address, and the data would be offset from that one.  So scanning from 0 to 1000 are unlikely related to the PCMCIA device.  You are probably verifying the state of other devices (if they exist).  You're older laptop may have one or more devices addressed in that range.  To confirm that, you'd have to check the addresses of all the devices within the Device Manager.

RayR

0 Kudos
Message 8 of 10
(3,260 Views)
I found a work-around for this problem. I installed an ActiveX component called TVicLPT and tried accessing the port through that. It works perfectly and gives hardware access at high speed.
It seems that the accesshw vi's just don't work on some machines.
TVicLPT is a nice program, it allows you to do just about anything you could want to do with a printer port, find the base address, access individual port pins, chance port mode, high speed data transfer, etc. Recommended.
 
Message 9 of 10
(3,211 Views)
Thanks for sharing 🙂
0 Kudos
Message 10 of 10
(3,180 Views)