09-02-2010 11:28 AM
( LabView Professional Development 2009 , version 9.0f3 32-bits, under window XP)
I use the XML-RPC Server /Client provided from
http://lavag.org/index.php?app=downloads&showfile=66, by Smith, Mark E
What I like to achieve in my motion control application is that the server has several methods:
1) portInit.vi
Setup serial port communication
(store the returned VISA Handle ID in a shared Variable called sharedVal.lvlib)
2) portClose.vi
close the serial port connection , using the shared Variable: VISA handle ID
3) moveHome.vi
move to initial axis home position , using the shared Variable: VISA handle ID
4) movAMove axis to some position, using the shared Variable: VISA handle ID
…
which a client can request
The server uses “launch Method.vi” to the requested method as seen in launchMethod.jpg
If I start the server inside LabView, everything is fine. A Client can call any method and the server runs OK.
However, if I build an executive file for the server as myServer.exe, and run it from window, calling firstly the portInit.vi ( see PortInit.jpg) method is fine. But subsequent method calls, such as portClose.vi (see portClose.jpg ) will fail. The error message is that the method call ( ie. portClose.vi ) is not idle. In the LaunchMethod.vi, it is Exec.State not Idle, see notIdleError.jpg. the portClose.vi is certainly not running I am sure. other methods work ok if they are not using the shared variable.
Can someone give me some suggestion as why running the server is Ok inside LabView, but not Ok when it is executed alone?
Can not I use the shared Variable here? If not, any way around? is there something need to be done in Build specifications?
I also tried queue methods, it seemed worse, I can not even pass the portInit.vi.
it returns:
Error -1073807246 occurred at Old VISA Open in serial port init.v,
Possible reason(s):
VISA: (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it
all JPG files and serial port init.vi and serial port close.vi are inside the tmp.zip
many thanks for your help
xiaofeng