LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simple peoblem::: execution loop problem

Solved!
Go to solution

hi ..

 i want the  labview to be able to execute ((loop one )) ten time on((( each value))) from loop two..

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

each sample from signal from loop two enter loop one and on this sample i will excute ten time .

 


any change i accept..

 

thank in advance

mustafa

 

 

(( figure that attached below ))  

 

hi ?Q>

0 Kudos
Message 1 of 16
(4,031 Views)

mangood wrote:

 i want the  labview to be able to execute ((loop one )) ten time on((( each value))) from loop two..

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

each sample from signal from loop two enter loop one and on this sample i will excute ten time . 


I have no idea what that means. Is this some kind of text based code? What do the colors mean? What to the parentheses mean? Maybe you could explain it by writing an english paragraph instead.

 

Your VI picture makes very little sense. Maybe you should start with a few simple tutorials.

 

  • Your sequence structure has no useful purpose. Execution order is already completely determined by dataflow. Delete it.
  • Your loop 2 runs only once, producing two arrays with exactly one element.
  • Your loop 1 wil also run only once because the number of iteration is the smallest of  the value wired to N, and all sizes of autoindexing input arrays). Since the array sizes are 1, loop 1 will execute once and complete.

 

 

 

0 Kudos
Message 2 of 16
(4,024 Views)

sorry.

Again with diffrent figure

    in (loop two) suppose that contain a wave generatore  that i take a sample from it at each 1 second

then this sample go to (loop one) then here i will compare this sample with random value ten time to produce stream's of 1's and 0's

that exact what i want stream's of  one's and zero's for each value of one sample.


thank

 

 

hi ?Q>

0 Kudos
Message 3 of 16
(4,004 Views)

1.  Eliminate the sequence structure.

2.  Eliminate the first while loop that is only running once.

3.  Change the tunnel going into the second while loop to be a regular tunnel instead of auto-indexing.  (This will actually happen automatically.)

4. Look at the online LabVIEW tutorials

LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 4 of 16
(3,997 Views)
Solution
Accepted by mangood

hi

first i would to thank alot who help me

i solve it my brother in this vi  excute it with highlight feature .

 

hi ?Q>

0 Kudos
Message 5 of 16
(3,987 Views)

Your code still makes absolutely no sense. You are autoindexing on a while loop and since the while loop stop after one iteration, you never see the rest of the data. So what's the point?

0 Kudos
Message 6 of 16
(3,980 Views)

 

 

 

my point is that i looking to built a multiplayer by  use only one  gate based  on what is called stochastic logic.

i will post the entire project after completing it ,since this is my first try on labview so many error will be happen and i try to avoid it as possible.

 

//////////////////////////////////////////

 

mustafa

hi ?Q>

0 Kudos
Message 7 of 16
(3,967 Views)

I have no idea what "multiplayer" you are referring to, or what "stochastic logic" is supposed to mean.

 

You really should mark Altenbach's post as the solution to your problem rather than your own message.  He was the one who first told you what was wrong with the code, and you obviously paid attention to part of what he told you.

 


@mangood wrote:

 ,since this is my first try on labview so many error will be happen and i try to avoid it as possible.



Yes many errors can occur when you first start working in LabVIEW.  And the best way to avoid them is to actually pay attention to the advice you've been told by an expert rather than insisting on continuing to do things the way you are.

0 Kudos
Message 8 of 16
(3,946 Views)

@mangood wrote:

my point is that i looking to built a multiplayer by  use only one  gate based  on what is called stochastic logic.


It does not matter what kind of fancy colored names you give it. You only get the first point of your square wave, which is always 0.5. You might as well replace the entire while loop with a simple index array. In fact, you can replace the entire thing with a 0.5 diagram constant and the result would still be exactly the same (see image). Are you running this once or are you using "continuos run" mode?

 

= same thing!

0 Kudos
Message 9 of 16
(3,942 Views)

It should also be noted that a lot of the numeric and comparison functions work on arrays.  So your code can be reduced to


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 10 of 16
(3,940 Views)