LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket publish AND subscribe

I'm trying to let two computers both be able to control a control and be able to see the change. I got it to let one publish and one subscribe but wasn't able to let each computer publish AND subscribe to one control.

I typed in "dstp:///knob" for URL. Selected publish and subscribe. And ran the datasocket server on computer A. Then I typed in the same URL in computer B and selected publish and subscribe. Didn't work. Computer B has a red light next to its control.

Do I need to change anything in the datasocket server manager? do I need to run the datasocket server on computer B?

Thanks in advance.

Jaeho
0 Kudos
Message 1 of 3
(2,655 Views)
Jaeho,

What you are doing looks to be correct. You do not need to run the server on Computer B to get both of them to publish and subscribe to the same control.

One tip I can give is to use the "ipconfig" in the command prompt to make sure the IP address of the server is correct. Another way to address the URL for the server computer would be to enter "localhost" in place of the IP. If you are still getting a red light on computer B, you can hover the mouse over the light to see what the exact error is and post that.

Go ahead and try to change the URL values and see if that works. If that doesn't, another way to check the URL settings is to create a single vi on one computer with two controls that both publish and subscribe to each other. Hope that this
helps.

Regards,

Tyler Heikes
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,655 Views)
Hi,
Thanks a lot. However, the problem is persisting. As you have advised, I hovered the mouse over the red light in computer B's knob and error message popped up. It read, "Error: Not permitted to write data item".

I actually forgot to tell you a critical detail. With the same setup above, both computers have a green light on for few seconds(~4sec) and then the computer B will display a red light with the above message. Basically, computer B becomes a subscriber. Although I can turn the knob, the change does not reflect on computer A.

Also, I did try it on a single computer and it works fine.

Thank you very much.
0 Kudos
Message 3 of 3
(2,655 Views)