02-22-2016 03:18 AM
Hello,
Event from B0max control provoke actionning of Regenerate B0 button. Should I create additional event case for B0max and put there the same code as for Regenerate B0.
Thanks in advance.
Pavel
ven
Solved! Go to Solution.
02-22-2016 03:45 AM - edited 02-22-2016 03:46 AM
Hi Pavel,
Event from B0max control provoke actionning of Regenerate B0 button.
Why should B0max create an action of the "Regenerate B0" button?
Both controls are set to call the same event case and so the event case is executed on value change of any of those two controls…
02-22-2016 04:08 AM
Hi GerdW,
When I change B0max, the values of B0x, B0y and B0z are also randomized as if Regenerate B0 button were also clicked.
I want that modification of B0max only scale the values B0x, B0y and B0z.
Actually it do both - scaling and randomizing.
Should I separate B0max and Regenerate B0 into different cases.
Best Regards
Pavel
02-22-2016 04:15 AM
Hi Pavel,
I want that modification of B0max only scale the values B0x, B0y and B0z.
When you WANT something you need to program it!
Should I separate B0max and Regenerate B0 into different cases.
This would be one solution to the problem. And it would be a clear solution with better separation of program steps and documentation what happens in your VI.
The other is to use a case structure in the event case to only randomize B0 values when button was pressed…
02-22-2016 04:44 AM
This would be one solution to the problem. And it would be a clear solution with better separation of program steps and documentation what happens in your VI.
So with this solution, the code for 2 event cases, i.e. B0max and Regenerate B0 will be the same (i.e. duplicated)
The other is to use a case structure in the event case to only randomize B0 values when button was pressed…
Case structure variable - output from Regenerate B0 ?
FALSE case - empty
TRUE case - dices
Correct ?
Thanks
Pavel
02-22-2016 04:54 AM
Hi Pavel,
So with this solution, the code for 2 event cases, i.e. B0max and Regenerate B0 will be the same (i.e. duplicated)
No.
With Regenerate you will create random numbers
With B0max you will create a new curve…
Case structure variable - output from Regenerate B0 ?
FALSE case - empty
TRUE case - dices
In FALSE case you should keep the last random numbers, in TRUE case you will generate new ones…
02-22-2016 05:26 AM
Thanks GerdW,
I've succeed in 2nd solution (i.e. using case structure).
Concerning 1st one (i.e. separate event cases), it requires creating of 2 additional indicators to be used as local variables - phi and theta. Correct ?
Best Regards
Pavel
02-22-2016 05:33 AM
02-22-2016 06:38 AM
Hi GerdW,
"2 separated event cases" solution doesn't work (of course if I correctly implemented your suggestion).
Best Regards
Pavel
02-22-2016 06:49 AM
You need to wire your values through each event case. If you don't, the values will basically be erased. I think you also need to use a BOmax Value (Signaling) property node in order to have the Regenerate button force the BOmax Value Channge event to happen.