Calling ASCOM ICameraV3.StartExposure Method throw exception

44 views
Skip to first unread message

tsat...@gmail.com

unread,
Feb 12, 2024, 10:53:29 AMFeb 12
to Java Native Access
Hi ,

I am Calling ASCOM  ICameraV3.StartExposure Method  example  :
AscomDriver extends COMLateBindingObject ......

public void invokeAscom(String methodName , Variant.VARIANT param1, Variant.VARIANT param2) {

try {

this.invoke(methodName, param1, param2);

}catch(COMInvokeException ex) { ex.printStackTrace(); }

} double expoTime = 5.0d; boolean light = true ;

ascomDriver.invokeAscom("StartExposure" , new VARIANT(expoTime) , new VARIANT(light) ;

throw this exception : 

com.sun.jna.platform.win32.COM.COMInvokeException: Exception occurred.(HRESULT: 80020009)

Source: ASCOM.OmegonPro

Description: External component has thrown an exception.

at com.sun.jna.platform.win32.COM.COMUtils.checkRC(COMUtils.java:187)

at com.sun.jna.platform.win32.COM.COMBindingBaseObject.oleMethod(COMBindingBaseObject.java:421)

at com.sun.jna.platform.win32.COM.COMBindingBaseObject.oleMethod(COMBindingBaseObject.java:191)

at com.sun.jna.platform.win32.COM.COMLateBindingObject.invoke(COMLateBindingObject.java:281)

at com.sun.jna.platform.win32.COM.COMLateBindingObject.invoke(COMLateBindingObject.java:298)

at server.AscomDriver.invokeAscom(AscomDriver.java:113)

at server.AscomCcdCamera$1.run(AscomCcdCamera.java:353)

Matthias Bläsing

unread,
Feb 12, 2024, 12:08:52 PMFeb 12
to jna-...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Java Native Access" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jna-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jna-users/6636f98e-91f9-4965-960f-7ee343521910n%40googlegroups.com.

tsat...@gmail.com

unread,
Feb 12, 2024, 2:26:49 PMFeb 12
to Java Native Access
Hi ,
thanks for the answer I pass double value as first parameter and boolean as second parameter as stated in the ASCOM Platform for the the StartExposure method  both parameters in VARIANT ??  I checked both parameters VARIANT objects and they have correct values 1 parameter as double and 2 parameter as boolean ??

Best Regards

Matthias Bläsing

unread,
Feb 12, 2024, 2:29:37 PMFeb 12
to jna-...@googlegroups.com
Hi,

I mean, that your device might

a) not be connected (NotConnectedException)
b) true for light or 5.0d for expoTime is not supported for your device (InvalidValueException)
c) Another problem occurs (DriverException)

Greetings

Matthias
Message has been deleted

tsat...@gmail.com

unread,
Feb 12, 2024, 2:45:46 PMFeb 12
to Java Native Access
Hi  Matthias ,

true for light or 5.0d for expoTime are just an example to illustrate the issue , the camera is connected and checked and its proprieties are read correctly using JNA   , the program is far more complex than that , the problem  there is no clear exception indicate the real cause , is there any way to catch the exception from ASCOM driver from JNA ??



Best Regards

tsat...@gmail.com

unread,
Feb 13, 2024, 4:03:38 AMFeb 13
to Java Native Access
Hi  Matthias,

after analyzing and testing the issue it turn out to be a driver issue and not JNA  , thanks foe efforts.



Best Regards
Reply all
Reply to author
Forward
0 new messages