LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

COM Port Issue

Solved!
Go to solution

Hello

I have developed an application which includes a handheld barcode reader, coming in on a COM (USB) port

I have developed it using LabVIEW on a windows 7 PC. When running on my development PC all is fine. I created an application and am trying to run it on a windows 10 machine but it is not working.

When plugging into the USB port, it assigns a different COM port but I have reassigned for this. On the windows 10 machine, I have downloaded a serial port 'test' piece of software and the barcode reader works fine with that, just not with the LabVIEW application I have written.

I think I am missing a 'trick' here, has anybody come across this before

Many thanks

Lee

0 Kudos
Message 1 of 10
(4,275 Views)

The scanners that I am familiar with basically emulate a keyboard.  When you plug them in, you can immediately start scanning barcodes into a text document and the embedded text will be typed out. 

 

Since your scanner is serial based, I'm not familiar with them but I would assume they are no different than any other serial device, that you have to establish a connection and poll the device for available scans.  I suspect that you have something wrong in your connection settings or the way that you poll the device. 

 

If you can post a snippet (Edit->Create Snippet), we can see what you are doing wrong and try to help you fix it.  Otherwise, we are playing a guessing game.  Smiley Wink

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 10
(4,259 Views)

Usually serial applications don't need to be changed following the OS. Unless you are using a very old version of LabVIEW/VISA drivers.

Did you install VISA runtime on the Win10 machine?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 10
(4,208 Views)

Hello

Thank you for your reply. I am unsure whether I have installed the VISA runtime on the target machine. I wasn't aware of it, so if by default I haven't maybe that is the cause. How would I know if it is installed and if not what did I miss when installing the runtime.

Many thanks

Lee

0 Kudos
Message 4 of 10
(4,192 Views)

Hello thank you for your reply. I am familiar with keyboard wedge scanners and it is not one of those. The 2nd reply I have had on this questions looks to 'point the way' so I will persue that route first. Thank you

0 Kudos
Message 5 of 10
(4,191 Views)

It depends on how you installed the runtime. If you generated an installer for the application, VISA runtime is included by default when your VIs contain VISA functions (unless you uncheck it in the Additional Installers tab, which is unlikely). However, if the runtime was already there for other reasons (another application without VISA, the compiler itself) NI-VISA drivers may not be present on the target machine and must be installed, e.g. with the NI Drivers DVD. In this case, the application will start but VISA errors will be undefined. Do you get any LabVIEW error code?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 10
(4,188 Views)

It is a new installation, so I installed the run time. Now reading your NI-VISA drivers from the NI Drivers DVD comment, I haven't done that, so maybe that is the reason, or does the builder realise there are VISA fuctions within the code and install them?

I am not at the target machine now, until after the bank holiday, but I will try that, and also I will recode to include using the error handler see if that sheds more light on the issue.

Many thanks again

Lee

0 Kudos
Message 7 of 10
(4,184 Views)

I said before that the Application Builder would automatically recognise if any VISA function is used and add the VISA runtime accordingly, but a quick test showed me that I was wrong (LV 2011). This is strange, as LV7.1 App Builder could do it.

Anyway, unless this was improved in your LV version, this suggests that you need to explicitly add the NI-VISA runtime (find it near the bottom of the list of the Additional Installers).

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 8 of 10
(4,177 Views)

OK, that's great and makes sense to me. I will try this when I am back at the target machine. I will let you know the outcome

Lee

0 Kudos
Message 9 of 10
(4,169 Views)
Solution
Accepted by topic author LeeBowers1

Hello

I looked into the options when building the executable and there was nothing relating to device drivers so I installed the device drivers directly onto the target machine and this solved my problem.

Many thanks for your help with this

Regards

Lee

 

0 Kudos
Message 10 of 10
(4,124 Views)