11-04-2015 11:38 AM
I have a working Labview program on my PC that accesses and uses COM1. I build it into an application. The compiled version works on my PC. I install it on a different PC that does not have a development environment. It will not recognize COM1. No VISA resources are shown when the refresh option is selected in the control pull down menu.
Is there something I am missing when I build the executable that is causing this?
Thanks
Solved! Go to Solution.
11-04-2015 11:47 AM - edited 11-04-2015 11:47 AM
11-04-2015 12:55 PM
11-04-2015 01:03 PM
Thanks,
I had assumed (maybe incorrectly) that the installer I built would have included those VISA drivers. I will get the error codes when the PC that I am testing on is freed up.
tgdrake
11-04-2015 01:28 PM - edited 11-04-2015 01:31 PM
Your installer won't include the VISA add-on unless you configure the installer to include additional installers. It will only install the executable unless told otherwise.
Now as far as the VISA naming convention goes, that can change from computer to computer. It may (and probably won't be) COM1 on both computers. If you are using a drop down, then you don't need to read any farther because the program should alert the user if they try to communicate with the wrong device once selected.
If you're initializing the device programmatically, you will run in to issues if you use "COM1". The way to solve this issue is to write a known command to each VISA device found until you get a response that matches your target device. Ideally, this command and response is a query for the device's ID or serial number, that way you can match it up to confirm.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
11-04-2015 03:39 PM
I installed NI-VISA 5.2. Still no luck.
Error code received: 1073676294
11-04-2015 03:45 PM
Did you search for that "error"? It's just a warning that there may be more data at the port. This often happens when you don't use a "bytes at port" property node to make sure you read everything.
http://digital.ni.com/public.nsf/allkb/C96C84C922DC3F978625632500482F78
11-04-2015 03:58 PM
So Each response I got helped me step closer to the solution. I did not have the NI-VISA driver installed as I had assumed. I will learn how to make this happen when I build the installer. Then I knew to make the VISA resource name a control and the it would need to be refreshed when first run. The person I asked to test out the new solution was not aware of this. Once we refreshed the list and selected com1, all worked. Thanks everyone for help.
11-04-2015 11:05 PM
@NIquist wrote:
Did you search for that "error"? It's just a warning that there may be more data at the port. This often happens when you don't use a "bytes at port" property node to make sure you read everything.
http://digital.ni.com/public.nsf/allkb/C96C84C922DC3F978625632500482F78
Actually it is just the opposite. You will very likely get that warning message when you DO use the bytes at port property node because you will find out N bytes are at the port, you read N bytes, and you get those N bytes back. It is telling you that there may be more bytes still there and you don't know it (think of the serial device possibly sending more bytes between the checking and the actual reading.
I think it is actually a pretty useless warning as any programmer worth their weight should understand there is always the possibility that there could be more bytes available in the buffer than what they requested.