LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a global array by shift register

You are right, of course. I was trying to quickly answer the enquirer's questions without knowing exactly what he or she is actually after.
0 Kudos
Message 11 of 27
(1,608 Views)
May I know how to make the one iteration loop?
0 Kudos
Message 12 of 27
(1,597 Views)
Just use a while loop with the termination condition set to terminate (via a diagram constant). It will run once per call.
 
0 Kudos
Message 13 of 27
(1,593 Views)

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. 



Message Edited by Ravens Fan on 12-10-2007 09:15 PM
0 Kudos
Message 14 of 27
(1,592 Views)
Sorry, I still cannot make it in 8.5
Just use a while loop with the termination condition set to terminate (via a diagram constant). It will run once per call.
0 Kudos
Message 15 of 27
(1,575 Views)
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?
  1. Add controls and indicators
  2. place a while loop
  3. add shift register
  4. wire a TRUE diagram constant to the termination condition terminal.
  5. wire the data wires as shown

 




Message Edited by altenbach on 12-11-2007 06:15 PM
0 Kudos
Message 16 of 27
(1,572 Views)
Thanks, I just using the feedback node for the 1st time.
0 Kudos
Message 17 of 27
(1,562 Views)

 

 

I want to build a 1D Array where each element is being entered manually. The new value has to be inserted, unless the value has not been previously inserted. And i have to display that array.

Cand someone tell me how to do it ?

0 Kudos
Message 18 of 27
(1,040 Views)

Use an event structure to capture when a new value has been entered.  Use a shift register to hold your current array.  When a new value is entered, use the Search 1D Array to make sure that the new value isn't already in the array.  The search function will return a -1 for the index if the element was not found.  If not found, use the build array to add the new value.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 19 of 27
(1,035 Views)

@Laur wrote:

I want to build a 1D Array where each element is being entered manually. The new value has to be inserted, unless the value has not been previously inserted. And i have to display that array.


Homework time again? 😉

 

Instead of adding to an existing 5 year old thread that is only marginally related, you should start a new thread. Then you should also be more precise on what you mean.

 

The term "insert" has a very special meaning in LabVIEW, and implies that it should go in an exactly specified location in the existing array (as opposed to "append" or "prepend", where it always goes to one of the ends). However, you are not specifying where the new element should be inserted (e.g. keep the array sorted, at the beginning, at the end, etc.). Please be more much specific.

 

This is a very basic exercise. What you have you tried so far? Where did you get stuck?

 

 

Message 20 of 27
(1,018 Views)