LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

when i enter the 2nd data it replaces the 1st one


@achfire wrote:

i was wondering if i will use a lot of clients(for example 2) do i have to use 2 sources not 1 in the Vi.

now i have in source1:dstp://localhost/emetteur1

                         source2:dstp://localhost/emetteur2

instead of having 1 source used for all clients:dstp://localhost/emetteur.

i'm really confused

NEW.png

and for sending continuously,i have to do it,because each client will not send data just 1 time.i think i missed something in the vi you gave me.what i'm expecting to have is when a client enter"nom- prenom-n candidat" in "emetteur.vi" i"ll see them in a table 1 time in 'recepteur.vi" and when a client enter "nom- prenom-n candidat" in "emetteur1.vi" i'll see them in the 2nd row of the table in "recepteur.vi" and so on.a lof of clients and one receiver without repeating data in reception


Well, if the sender constantly sends the same data over and over, you are loading the network with useless redundant information.  If you only have control over the receiver, you should check if the received cluster is ther same and the previously received cluster, and discard it unless the data has changed. same if a DS timeout occurs.

 

If you want to run two different receivers in parallel (as you apparently attempted in the image above), you should place each in a seperate while loop. Use a queue where you place the received data if it is different. Tag it with the prespective receiver. In a third loop (consumer loop!), dequeue the elements and place them in the table row according to the tag . You really should not place a 50ms wait in these loops. if the data arrives faster, you get buffering issues. If the data arrives slower, you hit the datasocket timeout, which should also skip the data parsing.

 

Placing them in the same loop will get you into problems. For example if one sender goes down, the other one is only read once per second because the other one needs to timeout for the loop to go to the next iteration.

 

I have not looked at your new code. Why are you doing these unintuituve boolean gymnastics? Use "stop if true" for the loop condition and things are much clearer (look at my earlier code).

 

Why aren't your type clusters diagram constants?

0 Kudos
Message 11 of 13
(387 Views)

i'm not sure if i really get your explication.i changed my vi according to what you tell me in "new recepteur.vi" i zip it in attachement

 

by the way i made some change in the vi you gave me to get the one below but what's the thing that i have to remove to avoid getting the same data repeated.i put the new one in attachement if by chance you need to say it15.png

Download All
0 Kudos
Message 12 of 13
(369 Views)
0 Kudos
Message 13 of 13
(338 Views)