LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

COM Port doesn't work with non-development PC

I've created an *.exe file which using COM ports to interface with an external device to send and receive the RS232 data. This *.exe is working fine and detected any COM Ports with out any issues on development PC. But this application doesn't seems to be able to send or receive any data at COM1(ASRL1) or COM2(ASRL2)on non-development PC. On the non-development PC, I've installed the LabView run-time engine 8.2.1 and NI-VISA run-time 4.6.2(Came with MAX v4.6.1f0). I've tried accessing a port using COM # or aliase # name like ASRL1 but nothing seems to work at all, and LabView doesn't report any errors. In the MAX, i can see that two COM ports are available for uses. I also checked the status of COM ports under system device, and everythings seems to be OK there. I don't know what else to try. HyperTerminal seems to be working OK on non-development PC.  

 

Here is my PC configuration:

       Pentium III, 512MB RAM, XP Professional

       Service Pack 3

       LabView run-time eng 8.2.1

       NI-VISA run-time 4.6.2 

0 Kudos
Message 1 of 8
(2,988 Views)

Are you getting any error messages?

 

Are you sure you've closed the com port on hyperterminal before running you .exe?

 

If you have a VISA control on your front panel, what does it look like when you select the dropdown button?

0 Kudos
Message 2 of 8
(2,985 Views)

I'm 100% that i closed the HyperTreminal.

I don't get any errors, this is strange

I see the alise name like ASRL1 or ASRL2

0 Kudos
Message 3 of 8
(2,971 Views)

Anything with baud rates and/or handshaking lines.  If you don't set those in code, then they are set for whatever their settings are in MAX.  Perhaps the baud rate or the need for handshaking is set differently between the development PC and the .exe PC.

0 Kudos
Message 4 of 8
(2,961 Views)

Hi

at this point I recommend you make a NULL modem (get a DB9 connector and short pins 2 &3).

Find a serial port example from the examples and build it (don't bother about the RTE since its already on the deployment PC).

Run it and anything you send should be received back. This checks LabVIEW. If this works check your baud rate / parity settings etc.

 

Has anything else changed between your development system and deployment?

I have had COM ports die in the past (I suspect due to grounding issues). The fact that hyperterminal works is promising.

 

Are you using a hardware COM port (PCI) or USB to serial adaptor?

The thoughput (latency) on USB serial adaptors is a lot worse than hardware COM ports - will this result in timing issues with your hardware?

 

Do you know if your hardware is receiving data and not responding? Or is nothing being sent out of the serial port by labVIEW?

 

My other trick is to make a serial spy cable... You can use hyperterminal to see what is going on - see http://www.lammertbies.nl/comm/cable/RS-232-spy-monitor.html

 

Good luck.

 

0 Kudos
Message 5 of 8
(2,943 Views)

Actually, that is a serial loop back tester.  A null modem cable is one where wires 2 and 3 are crossed from end to end (along with handshaking lines) so that two similar devices like PC's can communicate with each other.

0 Kudos
Message 6 of 8
(2,939 Views)

Portmon COM port monitor may help you out:  http://technet.microsoft.com/en-us/sysinternals/bb896644.aspx

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 7 of 8
(2,922 Views)

You are correct - I meant a loop back adaptor instead of  Null.

0 Kudos
Message 8 of 8
(2,898 Views)