LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Remove the stacked sequence structure from LabVIEW.

Well heres an example of the use of Stacked sequencies that I use quite frequently for more complex programs.   The whole program consists of a stacked sequence.  The first frame in the SSS consists of program initialization

ss 1.png

 

The next frame consists of the main program loop, with an event hanlder structure that waits for an event to occur (usually a button press), then executes the code in that block, then goes back to waiting for the next event

 

ss 2.png

Now I used to write subVIs for every single one of the the even handlers.   The problem becomes as the complexity of the program grows, it becomes a PITA to wire a reference for every single front panel object I am going to potentially maniuplate to the subVI

 

So usually, I just have another SS inside the event handler strucutre that.  Sure, I use subVIS for many things like setting up acquisiton, grabbing data, data processing etc., but typically I am doing alot of manipulating the front panel stuff, so that stuff I just do inside the SSS.   If I need more screen real estate, I just add another frame to the SSS.  

 

So shoot me Smiley Tongue

 

 

 

 

 

 

Message 41 of 195
(1,587 Views)

@PatrickR wrote:

Well heres an example ...


ouch!

Message 42 of 195
(1,574 Views)

Good LORD! I will not shoot you!  and, I thank you for your example.

 

A Consumer-Producer (Events) design pattern could offer you some better benefits than a bottle of aspirin and that construct though. 

 

Again, there is no shooting, but that example could easily be done without a SSS, AND, have improved performance for the user experience without sacrificing performance of the real program objectives.  (without the uithread hit the local variables require)

 

Try again Patrick.  I promise no shooting.


"Should be" isn't "Is" -Jay
0 Kudos
Message 43 of 195
(1,569 Views)

@altenbach wrote:

@PatrickR wrote:

Well heres an example ...


Ouch!


Hold Your Fire!-  this is not a live fire excise! Safe your weapons!

 


Seriously, I've learned a lot from threads like these!  This one seems promising for all.


"Should be" isn't "Is" -Jay
0 Kudos
Message 44 of 195
(1,563 Views)

The only time I have used SSS (two times) is when I am writing/reading configuration files where there are dozens of keys to write and read. Without SSS the BD can get pretty wide.

 

I guess I could break down the key sections into sub-vi's, but I'd rather see them up-front.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 45 of 195
(1,526 Views)

@AnalogKid2DigitalMan wrote:

The only time I have used SSS (two times) is when I am writing/reading configuration files where there are dozens of keys to write and read. Without SSS the BD can get pretty wide.

 

I guess I could break down the key sections into sub-vi's, but I'd rather see them up-front.

 

-AK2DM


What I do in that case is read the keys for each config file into 3D arrays, then just read the appropriate array elements into your program or replace them by index number. You can always make sure things went from/to the right place just by looking at the array. No SSS needed here.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 46 of 195
(1,515 Views)

My thoughts about the the SSS.  You can't get rid of it simply because it would destroy backwards compatibility.  On the other hand, it may lead to more LabVIEW jobs, as a huge chunk of the LabVIEW programmers would be lost without it...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 47 of 195
(1,507 Views)

@AnalogKid2DigitalMan wrote:

The only time I have used SSS (two times) is when I am writing/reading configuration files where there are dozens of keys to write and read. Without SSS the BD can get pretty wide.

 

I guess I could break down the key sections into sub-vi's, but I'd rather see them up-front.

 

-AK2DM


The OpenG ini-cluster vi's work pretty well and scale a lot nicer than reading individual keys.  Thats two SSS's you didn't need.Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 48 of 195
(1,486 Views)

@JÞB wrote:
The OpenG ini-cluster vi's work pretty well and scale a lot nicer than reading individual keys.  Thats two SSS's you didn't need.Smiley Wink

Which functions are those?  Are you talking about the Config File VIS in the File I/O Pallete?  Those don't seem to support clusters or arays, so you need to manually parse every single variable and bundle it into the cluster

 

I've been looking for something with the simplicity of Matlab's 'save' and 'load' commands, which handles data structures of arbitrary complexity, but have never been able to find something.  The closest I came was GXML, but thats still a pain because it breaks when you update the type definition of the cluster. 

0 Kudos
Message 49 of 195
(1,451 Views)

Hello PatrickR,

 

OpenG is an open-source third party library/add-on.  You can find it via the LabVIEW Tools Network app/VIPM or here:

 

OpenG Libraries - OpenG

http://sine.ni.com/nips/cds/view/p/lang/en/nid/209027

 

Regards,

Tom L.
Message 50 of 195
(1,442 Views)