取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 11 条)
4,891 次查看

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
2 条消息(共 11 条)
4,873 次查看

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

3 条消息(共 11 条)
4,871 次查看

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? 极度高兴的表情

 

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

Inventor of the WORM Global
4 条消息(共 11 条)
4,869 次查看

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.

5 条消息(共 11 条)
4,858 次查看

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. 极度高兴的表情

6 条消息(共 11 条)
4,854 次查看

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.  眨眼表情

 

- tbob

Inventor of the WORM Global
7 条消息(共 11 条)
4,849 次查看

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
8 条消息(共 11 条)
4,847 次查看
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).
9 条消息(共 11 条)
4,834 次查看

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.

10 条消息(共 11 条)
4,792 次查看