LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 loopback

I can try this out to know the answer, but until I I have access to the system, I thought I could post the question.

 

Can I use a loop back conector to Send and Receive info within the same computer? Thereby, eliminating the need for me to use two COM ports and have a serial cable in between?

 

Currently, I have a software sending data (say COM 1) and LabVIEW exe receiving data (say COM 2), Can I just use COM 1, use a loop back connector and have both the software and LabVIEW exe use COM 1? Will LV flag resource COM1 as being used by another application if I do so?

 

Thanks!


V

I may not be perfect, but I'm all I got!
0 Kudos
Message 1 of 9
(3,006 Views)

YES.  Short pins 2 & 3 together.  I do it all the time to test the com port.

Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 9
(3,004 Views)

My gut says no and the OS should prevent two processes from trying to acquire control of the same resource.

 

PortMon is capable of reaching into the transmit/recieve buffers so if you want to reseach how PortMon does it, you may figure out a way.

 

Sorry but that is all I can offer off hand.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 3 of 9
(3,002 Views)

Thank you for both replies. I actually do not want to test the port. I want to actually use it for communication between two softwares.

 

@BEn, I thought so too, because even in my original configuration, when the software was using (say COM 1) and I have accidently setup LabVIEW exe to use COM 1, LabVIEW threw out a nast error 🙂

I may not be perfect, but I'm all I got!
0 Kudos
Message 4 of 9
(2,998 Views)

Here is a KB that you may want to check out:

 

http://www.ni.com/white-paper/3450/en

0 Kudos
Message 5 of 9
(2,968 Views)

@PedroMunoz wrote:

Here is a KB that you may want to check out:

 

http://www.ni.com/white-paper/3450/en


 

Sorry Pedro but this thread is not about "How to Do a Loopback Test" but rather how to share the serial port data between two simultaneously running applications.

 

Now if you can find a white paper explaining how to tap into the transmit and recieve buffers (like what is done with PortMon) of a thrird party application, that would be helpful.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 9
(2,966 Views)

I wonder how PortMon is able to tap into the send buffer and display the data. That is exactly what I need to know and this would save us in hardware costs.

I may not be perfect, but I'm all I got!
Message 7 of 9
(2,963 Views)

@VeeJay wrote:

I wonder how PortMon is able to tap into the send buffer and display the data. That is exactly what I need to know and this would save us in hardware costs.


 

An easy method to get at those buffers would have helped in this application as well.

 

In that app I had to intercet the GPS feed to some third party mapping and navigation software (The Cap'n) to do my math while letting the Cap'n do its thing.

 

And before you start thinking "That looks like a fun project!" it was the low man on the totem pole that had to go out and run that software because you would get the "He3L beat out of you" while the craft wen through it manuvers.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(2,959 Views)

Well @ Ben, I am still gonna say, sounds like a fun project! And a perfect solution as well 🙂

 

I do the same thing. I have this commercial ECG software from GE which I use to communicate( through RS232 Serial port) to my LabVIEW application to control my device (an MR compatible Treadmill). I had to  make sure that I had 2 read and 2write lines each for the software and LV application to communicate back and forth.

I may not be perfect, but I'm all I got!
Message 9 of 9
(2,936 Views)