LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

client server..How do I do so that the client takes the control of the system?

How do I do so that the client takes the control of the system?I want to realize both a server that to forehead of the applications it furnishes some data to the clients however also of the clients that actively act on the program and the server saves the changes.

In the examples I don't find anything

0 Kudos
Message 1 of 16
(3,502 Views)

Hey there examples like shared variable and tcp communication Active-Passive in example finder.

 

Client-Server Model is possible with shared variables..

 

Post back for any queries..

 

Thanks

Prashh 

0 Kudos
Message 2 of 16
(3,488 Views)
I have not found anything of tcp communication active/passive.I have not understood as I can use a shared variable so that a client can give a command to the server (for example to dowload a file)
0 Kudos
Message 3 of 16
(3,467 Views)

Hey, For TCP communication, search for TCP in example finder, then u can find TCP communicator- Active and TCP communicator-Passive

 

        For shared variable, search for shared in example finder, then u can find shared variable client-server.lvproj

 

 

 

--> For ur client to download a file from server, U can put control in client VI, when this command is given to the server through shared variable, Server VI can send an html link to client VI through another shared variable. Now, this link will be displayed in an indicator in client VI. The user can copy the link and paste it in browser to download a file.

 

I will try to send this example 

 

Thanks

Prashh 

0 Kudos
Message 4 of 16
(3,456 Views)

Fantastic. I can directly send the file through TCP..I have seen the example server.vi.

 

But the communicator furnishes an answer to what the server it gives to the client. Can I do so that the client has the visualization as does it ask for it?In practice I would want the client to visualize data modifying some parameters. Can I do this?

0 Kudos
Message 5 of 16
(3,451 Views)

I have tried to see the example server.vi, but I could not find it. 

Where is it... in example finder. 

0 Kudos
Message 6 of 16
(3,439 Views)

As per my knowledge, we can not send a file directly through TCP... 

 

If u find any example which does this task, just let me know... 

 

 

Thanks

Prashh 

Message 7 of 16
(3,438 Views)

oh yes of course...http://zone.ni.com/devzone/cda/epd/p/id/2842

 

 

My problem is as I do to furnish to the pc1(server) from the pc2(client) the instant in which to furnish me the file. I could use a control (a button for example) which once pushed it gives the consent to the transfer of the file...but as I do to do so that the pc1 starts the transfer if I crush the button on the pc2? Besides I would want to do so that the client you visualize the data furnished by the tools to the server (for example about the numerical values) and that at the same time however me from client therefore from pc2 (then from distance pc) such data are visualized even changing a parameter (for example the time of acquisition). 

 

How can I do it? 

I hope to be explains me 

0 Kudos
Message 8 of 16
(3,427 Views)

You could create a simple messaging protocol over a TCP connection to accomplish what you need. Alternatively uou could use network queues. Either way you need to define some form of messaging so that each end of the connection knows what is happening. The queues are nice in that they naturally provide synchronization for your application. If you need bi-directional communication then both your server and your client would need to have a message queue. If you use straight TCP both your client and your server could be listening on their end of teh connection (once it has been established) but as I mentioned you will need some form of messaging protocol so that the client and server know what data they are receiving and what they will need to do with it. While you can simply dump the file over the connection it is generally helpful to let the receive know how many bytes of data they should expect to receive. This is where a simple messaging protocol is useful.

 

The protocol can be as basic as a fixed length message ID, followed by a fixed length data length and followed by the data when the data length is greater than 0.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 16
(3,421 Views)
My god...it's very difficult for me..I see network queue Smiley Sad
0 Kudos
Message 10 of 16
(3,417 Views)