Jump to content

Need while loop help


Recommended Posts

Hello,

I am a new LABVIEW user and I am attempting to interface with accelerometer code from a 3rd party vendor. The problem I have is more general than specific and I could not find the correct combination of search terms to find a solution to my problem (I know it is not unique).

Basically, the acquisition on all 3-axis occurs within a while loop using a 100 ms delay. I'd like to make this proprietary VI into a subVI. However, when I place the indicator outside of the while loop (or leave it in), set it to an output on the block connecter, and then import it into some simple code I cannot get a continuous reading output.

I know I'm missing something basic. I am more than willing to give additional information. Any help would be appreciated.

Thanks in advance,

Mark

Link to comment

QUOTE (PhattieM @ Jan 5 2009, 12:39 PM)

Basically, the acquisition on all 3-axis occurs within a while loop using a 100 ms delay. I'd like to make this proprietary VI into a subVI. However, when I place the indicator outside of the while loop (or leave it in), set it to an output on the block connecter, and then import it into some simple code I cannot get a continuous reading output.

With any subVI, the data on the outputs is not available until the subVI completes execution. If you are running a while loop inside the subvi, the output terminal will not be updated until the while loop finishes and the subVI returns. This subVI will also block dataflow on the line it exists on until it completes execution.

If you post your code someone can probably recommend another method to get the job done.

Link to comment

QUOTE (PhattieM @ Jan 5 2009, 06:30 PM)

This is a great idea and will be what I try first. Thanks, I'll let you know how it goes. If the problem persists I will post the code (which I may do anyway). Thanks for the replies!

~Mark

That's exactly TobyD's explanation packaged in a PNG... :thumbup:

Good luck.

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
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.