Jump to content

What is wrong with this?


Recommended Posts

Hi,

I have a really weird case happen here. I minus a number by one and the result is -1.

I attach my code here when it running with highlight and prob.

I have the actual code below it.

When I copy that code to another VI, it runs ok. I tried to replace that minus 1 by a minus block with a constant 1 and it still returns same result is -1.

Please tell me what I did wrong.

Best regards,

Thang

post-7703-0-29853600-1299279021_thumb.pn

Edited by Thang Nguyen
Link to comment

VI corruption. The fact a copy/paste of the code works is a strong clue.

I've had many inexplicable problems simply disappear by just copy and pasting entire block diagrams in to new VIs. It's almost at the level that the technique is a legitimate debugging step.

To paraphrase a friend: "What? You've never seen LabVIEW do something stupid before?"

Link to comment

I can offer two options for this.

  1. it looks like you could have made a programming error, use the auto-clean-up (ctrl-u) to verify you connected everything correctly
  2. You could force a recompile on your VI (ctrl-click on the run arrow, if memory serves right)

Ton

Link to comment
  1. You could force a recompile on your VI (ctrl-click on the run arrow, if memory serves right)

Yes. Hold down the ctrl key and click on the Run arrow button. That will force a recompile. If that works, please don't save over the busted VI until you post the actual VI and its subVIs to the forums at ni.com so that we can investigate that code for a compiler bug.
Link to comment

I did recompile and the error is still there. I tried to copy that while loop into a blank VI, ran, and confirmed it work. Then I delete the case in my main VI, and build the case. Copy back the while loop, and error still happens.

I have just tried to remove the -1 block from inside the while loop to outside the while loop and it works now. I am lucky that I don't have to rebuild the whole VI.

I sent the VI to NI already.

Best regards,

Thang Nguyen

Edited by Thang Nguyen
Link to comment

I did recompile and the error is still there. I tried to copy that while loop into a blank VI, ran, and confirmed it work. Then I delete the case in my main VI, and build the case. Copy back the while loop, and error still happens.

I have just tried to remove the -1 block from inside the while loop to outside the while loop and it works now. I am lucky that I don't have to rebuild the whole VI.

I sent the VI to NI already.

Best regards,

Thang Nguyen

This is starting to freaking me out ph34r.gif

Link to comment

I did recompile and the error is still there. I tried to copy that while loop into a blank VI, ran, and confirmed it work. Then I delete the case in my main VI, and build the case. Copy back the while loop, and error still happens.

I have just tried to remove the -1 block from inside the while loop to outside the while loop and it works now. I am lucky that I don't have to rebuild the whole VI.

I sent the VI to NI already.

Best regards,

Thang Nguyen

Looks almost like an implicit (and definitely not legal) I8 cast is done somewhere. This is something NI really will want to investigate, since such errors are a terror for any LabVIEW user.

Link to comment

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.