Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid pop-up dialog? "Read From Spreadsheet File.vi"

Solved!
Go to solution

Hi all,

Please note that I ran your VBAI under the Configuration Interface, and the pop-up only happens once after the VBAI is opened/loaded

 

At the pop-up dialog, I choose a arbitrary file and click "ok" so the program continues.

 

Subsequently, running the state does not produce the same problem.

 

Does this give any clue?

 

Maybe in the 2nd VI file, the string control has to be initialized to something??

0 Kudos
Message 11 of 14
(1,402 Views)

So unfortunately I can't reproduce this issue. I just tried your Test1.vbai with the Run1st.vi and Run2nd.vi and after I updated the VIs to point to the right location on my machine, it worked fine. I even closed the inspection and reopened in Configuration mode and then did it again in inspection mode and never saw a popup. I don't have any idea how this could happen for you. Just out of curiosity...why can't you combine the two steps into one VI...your 2nd VI could just use your First VI as a subVI inside it. I realize this doesn't answer the question, but if this works for you, it might at least get you back to developing. If you want to try and get to the bottom of this problem, you could try converting your VBAI inspection to LabVIEW code (Tools>>Migrate Inspection to LabVIEW), and see if this happens in your LV code as well, and then you can step into the VIs to get a better idea why it's happening.

 

Hope this helps,

Brad

0 Kudos
Message 12 of 14
(1,370 Views)

Please try the attached file.

Run it in Configuration Interface..

Basically, it will read a string contained in C:\MyFile.txt, and then create/open a file Report.txt, and append the string.

When I run it the first time, Report.txt is empty. Only when I run it again, the string appears.

Whats wrong?

0 Kudos
Message 13 of 14
(1,359 Views)
Solution
Accepted by splee

Turns out this was a bug in VBAI 2011 that was fixed in 2011 SP1. If you do not set any controls on a Run LV step (or a Calculator step I think), and you just read the indicators, the first time will return default values for the indicators. To fix this, either upgrade to 2011 SP1 (or newer) or set a dummy control to a constant in the step.

 

Thanks,

Brad

Message 14 of 14
(1,345 Views)