LabVIEW Idea Exchange

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

conditional shift register

Status: Declined

National Instruments will not be implementing this idea. See the idea discussion thread for more information.

25 Comments
crossrulz
Knight of NI

I don't agree with changing them to "tunnels".  It should behave just like the feedback node with an enable.  With the feedback node, it just keeps it's previous value if disabled.

 

(I'm pretty sure I've seen this idea before)


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Ironman99
Member

crossrulz, I posted some questions for better understanding the ouadji intentions. Judging from his (a bit cryptic) answers it seeems that he do not really intend to convert the shift register into an output tunnel (in that case the last value in his table would be "1", not "6"). So the disabled shift register behaviour seems exactly the same of a (disabled) feedback node.

In other words the answer to the my first question can be considered "YES"... Smiley Happy

 

ouadji
Trusted Enthusiast

@Ironman99 : " ... last value in his table would be "1", not "6" ..."

 

not "1", but "6" !

 

SR2.png

 

 

The last value in "A" from the Shift-Register, when the Shift-Register was still enable ... was 5 (sorry for my  bad english, i do my best)

 

So, when the Shift-Register is OFF (his conditional terminal = false), the value of Tunel "A" = 5

 

After that, (Shift-Register OFF) the Tunel "A" keeps this last value 5

 

5 + 1 = 6

 

my answers is not a bit cryptic, but perfectly clear Smiley Happy

 

 

Ironman99
Member

ouadji, I've no problem with your english. Mine is even worse... Smiley Embarassed

I apologize if I unintentionally offended you.

What you write is exactly what I meant in my answer to crossrulz, and it is to me perfectly clear why the last value returned by the loop is 6. I was just arguing that this behaviour is the behaviour of a "disabled feedback node", not the one of a pair of "tunnel", because, in the latter case, the input tunnel would be reinitialized every cicle to "0". In your proposal the "conditional shift register" remembers the last enabled value.

 

Cheers.

 

Marco.

 

crossrulz
Knight of NI

Actually, your code should return 5.  The value coming out of A is 5, but the shift register is still disabled.  So it should keep its previous value, 5.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
RavensFan
Knight of NI

And the confusion of all this is a good reason not to implement such a feature.  It is not saving much in terms of coding, and it is much clearer if you explicitly show what value should go into the shift register on each iteration.

JÞB
Knight of NI

Just to really toss a monkey wrench in the gears.  What would happen with a conditional SR on a 0 iteration For loop?  We sort of broke the inplaceness SRs are currently required to have.  FBNs dont have this restriction since they are not bound to the loop inputs and outputs.  A FBN can implement the function you want without breaking the inplaceness of the SR


"Should be" isn't "Is" -Jay
Darin.K
Trusted Enthusiast
ouadji
Trusted Enthusiast

 @ Jeff-Bohrer :What would happen with a conditional SR on a 0 iteration For loop?

 

no problem, no trap here ! Smiley Tongue

 

By défaut the Shift-Register is ON, therefore with 0 iteration, it's like a normal SR, output = input.

abostait97
Member

Could you tell me how can I make conditional shift register in LabVIEW 2017.

------------------------------------------------------------------------
Certefied LabVIEW Student Ambassador
LabVIEW Associate Developer (CLAD)
NI LSA CU Represntative