01-12-2012 03:40 AM
hi!!
i am doing a program and i must comunicate two pcs, he pcs do the same work, send and receive information...
i am abale to send info in 10ms so i think that,
can i,..
pc1 send info in 10ms while the pc2 is reading info, after this 10 ms change and pc1 reads and de second one send inofrmation??
thats my question, i have done a litte example but doesnt work good...
i think i must use semaphores don't i??
a agregatte the example if someones want to watch it. thank you!!
Solved! Go to Solution.
01-12-2012 07:23 AM
nadie, nada¿¿
01-12-2012 03:33 PM
What are you trying to do? Communication between 2 pc's? Semaphores are only to handle critical areas within one program.
What usually happens is PC1 sends a message, PC2 waits until it gets a message, and then sends an acknowledgement. PC1 wait for ack. If there's a timeout or wrong acknowledge it sends again.
As such, a Send is actually a send and recieve, while at the same time a Recieve is a recieve and send.
If you're certain messages will work, or it's not very important you can just have send/recieve loops without the acknowledge part.
/Y
01-12-2012 08:16 PM
What communications protocol are you using TCP, UDP, etc? Or are you asking how to exchange (handshake) the data transfer? Sorry, I was a bit confused by your post.
01-13-2012 12:37 AM
sorry!
hi again!
what i am trying to do a program that connect 2 pcs.
then, every 32sec(minimum) i must send information from the pc1 to the pc2.
so, in the second 0 one data is send, 32ms later another data, 32ms later another data...
but i can send this data onlyu in 10 msecs, so i can send(10ms) , and then wait for 22ms(10ms+22ms=32ms)
so my idea is to do a programm like this:
PC1: from sec 0--> 10ms, send information to PC2
from 10ms--> 20ms, read information from the PC2
from 20ms-->32ms, wait the start again doing this buckle
PC2: from sec 0--> 10ms, read information from the PC1
from 10ms--> 20ms, send information TO PC1
from 20ms-->32ms, wait the start again doing this buckle
I THINK YOU WILL INDERSTAND..IF YOU DON'T TELL ME AND I WILL TRY TO EXPLAIN IT BETTER...
MY QUESTION IS WHAT CAN I USE OR DO TO DO A PROGRAMM LIKE THIS???
THANK YOU!!
01-13-2012 04:07 AM
Under LabVIEW examples you have Data communication/TCP and Data Server and Data Client, i think they'll be a good start and possibly most of the solution. 🙂
/Y
01-13-2012 04:11 AM
i have done the programm using datasockets...i must change , i have seen the examples but with this...i think i don't solution my cuestion..what do you think??
01-13-2012 04:27 AM
Datasocket should be equivalent (we'll see if Ben and Altenbach thinks differently ;)) i get the feeling datasockets are aimed at/for files as ftp, http and such.
The example should give you knowledge on how to communicate between 2 PCs, which seems to be the initial problem.
/Y
01-13-2012 04:32 AM
i don't understand you when you said that the first is to comunicate the 2pcs,
firstly i must said that i comunicate only the problem is that i don't respet the times, by the way i have written on the top of this forum...
only i want to correct my time of working...
sorry my english is not good as your english...SORRY!
01-13-2012 07:26 AM
You can communcate between the two PCs relatively easy using the TCP palette functions. Have you tried this? What do you have so far and can you post it? Refer to LV help for their use.