LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple write operation on datasocket possible?

I am using datasocket to communicate between to applications, the first application writes a command on the datasocket url and the second application reads this command and after interpreting it writes some parameters on the same url, but i am having problems with this type of arcitecture. some times the commands are not read by the second application. I also wanted to know if after writing the command if i do a read operation on the same url then will the command be lost for the second application?
0 Kudos
Message 1 of 4
(2,752 Views)
Hi Arun,

You should be able to read and write from two separate loops or VIs using the DataSocket functions. However, I would suggest using two separate data items for the cross communication between the loops/VIs. In that case you wouldn't have to take into account that you might be reading the string that you just wrote from the same loop/VI.

It will be helpful it you could post the VI that gives you the trouble, thanks.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 4
(2,739 Views)
Hi Philip

Thanx a lot for your answer. i have created 2 diffrent items now and read write takes place on seperate items. But now i have another problem, i.e if i convert the vi's to application, the server is not able to read what is written on the url. i have attached the vi's along wid this mail, kindly change the url accordingly, before converting them to application and running.

thanx for your answer

Arun

type of command can be changed from 0 to 2
for 0 server answers as OK
for 1 server currently does not reply
for 2 server answers as OK

but if it is converted to application server does not the receive the commands.
0 Kudos
Message 3 of 4
(2,730 Views)
Hi Arun,

I have fixed your data server by removing the "Datasocket Open" functions outside the loop. Please try the attached "dtsokserver2.vi" and tell me what you think.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(2,720 Views)