LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read and write using one DS_Open function?

I want to pass data back and forth between my applications. But when I open datasocket using DS_Open I can select only one..either read or write. I need read and write capabilities from both server and client. Is it possible? any other ideas or suggetions?
Thanks in advacne for your help.
I use labwindows/CVI 6.0.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 1 of 4
(2,923 Views)
Hello

You will need to open 2 connections using ds_open, one of read and one for write. You can read and write to the same item from the same program. In CVI 7 though, you can open a single read\write connection.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(2,923 Views)
Hi,

The best way to go here will be to set 2 DataSocket connections, one for writing and one for reading. It is a common proctice to have several DS connections operating in a single application.

There a bunch of examples installed with CVI, I don't think any of those implement 2 way communication, but is just a matter of creating another connection that reads or writes, regardles of whichone is the server or the client.

I hope this helps.

Regards,

Juan Carlos,
N.I.
0 Kudos
Message 3 of 4
(2,923 Views)
Thanks for your input. I do have one more suggestion.
I have more than one applications connected to one datasocket server(address). and when I broadcast data from application#1, apps#2 and apps#3 should receive data and send response based on data received.
What happens is,
apps#1 broadcasts data.
apps#2 receive data and broadcast response.
apps#3 DOES not receive broadcasted data from #1 but it gets data from apps#2(response).
How do I received all data on server? (Broadcasted data of #1 by apps#3 and not lose this data)

Once again thank you very much for your input.
Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 4 of 4
(2,923 Views)