Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket: Multiple writers. Can't get it to work!

I made a datasocket ActiveX WEB component in VB which allow users to control data in a VI. But if more than one computer tries to connect, I got status error "Error: Can't connect to data item, another write connection exists."

I have configure DataSocket ServerManger, Default Reader, Default Writer, Creators and SampleGroup as "everyhost" and Predefine Data: Items, SampleNum, SampleString, SampleBool with read and write access: SampleGroup and Allow Multible Writers.

What are I doing wrong?

Sometimes I do not get the errormessage but there is still just one user who can control.

I must admit I don't understand fully the DataSocket ServerManger configure part and there is not much help
to find at NI or Datasocket sites. (It is propably to simple) What are f.x. "Predefined Data Item" Is it the name of my DataSocketReader/Writer in the VI or the name of my datasocket in the VB code?
0 Kudos
Message 1 of 3
(4,233 Views)
Multiple writers can connect to the same DataSocket item, but not by default.

When you create a connection to an item named "test" that is not predefined, it will allow Default Readers to read and only one Default Writer to write. This is because "test" was not listed in the predefined data items (from the DataSocket Server Manager) and follows the default case.

In order to allow multiple writers on a DataSocket item, you need to predefine the item in the DataSocket Server Manager. So in the above case:
1)Create a new item in the Predefined Data Items and name it "test"
2)Set the read and write access parameters
3)Check the allow multiple writer box

You can now have multiple writers on the "test" item. Note that all of the predefined data items can have di
fferent settings.

There is also a KnowledgeBase article discussing this at:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/a8ac9a751404bab18625672400630a3d?OpenDocument
Message 2 of 3
(4,233 Views)
Hi
I've made a chat utility that every one uses it to write to cluster (consisting of his name & the message)to the following socket dstp://servername/PUBLIC
The same application reads this socket & shows the incoming public messages.
When I run the application on 2 computers the first person can send his/her message to the public socket & the other computer shows the message.But after that, the other computer can't write to the socket giving the error "Multiple DataSocket writers are not allowed"
this is besides the fact that I've made a new item & checked allow multile writers box & setting all the permissions to everyhost.

Can multiple users from different workstations read & write from one datasocket?
Thanks for your attention in advance
0 Kudos
Message 3 of 3
(4,233 Views)