08-20-2015 04:08 PM - edited 08-20-2015 04:09 PM
Post the code so we can tell what is going on inside.
"I tried to make COM@ as a constant in the VISA resouce names"
Did you right click on the control and set it as default?
"it gives me a list of COM's connected"
Is that a seperate PopUp or the drop down list when you click on the VISA Ref front panel control.
08-24-2015 01:22 PM
Hello Omar,
As per our discussion I have attached some ppictures and I will explain you now what I need. So, this is the main VI, the first picture you can see below and there is a box which says Connect instrument. If I go into it, I find another sub Vi which is in the next picture 2.
In this second picture you must be able to the box which says Select Device Ok. This is the pop up window which comes up asks the user to select a port for use. My concern is that this pop up window doesn't shows up and the COM port is automatically selected. Now, I was easily able to dissapear the pop-up window by disabling the select device ok box but how can I make sure that it also selects the COM 2 as a default port. In the next picture 3 I have shown the block diagram of this Select Device Box where I have put the COM 2 as a constant but I do not know where to join it so that COM 2 is default and selected automatically.
The pop up window comes up when I execute the program and the last picture is showing it how does it look like.
I hope the situation is much clear for you to help me.
10-14-2015 09:30 AM
hello
sorry about not replying but I briefly stopped to work on this project.
the Blokks's solution is the best appropriate for me. I'm able to dress the list of COM devices present in the computer
thanks for your contributions.
10-15-2015 06:40 AM - edited 10-15-2015 06:42 AM
Unfortunately, I have another problem 😞
the diagram in the image 1 below, gives the result in the image 2, that's correct
however, the .exe gives the image 3: nothing is displayed
any idea?
1)
2)
3)
10-15-2015 07:43 AM
I confirm the problem, I get the following error when the VI is launched from a build (does your app report errors properly?):
This is the VI:
I dig into what is the cause...
10-15-2015 07:52 AM
Solution:
You need to properly close the VISA references:
10-15-2015 10:41 AM
hi blok
your solution is working, but....not working 🙂
let me make my device more clear. I'm developping with the computer A, where the labview licence is registered. the compiled .exe code is dedicated to the target computer B, which has no licence and is running with runtimes
thanks to your solution, I can see all COM inputs from the .vi and .exe in the computer A
But I still can't see them in the computer B.
I have a clue: computer A has "NI-VISA 14.0.1" and "NI-VISA runtime 15.0" while computer B only have "NI-VISA runtime 15.0"
I will ba testing my vi by installing the same year-version for both runtime and normal one. I hope it will work.
10-15-2015 10:43 AM
Or just create a stand-alone installer of your application including the required VISA driver...? So you do not need to install anything manually on a target computer.
If later you need a new version of your code, a "patch", you can just exclude the drivers, so the installer will only contain the application and will be a few MB only...