Publishing and Subscribing to DataSocket Items from Multiple Clients in LabVIEW
Primary Software: Other NI Software>>DataSocket
Primary Software Version: N/A
Primary Software Fixed Version: N/A
Secondary Software: LabVIEW Development Systems
Problem: How can I publish and subscribe to a DataSocket item in LabVIEW from multiple clients?
Solution: The DataSocket settings must allow multiple clients to both read and write. Complete the following steps to set the proper permissions.
- Open the DataSocket Server Manager and ensure that the intended hosts have permissions to both read and write.
- Select Predefined Data Items and click the New Item button. Place a checkmark in the Allow Multiple Writers checkbox so multiple clients can write to that item. Save the settings by pressing <Ctrl-S> or selecting Settings » Save Settings Now from the pulldown menu.
- If the DataSocket Server is open, restart it by displaying the DataSocket Server window and selecting Server » Shutdown DataSocket Server from the pulldown menu. When you open the DataSocket Server again, the new settings will be applied.
- In your VIs, set the DataSocket-enabled front panel object to publish and subscribe so they can both read and write to the predefined DataSocket item. To do so, right-click the object and select Data Operations » DataSocket Connection from the shortcut menu. Refer to the LabVIEW Help for more information about binding front panel objects to DataSocket items.
Related Links: KnowledgeBase 23TE72WZ: DataSocket Connection in LabVIEW Fails with "Error: Can't connect to data item, another write connection already exists" KnowledgeBase DIRECT-45GP8Z: Can Multiple DataSocket Writers Connect to the Same Item? NI Developer Zone Tutorial: Configuring a Datasocket Server
Attachments:
Report Date: 07/10/2001
Last Updated: 07/19/2007
Document ID: 2B98T655