LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP Connection Loop

Solved!
Go to solution

Hi,

 

I am trying to come up with a loop like this:

 

Labview vi #1 -------> Python ----------> Labview vi #2

  (server)                    (client 1)                (client 2)

 

I am trying to do this in the same computer for now, although eventually python will have to be on a different computer. I have found an example regarding the first part (from server LV vi #1 to client Python). However I am very new to this and the communication between the clients (from python to LV vi #2) puzzles me. Is there a way to achieve this? what would you suggest?

 

Thanks!

0 Kudos
Message 1 of 4
(188 Views)
Solution
Accepted by topic author SueLong

@SueLong wrote:

Hi,

 

I am trying to come up with a loop like this:

 

Labview vi #1 -------> Python ----------> Labview vi #2

  (server)                    (client 1)                (client 2)

 

I am trying to do this in the same computer for now, although eventually python will have to be on a different computer. I have found an example regarding the first part (from server LV vi #1 to client Python). However I am very new to this and the communication between the clients (from python to LV vi #2) puzzles me. Is there a way to achieve this? what would you suggest?


The Python code needs to be both a client and a server.  The client side of Python is getting data from VI #1.  It then needs to pass the data to the server side of the Python code to pass it on to VI #2.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(169 Views)

Thank you very much for your time!

I will try to figure out how to make python client pass the info to the python server.

0 Kudos
Message 3 of 4
(149 Views)

Hi,
I have attached what I have come up with so far. I can't seem to get the Labview client to connect to the Python server. I am getting Error 63 that goes like: Possible reason(s):

LabVIEW: (Hex 0x3F) Serial port receive buffer overflow.
=========================
LabVIEW: (Hex 0x3F) The network connection was refused by the server.


Anyhow, what I hope to achieve is:
- Labview VI connects to Python through a socket
- Python displays "Connection from address has been established!" and sends "Welcome!" to Labview
- Labview displays "Welcome!" on the Labview front panel
- When the user clicks on "STOP" on the front panel of Labview, Labview sends a message to Python that says "STOP!" (and Python displays it)

Am I messing this up? Any help is greatly appreciated!

Download All
0 Kudos
Message 4 of 4
(89 Views)