LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
ouadji

Disable Structure

Status: New

 

                                              With only 2 subdiagram, the Disable structure should behave in all cases like a flip-flop.

 

                                                                                        it's not currently the case and it's annoying

 

 

SR1.png

38 Comments
Technico
Member

There are sometimes occasions where you don't want any of the subdiagrams to be enabled.

Also more than 2 subdiagrams are possible so in this case no auto "flip-flop" is possible.

 

If LV would force to have at least 1 subdiagram Enabled then you could choose which one is active and the others get disabled automatically.
This would require adding an empty case if you want to disable all, so currenlty no Kudos from me.

 

 

ouadji
Trusted Enthusiast

Also more than 2 subdiagrams are possible so in this case no auto "flip-flop" is possible.

 

 

With only 2 subdiagram, the Disable structure should behave in all cases like a flip-flop.

ouadji
Trusted Enthusiast

@Technico :

 

There are sometimes occasions where you don't want any of the subdiagrams to be enabled.Smiley Indifferent )

 

please, could you give an example ?

Intaris
Proven Zealot

@Technico,

 

You are right, sometimes you don't want any active code in the disable structure.  This could still be achieved by having an empty disable case.

SteenSchmidt
Trusted Enthusiast

As the flip-flop behavior is implemented when you enable the disabled case, I think the disable structure (in this regard) is as it should be.

 

Forcing a flip-flop when you disable the enabled case as well will make it impossible to have two disabled cases (in a two-case structure), which I often have. Needing to have a third empty case for the unused enable case is a clunky solution. I find it most elegant as it is now (but that assumes you can see the benefit of two disable cases of course).

 

A use case for two disabled cases is when I check performance between adding functionality 1, adding functionality 2, or adding neither (enabling 1, enabling 2, or enabling neither).

 

/Steen

CLA, CTA, CLED & LabVIEW Champion
Intaris
Proven Zealot

Yeah, the more I think about it the less convinced I am.  Sorry, Kudos revoked...

ouadji
Trusted Enthusiast

@SteenSchmidt :

 

"A use case for two disabled cases is when I check performance between ... "

 

sorry, i don't understand because with two disabled cases the vi is broken.

How can you test anything when the vi is broken ?

SteenSchmidt
Trusted Enthusiast

You're right ouadji, it seems I must always have more than two cases then when I do A-B testing. I'll pay closer attention to what I usually do next time Smiley Happy

 

In the light of the above, your idea might make sense. See, the flip-flop will always be resolvable when you enable a new case, as LabVIEW will always know which case to disable (that will of course be the previously enabled case), but when you disable a case LabVIEW wouldn't know which of the possibly multiple other disabled cases to enable, except when there are only two cases in the disable structure - exactly as you point out.

 

So your idea is perfectly implementable. Sorry for shooting it down on a false basis.

 

Then just remains if I'd like the disable structure to actually enable another case for me, or if I'd like that action to remain on me. This will depend on my preferred work flow: which do I do more often; (do I disable-then-add, or do I disable-then-enable? I'll have to think about that...

 

Cheers,

Steen

CLA, CTA, CLED & LabVIEW Champion
ouadji
Trusted Enthusiast

@SteenSchmidt :

 

Yes, my proposal concerns only the case with two subdiagrams : "enabled" and "disabled".

 

"So your idea is perfectly implementable. Sorry for shooting it down on a false basis."

 

thank you SteenSchmidt  Smiley Happy

 

 "do I disable-then-add, or do I disable-then-enable? I'll have to think about that..."

 

add a subdiagram and then enable this new subdiagram,
the previous enabled case will be disabled automatically by LV (flip-flop)

Intaris
Proven Zealot

It still seems like a weird solution to a problem which is essentially that the "Disable this case" option should simply be removed.  Allowing only affirmative action on the individual cases solves the problem in a much easier way, no?