02-26-2014 02:34 PM
where should I connect the conditional terminal in the while loop?
02-26-2014 02:38 PM
You'll need a STOP button that will stop the VI completely.
02-27-2014 05:14 AM
I couldn't make the tunneling into a last value tunnel. Why is that?
02-27-2014 05:57 AM
I removed the quotient-remainder function because when we set the constant to 3 and the elements are incremented (so we have 1,2,3,4), the resulting remainder would be 1,2,0,1 - which only shows the sine and square waveforms.
So here's what I did.
The only problem is the looping in which, after I click the boolean button 4 times, I would have to click it once more so that the loop would repeat again. This would be satisfactory if I run the VI continuously.
But anyway, thank you for the ideas. I wouldn't be able to generate this program without your guidance ^_^ although I know there are still some flaws.
02-27-2014 07:10 AM
Hi geneclaude,
I removed the quotient-remainder function because when we set the constant to 3 and the elements are incremented (so we have 1,2,3,4), the resulting remainder would be 1,2,0,1 - which only shows the sine and square waveforms.
So why don't you set the quotient to 4 when you need the values 0,1,2,3 as remainder? Quite simple math…
02-27-2014 07:22 AM - edited 02-27-2014 07:46 AM
the low down and dirty....ex. waveforms remainders: (sine#0,cosine#1,sawtooth#2,square wave#3), sorry about added cosine?
* edited....
like gerd had said...."So why don't you set the quotient to 4 when you need the values 0,1,2,3 as remainder? Quite simple math…"
02-27-2014 11:37 AM
@GerdW wrote:
Hi geneclaude,
I removed the quotient-remainder function because when we set the constant to 3 and the elements are incremented (so we have 1,2,3,4), the resulting remainder would be 1,2,0,1 - which only shows the sine and square waveforms.
So why don't you set the quotient to 4 when you need the values 0,1,2,3 as remainder? Quite simple math…
Or, as I originally suggested DO NOT use a constant. Create a property node for the Waveforms control read Number of items.
Now when you add or remove items the modulo math doesn't break
02-27-2014 11:40 AM
@JÞB wrote:
@GerdW wrote:
Hi geneclaude,
I removed the quotient-remainder function because when we set the constant to 3 and the elements are incremented (so we have 1,2,3,4), the resulting remainder would be 1,2,0,1 - which only shows the sine and square waveforms.
So why don't you set the quotient to 4 when you need the values 0,1,2,3 as remainder? Quite simple math…
Or, as I originally suggested DO NOT use a constant. Create a property node for the Waveforms control read Number of items.
Now when you add or remove items the modulo math doesn't break
aaaaaaah, that is what you meant.....maintainable? or scalable? I get confused which term....
02-27-2014 01:01 PM
maintainable? or scalable? I get confused which term....
There is enough interaction between the two that deliniation is usually not necessary. Maintainable code is scaleable and vice versa.
For instance: If you stick that code in a proper design pattern (and what you have is close[ish) the code practically reads itself and changes are easy.
Tease VIA snip: Vi attached