LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parrallel port XP performance

Hello,

I am developing an application which is the software for a logical state analizer. (the communication with the analizer is based on the parralel port) To make this post as concrete and short as possible.

I have developed my application in LV 6.1 and used the Access HW library in order to be able to communicate throught the LPT port under windows XP.

My device works in a way that it fills internal memory cells with data which I than aquire though parralel port. I have to make approx 32k x 8 operations on the out port and the same amount of infort to get the measured data downloaded.

When I run my application on windows 98 machines the data acqusition takes about 21 seconds ( PII 300 MHz 256 RAM machines , in the lab), When I run the same application on my PC ( P41,7 512 RAM ) it takes a staggering 50 on some XP PC's I even had a 70 sec. data download.

Are there any suggestions ... I can post my data Acq module gladly if some one would be willing to take a look at it.

Any quick ideas on where I could have gone wrong ??? ... I myself lack the experience ;/ (I am a student hence I am a relatively unexperienced developer)

Regards,
Maciej

0 Kudos
Message 1 of 14
(3,330 Views)
Hello Maciej,

as far as I see it - you have not really made a mistake.

The only mistake is - switching from Win98 ( does not need accesshw ) to one
of the next Operation systems like W2k or XP.

In the past - as I used LPT Port for a lot of applications - I have realized your
described behaviour and made my own benchmark. I have simply used a loop with 100 or 1000
times Port Out operations and compared execution time on different machines.

Best result was - use of an additional PCI-card with LPT - Interface .....
you can see it on attached picture.

If you need to go to XP - the only way will be ..... to take a DIO-card or something
else. With LPT you will get stuck with expected speed. Who wants to wait 20seconds
or more for such kind of Digital I/O - you will get gray hair until measurement completes.

Hope, that this guides into expected direction .......... ???
Regards
Werner
0 Kudos
Message 2 of 14
(3,315 Views)
Werner,

Thank you very much for the info. This application is my diploma work. And hence I will not use an internal PCI Card ( The universyty has low budget as it is).I shall keep to Access HW as I would like the software I have made to work on every workstation .Currently my University uses win98 in the Lab the analizer is desitignated to be used in, but if they decide to upgrade to XP next year I would not like my software to become copletely useless ... too bad it will take 2x more time to make the data acq but the device will sitll be somewhat usefull).

And for the record I was developing the app mostly on my comuter which has the XP system installed, so that is why I used Access HW in the first place ;]

I was thinking perhaps of maybe using an external library (not one made by National Instruments) to comunicate with the parallel port , perhaps use a dll written in another language ... , But since NI wrote the Access HW I guess they knew what they were doin'. Perhaps this is an XP fault and I have nothing to say here.

Thank You very much for the feedback ... Looks like my app will stay the way it is than. Unless some one else jumps out with a brilliant, simple and ellegant solution ;]

Best Regards,
Maciej

0 Kudos
Message 3 of 14
(3,305 Views)
Ok, no-one's mentioned it yet, so I suppose I will....

Have you tried using VISA? It allows you to interface with the parallel port and I'm assuming that the performance isn't too bad (It works quite well for serial communications at least).

Maybe it's worth a try.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 14
(3,299 Views)
Shane,

As far as I am aware using VISA with the parralel port enables you only to commit write operations.

from the NI support :
"Windows environment we can output data to the parallel port using the same VISA VIs that we would use for normal serial communication. However, the Windows API does not have built in support for input operations"

I however need access to all three LPT registers Data, Status and Control. So using VISA is totally out of the question.

Besides using the outport and inport is a more low level approach and I would expect it to have far better performance, than having to cast from numeric value to string in order to use the VISA.vi about 256 k times in my application each time I download the measured data.

Thank you for replying,
Best regards Maciej

0 Kudos
Message 5 of 14
(3,292 Views)
Hi Maciej,

independent of good/bad performance with LPT - maybe it's worth to have
a look on your code in order to give some hints ..... for optimization.

If you are interested ........ let me know. In case you don't want to send
your code to this public web-place - my private email: werner.hasche@web.de

Regards from Dresden/Germany
Werner

P.S. store your application in .llb and zip it; otherwise needed
sub.vi's are not available.
0 Kudos
Message 6 of 14
(3,271 Views)
Hello,

Werner and anyone else interested here is my code. The way it works is ... well ;] not wery simple to explain if you want more info on why and where I can e-mail the schematic...

The top level VI is called ACQISITION.vi

Regards,
Maciej

0 Kudos
Message 7 of 14
(3,235 Views)
Hello,

As a general note, you may find some other posts useful; sorry that you have not found VISA useful in your case.

http://forums.ni.com/ni/board/message?board.id=170&message.id=32010&requireLogin=False

http://forums.ni.com/ni/board/message?board.id=170&message.id=96478&requireLogin=False

http://forums.ni.com/ni/board/message?board.id=170&message.id=34544&requireLogin=False

http://forums.ni.com/ni/board/message?board.id=170&message.id=25066&requireLogin=False

Best Regards,

JLS
Best,
JLS
Sixclear
0 Kudos
Message 8 of 14
(3,216 Views)
JLS,

Thanks for the post. Unfortunately none of the threads You have posted addreses my problem :(.I have no problems with communicating with my device actually it works the way I want it to. The problem is that under the XP operating system I suffer a lowered performance compared to win98 systems as I have written in the OP.

And unfortunately I cannot use VISA as it does not support input operations for LPT.

Regards,
Maciej

0 Kudos
Message 9 of 14
(3,208 Views)
Here is some info I found with google. It suggests turning off bidirectional on the parallel port. Try different bios settings on the parallel port.

"Why does my printer go slow when it's connected to the V++ security key?

A number of recent model printers operate very slowly if connected via the V++ security key. Documents do transfer to the printer but at an extremely slow rate. This problem has been observed with Hewlett-Packard models such as the LaserJet 6MP and LaserJet 2100TN. Users are requested to let us know about other affected printers.

This problem is caused by bi-directional use of the parallel port by the printer. The solution is usually to install the latest security key system driver (available for download on the System Updates page).

Other solutions include either connecting the printer via some other medium (e.g. serial port, USB, or direct Ethernet connection) or connecting it to a different parallel port than the security key. If you have more than one parallel port then connect the security key to LPT1: and the printer to LPT2:. Extra parallel ports, on plug-in cards, may be purchased very cheaply from a computer retailer."
0 Kudos
Message 10 of 14
(3,197 Views)