LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data is not acquired because of an VISA error!!

Solved!
Go to solution

Thanks for the correct subVI but you still don't quite understand everything. Ben said that you should place a probe on the VISA Resource Name wire - not the error out. You can actually place a probe on the VISA Resource Name of the main VI and before you run it, open the subVI (Vi Connection) and place a probe on the VISA Resource Name there. They should match. The VISA Resource Name on the front panel should also reflect a com port that you actually have. To do this, click on the pull down and select the proper resource.

0 Kudos
Message 21 of 40
(795 Views)

Ok I already tried to put a probe on the visa resource name wire before running the program. It was empty which is not the same as my original sub VI that I modified to take the while loop off and put it into my main VI like this.

 

You can see my orginal sub VI again which is the original version of VIs connection1. I did not change any details of the code, just took everything inside the while loop, made a sub vi, put it into the main vi and then wire everything that was outside the while loop in the original sub VI to this new sub VI, as you can see in the main one.

 

It was little bit complicated. Hope you understand. 

0 Kudos
Message 22 of 40
(792 Views)

If you have a blank VISA Resource Name on the top level VI, then you are passing a blank VISA Resource Name to the subVI and that explains the error. What you do or do not have on the subVI is irrelevant.

0 Kudos
Message 23 of 40
(789 Views)
But why is it empty while my original sub vi has a visa resource name? Did I do anything wrong with vi with vi modification?
0 Kudos
Message 24 of 40
(786 Views)

To repeat what I said, you must enter a valid VISA Reource Name on the front panel of the main VI. Whatever you enter there is what is passed to the subVI. The value on the main replaces whatever value you might have on the front panel of the subVI.

0 Kudos
Message 25 of 40
(782 Views)

Ok now I understood everything what you have said. (please don't get annoyed too early 🙂 ) The problem is when I connected my original Sub VI (Data_Read) to the test bench, it automatically obtained the valid visa source name from the test bench. I did not have to type it. However when I tried to connected this main VI (assembled VI) to the test bench, it didn't acquire any visa resource names from it. I think this is reason why my main VI didn't work. What should I do with my main vi to be able to acquire the visa resource name from the test bench?

0 Kudos
Message 26 of 40
(780 Views)
Solution
Accepted by topic author Bombbooo

The only "automatic" method for your main VI or your subVI is by clicking on the pull-down of the resource name control. It does not automatically populate. When you see the list, select the one you want. Then you can make that the default value.

Message 27 of 40
(774 Views)

Thanks for the suggestion but today I tested it with the test bench and pulled down the resource name control, it was blank. (not like my original sub VI, there were 2 names which one of them worked). This is the problem I am facing now because my main VI does not obtain any visa names from the test bench.

0 Kudos
Message 28 of 40
(771 Views)

Was it truly blank?  Did it have a Refresh choice and did you click that?

 

If you right click on the control and go to I/O Name Filtering, what does it show?

0 Kudos
Message 29 of 40
(765 Views)

@Bombbooo wrote:

Thanks for the suggestion but today I tested it with the test bench and pulled down the resource name control, it was blank. (not like my original sub VI, there were 2 names which one of them worked). This is the problem I am facing now because my main VI does not obtain any visa names from the test bench.


What is "test bench?"  Is this your developement computer?  Do you mean Test Stand?  I'm wondering if the VI you're using is being used on two different systems.  In which case your resource names will be different, but your Visa Control should show what resources you have available.

I'll try to post a few more times to help get to 40 posts for this thread.Smiley Wink

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 30 of 40
(761 Views)