LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to work in diferents sequences...

Solved!
Go to solution

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!!

0 Kudos
Message 1 of 71
(2,950 Views)

nadie, nada¿¿

0 Kudos
Message 2 of 71
(2,931 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 3 of 71
(2,908 Views)

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.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 4 of 71
(2,890 Views)

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!!

 

 

0 Kudos
Message 5 of 71
(2,880 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 71
(2,865 Views)

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??

0 Kudos
Message 7 of 71
(2,862 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 71
(2,856 Views)

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!

0 Kudos
Message 9 of 71
(2,853 Views)

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.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 10 of 71
(2,840 Views)