Error Connecting to Filter Wheel

Discussion in 'STX and STXL Series Cameras' started by Sreilly, Sep 4, 2019.

  1. Sreilly

    Sreilly Cyanogen Customer

    Joined:
    Oct 10, 2014
    Messages:
    508
    So on occasion I will get a "Failure to connect to filter wheel" when connecting the STX-16803 camera to MaxIm. The full scenario is that the telescope is located at SRO in California while I live in Virginia. The main software that runs the system in ACP Expert which is using MaxIm V6.20 for camera control. The guiding is set to use ASCOM Direct however a few things have been noted. Guiding works well but when the startup script is run it turns on the needed power outlets, starts APCC, initializes the mount, starts up MaxIm, Pyxis Server, then connects the camera, connects the rotator, and then connects the mount.

    More times than not it will connect to the mount when the camera is started and I'm guessing due to the ASCOM Direct guiding. But at random times I will get a "failed to connect to filter wheel" or something to that extent message. Usually power cycling the camera resolves this but will cause the startup script to fail and stop. Is this something that can be overcome? Is there a setting that needs tweaking to resolve?

    So finding a reason for the filter wheel error is important as it isn't anything physically being done and the time from turning the power on to the equipment and starting the program and then finally connecting the camera is 60-90 seconds, likely more. So it's not like you power on an a split second try connecting. I'll attach the guts of the script to make clearer.

    The other issue is when the mount connects and if using the ASCOM Guider option is causing the mount to connect ahead of time. I do have a guide cable connected from the AP CP4 controller to the guide port on the camera but haven't changed the guide settings to Guider Relays yet as I haven't had time to recalibrate the guider with this setting and I'm guessing they aren't interchangeable between guide methods. Does having that cable connected and still using the ASCOM Direct method cause an issue? I do need to recalibrate when I switch to Guider Relays, correct?

    Am I missing something? ACP Startup Script:

    // Sample for Digital Loggers Ethernet Power Controller using the
    // ASCOM.DigltalLoggers.Switch driver, available on the ASCOM Initiative
    // website at http://ascom-standards.org/Downloads/SwitchDrivers.htm
    // See the function definition in the Utility Functions section below
    // Set the SWID variable above for the ID of the specific switch driver.
    //
    TurnOnPower(0, "AP Mount");
    TurnOnPower(1, "STX Camera");
    TurnOnPower(2, "RC Rotator");
    TurnOnPower(3, "RC 12v Rot+Focus+fans");
    Console.PrintLine("Wait for Power-up and IP connections to get going (20 sec)");
    Util.WaitForMilliseconds(20000);

    // ==================================================================
    // CHANGE PATHS TO PROGRAMS AS NEEDED AND ADD OTHER PROGRAMS YOU NEED
    // ==================================================================

    Console.PrintLine("Starting some support programs as needed. ");
    if(!StartProgram("C:\\Program Files (x86)\\Astro-Physics\\APCC Pro\\AstroPhysicsCommandCenter.exe", 1)) {
    Console.PrintLine("**Failed to start APCC Pro");
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }
    Console.PrintLine("Wait for APCC to get going (20 sec)");
    Util.WaitForMilliseconds(20000);

    if(!StartProgram("C:\\Program Files (x86)\\Diffraction Limited\\MaxIm DL 6\\MaxIm_DL.exe", 1)) {
    Console.PrintLine("**Failed to start MaxIm");
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }

    if(!StartProgram("C:\\Program Files (x86)\\Optec\\PyxisServer\\PyxisCommander.exe", 1)) {
    Console.PrintLine("**Failed to start Pyxis");
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }

    try {
    if(!Telescope.Connected) {
    Util.WaitForMilliseconds(5000);
    Console.PrintLine("Connect ACP to the telescope, will auto-home if needed");
    Telescope.Connected = true; // (Requires driver "home on connect")
    Console.PrintLine("OK");
    } else {
    Console.PrintLine("Telescope already connected");
    }
    } catch(ex) {
    Console.PrintLine("**Failed to connect to the Telescope:");
    Console.PrintLine(" " + ex.description);
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }

    if(Rotator.Configured) // If there is a rotator, get it going
    {
    try {
    if(!Util.RotatorConnected){
    Console.PrintLine("Connecting to rotator.");
    Util.RotatorConnected = true;
    }
    } catch(ex) {
    Console.PrintLine("**Failed to connect to rotator:");
    Console.PrintLine(" " + ex.message);
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }
    }

    try { // Connect the camera
    if(!Util.CameraConnected) {
    Util.WaitForMilliseconds(5000);
    Console.PrintLine("Connect ACP to the camera");
    Util.CameraConnected = true;
    Console.PrintLine("OK");
    } else {
    Console.PrintLine("Camera already connected");
    }
    } catch(ex) {
    Console.PrintLine("**Failed to connect to MaxIm and camera:");
    Console.PrintLine(" " + ex.description);
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }
    Console.PrintLine("Wait 10 sec for MaxIm before trying to connect from Focus Max");

    Util.WaitForMilliseconds(10000);
    Console.PrintLine("Finally, start FocusMax which will auto-connect to things");
    if(!StartProgram("C:\\Program Files (x86)\\FocusMax V4\\FocusMax.exe", 1)) {
    Console.PrintLine("**Failed to start FocusMax");
    throw new Error(0x80040001, "==== Startup failed, cannot continue");
    }

    // ===========================================
    // IF FOR SCHEDULER DO NOT OPEN THE DOME HERE!
    // ===========================================

    Console.PrintLine("Chill cooler to -20");
    Camera.CoolerOn = true;
    Util.WaitForMilliseconds(5000); // For quirk in MaxIm 6.05
    Camera.TemperatureSetpoint = -20; // Chill the cooler

    // ==========================
    // ADD ANYTHING ELSE YOU NEED
    // ==========================
     
  2. Sreilly

    Sreilly Cyanogen Customer

    Joined:
    Oct 10, 2014
    Messages:
    508
    So now that I've shaken things up, sorry, it was excellent timing that I went back to check the drivers and firmware. The drivers were up to date and the Firmware check isn't getting any info, and yes the camera is on and connected in MaxIm. The error on the other hand has nothing to do with the filter wheel but rather:
     

    Attached Files:

  3. Doug

    Doug Staff Member

    Joined:
    Sep 25, 2014
    Messages:
    9,932
    Generally speaking it's better to have one thread per issue. Things can get conflated otherwise. I'll address the guider outputs first:

    ASCOM Direct doesn't care whether the autoguider cable is plugged in or not. Yes the calibration will very likely be different between the two methods - though it's a matter of a minutes or two to recalibrate.

    In theory it shouldn't matter whether you connect to the mount first from ASCOM Direct or from your control program, but details like timeouts and such are out of our control. So it might be safer to ensure the mount is connected to the control program first.

    As for the filter wheel failing to connect... that doesn't make much sense. It's the same plug-in talking to the same driver.

    However Error 27 would explain a few things. That indicates that the low-level drivers aren't loading. Usually that's caused by a failure of the camera to show up in the Device Manager. I'd check on your USB connections, cables, hubs, etc. Also if you're remotely powering up the equipment prior to connecting it might just be that you're not waiting long enough for the camera and USB to initialize and connect up to the PC.
     
  4. Sreilly

    Sreilly Cyanogen Customer

    Joined:
    Oct 10, 2014
    Messages:
    508
    My mistake on the filter wheel issue, it's actually the dual chip mode error. Hey it was 3:30 in the morning and sleep was very little.....and I'm 65....

    Agreed on the recalibration timing but being a 3 hour time difference makes the biggest difference. Usually puts it past mid-night this time of year but necessary of course.
     
  5. Sreilly

    Sreilly Cyanogen Customer

    Joined:
    Oct 10, 2014
    Messages:
    508
    "However Error 27 would explain a few things. That indicates that the low-level drivers aren't loading. Usually that's caused by a failure of the camera to show up in the Device Manager. I'd check on your USB connections, cables, hubs, etc. Also if you're remotely powering up the equipment prior to connecting it might just be that you're not waiting long enough for the camera and USB to initialize and connect up to the PC."

    Doug I've seen that at home, at SRO, and several people I know running SBIG cameras have said the same thing. It's random but it has happened and it isn't a recent thing. A conservative guess might be a few years but again it's usually random and seems to correct itself with a few tries. But for remote work it can kill a nights imaging session unless it's being monitored. Is there a way to have this retry when it fails without intervention?
     

Share This Page