04-27-2009 06:34 AM
Hello,
I am developing some code which is receiving data from a serial port. I am sending three data packets with a 500ms gap between each one. There is a minimum of 1300 seconds before the next set of data is sent out.
The time my labview code takes to run seems to have become as issue, I am doing a some of array manipulation, and a few other things.
It seems to miss out some data and I want to be sure that the code is running within my timing limits. But surely LabVIEW can't be that slow that it takes 500ms to run a VI (or part of one in my case)?
Is there anyway way of timing how long it takes to run a VI or part of a VI?
Thanks,
Jack
04-27-2009 06:52 AM
Hi Jack,
see "Tools -> profile -> performance and memory...". It shows how long a vi needs to execute.
Mike
04-27-2009 07:18 AM
04-27-2009 07:26 AM
In addition to the above susggsetions you can do benchmarks to comapre different code constructs. THe following is an image where I was comparing 4 different methods of stoping a VI.
Post an image of your code and we can probably tell you what is taking too much time.
Ben
04-27-2009 08:50 AM
Hi,
As Ben suggested, you could use sequence structures and tick counts to find how long your vi is taking to excute. Also, try setting ur vis execution properties for optimal performance by removing debugging, increasing the priority of execution.. etc
04-27-2009 08:57 AM
mallyaprs wrote:Hi,
As Ben suggested, you could use sequence structures and tick counts to find how long your vi is taking to excute. Also, try setting ur vis execution properties for optimal performance by removing debugging, increasing the priority of execution.. etc
NO!
First fix the code. Mucking with priority (without a good understanding OS Scheduling operations) is a bad idea.
Ben