LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems With Shift Register

Hi..

 

How do i reinitialize values after shift register has been used to sort the data. From the attached file, in figure 1, the block diagram is used to separate negative value and positive value. Using shift register, the 'sorting' step will repeat itself...as seen in figure 2 where the array were filled up again & again with the same value...

 

I've tried to create this sorting system without shift register ...but it will not work....shown in figure 3 & 4

 

Appreciate anyone who can help me with this..

 

Thanks

 

 

 

 

 

0 Kudos
Message 1 of 11
(4,579 Views)

You need to ... initialize the shift register. This means you need to wire an empty array of DBLs to the left node of the shift register as so:

 

 

When not initialized, the shift register will continue to hold its values while the VI remains in memory. This is documented in the LabVIEW Help.

 

Tip: OpenG has a VI that can do this for you.

Message Edited by smercurio_fc on 06-03-2010 12:09 PM
Message 2 of 11
(4,561 Views)

Please post your actual VI or a screenshot as a .png file.  Don't embed an image in a proprietary MS Word file format.  A bitmap in a Word document took nearly 1/2 MB, while the VI or a .png screenshot would have been perhaps 50 KB.

 

Right click on the left hand shift register and select create constant.  It will create an empty array constant.

 

This is basic LabVIEW knowledge.

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Message 3 of 11
(4,559 Views)

First of all, please do not post a Word document.  Post your vi itself.  We can't troubleshoot a document, but we can troubleshoot code.

 

You need to create an empty array and wire it to the left shift register before the loop.  This way, when the vi starts, the shift register will be empty.

 

 

 

WOW, I lost the race.  Smercurio and Ravens Fan, don't y'all have work to do? Smiley Very Happy

 

Message Edited by tbob on 06-03-2010 10:10 AM
- tbob

Inventor of the WORM Global
Message 4 of 11
(4,557 Views)

As with many of these basic questions, the answer lies in the shipping examples. Look at the one called 'Separate Array Values'.

 

p.s. And please, in the future, do not attach word documents.  LabVIEW is programming language and the code is required to do any real dubugging.

Message 5 of 11
(4,546 Views)

tbob wrote:

 

 

 

WOW, I lost the race.  Smercurio and Ravens Fan, don't y'all have work to do? Smiley Very Happy


Just work that I don't want to do. Smiley Very Happy

Message 6 of 11
(4,542 Views)

Ravens Fan wrote:

tbob wrote:

 

 

 

WOW, I lost the race.  Smercurio and Ravens Fan, don't y'all have work to do? Smiley Very Happy


Just work that I don't want to do. Smiley Very Happy


Same here.  Thank God for the LV forum.  Smiley Wink

 

- tbob

Inventor of the WORM Global
Message 7 of 11
(4,537 Views)

Aside from what everyone said about initializing and word documents, which is all true, you can do what you're trying in a single loop.

 

Example_VI_BD.png

--
Tim Elsey
Certified LabVIEW Architect
Message 8 of 11
(4,535 Views)
While we are on the subject, why are .doc files even allowed by the filter?  It is just a lame way to circumvent the other file format restrictions (even lamer than zipping).
Message 9 of 11
(4,522 Views)

tbob wrote:

Ravens Fan wrote:

tbob wrote:

 

 

 

WOW, I lost the race.  Smercurio and Ravens Fan, don't y'all have work to do? Smiley Very Happy


Just work that I don't want to do. Smiley Very Happy


Same here.  Thank God for the LV forum.  Smiley Wink

 


Yeah, I don't like doing Ravens Fan's work either.

Message 10 of 11
(4,480 Views)