LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reinitializing shift register

not-reinitializing.jpgI am attempting to reinitialize a shift register on every pass of a while loop but it

isn't working. Can anyone spot what I am doing wrong?

 

 

Thanks

TCPData.png

 

0 Kudos
Message 1 of 7
(3,910 Views)

Could you please attach the VI instead of an image? Is shown case structure included in a while loop?

 

Thanks,

Arev 

 

CTO | RAFA Solutions

 

Certified-LabVIEW-Embedded-Systems-Developer_rgb.jpgCertified-LabVIEW-Architect_rgb.jpg

0 Kudos
Message 2 of 7
(3,898 Views)

@arevh wrote:

Could you please attach the VI instead of an image? Is shown case structure included in a while loop?

 



The bottom image is a snippet, please drag and drop.


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
Message 3 of 7
(3,889 Views)

What is leading you to think that the shift register is not reinitializing?  I can belive you having issues with that Feedback Node inside of that FOR loop, but I see nothing wrong with that shift register.



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
0 Kudos
Message 4 of 7
(3,878 Views)

I agree with Crossrulz.  Try running your code with a Probe inside and outside the For loop.

 

I'll also note that you appear to be using an I32 to do a Boolean's job.  If you wired a False to the input tunnel, made it a Boolean, and turned it True in the "Bad Channel" case inside the For loop, you could bring this "Fail" signal directly into the subsequent "Allow up to 3 passes" Case Statement.

 

I just erased a comment I made about how silly it was to have two controls, Pass and Fail, one being the negative of the other.  I then realized you were making a 3-state indicator for your Boolean outcome -- "Pass", "Fail", and "Don't Know, yet".  Here's a way to make it really be three-state:

  • Create Pass and Fail indicators, as you have done.
  • Change the Fail indicator to use Red (bright and dim) as its colors.
  • Drag Pass on top of Fail.

When you initialize your program (so the answer is "Don't Know Yet", hide Fail.  When it is time to display, do the following:

  • Turn On the appropriate Indicator.
  • Make that Indicator Visible.
  • Hide the other Indicator.

When you go back to the next loop and the "Don't Know Yet" state, you can simply turn both Indicators off.

 

Now, when your program runs, you will see "Pass", but it will be off.  If it Passes, Pass will illuminate, otherwise Fail will illuminate.  The Colors will be different (bright Green vs bright Red) and they will show the Pass or Fail label.

 

Bob Schor

Message 5 of 7
(3,858 Views)

Bob_Schor wrote:

I just erased a comment I made about how silly it was to have two controls, Pass and Fail, one being the negative of the other.  I then realized you were making a 3-state indicator for your Boolean outcome -- "Pass", "Fail", and "Don't Know, yet".  Here's a way to make it really be three-state:


I just change the color of the one indicator when the test is done.  While running, I have the FALSE state be a grey or dim green.  When the test is complete, change the FALSE state to be red.  The colors for TRUE never change.  This allows the result to be directly written and you just change the color instead of one control of messing around with multiple indicators.



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
Message 6 of 7
(3,847 Views)
One other thing to do is click the cleanup diagram button and make sure everything is connected where you think it is.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 7
(3,822 Views)