LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

closing datasocket

Hi,
how can I close the datasocket server automatically. I could open it from Labview but the "close"-method isn't working.
0 Kudos
Message 1 of 5
(3,116 Views)
Hi,

can you explain in more details what you are doing?

Normally you start the data socket server through the progams>>National Instruments>>DataSocket>>Data Socket Server link or something in the autostart. You stop the Server via its menu or during system shutdown.

You can programmatically start the DS server using the SystemExec.vi.

The open and close functions from the "Communication>>DataSocket" palette will neither start or stop the DS Server. They will handle connections to DataItems. Do you have problems with one of that functions?

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
Message 2 of 5
(3,116 Views)
Hi,
Thanks for your help. I just found the error. When the input has an error comming in then the command won't be executed. Seems quite odd to me but I checked with a "no error" input on the "close"-command and then the DS Server was closed properly.
0 Kudos
Message 3 of 5
(3,116 Views)
This is a common behaviour to all the LV functions and VIs. If you chain the functions and VIs with the error in/error out mechanism and an error occurs elsewhere the subsequent functions/VIs will not execute. This is true even for "close" functions. That makes sense if you structure your code as in the attached block diagram picture. Here it is demonstrated with the File functions. The upper part is for the case the "open" function does not succeed and therefore the "close" should do nothing. The lower part is for the case you can "open" but during using the resource something goes wrong. Then "close" needs an "no error" and the correct resource reference.

Waldemar.
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 4 of 5
(3,116 Views)
Thanks for your precious help-

Yves
0 Kudos
Message 5 of 5
(3,116 Views)