Objectmix
Tags Register Mark Forums Read

Re: How to make a global array by shift register : labview

This is a discussion on Re: How to make a global array by shift register within the labview forums in Programming Languages category; Could you explain in a few more words what you are actually&nbsp;looking for? What are you trying to do? (Maybe an <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;view=by_date_ascending&amp;message.id=240328" target="_blank">action engine</a>)???...


Object Mix > Programming Languages > labview > Re: How to make a global array by shift register

Reply

 

LinkBack Thread Tools
  #1  
Old 12-07-2007, 03:10 AM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

Could you explain in a few more words what you are actually&nbsp;looking for? What are you trying to do?
(Maybe an <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;view=by_date_ascending&amp;message.id=240328" target="_blank">action engine</a>)???
  #2  
Old 12-09-2007, 10:40 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

See the attached example of functional global for Read &amp; Write 2D -Array.Modify this as ur need.
&nbsp;
-Kumar B


Read-Write FG.vi:
http://forums.ni.com/attachments/ni/...8/1/Read-Write FG.vi
  #3  
Old 12-10-2007, 03:10 AM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

I hear there are 2 ways to create global in labview, one is using shift register.
I am not sure how to run the read-write vi, will it keep running all the time?
  #4  
Old 12-10-2007, 03:10 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

Johnboy,
&nbsp;
Your example is a horrible hack and not at all in the spirit of an action engine.

- An action engine stores the data in a "uninitialized shift register", eliminating the need for local variables

- Your shift register serves no purpose at all, because you initialize it&nbsp;at each call and instead use the disconnected object "global array" for data storage. You might as well get rid if the shift register completely! Why use a shift register if you initialize it at each call?

- You are creating unecessary copies of your data for no reason.

- The while loop in your last example makes no sense. It serves no purpose because it has no shift register.

- Kumar's example is just fine, why mutilate it by making it much more complicated???

For those who use LabVIEW 8.5, feedback nodes no longer need a "one iteration loop" but can stand&nbsp;alone.&nbsp;Here&nbsp;no longer even need a loop (see image).
<img src="http://forums.ni.com/attachments/ni/170/289481/1/noloopAE.png"> Message Edited by altenbach on 12-10-2007 12:08 PM


noloopAE.png:
http://forums.ni.com/attachments/ni/...1/noloopAE.png
  #5  
Old 12-10-2007, 09:40 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

Just use a while loop with the termination condition set to terminate (via a diagram constant). It will run once per call.
&nbsp;
  #6  
Old 12-10-2007, 09:40 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

The correct way to do a functional global variable or action engine.
Note that the Read case just wires through the case and would not actually be broken.&nbsp;
<img src="http://forums.ni.com/attachments/ni/170/289550/1/Read-WriteGlobal[1].png"> Message Edited by Ravens Fan on 12-10-2007 09:15 PM


Read-WriteGlobal[1].png:
http://forums.ni.com/attachments/ni/...ad-WriteGlobal[1].png
  #7  
Old 12-11-2007, 09:40 PM
Junior Member
 
Join Date: Nov 2009
Posts: 0
Application Development is on a distinguished road
Default Re: How to make a global array by shift register

As I said, you don't even need a loop in LabVIEW 8.5. Just use a feedback node and wire as I showed above.





turbot wrote:
Sorry, I still cannot make it in 8.5



What problems do you encounter?

- Add controls and indicators

- place a while loop

- add shift register

- wire a TRUE diagram constant to the termination condition terminal.

- wire the data wires as shown

&nbsp;


Message Edited by altenbach on 12-11-2007 06:15 PM
Reply

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
Re: How do you make a global const array that requires a function? usenet c++ 0 11-26-2007 06:17 AM
Re: How to avoid the double memory assignment for an array which Iconnected to the shift register? usenet labview 0 09-03-2007 02:40 PM
Re: How to avoid the double memory assignment for an array which Iconnected to the shift register? usenet labview 0 09-03-2007 02:40 PM
Re: How to avoid the double memory assignment for an array which Iconnected to the shift register? usenet labview 0 09-03-2007 02:40 PM
Re: How to avoid the double memory assignment for an array which Iconnected to the shift register? usenet labview 0 09-03-2007 02:10 PM


All times are GMT -5. The time now is 08:46 AM.

Managed by Infnx Pvt Ltd.