Jump to content

Write to file bug (or feature)


Ulf

Recommended Posts

Hi!

I'm having problem with logging data to a file in the background. LabVIEW halts at "File Open" if the user is using LabVIEW file browser at the same time. I have found a way around this, but I don't now why it works? I have attached a simple test program for the "bug". Run the VI and press "browse"-button, look at the two indicators "Loop1" and "Loop2".

Best regard Ulf

FileOpenProblem.vi

Link to comment

Hi!

I'm having problem with logging data to a file in the background. LabVIEW halts at "File Open" if the user is using LabVIEW file browser at the same time. I have found a way around this, but I don't now why it works? I have attached a simple test program for the "bug". Run the VI and press "browse"-button, look at the two indicators "Loop1" and "Loop2".

Best regard Ulf

I ran this on Windows 7 and it works fine.

Both loops continued to increment the index with the browse dialog open.

I even switched execution to user interface and it worked fine.

Is this feature OS dependent?

Link to comment

I ran this on Windows 7 and it works fine.

Both loops continued to increment the index with the browse dialog open.

I even switched execution to user interface and it worked fine.

Is this feature OS dependent?

I'm running on XP LV8.5 & LV8.6

//Ulf

Link to comment

I forgot to say LV2009 for me.

I would guess that this is more important than the fact that it is Windows 7. :shifty:

Apparently someone put some love into the File IO C code and removed a global somewhere in the Open File function that prevented that function from being called as a thread-agnostic function, so the File dialog, which has to run in the UI thread since it does UI :rolleyes:, can't block it anymore.

Link to comment
  • 2 weeks later...

Hi!

I'm having problem with logging data to a file in the background. LabVIEW halts at "File Open" if the user is using LabVIEW file browser at the same time. I have found a way around this, but I don't now why it works? I have attached a simple test program for the "bug". Run the VI and press "browse"-button, look at the two indicators "Loop1" and "Loop2".

Best regard Ulf

Loops working Ok for me even when browse is pressed on Win XP SP2 LabView 2009

Link to comment
  • 1 year later...

I'm seeing the same problem...

So, there's no way around it? :(

Of course there is! Use a recent LabVIEW version and of course don't use functions that are synchronized through the UI thread. That includes all VIs itself set to run in the UI thread but also just about every LabVIEW VI server function including Property Nodes and Methods.And everything else that will put up a UI screen such as a dialog or similar.

Link to comment

Of course there is! Use a recent LabVIEW version and of course don't use functions that are synchronized through the UI thread. That includes all VIs itself set to run in the UI thread but also just about every LabVIEW VI server function including Property Nodes and Methods.And everything else that will put up a UI screen such as a dialog or similar.

Thanks for your reply, but I'm not sure if I understand what you suggest... Are you saying that I should change some settings in 'VI properties' for all sub-VIs?

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.