01-08-2014 03:37 PM - edited 01-08-2014 03:38 PM
@GuenterMueller wrote:
They shouldn't. The wire just stops at the sequence local. The data is still on the wire and can be read without any allocation in another frame.
No, if you look at the FSS, each "+1" operation needs to allocate a new buffer, because the input buffer cannot ber reused (it is needed again later). I think the same should apply for the SSS too. Where else would the intermediary results be kept?
Maybe I am missing something obvious. 😉
01-08-2014 03:55 PM
@altenbach wrote:
@GuenterMueller wrote:
They shouldn't. The wire just stops at the sequence local. The data is still on the wire and can be read without any allocation in another frame.
No, if you look at the FSS, each "+1" operation needs to allocate a new buffer, because the input buffer cannot ber reused (it is needed again later). I think the same should apply for the SSS too. Where else would the intermediary results be kept?
Maybe I am missing something obvious. 😉
Right you are, Christian. It seems to me as if LabVIEW allocates memory for each sequence local and thus no memory allocation dots appear.
01-09-2014 10:34 AM
If everyone understood code optimization, readable code, and how to avoid abuse, then every function / structure within LabVIEW is great.
In real life, it is not the case... Most (many?) people do not write readable code when using SSS. As a matter of fact, it is highly abused with nested SSS.
The State Machine may not perform as well, but it is much easier to maintain (read, debug, etc), and scales more gracefully.
That being said, a skilled LabVIEW programmer can write a good program using practically any architecture (use of structures). Anyone can make a mess of a state machine.. It all depends what your ultimatye goal is. There's no "wrong" answer.
I see less SSS in the code I inherit, so I am happy with the stand that I chose to take. 🙂
😄
It would be an interesting challenge to request writing code but offer different criteria on what can and cannot be used to develop the code. You would end up with n-versions..
01-09-2014 10:53 AM
01-09-2014 11:11 AM
@Pete.Dunc wrote:
This should always be a cause for concern
I do that all the time, then select the frame and "edit...create subVI". Now I add real code to the subVI and remove the sequence frame from it.
(No need to create controls and indicators with the correct representation or connect the connector pane. :D).
01-09-2014 11:21 AM
03-26-2014 10:03 AM - edited 03-26-2014 10:14 AM
I just ran across another example where someone wanted a new sub-palatte (On the Functions Palettes this time)
You CAN add your own palettes!
Your new sub-palette is right there
You can also use the tool to change palette item locations, remove items, add other things and edit sub-palette icons. Enjoy!
EDIT I forgot, You can also use the tool to change what happens when you select a vi. The default is to drop the vi ther option is to drop the contents of the vi. (Useful for things like "dropping" an event loop with Stop and error handling)
04-10-2014 12:10 PM - edited 04-10-2014 12:11 PM
I feel stupid, I wrote a function with a LV2-style global to do this:
If you need a numeric control to be only odd or even, set the minumum value to odd or even and increment to 2 in the properties dialog for the numeric!
07-19-2014 04:11 AM
This post was not intended to be a Nugget but it seems to become a useful Nugget. I also shared it another Breakpoint thread but posting it here makes more sense.
Shortcut to jump up or down in an array
07-28-2014 03:36 PM - edited 07-28-2014 03:39 PM
I've never noticed that, but Draw Unflattened Pixmap.vi is polymorphic:
By default it accepts U32 RGB array. In the picture above there is no coercion dot, which suggest that there is some polymorphism going on (but I've never noticed missing red dot). Also - always read the documentation, even on functions you use a lot 😉
BONUS: you can connect boolean array to draw binary images!