LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waarom is procesbesturing via compoort zo traag?

In mijn applicatie wordt apparatuur bestuurd en uitgelezen via de com-poort van een PC. Nu alle delen worden samengevoegd blijkt de besturing onacceptabel tijdrovend. Het blijkt ook niet te liggen aan de snelheid van de machine. Hoe zit dit? Waren onze verwachtingen te hoog gespannen?
0 Kudos
Message 1 of 3
(2,691 Views)
I think I have understood the question...

If you are polling the serial port with a while loop, make sure that there is a small delay (Wait until ms multiple) in the loop, otherwise the loop will eat up processor time.

Also, instead of reading directly from the COM port, make sure you use the VISA "Bytes at Serial Port" function to see if there is anything there, and only read if this is >0.

These are the two points which, in my experience, most often lead to problems with speed when using COM ports.

I hope I 1) understood the problem properly and 2) could help.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 3
(2,691 Views)
Hi
without more information it is terrible difficult to give a real solution.
What is slow? once a second? or once a millisecond?
The other answer about polling and eating cpu time can solve your problem but serial IO has more problems than wiring in LabVIEW.
You can also email me directly in Dutch if you need to.

Albert.Geven@philips.com
greetings from the Netherlands
0 Kudos
Message 3 of 3
(2,691 Views)