Jump to content

While loop oddity


Recommended Posts

Posted

Original Post:

http://forums.ni.com/ni/board/message?boar...ssage.id=200378

I was trying to make a bit of code in 7.1, win2k do the following:

If an index is contained in a row of a 2D array of integers, output all of the integers for that row, otherwise, just output that index.

My somewhat convoluted VI to do so is attached.

Now, am I overthinking this (which I've been known to do 16x16_smiley-tongue.gif), or is it actually taking a modification of the row downstream and modifying the input array?

I checked this on an 8.20 eval, win xp machine with the same results.

Thanks,

Joe Z.

Reported: # 40DAF67U

Download File:post-2-1156914149.vi

Posted
This is really weird.... Can I trust my LabVIEW to compute correctly after bugs like this and the constant loop bug?

Strange thing like the "For Loop" bug in 7.1.

I guess, we can expect LV 8.2.1

I also found out the same behaviour in LV 7.1.1 and 8.0.1

Wolfram

Posted
:o:blink: :headbang: :!:

These kind of bugs normally indicate that the software architecture is too complicated and not modular, and the bugs arise from the fact that new functionality is added to an environment where it doesn't fit to the architecture. :thumbdown:

Posted

This bug worries me a lot...how can i go on if i can not rely on labview???

So i made some test.

The error occur at the indexing in the while loop.

If we carry the 2d array into the while loop and extract each element using the index of the cycle no more error occurres.

So....there must be an explanation to this thing...

I don't like auto indexing in the while loop...i use them only when are useful even to determine the number of cycles of the for loops. Can it be relate to this bug?

Three Cycles..same operations... only while loop is wrong...

:nono::nono::nono::nono::nono:

It's not possible such a bug!

and.....if the problem is the "+1" module combined with the while loop?

If we substitute the "+1" with a sum with an array of 1 the problem don't occur.

Download File:post-1899-1157618194.vi

Posted
Hi, I found that if you enable the Show folding feature the error don't occur anymore

What the F... ? How can visualization option have anything to do with how LabVIEW generates code? Is there a name collision, on bug collides with another and both desappear... :headbang: :blink: :beer:

Posted
This is indeed a bug in LabVIEW's inplaceness algorithm, the result of an overzealous optimization, having to do with using auto-indexing input tunnels on a While Loop inside another loop. It is slated to be fixed in the next maintenance release.

Craig Smith

LabVIEW R&D

National Instruments

Well, I guess now we know we're going to see 8.2.1 before 8.3 or 9.0 :)

Jaegen

Posted
Well, I guess now we know we're going to see 8.2.1 before 8.3 or 9.0 :)

Jaegen

:!: Yes, but we will have to wait a year until LabVIEW is 21 years old to see LabVIEW 8.21 :P

Posted
:!: Yes, but we will have to wait a year until LabVIEW is 21 years old to see LabVIEW 8.21 :P

:D:D

Thank you - that brightened my otherwise rather grey day fighting with upgrading a project to 8.2. It is rapidly becoming counter-productive: See here, and here.

Jaegen

  • 3 months later...
  • 3 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.