Discussion:
LabVIEW Linux application slow when run without X Display
(too old to reply)
nbort
2008-07-16 15:10:11 UTC
Permalink
I have a VI which collects data from two USB-6218 DAQPads and one USB-6009 DAQPad and transmits the data to a second computer over a UDP port. The VI works properly when run from LabVIEW or when compiled as a "standard" shared library. When I compile the VI to run without requiring an X Display, following the tutorial "Running a LabVIEW application on Linux without an X Display", the application appears to function properly but run unacceptably (and unreasonably) slow. This problem occurs whether I run the application from a terminal within Gnome or from a text-only session.
 
I am looking for suggestions on where to start in tracking down this problem.
 
Thanks,
Neil
nbort
2008-07-18 17:10:12 UTC
Permalink
Ok, a bit more information:
The VI has multiple while loops running in parallel, each of which has a "Wait" block in it for timing. It appears that when using the "dark" runtime engine, the "Wait" blocks sleep the entire execution thread, not just the loop in which it is contained (a la the Wait block in the RT Module).
Since the Timed Loop structure is apparently not available in Linux, and "Wait" and "Wait Until Multiple" do not have the desired function, I am at a bit of a loss as to how I can do parallel timed loops.
-Neil
Raajit L
2008-07-23 15:40:12 UTC
Permalink
Hi Neil, What kind of slow speeds are you experiencing?  Could you tell us how much slower your application seems to be running?  What version of LabVIEW are you using and do you have the Full Development system?  How much data are you transferring over the UDP port?  Regards,
nbort
2008-07-23 16:40:11 UTC
Permalink
Raajit,
I am using the Full Development version of LabVIEW 8.5.1 with the Application Builder (also version 8.5.1). The data transfer over UDP is minimal: 4 packets of 20-40 bytes each, each sent at 10 Hz. I am testing with a direct connection between the two computers, and there is no traffic in the "return" direction.
I am nearly certain that the issue is in how the "Wait" blocks are handled, and not specifically related to my DAQ hardware or UDP. For instance, if I delete all but one loop, and put ten 100-ms waits in that loop (not connected to anything else or in a flat sequence, etc.), the loop executes at ~10 Hz when run from LabVIEW or compiled with the standard run-time engine, but runs at ~1 Hz when run with the "dark" run-time engine.
For the time being, I have bypassed this issue by combining some of the loops, and separating the remaining loops into multiple executables that I run concurrently from a script. This is an OK solution for the time being, but does not accommodate data exchange between the loops.
I have also submitted this as a support request, and will post if a solution is found.
-Neil
Eriquito
2008-07-29 21:40:07 UTC
Permalink
This was reported to R&D (# 121652) for further investigation.  The workaround provided by nbort (separating each thread into separate vis) appears to be the best solution for the moment.Message Edited by Eriquito on 07-29-2008 04:29 PM
Loading...