09-28-2018 12:54 PM
Personally I don't think it is a driver issue unless your COM port is a virtual COM port and requires a driver.
The problem is the code which you haven't show us which determines which COM ports are on your PC. I asked for it, and you ignored it and posted something else.
.
09-28-2018 01:15 PM
You should be careful in regards to the COM port number, they don't always match for different machines. Furthermore, ports which are assigned via an adapter (say a USB-serial adapter) can be arbitrarily assigned by windows (and they can change if you remove/reconnect devices often).
Use "VISA Find Resource.vi" to get the list of ports/devices (ASRL* are your comm ports). If your device has a known query response (something similar to *IDN? looking for a model or serial number), iterate through the list until you get the correct response, you have now located your device.
09-28-2018 01:40 PM
@nyc_(is_out_of_here) wrote:
Personally I don't think it is a driver issue unless your COM port is a virtual COM port and requires a driver.
The problem is the code which you haven't show us which determines which COM ports are on your PC. I asked for it, and you ignored it and posted something else.
You did not specifically ask for the code in any of your posts.
I just ran the exported EXE file on the same machine that I built the VI on and it worked perfectly, so it was not the code. Then I installed the VISA runtime engine on the PC that I transferred the EXE to, and everything started working great.
Thanks everyone for your help. I marked UliB and GerdW's responses as the solution.
09-28-2018 01:57 PM
As general advice for you in regards to building an application for a target PC.
You typically need to consider the following.
1) any input files (config files) your code relies on
2) any external DLL files your code calls (this can include manufacturer LabVIEW drivers)
3) any hardware drivers your external hardware requires (common for USB devices)
4) any NI drivers your code uses for communication. This commonly means NI-VISA, NI-488.2, NI-DAQmX, NI-Serial, etc.
5) Run-time engine for the appropriate LabVIEW version
6) Optional toolkits may require additional support (like "NI Vision Development Module Run-Time" for NI Vision functions )
This is the reason others were directing you to create an installer. You can wrap everything you need together instead of installing them 1 at a time.
09-28-2018 03:00 PM
Thank you, agreed creating an installer would have been better. I found that how-to in the LV help files so will do that going forward.
09-28-2018 04:25 PM
@lavadisco wrote:
@nyc_(is_out_of_here) wrote:
Personally I don't think it is a driver issue unless your COM port is a virtual COM port and requires a driver.
The problem is the code which you haven't show us which determines which COM ports are on your PC. I asked for it, and you ignored it and posted something else.
You did not specifically ask for the code in any of your posts.
I asked you how you were populating the dropdown box.
If that isn't asking for code, I don't know what is!
.
10-01-2018 01:15 AM
@nyc_(is_out_of_here) wrote:
I asked you how you were populating the dropdown box.If that isn't asking for code, I don't know what is!
The dropdown box is a I/O Control provided by NI in the palettes (IO >> VISA Resource Name). The list populates itself, no need for code.
You even can apply 'IO Name Filtering' or 'Select VISA Class' over right click menu.
See http://zone.ni.com/reference/en-XX/help/371361R-01/lvconcepts/io_controls_and_indicators/