LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between Labview and Python

Hi all, currently working on vision aided P&P project. (Geometric matching) I have difficulties in sending the object image location to the robot through TCP/IP protocol. 

The robot is programmed in Python. It uses VIP+ language. 

May I know what's the communication method to communicate between them for object sorting purpose ? 

0 Kudos
Message 1 of 5
(1,980 Views)

@Jaycobian wrote:

Hi all, currently working on vision aided P&P project. (Geometric matching) I have difficulties in sending the object image location to the robot through TCP/IP protocol. 

The robot is programmed in Python. It uses VIP+ language. 

May I know what's the communication method to communicate between them for object sorting purpose ? 


I don't understand.  Isn't TCP/IP the method of communication?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(1,942 Views)

Yes. Using TCP/IP for the communication. 

How to bridge the labview and python through TCP/IP ? 

0 Kudos
Message 3 of 5
(1,896 Views)

If you're trying to use TCP in LabVIEW, the receiving tool has little to do with it (unless you mean you already have a Python library that uses TCP to communicate with a different Python library on the robot...).

 

You can use the TCP nodes in LabVIEW and then the difficulty is only appropriately creating the message bodies. For this, you need to know what messages your robot will receive and what it sends back for you to read with LabVIEW.


GCentral
0 Kudos
Message 4 of 5
(1,886 Views)

@Jaycobian wrote:


How to bridge the labview and python through TCP/IP ? 


This question indicates a fundamental lack of understanding of what TCP/IP does, and how you might go about communicating between machines. So, let me take a stab at an ELI5 here.

 

To explain what is going on, let us consider the standard mail carrier in the real world. Say I want to send a letter to NI. I would write my letter, pack it in an envelope, write NI's address, and put it in my mailbox. The mail carrier would then pick up my envelope and read the address. He would carry the envelope to the address listed and drop it off. Someone at NI would then open the envelope and read the contents.

 

In this case, TCP/IP is the mail carrier. You write your letter in LabVIEW (body), package it in a TCP/IP "envelope" (packet), and ship it off to Python. And, just like the mail carrier doesn't care if I'm sending a letter to NI or a letter to Microsoft... TCP/IP doesn't care what is on the other end of communication whether it is LabVIEW, Python, C++, or any other programming language.

 

Now then, what is it that matters about our fictional mail carrier's package?  Well, the letter contents itself is what matters. If I write a letter to NI in crayon that is just a child's drawing of me holding a PXIe chassis, they aren't going to ship me one.  NI is going to expect my letter to be formatted in such a way that it is clear I'm trying to order hardware from them.

 

Similarly, you will need to write the message to your Python client in a way that it can correctly interpret. That message will need to be formatted to give a command, request data, etc. And unfortunately the formatting of that message isn't something anyone here can help you with because it will depend entirely on the Python code running at the other end.

 

Now, if you wanted to post your entire Python library and hope someone is bored enough to dig through it and parse out command/response pairs you might get lucky. But that someone won't be me 🙂

Message 5 of 5
(1,871 Views)