03-07-2014 03:48 AM
Hello All,
Lets talk about this.
In my project I dont want to use Case Structre/Stacked str for Nested If else conditions.
I think we can use Selector for this. Yes I know it's quite complicated solution but i want to these kind of alogrethims (PFA).
could you please tell me how much possibility (%) is there in LabVIEW without using case structure to implement any kind of logics.
Thanks & Regards,
Guru
03-07-2014 04:19 AM
03-07-2014 04:56 AM
Dear GerdW,
Thank you so mcuh for your reply.
As per my cleint request I can't use Case structre so I'm searching for better solution to solve my problems.
Please help me.
Thanks & Regards,
Munna
03-07-2014 05:27 AM - edited 03-07-2014 05:28 AM
You've been hired as the expert. Take a shot at convincing them that avoiding Case structures is silly.
Perhaps they're using an older version of LabVIEW with a license that doesn't include Event structures and they've mistakenly proscribed Case structures?
03-07-2014 05:41 AM
Dear Jim,
We are using LabVIEW 2012. Sometime I used Case Str and Event structures.
Now I'm trying to Avoid these. I want to know what is the problem if I'm using Selecor instead of Case Structure in all the cases.
BR,
Munna.
03-07-2014 05:46 AM
Hi Munna,
there is no "problem" to use Select function in favor of Case structure.
It just produces bigger block diagrams, produces (sometimes) harder to read (and maintain) code, - and it's just silly to not use an elementary programming structure offered by the IDE…
03-07-2014 06:02 AM
Dear GerdW,
Thank you so much for your support as always.
Yes, you're right. it's quite difficult to maintain the code if no. of cases are more.
I think we can use Selector instead of case structure for all the cases.
I mean, case-1 Read the Text file case-2 Read and write to text file case-3 some String operations etc.
BR,
Munna
03-07-2014 06:06 AM
Hi Munna,
the difference between a (proper) Case structure and your "Select" approach is:
in a Case structure only the code in the selected case is executed. When using Select instead all the time all code has to be executed (THINK DATAFLOW)!
So decide on your own if you want to refuse from using Case structure…
03-07-2014 06:13 AM
Think of a statemachine running without case structure...... *shudder*
Norbert
03-07-2014 06:16 AM
Dear GerdW,
You're correct.
I think execution time also will get increase with Selector approach (If cases are more).
Now, we are not thinking about how many cases executed/ time. Just I want to know how much possibility is there if I'm using Selector to implement any kind of Logics.
BR,
Munna.