David's Astronomy Pages
Notes - Session 605 (2017-11-17)

2017-11-17
Bullet Session Aims & Highlights
Bullet Start-up and Operational Issues
Bullet PHD2 Guiding
Bullet Autoguided Imaging
 
2017-11-19 (Post Session)
Bullet CCDSoft 5 Re-Install
 
2017-11-23 (Post Session)
Bullet SBIG Device Not Found
Bullet SBIG Driver Checker 64
Bullet SBIG Camera Error Codes
Bullet Sequence Generator Pro (SGP) & SBIG Camera
 
Bullet Visual Studio 2015 / 2017
Bullet JIT Debugging
Bullet Python Script Development (SharpCap Interface)
 
Bullet Images from 2017-11-17 >>

Session Aims & Highlights (S605)

Main aims of session were to test software updates on CCDApp2 control program that support dual scope/dual camera operation with autoguiding. The session utilised:

- 12" LX200 + ST-10XME for imaging
- TS 80mm APO + ZWO ASI178MC for guiding
- POTH Hub for multi-software access to the LX200 Mount.  
- PHD2 for Autoguiding using ZWO ASI178MC camera and the LX200 Mount
- CCDApp2, CCDSoft5 and TheSky6 for overall control of LX200 Scope and the main imaging camera (ST-10XME)
- VB2015 and VB2010 versions of the CCDApp2 observatory control program

Startup and operation was smoother than during the previous session (S605, 2017-11-14):

- LX200 was powered up and initialised (with GPS Fix) before attaching the APO GuideScope
- Focal length was set up beforehand in PHD2 ensuring that it used the correct Image Scale for the session
- A new (12") dew heater band was fitted to the LX200 scope and used to prevent dew formation.
- Several software enhancement have been added to CCDApp2 (my observatory control program) since the last session
  - enhanced name matching, enabling slewing to and imaging of certain targets with specific names in TheSky6,
    namely  M33 (M33 H IV 17) and Hickson 46 (Hickson: 46)
  - fully automated guiding, without requiring user to click to confirm before starting to image each target
  - continuous guiding on same guide star when performing back-to-back image sets on the same target object
- LX200 Scope was successfully parked at the end of session using POTH Hub under remote control.

Whilst the main aims of the session where achieved, imaging was badly affected by wind/seeing conditions and the observing session was consequently ended once it was evident that it would be impossible to get any good images.

Back to Top


Start-up and Operational Issues (S605)

On attempting to start up and operate the observatory a number of issues arose

- VB2015 version of CCDApp2 program crashed when attempting to analyse 3s Snap Image.
  Reason: Bug in new beta version of software. 
 (VB2010 version of the program was then used for the remainder of the session)

- Guidescope Images were initially out of focus, preventing PHD2 from finding a star suitable for guiding.
  This required an unplanned trip out to the observatory to refocus the guidescope
  Reason: Focus position on TS 80mm APO scope had altered since the last session, and the combination of this and poor seeing meant that there were no suitable stars visible in initial 1s & 2s images taken with ZWO ASI178MC camera. (Lessons: Check and adjust focus on guidescope at start of session and before moving indoors for remote monitoring & control.  Focus check/ adjustment is probably best done in SharpCap rather than in PHD2 as images can be zoomed or set to a smaller AOI.  Remember to remove focus knob cover for access to fine focus adjustment on the 80mm APO scope. Without doing so, meant that only coarse adjustements were initially being made).

 - Desktop Computer, used indoors for remote monitoring and control of the observatory, hung 2 times during the session
  This required a computer reboot & remote reconnection each time, loosing observing time in some cases.
  Reason: Unknown.  The problem, which might be either Hardware Drivers or Windows 10 related, is particularly frustating.

- Weather Station Data not replicating to the Observatory Laptop
  Reason: The dbase.csv file being written to by the VWS (Weather Station) application isn't being saved properly, meaning that new records are effectively invisible to the replication process. (Still looking at a solution for this problem. Textpad can see the newly added records so there must be a programming solution to the problem. In the meantime my Weather Replication program has been modified to prevent it from passing on old data records)

- Sliding roof difficult to move/slide
  Reason: continued warping and consequential spreading of observatory's roof sides moving wheel tracks to positions beyond the shed walls

Back to Top


PHD2 Guiding

Guiding again used the latest version of PHD2 (version 2.6.4, Sept 17th 2017). 

Guide Star selection and guiding was initially compromised by the GuideScope being out of focus.
Once this was fixed guiding was then compromised by wind shake/poor seeing

Following images show the impact of GuideScope focus on a potential guide star.

GuideScope Focusing
Initial out-of-focus position (left) to Final in-focus position (right)
(1 sec exposures, screen captures from PHD2, wind & poor seeing)
Image
  
  
PHD2 Guiding, 2017-11-17 01:46h
2s exposures, poor conditions (8mph wind & poor seeing).
RMS Scatter of 3.20" (9" peak), compared to only 1" (4" peak) in the previous session
Guide Star SNR and Star Mass is badly affected by the wind and poor seeing (see the large jiiter in white/yellow lines in history graph)
  Image
 
  
End Result of Guiding - M33 (Pinwheel Galaxy)
(whilst errors due to tracking and alignment are corrected, guiding is unable to keep up with the rapid
movements of the star due to poor seeing and the effect of wind buffeting the scope)
Image
CCD Image  (75% size)
4 x 120s exposure (average combine), 3x3 binning, C Filter 
2013-11-18 01:45hUT (#605014-19)
12" LX200R  (at f/10.4) + ST-10XME
(Autoguided using TS 80mm APO + ZWO ASI178MC)
   
PHD2 Guiding Results, 2017-11-17 01:38 to 01:52h
2s exposure, poor conditions (8mph wind & poor seeing).
Stats for main intervak of guiding show RMS Scatter of 3 arc sec
SNR peaks at around 15, but the wind/poor seeing result in multiple 'Star lost' events
(original image produced in Phd Log Viewer, http://adgsoftware.com/phd2utils/ )
  Image

Back to Top


Autoguided Imaging

The principal requirement of autoguiding is to keep the Imaging Scope /Camera fixed onto a specific target during imaging, to prevent star trails and non-circular stars that will impact image quality either directly or indirectly as the poorest images will have to be thrown away prior to stacking reducing the theoretical SNR.  Autoguiding through a sequence of frames will also help ensure that frames maintain near identical fields of view, which helps later frame stacking and provide a consistent presentation.

When doing automated guiding for each target CCDApp2 ('Automated PHD2 Guiding' checkbox) has the potential to automatically handle the schedule of target objects, commanding PHD2 to start guiding on a star upon arrival at each target and later on to stop guiding before slewing to the next target.

More work is required to QC and report the status of PHD2 Guiding.   The process relies on OpenPHD / Event Monitoring which I'm sti getting to grips with.

  Activate Guidescope Guiding
    Check Connection           Ok        Using PHD2 (ZWO ASI178MC)
    Start Looping ...          Ok        Exposure 2000 ms
    Select Guide Star ...      Ok        null
    Check App State ...        Ok        Looping
    Start Guiding ...          ?         Uncertain result (null)
    Review Guiding ...         Fail      1

Back to Top


CCDSoft Re-Install (2017-11-19)

For some time I lived with a problem where by clicking on a FITS file wouldn't open up in an existing CCDSoft 5 Window, but would try to open a new instance of the CCDSoft 5 program (I would always decline the action, because of a fear of the potential impact on CCDSoft Scripted Operation). Instead of clicking on a FITS file I would therefore drag and drop any FITS files onto my open CCDSoft window (or less easily, by navigating to the FITS files from within CCDSoft).

In trying again to examine why this would happen, I somehow corrupted the behaviour of CCDSoft / FIT files such that I could no longer drag and drop FIT files into CCDSoft and I would get an extra message "There was a problem sending the command to the program".

Unable to restore correct behaviour or and unable to operate my normal workflows in any practicable way I was finally left with no option other than to un-install CCDSoft 5 and begin reinstallation starting from original CDROM version.  Unfortunately this didn't make the problem go away.  

After multiple re-install attempts I next resorted to deleting every CCDSoft related Key in Windows Registry and clearing the entire CCDSoft Folder in Program Files (x86).    After Installing CCDSoft 5 again I was presented with message when starting the program up saying that CCDSoft had encountered an error and had to close.   This time I went with a 'Repair' rather than an Uninstall/Install Cycle.  This finally did the trick and it resolved both the drag/drop & send command problems and the original multi-instance issue. 

I then installed the various updates to CCDSoft including the critical versions 5.00.135 and 5.00.156.  Before a final installation of the  5.00.201 update.

During installation of the updates the following message would frequently appear:

"Self Registration Error - The following files did not self-register or unregister
C:\Program Files\Common Files\System\SBFocuser.dll
The operating system cannot run.  To continue, click OK; Otherwise, click Cancel

From previous installations I knew this error from previous iinstallation that this was related a LIBFLI.DLL Version Conflict.
(see http://www.bisque.com/sc/forums/t/2828.aspx).  

"An older version of the file LIBFLI.DLL causes this message error message. CCDSoft version 5.00.177 and later distributes the latest version of the Finger Lakes Instruments Device Drivers in the file named LIBFLI.DLL, and places this file into the C:\Program Files\System folder. Other software vendors distribute this file, and place it in various locations on your computer.

If an **older** copy of LIBFLI.DLL is located anywhere in the computer's PATH, then Windows will load the older version of this DLL, and CCDSoft will therefore not be able to attach to any supported focuser."

I already had a copy of libfli.dll with 2007 modification date held in reserve and used this to replace the 2002 version that was is installed with the initial CCDSoft installation/early update.  After installing updates up to 5.00.201 I notice that the final libfli file has a 2010 modification date, whilst the final SBFocuser.dll has a 2008 modification date.

Whilst CCDSoft 5 GUI was now operating ok, attempts to run my CCDApp2 control program to connect to the CCDSoft's camera object failed with 'Library Not Registered' error messages.   I've seen this problem before with CCDSoft 5/ TheSky6 and reinstalling and apply each update in turn has eventually worked.  I did that this time and it eventually worked (on about the third attempt). The trick seemed to be to run CCDSoft 5 once as Administrator   (presumably needed to register the CCDSoft libraries). 
(a similar issue/solution was noted before after a installing TPoint, see notes)

Next problem was that taking a simulated light frame from my CCDApp2 program caused it to fail when using using the 'Image.Keyword()' method. and other calls (This was with CCDSoft 5.00.142).  
   Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))

Eventually after installing the key update 5.00.156 and then bringing the program up to version 5.00.201 , the errors associated with the CCDSoft's Image object went away.


Final tasks included
- update SBIG drivers for my ST-10XME camera using SBIGDriverChecker64.
- check CCDSoft Preferences (to ensure it used TheSky6 astronomical software integration), (under File/Preferences)
- update CCDSoft File Defaults with observer and telescope details (under Camera(Control)/Setup/File Defaults)
- check parameters in Source Extraction Setup. (under Research/Analysis Folder of Images/PreAnalyse(Data Analysis) )
- create an Image Reduction group for reduction of Light Frames (under Image/Reduce/Reduction Group)
   - Darks :   ..\_Darks\Auto Masters\MasterDark.FIT
   - Flats :    ..\_Darks\Auto Masters\MasterFlat.FIT
- create a Flats Reduction group for reduction of Flat Frames
   - Darks :   ..\_Darks\Auto Masters\MasterDark.FIT
- update Filter Names for SBIG CFW-10 filter wheel (under Camera(Control)/Setup/Filter Wheel/Settings)
- copy third party camera drivers (AscomCCDSoft.dll & Starlight Xpress SXV Plug In.dll) into CCDSoft's "Camera Plug Ins" folder
    (C:\Program Files (x86)\Software Bisque\CCDSoft Version 5\Camera Plug Ins)

  

Latest News: (2017-11-23)
Whilst CCDSoft works with Camera Simulator and my CCDApp2 control program indoors during post installation testing, it gave a show stopping problem when trying to connect to my SBIG camera out in the Observatory when attemptong an observing session.

 
Image

 The problem persisted even after installing latest SBIG Driver Checker software, and downloading and installing the latest SBIG drivers.   Attempts to connect to the SBIG Camera from other applications also failed.    After trying various things the observing session was eventually cancelled for the night.

This 'SBIG Device Not Found' problem and eventual solution is discussed in section below.

Back to Top


SBIG Device Not Found/a> - problem and eventual solution

After re-installing CCDSoft including installation of SBIG drivers a showstopping problem arose when trying to connect to my SBIG ST-10 camera in the Observatory (2017-11-23), with CCDSoft giving the message  "SBIG Driver: Device not found. Error Code = 1027".  

In trying to find a log file reporting any further information about SBIG Device not found I came across a list of all CCDSoft's SBIG Camera Errors in "C:\Program Files (x86)\Common Files\System\sberror.h".   This suggests that the 1027 Error Code is specifically  "Device (Camera) not found" since there is a separate code (1019) for "Driver not found".
Image

I checked and installed the latest version of SBIG Driver Checker 64, downloaded & pre-installed the latest (64 bit) SBIG drivers, and reconnected the camera to automatically install the drivers.

Image

CCDSoft continued hwoever to give the error message that the SBIG Device is not found.    The message was given regardless of whether the ST-10XME camera is physically connected to the laptop or not.

Now was the continuing 'Device Not Found' messages due to CCDSoft (possible as I had just reinstalled it), due to SBIG Drivers (unlikely as I had just downloaded and installed the latest drivers),  a broken Camera (unlikely it was working at end of last session and is recognised when USB cable is plugged into computer) or something else ('DLL Hell' perhaps)

A whole series of tests was conducted over the next few days to help diagnose and solve the problem.  The last thing I wanted to do was start a fresh re-installation of CCDSoft given the earlier problems.


- Tried running CCDOps 5 (for USB camera) but it immediately fails with the message   "The procedure entry point PutEEPROM could not be located in the dynamic link drive SBIGUDrv.dll".   This error message is again given regardless of whether the ST-10XME camera is physically connected to the laptop or not.

Image

- Tried connecting to SBIG camera from PHD2. This gave some message about being unable to open the SBIG camera or device

- Tried connecting to SBIG camera  using Sequence Generator Pro (trial version). This program also failed to find the SBIG device with the error message "SBIG Error while querying for USB devices: None found" .  The message is again given regardless of whether the camera is physically connected to the laptop or not.

Image

SGP's logfile records the following messages:/p>

[Main Thread] Connecting camera in main thread...
[Main Thread] Connecting SBIG camera...
[Main Thread] SBIG Driver name: SBIGUDrv.DLL Ver ???
[Main Thread] SBIG Driver version: 0
[Main Thread] SBIG Error while querying for USB devices: DEVICE_NOT_OPEN
[Main Thread] SBIG Error while querying for USB devices: None found
[Main Thread] Disconnecting SBIG camera...
[Main Thread] SBIG Error while closing device

(Logfile at C:\Users\username\AppData\Local\SequenceGenerator\sg_logfile_timestamp.txt)

SysInternal's Process Monitor 3.40 shows the following records when SGP attempts to connect to the SBIG Camera.

FASTIO_NETWORK_QUERY_OPEN   C:\winnt\system32\SBIGUDrv.DLL        FAST IO DISALLOWEDbr> IRP_MJ_CREATE               C:\winnt\system32\SBIGUDrv.DLL        PATH NOT FOUND
FASTIO_NETWORK_QUERY_OPEN   C:\winnt\system32\SBIGUDrv.DLL.DLL    FAST IO DISALLOWED
IIIRP_MJ_CREATE               C:\winnt\system32\SBIGUDrv.DLL.DLL    PATH NOT FOUND

- With the observation that SBIGDeviceChecker64.exe installs SBIGUDrv.dll into "C:\Windows\system" folder on my Windows 7 computer (where its the only file in the \system folder ! ) I copied the .dll  into "C:\Windows\System32" folder assuming that is where it is maybe meant to go (a SharedDll key in the windows registry suggests as much) however SGP, CCDSoft, and CCDOps still failed to connect.

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SharedDLLs\  

Value Name: C:\Windows\system32\SBIGUDrv.dll

- I next tried to connect to the ST-10XME Camera from my 32 bit AllSky Laptop which has CCDSoft installed for acquiring allsky pictures with a Starlight Xpress Oculus AllSky Camera, using the camera plug-in 'Starlight Xpress SXV Plug In.dll'.   Initially CCDSoft gave the error message "SBIG driver: Camera not found. Error Code = 1001" /i> when attempting connection with the ST-10XME camera.

Image

However since this laptop has never be used with a SBIG camera before the error message most probably relates to the presence of older drivers for Classic ST camera that were installed with the original CCDSoft installation and/or early updates.   The old SBIGDriverChecker program was uninstalled and existing 'SBIG USB Camera' uninstalled in Device Manager.  The latest version of SBIG Driver Checker 64 was then installed, and used to download & pre-install the latest SBIG drivers. (Note that the program downloads 32 bit version of the driver as well as 64 bit versions)

The ST-10XME camera was then reconnected to the computer whereupon drivers for 'SBIG USB Camera With Firmware' were automatically installed.

SBIG - Old USB Drivers   SBIG - New USB Driver
Image   Image
     
Old SBIG Drivers   New SBIG Drivers (32 bit computer)
Image   Image 
     
Device Manager - Old SBIG Drivers   Device Manager - New SBIG Drivers 
Image   Image 

After the driver for SBIG camera were installed  CCDSoft was used to connect to the camera, but the program hung.  It hung in such a manner that not even attempting to the CCDSoft.exe process in TaskManager could kill the program. The computer had to be powered down and rebooted.

Image

CCDOps 5 program also failed to connect to the SBIG camera but didn't hang. 

After reading some of the older guidelines to SBIG Driver installation, I uninstalled the drivers for SBIG USB Camera With Firmware, and then installed drivers from within Device Manager and navigating to "C:\Program Files\SBIG\Driver Checker 64\SBIG Drivers 3r2\32 Bit\Pro" to ensure than the Pro version of the SBIG drivers were picked up.   (As I understand things, the ST-10XME doesn't firmware stored but relies on firmware being uploaded from the computer onto the camera by the driver on start-up.  The ST Classic Camera has firmware built-in and uses a different version of the driver. Maybe this is why CCDSoft hung like it did ).  I believe I saw the driver installation process flash up a message about installing 'SBIG USB Camera Without Firmware', but the name is left as SBIG USB Camera With Firmware' in Device Manager.

After this CCDSoft was able to connect to SBIG ST-10XME camera ok.  CCDOps was also able to connect to the Camera ok.

- I then returned to my main 64bit laptop used for Astro Imaging. As per AllSky laptop I installed drivers for SBIG USB Camera from within Device Manager but this time navigating to "C:\Program Files\SBIG\Driver Checker 64\SBIG Drivers 3r2\64 Bit\Pro" to pick up 64 bit Pro drivers.   Everything should work now, surely.  But no. Yet again CCDSoft would give the message 'Device Not Found message when trying to connect to the ST-10XME camera. CCDOps would also failed with the message about "PutEEPROM" point.

- I tried using 'Config Drv' button in SBIG Driver Checker 64 and made sure that ST Model was 'My ST is a Pro Model with the RGH Connector'. But again the same error message when connecting to the ST-10XME Camera.

- Final Step was to remove SBIG Drivers from within SBIG Driver Checker 64,  rename all renaming occurances of SBIGUDrv.dll to old_SBIGUDrv.dll and then reupdate/install SBIG drivers.   This time, after a slight hestitation, CCDSoft was able to connect to the ST-10XME camera ok.  CCDOps was also tested and able to connect (no message this about being not able to locate the PutEEPROM entry point in SBIGUDrv.dll).    

So all down to a classic case of 'DDL Hell' !  (see DDL Hell on Wikipedia)

Any way PROBLEM SOLVED.   

Whilst looking for product information/ information about SBIG Drivers and Cameras I noticed that the former SBIG website (www.sbig.com) no longer exist and that it automatically redirects to the Diffraction Limited website (www.diffractionlimited.com)Manuals, Drivers Support for discontinued SBIG products can be found at  http://diffractionlimited.com/support/sbig-archives/ 

Back to Top


SBIG Driver Checker 64

A part of the attempt to resolve 'SBIG Device Not Found' Issue the latest version of SBIG Driver Checker 64 application was downloaded from the SBIG Archives page (Diffraction Limited), and 'Update' was used to download and install the latest drivers.

As at 2017-11-23, the latest drivers downloaded were as follows (on 64 bit computer):

Image

Despite the '64' in the name SBIGDriverChecker64.exe is a 32-bit application and can work on a 32-bit computer to install 32-bit SBIG drivers

It was noted that SBIGDriverChecker64 installs latest driver files into the following locations on my 64bit laptop running Windows 7

C:\Windows\system  :   sbigudrv.dll

C:\Windows\System32\drivers\ : sbigu64.sys, sbigfcam.hex,  sbiglcam.hex, sbigpcam.hex, sbigfga.bin

sbigudrv.dll is observed to be the only file contained in the \Windows\system folder on my 64 bit computer

It's unclear how other programs manage to find it. Examining the Windows Registry with Regedit shows just a single reference to SBIGUDrv.dll (see below) which points to a C:\Windows\System32 location for the .dll

HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SharedDLLs\  

Value Name: C:\Windows\system32\SBIGUDrv.dll

Back to Top


SBIG Camera Error Codes

In trying to find a log file reporting any further information about "SBIG Device not found" errors I came across the following list of all CCDSoft SBIG Camera Errors in "C:\Program Files (x86)\Common Files\System\sberror.h".   .

SBIG Camera Errors

CE_CAMERA_NOT_FOUND         1001  |SBIG driver: Camera not found.|
CE_EXPOSURE_IN_PROGRESS     1002  |SBIG driver: Exposure already in progress.|
CE_NO_EXPOSURE_IN_PROGRESS  1003  |SBIG driver: Exposure not in progress.|
CE_UNKNOWN_COMMAND          1004  |SBIG driver: Bad PC Command.|
CE_BAD_CAMERA_COMMAND       1005  |SBIG driver: Bad camera command.|
CE_BAD_PARAMETER            1006  |SBIG driver: Bad parameter.|
CE_TX_TIMEOUT               1007  |SBIG driver: Transmission timeout.|
CE_RX_TIMEOUT               1008  |SBIG driver: Receive timeout.|
CE_NAK_RECEIVED             1009  |SBIG driver: NAK received.|
CE_CAN_RECEIVED             1010  |SBIG driver: CAN received.|
CE_UNKNOWN_RESPONSE         1011  |SBIG driver: Unknown response.|
CE_BAD_LENGTH               1012  |SBIG driver: Bad length.|
CE_AD_TIMEOUT               1013  |SBIG driver: A/D timeout.|
CE_KBD_ESC                  1014  |SBIG driver: Keyboard Escape.|
CE_CHECKSUM_ERROR           1015  |SBIG driver: Checksum error.|
CE_EEPROM_ERROR             1016  |SBIG driver: EEPROM error.|
CE_SHUTTER_ERROR            1017  |SBIG driver: Shutter error.|
CE_UNKNOWN_CAMERA           1018  |SBIG driver: Unknown camera.|
CE_DRIVER_NOT_FOUND         1019  |SBIG driver: Driver not found.|
CE_DRIVER_NOT_OPEN          1020  |SBIG driver: Driver not open.|
CE_DRIVER_NOT_CLOSED        1021  |SBIG driver: Driver not closed.|
CE_SHARE_ERROR              1022  |SBIG driver: Driver share error.|
CE_TCE_NOT_FOUND            1023  |SBIG driver: TCE not found.|
CE_AO_ERROR                 1024  |SBIG driver: AO error.|
CE_ECP_ERROR                1025  |SBIG driver: ECP error.|
CE_MEMORY_ERROR             1026  |SBIG driver: Memory error.|
CE_DEVICE_NOT_FOUND         1027  |SBIG driver: Device not found.|
CE_DEVICE_NOT_OPEN          1028  |SBIG driver: Device not open.|
CE_DEVICE_NOT_CLOSED        1029  |SBIG driver: Device not closed.|
CE_DEVICE_NOT_IMPLEMENTED   1030  |SBIG driver: Device not implemented.|
CE_DEVICE_DISABLED          1031  |SBIG driver: Device disabled.|
CE_OS_ERROR                 1032  |SBIG driver: Operating system error.|
CE_SOCK_ERROR               1033  |SBIG driver: Socket error.|
CE_SERVER_NOT_FOUND         1034  |SBIG driver: Server not found.|
CE_CFW_ERROR                1035  |SBIG driver: General CFW error.|

CE_CFWE_NONE                1040  |SBIG driver: CFW error none.|
CE_CFWE_BUSY                1041  |SBIG driver: CFW error busy.|
CE_CFWE_BAD_COMMAND         1042  |SBIG driver: CFW error bad command.|
CE_CFWE_CAL_ERROR           1043  |SBIG driver: CFW error calibration error.|
CE_CFWE_MOTOR_TIMEOUT       1043  |SBIG driver: CFW error motor timeout.|
CE_CFWE_BAD_MODEL           1045  |SBIG driver: CFW error bad model.|

Back to Top


Sequence Generator Pro (SGP) & SBIG Camera (2017-11-24)

Downloaded and installed Sequence Generator Pro today (fully featured 45 day trial).  Principal aim is to gain an independant view & diagnosis of the SBIG Camera Not Found problem that I've been experiencing whilst trying to connect to my SBIG ST-10 camera from a recently reinstalled copy of CCDSoft 5 . However it will also give me an opportunity to understand if the SGP offers me anything of benefit, considering its cost $99 USD versus it features which strongly overlap with the functionality of my own AIS/CCDApp2 observatory control program.

Back to Top


Visual Studio 2015 / Visual Studio 2017

VS2010 Express Edition has been my principal program development environment in the last  6 years or so for developing my CCDApp2 and CCDApp2_AllSky programs for observatory control and for AllSky Image Capture respectively. However I begun to move my program development into more recent Visual Studio products.

VS2015 and 2017 have a lot of new features that I don't need use for regular Windows Forms / Console Programming and their GUI in are both less appealing than VS2010's GUI due to MicroSoft's move towards dumbing down the window bars, dividers, scoll bars etc (It can be hard to pick out the window your're working on and hard to find &  move scroll bars etc). However both offer JIT debugging which is useful and both advertise support for Python Programming.

In practice VS2015 (Vn 14.0.25431.01 Update 3) is found to be highly resource intensive, consuming significant CPU and large amounts of memory. A lot of online blogs and forum postings report this.  None of the 'solutions' I've tried provide an adequate fix to this problem.   (It is noted that VS2015 starts up a side process called 'Microsoft.VsHub.Server.HttpHostx64.exe' which also consumes resources and still runs for some 15 mins after VS2015 is closed).
See https://connect.microsoft.com/VisualStudio/feedback/details/1610160/microsoft-vshub-server-httphostx64-exe

VS2017 (Vn 15.4.4) is altgether a lot lighter installation and consumes far less CPU and memory.
Hence VS2017 will gradually become my main programming environment for VB.Net programs.
[VS2017 was updated to Vn 15.5.0 on 2017-12-06, it's meant to have faster project opening and faster building]

For my Pthyon scripts and programs (e.g SharpCap Interface application) VS2015 will be the programming environment of choice, since python code debugging works in VS2015, but doesn't in VS2017 (I've seen this reported as an VS2017 issue in various online forums)

Some legacy VB.Net programs will remain for the time being in VS2010.

I've tried to install VS2017 on my AllSky Laptop in order to access JIT debugging to solve an annoying runtime error that occurs after several hours or days of operation which stops a particular thread and eventually brings down the whole program. Unfortunately VS2017 refuses to load as the laptop is running Windows XP.

Back to Top


JIT Debugging

For some time JIT debugging hasn't been working on my main laptop.  Whilst it may not have be a feature in VS2010 Express Edition, it is a feature of VS2015 Community Version and although I had enabled JIT from Tools/Options/Debugging/JIT Debugging, I was not presented with an option to debug the program when one of my VB.Net programs crashed or otherwise failed during testing.

Eventually I came across a solution online which solved the issue
https://stackoverflow.com/questions/32988364/vs-just-in-time-debugging-wont-work

The trick was to go to Windows "\Control Panel\System and Security\Action Center\Change Action Center Setting\Problem Reporting Settings"  and set it to 'Never Check For Solutions".  This may require administrator permissions.

Back to Top


Python Script Development, SharpCap Interface

A method of Connection and Control of SharpCap image acqusition program from my own Observatory Control Program (AIS/CCDApp2) has been described previously.  This involves a python script (SharpCap Interface v10.py) that is run from within SharpCap to act as a server/interface application.  Once started the script opens Port 4000 (localhost), and waits/listens for a connection from the CCDApp2 program running on the same machine. After connection is made the server than waits for request messages from CCDApp2's job queue, such as 'take_image_set' request to record a set of Live Stacked Images for a specified Target Object.   Progress during image capture is communicated through 'get_appstate' and 'get_lastresult' requests. 
(Note that since SharpCap 3.0 a special 10 licence is required to access certain feature in SharpCap, including Scripting)

Whilst the Python Scripts can be created and edited in a simple text editor, there is an advantage in being able to create & develop them in a proper source code development package that can colour code text, spot language errors and be able to run the program under debugging conditions. 

Since the Script uses Windows Forms with data fields, labels and buttons etc, there is an extra benefit if the source code development package can also build forms interactively (visually rather than simply in code). However I haven't found a package yet that can develop Forms interactively for use with Python Code.   So I'm left to define my form using code alone.

SharpCap uses a built in scripting language called IronPython (http://ironpython.net/).  IronPython is an implementation of the Python programming language which is tightly integrated with the .NET Framework. I've therefore installed IronPython on my computer (Current Version 2.7.7)

At the present moment I'm using two alternative packages for developing my Python Code:
a) Microsoft Visual Studio 2015 (Community Edition, V14) (including PythonTools)
b) JetBrains PyCharm (Community Edition, 2017.2.4)

Both packages seem have issues for developing and debugging Python code.   I'm see trying to see which one provides the most productive environment to work.  Visual Studio is the environment I've previously worked with whilst developing VB.Net applications

At the moment PyCharm produces the critical error message when attempting to run the Script with debugging.
   "Unable to proceed (sys._current_frames not available in this Python implementation)."
This is apparently a known problem for running PyCharm with IronPython but one that has not been solved yet.
Running Python Code in PyCharm however works ok
(It's understood that the sys._current_frames problem was introduced with IronPython 2.7.6 and 2.7.7 and thus debugging might work ok if using version 2.7.5)

VS 2015 will run the program with debugging, but initially whilst it stopped at Breakpoints, the step-in/over/out operations didn't move through the code in the interactive screen but simply caused the program to run until the next breakpoint.  This was eventually fixed by going to Debug Tab in the Project's Properties (accessed by Right Clicking on the Project in Solution Explorer) and changing the debug Launch Mode from "IronPython (.NET) launcher" to "Standard Python launcher".  'Execute Project in Python Interactive' (accessed from Debug or Tools/Python Tools menus)  is used for running the Script in the development environment. This provides a console window that highlights any runtime errors and warnings.

More recently I've tried moving my SharpCap Interface project into VS2017, but I find that I'm unable to successfully run Python Code with debugging.  This is understood to be an issue with VS2017. 

In both VS2015 and PyCharm running the Script in development environment (outside of SharpCap) is not able to access SharpCap data and methods.   An include file containing dummy classes and objects representing those in SharpCap itself is used to prevent the Script from crashing in the development environment.   This is not ideal, but allows connectivity between the Server Interface and my CCDApp2 program to be tested.  The presence of a flagging file (SimFlag.dat) is used to tell the script if it is in the test (Simulation) environment or the live (SharpCap) environment:

import os.path
if os.path.exists('SimFlag.dat'):
   sim = 1
   from SharpCap_Dummy import SharpCap
else:
   sim = 0

Proper testing requires the Script to be run from within the SharpCap program itself however.   To speed up my workflow I have added a Button (& subroutine) to my Observatory Control Program plus accompanying routine that allow me to quickly copy the Python Script Files from the VS2015 project areas into the particular folder that I use for running Python scripts in SharpCap.

Beside an .htm report file summarising the session, the script also outputs a .log file that contains more detailed information about the session and the communications between CCDApp2 and the SharpCap interface. Both of these can be helpful for understanding any issues or bugs.

Back to Top