06-03-2010 11:59 AM
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
06-03-2010
12:08 PM
- last edited on
04-28-2025
04:28 PM
by
Content Cleaner
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.
06-03-2010 12:09 PM
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
06-03-2010 12:09 PM - edited 06-03-2010 12:10 PM
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?
06-03-2010 12:11 PM
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.
06-03-2010 12:12 PM
tbob wrote:
WOW, I lost the race. Smercurio and Ravens Fan, don't y'all have work to do?
Just work that I don't want to do.
06-03-2010 12:13 PM
Ravens Fan wrote:
tbob wrote:
WOW, I lost the race. Smercurio and Ravens Fan, don't y'all have work to do?
Just work that I don't want to do.
Same here. Thank God for the LV forum.
06-03-2010 12:14 PM
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.
06-03-2010 12:19 PM
06-03-2010 01:33 PM
tbob wrote:
Ravens Fan wrote:
tbob wrote:
WOW, I lost the race. Smercurio and Ravens Fan, don't y'all have work to do?
Just work that I don't want to do.
Same here. Thank God for the LV forum.
Yeah, I don't like doing Ravens Fan's work either.