LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does Labview Depend heavly on Computer Memory RAM?

Hello,
I am new to Labview. I have built an serial application that use VISA to send out data packet to another PC that's also running labview to loopback the data packets back to the host pc. I noticed when I swap the host and loopback unit I have to insert a delay between my VISA write and VISA read functions in order for the data packets to come back correctly.

the setup I had:

host PC : Pentium4 1.8G 256MB
loopback PC : Celeron 2.0G 128MB
-- for this setup I would need to use timer to wait for 137 ms in order for my application to work

host PC : Celeron 2.0G 128MB
loopback PC : P4 1.8G 256MB
-- this setup works fine

Why is there a big difference?

Robert
0 Kudos
Message 1 of 3
(2,760 Views)
Since you're doing asynchronous serial communication, you do need to wait for data to come back. You don't know how quickly you'll get a response. Just waiting a fixed amount of time isn't the best solution, especially when you have to tune it depending on which machine is responding.
Look at the example serial VIs that ship with LabView. They show a couple of different ways to wait for data.
LabView <-> Serial.vi uses a loop reading Bytes at Port to wait for data.
Serial Read with Timeout.vi programs a timeout which specifies the maximum time to wait: if data comes in sooner it reads it.
To find the serial examples, from any LabView window goto Help >> Find Examples >> Search then enter "serial" in the box labeled Type a keyword to find:.
P.S. You said you
used a timer to wait for 137 ms. What function did you use? Have you seen the Wait (ms) function on the Time & Dialog palette?
Message 2 of 3
(2,760 Views)
Thank you for answering,

Yes, I used the wait(ms) from Time&dialog
I found out I had my VISA config and VISA close within the while loop I created, so that slows down my application alot.

I followed the design from Labview<-->Serial and changed the VISA to "DO I/O Asynchronously. Now everything works fine.
0 Kudos
Message 3 of 3
(2,760 Views)