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 looking for? What are you trying to do? (Maybe an <a href="http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=240328" target="_blank">action engine</a>)???...
![]() |
| | LinkBack | Thread Tools |
|
#1
| |||
| |||
| (Maybe an <a href="http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=240328" target="_blank">action engine</a>)??? |
|
#2
| |||
| |||
| See the attached example of functional global for Read & Write 2D -Array.Modify this as ur need. -Kumar B Read-Write FG.vi: http://forums.ni.com/attachments/ni/...8/1/Read-Write FG.vi |
|
#3
| |||
| |||
| 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
| |||
| |||
| Johnboy, 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 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 alone. Here 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
| |||
| |||
| Just use a while loop with the termination condition set to terminate (via a diagram constant). It will run once per call. |
|
#6
| |||
| |||
| 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. <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
| |||
| |||
| 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 Message Edited by altenbach on 12-11-2007 06:15 PM |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| |
| ||||
| 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.


