Example Code

Python LabVIEW TCP/IP socket communication

Code and Documents

Attachment

 

Short example how to build LabVIEW and Python clients and servers.

 

LabVIEW server + Python client = control LabVIEW from Python

LabVIEW client + Python server = control Python from LabVIEW

 

Hope this is useful for someone. Have fun!

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
SoheylV
Member
Member
on

Thank you very much for useful video and files. Could you please include the missing typedefs for the TCP Multiple Connections - Server.vi to make it more complete?

PrimaryKey
Active Participant
Active Participant
on

I could include the typedefs but you can just disconnect them. I think that is faster and the code works the same. Sorry for not disconnecting them before puting them herehere.

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect
AudreyZalar
Member
Member
on

Where is the .ctl of the TCP Multiple Connections - Server?? The arrow button is broken, I can't run it. Please do help. Thank you in advance

PrimaryKey
Active Participant
Active Participant
on

Fixed the CTL problem

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect
n12iki
Member
Member
on

Hi

I really enjoy using your program. I am getting a huge string before the data I need that looks like this \t\u0000\u0000\u0000\t\u0000\u0000\u0000\t. This is when I write it to a file. I am using the python client and labview server. I was wondering if you had an idea of how to remove this. I have tried .replace() in python but it didnt work. Thanks for putting this code up it helped out a lot

curosman
Member
Member
on

Check this simple...socket programming in python

http://net-informations.com