## iOptron Minitower - Error connecting to ASCOM mount. Object required.

A place to report problems and bugs in SharpCap
Forum rules

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
howardgrams
Posts: 20
Joined: Thu Aug 17, 2017 7:59 pm

### iOptron Minitower - Error connecting to ASCOM mount. Object required.

Trying to use Sharpcap 3.0.4002 with an iOptron Minitower mount using iOptron ASCOM driver 2.1. Two different planetarium programs (Project Pluto Guide 9 and Cartes du Ciel 4.0-3575) can connect to the mount and drive it at the same time using the ASCOM Generic Hub driver ahead of the iOptron driver. But when I try to add Sharpcap to the mix, it pops up a messagebox saying "Error connecting to ASCOM mount. Object required. (I have also tried connecting Sharpcap directly to the mount without the use of Generic Hub and it fails in the same way.)

The camera is a ZWO ASI224MC, computer is a HP laptop running Windows 10 64-bit Version 1703 Build 10563.540. Same problem occurs on an Asus netbook running Windows 10 32-bit.

A Sharpcap log is attached. The pertinent lines seem to be around the following:

Connected to a scope driver with the following information:
iOptron Telescope ASCOM Driver 2.1 Copyright (c) 2007-2011, iOptron Telescope, 2.1
Debug: 11:08:50.8945627 Thread:#1 SharpCap.Cameras.NewDirectShow.FrameRatePropertyControl.PopulateValueList() :: Started
Debug: 11:08:50.8955630 Thread:#1 SharpCap.Cameras.NewDirectShow.FrameRatePropertyControl.PopulateValueList() :: Ended
Debug: 11:08:50.9557123 Thread:#1 SharpCap.Models.Camera.<ImplOnOnCaptureEvent>b__16_0() :: Status update after capture complete.
Info: 11:08:50.9557123 Thread:#1 SharpCap.Base.CaptureProviderBase1.StartPreview() :: Ended
Error: 11:08:51.1008341 Thread:#1 SharpCap.Base.Utilities.Logger.Error(Exception e, String action, String additionalInfo, Boolean stackTrace) :: Exception from Calling IDispatch method : AxisRates : Exception has been thrown by the target of an invocation.
Stack Trace: at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at SharpCap.MountProxy.ASCOM.ProxyBase.CallMethodT[T](String name, Object[] oParams) in C:\Documents\Source Code\SharpCap3.0\src\SharpCap.MountProxy.ASCOM\MountDispatchProxy.cs:line 75
Error: 11:08:51.1018687 Thread:#1 SharpCap.Base.Utilities.Logger.Error(Exception e, String action, String additionalInfo, Boolean stackTrace) :: Inner Exception : System.Runtime.InteropServices.COMException (0x800A01A8): Object required
Error: 11:08:51.1018687 Thread:#1 SharpCap.Base.Utilities.Logger.Error(Exception e, String action, String additionalInfo, Boolean stackTrace) :: Exception from Couldn't get slew rates via IEnumerable : Object required
Attachments
Sharpcap Log_2017-08-17T11_08_16-11568.log
Posts: 5486
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Hi,

I believe that I have a fix for this problem already in the alpha build of SharpCap 3.1, but I have no iOptron mount myself to test with. If you are interested in testing this potential fix and future changes if the current fix is not quite right then please let me know and I will add you to the alpha testers group.

thanks,

Robin
howardgrams
Posts: 20
Joined: Thu Aug 17, 2017 7:59 pm

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Hello Robin,

Sure, I'd be happy to test it and let you know.

Regards,
Howard
Posts: 5486
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Have a look at the forum list and you will now see the Alpha testers forum - you'll find the download link for the 3.1 alpha in that forum.

cheers,

Robin
howardgrams
Posts: 20
Joined: Thu Aug 17, 2017 7:59 pm

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Hi Robin,

I'm sorry to report that the newly written ASCOM 6.3 code in Sharpcap 3.1.4205 still has a problem with the iOptron Minitower. It now posts a messagebox saying "Error connecting to ASCOM mount: Exception has been thrown by the target of an invocation." The log file is attached.

Regards,
Howard
Attachments
Sharpcap Log_2017-08-18T18_48_39-7536.log
Posts: 5486
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Ok, thanks for the update - same problem again basically that I can't persuade the mount to give me the list of rates that it can slew at. I will have to look at this again.

cheers,

Robin
Posts: 5486
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Ok, so a deeper look makes it clear that the iOptron driver is not co-operating with the request SharpCap makes to get the possible axis rates back. Please could you run the ASCOM conformance check on your driver as described here:

viewtopic.php?f=5&t=170&p=722&hilit=conformance#p722

and post the result.

If that shows problems with getting the possible axis rates then it points to a bug in the iOptron driver, otherwise it's back to head scratching time but with maybe a little more information.

thanks,

Robin
howardgrams
Posts: 20
Joined: Thu Aug 17, 2017 7:59 pm

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Hi Robin,

Attached is the result of running the conformance test on my Asus netbook 32bit Win 10 system.

I was unable to run the conformance test on my HP laptop 64bit Win 10 system. When I'd go to select the telescope, it would pop up a messagebox saying "ASCOM telescope chooser. Incompatible driver (iOptron.Telescope) This 32 bit driver won't work in a 64 bit application even though it is correctly registered as a 32 bit COM driver. Please contact the drive's author and request an updated driver."

I suppose the reason that Guide and Cartes du Ciel are happy with the iOptron driver is that they are 32 bit applications (as is Sharpcap apparently), so this in itself should not be an issue.

Regards,
Howard
Attachments
conform32.txt
Posts: 5486
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Ah, thank you!

Here's the offending portion of the conform log

Code: Select all

13:48:15.750 AxisRate:Primary                  ERROR    Driver returned a null reference instead of an AxisRates object for axis axisPrimary
13:48:15.780 AxisRate:Secondary                ERROR    Driver returned a null reference instead of an AxisRates object for axis axisSecondary
13:48:15.806 AxisRate:Tertiary                 ERROR    Driver returned a null reference instead of an AxisRates object for axis axisTertiary
`
This is what is tripping SharpCap up - the driver is not properly responding to these requests and the current version of SharpCap unfortunately chokes on that. I have made a change that will be in the next release of 3.1 that will allow you to get past this point and plate solve, but you wont be able to use the mount controls to move the mount because it does not support the MoveAxis command.

You may want to also get in touch with iOptron as they should really be fixing their ASCOM driver so that it gives no errors in the ASCOM conformance test!

cheers,

Robin
howardgrams
Posts: 20
Joined: Thu Aug 17, 2017 7:59 pm

### Re: iOptron Minitower - Error connecting to ASCOM mount. Object required.

Hi Robin,

But since the mount has reported that it can't move any of the axes:

13:48:13.556 CanMoveAxis:Primary OK CanMoveAxis:Primary False
13:48:13.610 CanMoveAxis:Secondary OK CanMoveAxis:Secondary False
13:48:13.674 CanMoveAxis:Tertiary OK CanMoveAxis:Tertiary False

shouldn't you take that to mean than you should not expect to query any of the three axis rates?
Regards,
Howard