02-25-2022 08:37 AM
Hi,
I‘ve built an exe with LV 2020.
My built exe reads out a VISA COM Port. It all works great on the development PC.
Now the exe works on the development PC. I can choose the COM Port I need to run the VI.
So I click on the VISA Ressource Name drop down menu on the Front Panel and then there is the COM Port.
But if I am moving it on an external PC (Labview Runtime and Visa Runtime installed) then there is no COM Port in the Drop down menu as on the development PC.
Can anyone please help me?
Thanks!
02-25-2022 09:16 AM
In general all VISA resources must be "found" in NI-Max before they will show up as a selectable VISA resource.
02-25-2022 10:12 AM
That‘s right.
But I can use this source already.
It‘s only a difference when I am running the exe on the other PC.
There must be settings or sth else I have to insert in the exe building process I think.
But I don‘t know the settings I have to include to the exe.
02-25-2022 10:19 AM
They have to be found on every PC it is running on.
02-25-2022 10:25 AM
@RTSLVU wrote:
In general all VISA resources must be "found" in NI-Max before they will show up as a selectable VISA resource.
I've never once needed to use MAX to handle VISA resources. LV finds them just fine with the normal COM port dropdown box.
If nothing shows up in the dropdown box, you probably don't have the drivers installed. Open Device Manager and see if it shows up there. Also try a terminal program like Termite or PuTTY and see if they see a COM port in their list of ports to connect to.
02-25-2022 11:40 AM
I would suspect that your target PC is missing a Virtual COM port driver and you have some hardware connected that is not being enumerated as a COM resource on the target.
Let's use a USB plug-n-play Virtual COM Port connection as an example.
The OS sees a "device" connected and plug-n-pray technology queries that device for some information [like a vendor ID and device type specific information]
The OS then looks into its registry sees if any matches are found that define the type of device as a Serial COM Port and enumerates that device on that USB port as a COM port AS DEETERMINED BY the vendor supplied registry key values "HKEY=serenum" but that's really handled by the OS
this all means the the device vendor must provide a "Hardware Driver" that must be installed (and which installed the associated registry keys) before the OS can use the type of device as a COM port.
If you know what device you are connecting you can Goggle the vendor and find a driver download for the target OS. The User Manual should also have that information.
If you DON'T know what the device is or who makes it WTFWYT?
02-25-2022 12:05 PM - edited 02-25-2022 12:06 PM
@BertMcMahan wrote:
@RTSLVU wrote:
In general all VISA resources must be "found" in NI-Max before they will show up as a selectable VISA resource.
I've never once needed to use MAX to handle VISA resources. LV finds them just fine with the normal COM port dropdown box.
Sure, but I can tell you this for fact: If NI-Max can't see it LabVIEW will not see it either.
So looking at NI-Max is always the first step in troubleshooting instrument connectivity issues.
02-25-2022 12:14 PM
@RTSLVU wrote:
@BertMcMahan wrote:
@RTSLVU wrote:
In general all VISA resources must be "found" in NI-Max before they will show up as a selectable VISA resource.
I've never once needed to use MAX to handle VISA resources. LV finds them just fine with the normal COM port dropdown box.
Sure, but I can tell you this for fact: If NI-Max can't see it LabVIEW will not see it either.
So looking at NI-Max is always the first step in troubleshooting instrument connectivity issues.
Yes, definitely true. I prefer using terminal programs or the device manager. In general, "it doesn't show up in the dropdown" is not a LabVIEW problem, so you don't use LabVIEW to fix it. MAX is definitely a great tool for that, I just wanted to make sure the OP didn't think he had to enable it in MAX or something before LV could use it.
02-25-2022 12:15 PM
Thank you all for the fast answers.
I wonder why I can use it on the development PC and it‘s shown in the drop down menu. I didn‘t install any drivers on the development PC. I connected the USB with the PC and it worked instantly correct.
Doesn‘t matter if it‘s the programm directly or a executable.
I only can‘t handle COM Ports in general. My thought is there is any setting missing i can attach the exe-file such as „always included“.
Or am I completely wrong?
02-25-2022 01:06 PM
If the executable works on the development PC and not on the deployment PC then it's not a LabVIEW issue, it's a driver. Many USB drivers are common across brands, so it's likely you have installed a similar device a long time ago and got lucky. What device are you communicating with?
Does it show up correctly in Windows Device Manager?