From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
RavensFan
Knight of NI

Why do you need this?

 

What do you want to go into the shift register if the conditions is False?

Jokelnice
Active Participant

This action would break the flow of data immediately....



Ing. Jonathan E. Cruz Ortiz

ENERGÍA PROACTIVA S.A.S

Cel : (+57) 3173669343 - (+57) 3124451894

Ironman99
Member

Not so clear for me what you mean, ouadji...

Is your idea the equivalent of the following standard code?

 

    Standard code

 

Jokelnice, why do you think the action would break the dataflow?

 

Cheers.

 

Marco

ouadji
Trusted Enthusiast

if "false", the shift-register is disable and behaves like a normal couple of tunels.

Ironman99
Member

Sorry ouadji, I'm still a bit confused...

 

What results do you expect from these two sample code?

 

Sample code

 

Cheers.

 

Marco.

Jokelnice
Active Participant

The function of "Shift Register" is passing data between one iteration and the other, if you implement a conditional for "Shift Register" would be to select whether the data is passed or not. And if you do not pass this data, what value will make the next iteration?. Perhaps it would be enabled by a value "default", as it works when using the tunnel with the action "Use default if unwired".



Ing. Jonathan E. Cruz Ortiz

ENERGÍA PROACTIVA S.A.S

Cel : (+57) 3173669343 - (+57) 3124451894

ouadji
Trusted Enthusiast
Jokelnice
Active Participant

Your idea is good just that the "Shift Register" if you wire externally, operates as a simple tunnel and the tunnel has already improved when used with the condition, so I see no point to it at some time used as "Shift Register "and other times as a tunnel, and with respect to the attached image, this function can be done with the" conditional tunnel ".

 

tunel .png



Ing. Jonathan E. Cruz Ortiz

ENERGÍA PROACTIVA S.A.S

Cel : (+57) 3173669343 - (+57) 3124451894

tst
Knight of NI Knight of NI
Knight of NI

I can say that back when conditional tunnels were introduced, someone suggested the same idea elsewhere. I asked them to post it here and even came up with a sample graphic, but for some reason was unable to post it myself. I'm not sure why, but for some reason I have my doubts about this idea, even though it makes sense:

 

Conditional SR.png

 

 

As you can see, this code calculates a simple factorial, but the bottom two options ignore the 3, so the result is a third of what it would normally be. Since feedback nodes are supposed to be basically the same as shift registers and they already have an enable terminal, it would make sense that SRs would have it to and that when it is false, the SR would keep the value it already has in it, but for some reason I still have my doubts.

 

 


___________________
Try to take over the world!
ouadji
Trusted Enthusiast

" ... feedback nodes ... they already have an enable terminal ... "

 

you are right tst, +1. good point!