05-23-2012 03:45 PM
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.
05-23-2012 03:58 PM
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.
05-23-2012 04:04 PM
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.
05-23-2012 04:12 PM
05-23-2012 04:28 PM
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.
05-23-2012 04:38 PM
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?
05-23-2012 05:44 PM
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.
05-23-2012 05:54 PM
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.
05-23-2012 06:56 PM
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?
05-23-2012 09:26 PM - edited 05-23-2012 09:27 PM
@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.