LabVIEW to FlowStone - For and While Loops

For general discussion related FlowStone
Post Reply
Aeronomer
Posts: 1
Joined: Mon Jul 29, 2013 3:57 pm

LabVIEW to FlowStone - For and While Loops

Post by Aeronomer »

LabVIEW provides graphical for and while loops - see http://www.ni.com/white-paper/7588/en/. How do you achieve similar constructs in FlowStone? Thanks.
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: LabVIEW to FlowStone - For and While Loops

Post by KG_is_back »

It depends on what you are trying to achieve.
For static calculation I recommend using the ruby component. Ruby is very easy to learn if you have basic programing skills.

In green, while loop can be created using the "int loop" primitive or "draw loop" if the code also draws something.
In both cases the primitive outputs indexes one by one in given range and outputs trigger each time. While loop is more complicated thing to do, so I really recommend Ruby for such case.

In code components only loop that is possible is static loop (with hard-coded number of iterations which also must be power of 2). The code component was meant to calculate DSP code fast as possible so it contains very little place for any code branching.
It is however possible in assembler. That is however very risky (you may crash Flowstone with bad code very easily) and quite complicated to do.
Post Reply