LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tetris in Labview

Stacked sequence structures are considered bad, stylistically, as they obscure the functionality and flow of the program


Again, I see that as an over-generalization. Do you consider subVIs to obscure the functionality? You have to open them up to see what's happening inside.


When using a 10-frame sequence, I find it hard to use the flat ones, and the add to the bloat of the diagram (screen-size wise).

I'm not sure what data flow rules are broken by the flat sequence structure.


All the other structures say that the wires going out of them do not become valid until the entire structure executes. Even if you wire something out of frame 0, it's not available to the receiver until the last frame has finished. That's true for FOR, WHILE, CASE and stacked SEQUENCE structures. But no, the flat structure is different, for reasons I don't understand. If you wire something out of frame 0, then it's available as soon as frame 0 finishes.

One of the things that always annoyed me about the stacked version is that you had to route the signals from one level to the other in ugly ways to try and maintain the left to right flow in each frame.


Fair enough - I agree with you there.


But ultimately the use of flat or stacked or sequence structures at all, is one of preference.


Agreed, which is why I wonder why the "they are bad style" is used as if it were fact.



This forces you to stop, read and interpret the text. I, personally, am able to interpret simple graphical images faster, finding the "scope" icons faster than the very coarse text "scope" on a myriad of similar looking textual based icons.


If everything in a program was a "simple graphical image", then I would agree with you. But my current project, for example, has 480+ of my VIs. It becomes especially difficult to design 480 distinct icons, and have them mean something (to me, anyway).



Heaven help me if anyone sees the early stuff that I produced,


I learned on LabVIEW 1.2 (1989 - the wires would not stretch if you moved a function. you had to disconnect them all, move the function, and re-wire it. YIKES!) But some of my stuff on LV 2.2 (1992 or so) is still running, AFAIK. I don't have access to it anymore, but I'm sure I would be similarly appalled.


Thanks for your comments.

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


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 41 of 59
(3,733 Views)

To help sell the graphic icon idea, I offer the attached screen shot and ask you attempt to answer the following questions.

1) Which VI's are used in the PIDs?

2) Which VI's are used to compute Isc and Voc for the diodes characteristic curve?

3) Which VI's control the Lamps?

4) Which VI's control the curve tracer?

5) Which VI's are file related?

6) BONUS QUESTION: Which VI launches the error logger?

7) And for all you HP fans, which VI's control HP DAS and HP power supplies?
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 42 of 59
(3,725 Views)
Bonus questions:


8... What does the bricks-falling-onto-a-diving-board icon represent?
9... What's the difference between the "WAIT" function and the "Wait" function?
10... What does it mean when there are 30 icons with the same picture, distinguished only by text?


;->

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


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 43 of 59
(3,711 Views)
Excellent questions!

"8... What does the bricks-falling-onto-a-diving-board icon represent?"
 
The work of a text based programer I am trying convert over to LV. He still needs some tutoring.Smiley Very Happy

"9... What's the difference between the "WAIT" function and the "Wait" function?"
 
Those two VI's and their callers are the work of the vendor of that gizmo. I guess I should talk to them about their icons. Smiley Happy

"10... What does it mean when there are 30 icons with the same picture, distinguished only by text?"
 
Those 30 icons are all related to the same gizmo. All related VI will have a similar theme. All I have to do is just find one realted to what I am after and then do a "show VI hiera..."  find the top, "show VI hiera..." and I have reduce a display with 500 icons down to only the VI that are involved in what I am after.


Thank you for the follow-up Q's Coastal! Your Q's are seldom easy to answer but the prcess of trying is often worthwhile.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 44 of 59
(3,702 Views)
thank you Ben for checking out my code. i know it is very messy and I need to make it look nicer. hear is my reply to your comments. the reason that i do not have the score in the picture is that it gets in the way of the pieces. I like the idea about the preferences being in two 1-D arrays. I personally do not like using icons because i find it quicker for me to look and read the text. as a last comment i think it is impossible to write perfect code
0 Kudos
Message 45 of 59
(3,545 Views)

"i think it is impossible to write perfect code"

You are on the same page as Plato!

It is worth trying to prove yourself wrong Smiley Very Happy

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 46 of 59
(3,550 Views)
I do agree with you that it is good to be as good as you can
0 Kudos
Message 47 of 59
(3,672 Views)
the challenge is to be better... 😉
 
... and there is always room for that..
 
Concerning the icons.
 
I decided to group the icons by functionality and assign specific colors to them.  The image represents what it does.
So when looking for a partiular vi, I first look at the color and then the picture followed by the text (whatever fits).
 
Nice job vivi. 
 
Impressive.  People are going to steal you away from Coastal 😉
 
😄
JLV
Message 48 of 59
(3,596 Views)
could you please show me some sample of what you mean about the icons
0 Kudos
Message 49 of 59
(3,569 Views)

Hi vivi,

I can send you some of them... I will try to remember to do that this weekend. 

The nicer ones I created were for the visionProbe & visionIce programmers.

Basically, I "borrowed" the pattern from Rohde&Schwartz.  You could download their LV drivers for their spectrum analyzers.  It was the best example I could find.  Basically, they created a tree which describes each of their vi's.  I started with that and used solid colors as backgrounds for the icons and degraded colors for backgrounds of specific functions, such as Flash programming (dark to light blue), FPGA programmer (Orange to yellow), etc.  

Although I try to keep a vi to a single page, the color scheme helps you to "see" its contents.  And less brain CPU to figure out what it does.

Oh..oh... I'm starting to share my secrets.... and to the competition 😉  Oh yeah.. you're south... I guess it's ok..  😄

First try looking at the icons from the vi's from R&S.  I will (try) to check this forum during the weekend.

Take care,

JLV

Message 50 of 59
(3,556 Views)