LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket transfer and receive in one time

Dear all:

I don't know how to use datasocket in two-way at the same application.
because i just can transfer data to another computer(application) but can't received from this at the same time(application) .
I want to use two-way,  in one application can write and read data to/from another application use datasocket.
Please tell me how to do that, have any example or good suggestion?
0 Kudos
Message 1 of 5
(3,602 Views)
Howdy pigjer,

I am not exactly sure what you mean by "two-way" unless you are just describing having both a datasocket reader and writer in the same project or maybe the same source code file. Either way, I don't believe we have any examples that show that directly but we do have plenty of DataSocket examples that demonstrate the reader and writer functionality. You could then just take our examples and combine them to your liking.

The best section of examples in CVI is with the Example Finder (Help >> Example Finder). Inside this utility, select the Search tab and type "Datasocket". Here you will find a large amount of examples that you can play with. 

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 5
(3,590 Views)
Hello Johnathan N:

Thank for your reply, I mean that's how can i use (A application) write data to (B application), and (B application) also can write/feedback data to (A application), so (A and B application) both can write and read at the same time. Please tell me have the way how to do, because i tried every example about DataSockets already, thanksSmiley Happy
0 Kudos
Message 3 of 5
(3,572 Views)

Howdy pigjer,

You can set up your datasocket server to have multiple writers. See the KB Publishing and Subscribing to DataSocket Items from Multiple Clients in LabVIEW. It talks about setting up the server to allow this option. Then in CVI, when you use the DS_Open() function, you can set the access mode to both read and write.  That function has a parameter called
Access Mode.

Hope this helps!

Best Regards,

 
Jonathan N.
National Instruments
0 Kudos
Message 4 of 5
(3,554 Views)
Hello Johnathan N:

Thank for your help, yesterday i tried it again, and i success already.Smiley Happy
0 Kudos
Message 5 of 5
(3,540 Views)