LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nested If and else without case structure

Hi Munna,

 

so then why did you even mention Simulink when there is no relation to LabVIEW at all?

 

Is all this thread only made because you try to translate some Simulink/Matlab code to LabVIEW?

In this case: it doesn't count to translate literally "word by word" but to recreate the programmatic behaviour in a proper way…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 21 of 45
(1,142 Views)

Dear Jim,

 

Just we want see all cases at once. Like, True and False case in same winow. But, Case structure will shows only one case at once.

 

For this we can use true case in one strcure n false case in other str. but we don't want to use Case str.

 

BR,

Guru.

Munna
0 Kudos
Message 22 of 45
(1,139 Views)

Dear GerdW,

 

we are not Translating Simulink/Matlab code to LabVIEW.

 

In Simulink we are not using Switch case even though we are able to create our requirements and we never faced any Memory/Peripheral problem.. So, just I want to know, how much possibility is there is Labview to execute Nested if else without case str.

 

BR,

Guru

Munna
0 Kudos
Message 23 of 45
(1,136 Views)

@Munna232 wrote:

Dear Jim,

 

Just we want see all cases at once. Like, True and False case in same winow. But, Case structure will shows only one case at once.

 

For this we can use true case in one strcure n false case in other str. but we don't want to use Case str.

 

BR,

Guru.


OK, now, please give the reasons for wanting to see all cases at once.  I can ask "why" all day...

 

 

As a side point, you can "Print" the VI Documentation in such a way as to "see all cases at once".

print.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 24 of 45
(1,118 Views)

Dear Jim,

 

we want to see all cases in Block diagram. Not in Documentation.

 

This is one of our requirement to see all cases at once in Block diagram window So that programmer can see all cases in same time.

 

BR,

Munna

Munna
0 Kudos
Message 25 of 45
(1,109 Views)

@Munna232 wrote:

Dear Jim,

 

we want to see all cases in Block diagram. Not in Documentation.

 

This is one of our requirement to see all cases at once in Block diagram window So that programmer can see all cases in same time.

 

BR,

Munna


I understand that it is your requirement, but it seems arbitrary.  Why is it your requirement?  You mentioned earlier that the requirement was your client's request.  I'd recommend against using LabVIEW with that kind of a request.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 26 of 45
(1,101 Views)

Hi Munna,

 

who wrote such a requirement and who accepted such a requirement?
 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 27 of 45
(1,100 Views)
So that implies that you can't use subVIs or the event structure. The requirement is just brain dead. My advice is to switch to a text based programming language.
0 Kudos
Message 28 of 45
(1,093 Views)

@GerdW wrote:

Hi Munna,

 

who wrote such a requirement and who accepted such a requirement?
 


I get the feeling that if you haven't talked him out of that requirement yet, no matter how silly, pointless, and arbitrary it is, you aren't going to 🙂

 

 

Munna,  I would still use case structures.  One structure for each case, and leave the "Default" case blank.  That will fill your requirements and prevent your code from being executed every time.  Still an aweful way to do it, but it will meet your requirements.

0 Kudos
Message 29 of 45
(1,086 Views)

You definitely want to do this job on a time-and-materials basis.  You're gonna make a fortune! 😄

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 30 of 45
(1,081 Views)