Jump to content

subroutine priority and memory allocation


Gary Rubin

Recommended Posts

I have a LV8.6 subVI that is set to subroutine priority. It has 6 array indicators that are used for debugging and are not connected to terminals. When I have LV show me buffer allocations, I get flashing dots on these indicators. Given that I'm running in subroutine priority, is memory really allocated for for those?

Thanks,

Gary

Link to comment

I have a LV8.6 subVI that is set to subroutine priority. It has 6 array indicators that are used for debugging and are not connected to terminals. When I have LV show me buffer allocations, I get flashing dots on these indicators. Given that I'm running in subroutine priority, is memory really allocated for for those?

Thanks,

Gary

--- I don't think the priority has anything to do with the buffer allocations.

One of the rules is that an indicator (that it fed data from a wire) will make a copy of that data at execution time.

I don't think that rule is different for subroutines.

If it's a performance issue, put the indicators into a conditional-disable structure.

Steve Bird

Culverson Software - Elegant software that is a pleasure to use.

Culverson.com

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Link to comment

I don't think that rule is different for subroutines.

If it's a performance issue, put the indicators into a conditional-disable structure.

According to LV8.6 Help:

In addition to not sharing time with other VIs, subroutine VI execution is streamlined so that front panel controls and indicators are not updated when the subroutine is called. A subroutine VI front panel reveals nothing about its execution.

I figured that if the front panel indicators are not updated and the indicator is not connected to a terminal, there's no need to allocate memory for that indicator. I guess that's not the case, because a disable structure around the indicators did speed up my process considerably.

Also, welcome to LAVA.

Gary

Link to comment

According to LV8.6 Help:

I figured that if the front panel indicators are not updated and the indicator is not connected to a terminal, there's no need to allocate memory for that indicator. I guess that's not the case, because a disable structure around the indicators did speed up my process considerably.

Also, welcome to LAVA.

Gary

Another way to twist it so it make smore sense.

Controls and indicators not on the icon connector can still be used, although I have not seen it much or often. If I wanted to icould write a value to an indicator (not on the connecto pane) in one call of a sub-VI and use a local to read that value on the next call. I have seen it used like Sr are used in an Action Engine (AE). I think I have even seen controls not on the icon connector used to localize VI for diferent langauges by using Invoke node set control method and savign the VI.

No the GUI does not need to update but that data has to be there for it to read on another call.

Ben

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.