LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI properties execution

Solved!
Go to solution

Hello,

I have a few general questions regarding the VI properties execution settings.
http://zone.ni.com/reference/en-XX/help/371361B-01/lvdialog/execution/

I have the VIs ready to build an application and am considering the aforementioned settings. First of all, I wanted to know or at least have an idea of how much of a difference these settings could make in terms of speed or performance? Should I consider this a trial and error type of situation, since I am not 100% sure which settings would be the best for me?

The settings I am considering are the following:

What priority to set each VI to?
Which execution system to use?
Allow debugging?
Reentrant execution etc ?
Enable automatic error handling?

Obviously, I don't expect someone to tell me those answers, but maybe just explain how much of a difference they can make.

Also, if someone could either verify or correct me on this, but should I refrain from setting a VI to subroutine if that VI takes in multiple inputs from the user and uses local and global variables?

Anyway it's not that I don't already have the settings in mind, it's just that i wanted to have a better idea of what may happen if I happened to not select the best settings. I do realize this is very general and basic. Any replies would be very greatly appreciated.


thanks

0 Kudos
Message 1 of 7
(3,020 Views)
Solution
Accepted by topic author nano_era

 


@nano_era wrote:

Hello,

I have a few general questions regarding the VI properties execution settings.
http://zone.ni.com/reference/en-XX/help/371361B-01/lvdialog/execution/

I have the VIs ready to build an application and am considering the aforementioned settings. First of all, I wanted to know or at least have an idea of how much of a difference these settings could make in terms of speed or performance? Should I consider this a trial and error type of situation, since I am not 100% sure which settings would be the best for me?

The settings I am considering are the following:

What priority to set each VI to?
Which execution system to use?
Allow debugging?
Reentrant execution etc ?
Enable automatic error handling?

Obviously, I don't expect someone to tell me those answers, but maybe just explain how much of a difference they can make.

Also, if someone could either verify or correct me on this, but should I refrain from setting a VI to subroutine if that VI takes in multiple inputs from the user and uses local and global variables?

Anyway it's not that I don't already have the settings in mind, it's just that i wanted to have a better idea of what may happen if I happened to not select the best settings. I do realize this is very general and basic. Any replies would be very greatly appreciated.


thanks


 

This will depend on your computer (i.e memory, CPU's, etc...), the operating system, coding efficiency, vi purpose etc...

 

What priority to set each VI to?

 

This will really depend on what you are trying to accomplish. Normal priority is good for most vi's and applications that I have ever developed. If there are time critical things that have to happen then you can make these more agressive. This can cause problems down the road with something hanging up while your "more important" code is exicuting. Stay away from this unless you really need this. If your timing has gotten that critical you may need to look into a real time system.

 

Which execution system to use?

 

The system execution allows you to set threads for your code. If you give them different execution system you may see sutile coding effects.

 

Allow debugging?

 

Should not have much of an effect.


Reentrant execution etc ?

 

This will depend on how many copies of this vi are tunning at the same time. If you are using a vi in multipule places at the same time then you may see a great deal of effeciency improvement as the software does not have to wait for the exicution of code to finish before it can be used again. This code (if reentrant) can be use symotaniously in all places at once.

 

Enable automatic error handling?

 

Little or no effect on timing.

 

Also, if someone could either verify or correct me on this, but should I refrain from setting a VI to subroutine if that VI takes in multiple inputs from the user and uses local and global variables?

 

You are very correct here. You only want to set code to subroutine if the code only has to process and release. It will not store or update.

Tim
GHSP
0 Kudos
Message 2 of 7
(2,998 Views)

Thank you for the reply. That makes it much easier to make my selections.

Another question, seeing as how I have a VI that seems to require reentrant execution, is it necessary to preallocate clone for each instance?


Thanks

0 Kudos
Message 3 of 7
(2,989 Views)

No, Labview will automatically do that. If you place the vi in the block diagram it is placed as a clone if it is reentrant. You will have to be aware of that if you need to edit this vi as you will have to change it to edit mode to change the code.

Tim
GHSP
0 Kudos
Message 4 of 7
(2,977 Views)

OK, what about the "share clones between instances" option? It says that it reduces memory usage. Does that affect performance and is there any sort of issue with selecting this?

0 Kudos
Message 5 of 7
(2,965 Views)

OK, what about the "share clones between instances" option? It says that it reduces memory usage. Does that affect performance and is there any sort of issue with selecting this?

EDIT: sorry for the accidental double post.

0 Kudos
Message 6 of 7
(2,965 Views)

 


@nano_era wrote:

OK, what about the "share clones between instances" option? It says that it reduces memory usage. Does that affect performance and is there any sort of issue with selecting this?


THat will depend on how many instances you have running at the same time and how long it takes to exicute the code in that vi. If you have one instance of that vi and it does not take long to exicute the code then you will not see much (if any) improvement. If your code is in one hundred simotaniously call vi's and each vi takes 30 ms to exicute then you would see a big difference.

 

Tim
GHSP
Message 7 of 7
(2,957 Views)