04-02-2021 01:07 PM
I found this exaple program online in this side and i am trying to make something like this for my school project. Anyways, i am really new in labview but i started learning some basing things and a little more . I really need help from someone to explain me analytic the blog diagram of this program in this file if its posiible .I understand what the procces doing but i really need an analytic explanation of the blog diagram.
Thank you.
04-02-2021 04:28 PM
Hi demokratias,
That VI you attached has a lot of examples of bad programming practices. There are a lot of hardcoded waits, the diagram is way too large, controls and indicators do not have meaningful names, there are no comments, a sequence structure is used to control the execution order, there is a lot of redundant code.
Can you explain what you're trying to do? If you're just wanting to learn LabVIEW, there are some good resources at the top of the forum, and that will be time much better spent than trying to study this block diagram.
04-02-2021 07:27 PM
You can keep the controls and indicators (after giving them reasonable names), then delete everything on the block diagram because the program is complete junk. Don't even look at the diagram!
(There is no toplevel while loop. (And a toplevel FOR loop with one iteration can be removed without any change in functionality! There are extremely long sequences with long waits. Doing a "select signals" express VI on a scalar boolean does not make a lot of sense! It almost seems this got posted as a joke on what not to do, or a puzzle to find at least 100 mistakes! Was it posted yesterday (April 1 fools day!!!)???
Now look at some of the state machine examples that came as design templates and understand that concept. Keep a cluster containing the values of all tanks and other indicators in a shift register and update them according to state.
Take a sheet of paper and decide what the states are. (The only controls seem to be two rings and "x" and they currently get read so rarely that any user interaction is currently pointless because nothing will change for long times.) Should these controls be set before running the simulation and not be touched during the run?