Jump to content
Sign in to follow this  
BrokenArrow

Action Engine : Location of Indicators, Controls, Constants

Recommended Posts

I am wondering what the impact is of having constants, controls, and indicators inside or outside the loop of a fast Action Engine. It doesn't seem to matter in my testing (memory, speed).

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

QUOTE (neBulus @ Mar 18 2009, 09:33 AM)

See http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=191864#M191864' target="_blank">reply #12 in this thread on the dark-side where Greg McKaskle explained why the VI Analyzer want controls and indicators that are on the icon connector to be on the "root" of the diagram.

Ben

I read that post a while back and was wondering where it was - it was on my mind this week, thanks for finding it.

"The caller has to protect the data on its wire from the subVI"... :blink: that kind of stuff blows my biscuit.

Share this post


Link to post
Share on other sites

This seems to be an ideal that has little significance for action engines. An action engine make use of shift registers to store data and/or states, and if you wire from the outside and on to the register, you accomplish nothing because you (re)initialize the shift register for each call. If you use the action engine to read and buffer data from some source, you will have to bypass the left shift register somehow during read, no matter what. I don't see how doing this inside the loop will be any worse than outside the loop. When there is no data to send to the AE, the worst thing that can happen is a copy of an empty array. When sending data from the AE, this can be done "on the other side" of the shift register. The rest of the input end of the action engine usually is some low byte count initializing stuff anyway (references etc). I mean, the data going into the AE may not even be of the same format or type as the data going out of the AE. If you have to pass huge amounts of other data through the AE, this is completely different, but why would you want to do that?

But then again, my understanding of buffers is fuzzy at best :wacko:

Share this post


Link to post
Share on other sites

QUOTE (bsvingen @ Mar 18 2009, 05:53 PM)

.... and if you wire from the outside and on to the register, you accomplish nothing because you (re)initialize the shift register for each call.

It's just simply not an AE if you do that!

Share this post


Link to post
Share on other sites

QUOTE (BrokenArrow @ Mar 18 2009, 11:30 PM)

It's just simply not an AE if you do that!

Exactly, so the reasons for placing controls outside of the while loop is simply not there for AE, unless you also pass through some additional large datasets.

Share this post


Link to post
Share on other sites

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.

Sign in to follow this  

×
×
  • Create New...

Important Information

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