LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Communication with Python

Solved!
Go to solution

Hi,

I am trying to communicate with Labview using python. I based my code off of the code given here. https://forums.ni.com/t5/Example-Program-Drafts/Python-LabVIEW-TCP-IP-socket-communication/ta-p/3537...

I am currently having troubles with receiving the data. The line I get from the first call is much shorter than expected. It appears that the data is received with the second call. By the third line it seems that this is mostly resolved, except for a few extra data points that appear here and there. These points only appear from one module, so I am thinking that it has to do that the module isnt properly set up with its sensors yet. I was wondering if you guys thought that this was a software or hardware issue. If it is a software how should I fix it?

Sorry if this is the wrong place for this question. If it is please tell me so that I can place it in the correct forum. I think this is saved as Labveiw 2017.

 Also I am sorry if something is unclear, please ask so that I can try to make it more clear for everyone

0 Kudos
Message 1 of 4
(4,536 Views)

Hi,

 

If this issue is only happening with one module then it is a hardware issue. Feel free to move this to a forum for the hardware you are currently using. 

Thank you,

Angie Cisneros

0 Kudos
Message 2 of 4
(4,453 Views)
Solution
Accepted by topic author n12iki

I added a time.sleep() after creating the socket, which has solved the problem. It seems that the socket needed more time to create the connection, which is what I am guessing caused the problem.

0 Kudos
Message 3 of 4
(4,448 Views)

I'm glad you were able to find a solution to your problem! If you have any more questions just let us know.

 

Angie Cisneros

0 Kudos
Message 4 of 4
(4,437 Views)