LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

com1 not recognized when compiled version installed on new PC

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(4,256 Views)
Solution
Accepted by topic author Tgdrake

Hi drake,

 

is VISA installed on that other PC?  It's needed for VISA operations…

 

Also you should get some error messages/numbers when trying to call VISA functions. What does your debugging result in?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(4,249 Views)
What did you include with the installer you created? You did create one, didn't you? Later versions will give you a list of necessary components. The VISA runtime would be one.
Message 3 of 9
(4,231 Views)

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

0 Kudos
Message 4 of 9
(4,224 Views)

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>   ---'


Message 5 of 9
(4,212 Views)

I installed NI-VISA 5.2.  Still no luck. 

Error code received: 1073676294

0 Kudos
Message 6 of 9
(4,195 Views)

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

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 7 of 9
(4,189 Views)

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.

0 Kudos
Message 8 of 9
(4,177 Views)

@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.

0 Kudos
Message 9 of 9
(4,146 Views)