LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Logical question, it's not enought to know LabVIEW, it's necessary intelligence...

Don't worry, Alan!  We're not going to yell at you for posting some code that is entirely relevant to the original discussion.  And congratulations on your CLAD!

 

I think you missed part of the problem statement...the OP wanted only the last 5 elements of the generated array.  Also, as an example of a possible "stop" condition, the loop would stop when the random number generated had a value of, say, 9.  You can just use a "Stop" button for your "stop" condition.

 

So your VI doesn't solve the problem.  If you want to try again, here's some advice:

 

1.  It's going to be easiest to pre-allocate a 5-element array to work with, so as to get the output array size correct.

2.  You'll need some way of eliminating the older elements as the loop iterates, so that the array size is always 5

3.  You'll need some way of inserting each new element at the beginning of the array as the loop iterates

 

Possible approaches suggested during this thread were:

 

1.  Use of the "rotate array" function in conjunction with the "replace array subset" function

2.  Use of the "delete from array" function in conjunction with the "insert into array" function

3.  Use of shift registers

4.  Use of a "lossy queue" function.

 

Any of those approaches will work well.  Give it a try!  Smiley Happy

 

d

Message Edited by DianeS on 03-01-2010 11:29 AM
Message 81 of 97
(1,494 Views)

That was it?

 

You mean that's all the person wanted?

And it exploded into this long thread?

 

I thought I had missed something in the interpretation and it was something more complex.

 

w-o-w ... 😐

 

Oh well.. you can't win 'em all...

0 Kudos
Message 82 of 97
(1,488 Views)

Um, yes.

 

That's all.

 

Instead of trying out any of our suggestions as to how she might approach the problem, she threw a fit.  She also took exception to the fact that we wanted her to write her own code.

 

Ah well!

0 Kudos
Message 83 of 97
(1,470 Views)

Ray.R wrote:

That was it?

 

You mean that's all the person wanted?

And it exploded into this long thread?

 

I thought I had missed something in the interpretation and it was something more complex.

 

w-o-w ... 😐

 

Oh well.. you can't win 'em all...


Yeah, when you actually looked at it was a trivial problem.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 84 of 97
(1,446 Views)
It was a trivial problem except that there were typos in the original problem description. Michelle made a mistake showing what should have been in the FIFO. I was going to say something but then... Smiley Surprised ... Smiley Mad ... Smiley Tongue
Message Edited by NIquist on 03-01-2010 01:19 PM
LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 85 of 97
(1,437 Views)

Actually the original problem description was more-or-less incomprehensible.  She did a much better job of explaining it later in the thread, after several people went "huh?"  But even then, there were typos in it...I noticed them too.

 

Of course, we were all stupid because we didn't understand her original description...

 

...and then we were all stupid because we suggested approaches she could try by herself, instead of posting already-written code.

 

My suggestion was the stupidest one, of course.  Smiley Wink

Message Edited by DianeS on 03-01-2010 12:31 PM
Message 86 of 97
(1,422 Views)

... of course...  😄

 

LOL!

0 Kudos
Message 87 of 97
(1,401 Views)

DianeS wrote:

 

My suggestion was the stupidest one, of course.  Smiley Wink

Message Edited by DianeS on 03-01-2010 12:31 PM

Yeah but great for your post count!  I make the thread to be about 5% of your great work 11/205

 

Smiley Very Happy 


"Should be" isn't "Is" -Jay
Message 88 of 97
(1,362 Views)

I hadn't even considered that!

 

And here's #12...let's up that percentage juuuust a hair more...

Message 89 of 97
(1,337 Views)

Now that this thread has been idle for a bit I'll propose a solution on a track that wasn't offered.   I just couldn't stand letting the year end without the simple solution being presented.

The only hard part was limiting the array size to 5 elements with 8.0 compatable functions (aren't lossy Queues and feedback nodes nice)

 

Virtual Kudos to all who tried to understand michelle's rantings.

 

 Am I Smarter than Diane.png

(the title is a running inside joke)


"Should be" isn't "Is" -Jay
Message 90 of 97
(954 Views)