LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp/ip bidirectional communication between Labview and Robotstudio

Hello Friends,

 

I am new to the Labview, i need help to interage my labview vi inside the TCP Communicator - passive.vi you can find this vi inside the example Networking->Tcp & Udp->TCP communicator passive.vi.

 

I have genereated one more vi which you can find in attachment send_x_y.vi  Here i am generating a string from 2D array and i want to pass that string when i receive a message from robot studio that "send data" than and only than i want to send the data automatically and when again robot studio send a string "send data" than only than sedond data send . That means i want to wait unitl i got reply from the robot studio.

 

I am able to send the data one by one but i wan to make a loop that whenever i receive the string form robot studio "send data" than and only than i wan to send the data.

 

Here is the screen shot of my send_x_y.vi.

send x y.jpg

 

 

screen shot of TCP Passive.vi

 

TCP Passive.jpg

 

Thank you in advance for any help you can provide.

 

 



Download All
0 Kudos
Message 1 of 3
(5,546 Views)

First, you want to read the TCP Port until "send data" appears. Next, you want to send your String and finally you want to repeat until the stop button is hit. I've edited the example VI to fit this structure (see attached VI).

 

The trick is to make your send loop wait to run until the receive loop has detected the desired string; this is accomplished by passing the TCP reference from the receive loop to the send loop. Also, I added a while loop over everything inside the error case structure to give you a continuous program.

 

You still have work to do before this VI will work for you; however, this is the structure you've asked for. Hope this helps, good luck!

 

 

edited BD.JPG

 

 

------

Matt Kirk

Inventor of ImageJVI

Message 2 of 3
(5,524 Views)

Hello MKirk

 

I appreciate your effort for helping me with this issue.


In Labview there is two example on Networking  which you can find under the example Networking->Tcp & Udp->TCP communicator passive.vi. and TCP communicator active.vi

 

from Tcp communicatro active.vi send string "Send Data" than TCP communicator passive.vi receive that string and than i want to send the string from an 2D array only first row from that array for ex:- x120y420" to Tcp Communicator active.vi after that tcp passive wait until it recive another string "Send Data" and than only tcp passive send 2nd row of array...

 

I am able to convert 2d array to string which i have attached earlier in this post. but now the question is how can i integrate that in Tcp communicator passive.vi

with condition which i have explain in above paragraph.

 

give me some suggestion where i can insert my arrary to string code inside Tcp Communicator passive.vi

 

PLz help me with this issure..i am struggling from last week.

 

I hope you understand what i need....

 

 

 


0 Kudos
Message 3 of 3
(5,504 Views)