Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Hybrid View

  1. #1

    Default FocusMax failing to pass through focus changes - Breaks ACP filter offsets

    Hi

    I have just noticed that my focus offset isn't actually moving the focuser. After auto-focusing is complete ACP proceeds to changing from the focus filter (clear filter) to the imaging filter. In the logs it says that the offset will be applied but when I look at the focuser value it's the same.

    I'm including the log. All looks good except that the focuser didn't change when switching from clear to halpha.

    Also here's a screenshot (below) that shows the autofocus focus value and the current focus value being the same.

    Is there a simple way to test this? Any idea of what going on?

    Thanks Sam

    Attached Files Attached Files
    Last edited by Bob Denny; Aug 1, 2017 at 19:25. Reason: Move log into attachment, post image inline

  2. #2
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    26,843

    Default

    Sam -- I hope you don't mind, I pulled the log out into an attachment and put the image inline, making the post self-contained (in case I need to refer to it in the future). There are several focus changes (including the autofocus):

    06:14:25 Switching from Halpha to Clear filter for pointing exposure
    06:14:25 Focus change of -49 steps required

    06:14:58 Starting Autofocus...
    06:14:58 23:14:58
    06:14:59 23:14:59 ** Beginning Find Star **
    06:14:59 23:14:59 ...Filter 1: Clear (slot 4)
    ...


    06:16:20 FocusMax auto-focus successful!
    06:16:20 HFD = 2.94
    06:16:20 Focus position = 29465


    06:16:42 Switching from Clear to Halpha filter for imaging
    06:16:42 Focus change of 49 steps required

    From what I can see the focus change did occur but the wrong way? The focus value at the end of the AF (for Clear) is 29465, and at the time of the screen shot it is 29418 (close to 29465 - 49 = 29416).

    Attachment 8836

    This has me baffled. Can you please post your Public Documents\ACP Config\FilterInfo.txt file? And you can attach it to your reply <- link to attaching instructions
    -- Bob

  3. #3

    Default

    Hi Bob.

    Thanks for getting back to me.

    I copied the wrong log. Here is the correct log in the attachment.

    Let me know what you think.

    Sam
    Attached Files Attached Files

  4. #4

    Default

    Here's the FilterInfo.txt file.

    The offset is correct.

    I'm trying to make a test script to see if I can just test the SetFilterOffset() routine but I can't seem to make it work. I'm not really familiar with VBS, so I'm just hacking away. Would that be the correct function to test?

    Sam
    Attached Files Attached Files

  5. #5

    Default

    Hi Bob.

    I've been doing a little hacking and found that For some reason I can not get the move() function to move the focuser from FocusMax 4. Here's what I have tried.

    Code:
    Option Explicit                     ' Enforce variable declarations
    Dim SUP, F                             ' Global for annunciators
    
    Sub Main()
    
        Set SUP = CreateObject("ACP.AcquireSupport")
        Set F = CreateObject("FocusMax.Focuser")
            
        Console.PrintLine "Start position: " & F.Position & " - Focuser is absolute: " & F.Absolute
        
        Console.PrintLine "Adding 40 Steps"
        F.Move(F.Position + 40)
        
        Console.PrintLine "End Position: " & F.Position
    
    End Sub
    the result in the ACP log window is:
    -------------
    Start position: 29386 - Focuser is absolute: True
    Adding 40 Steps
    End Position: 29386
    -------------


    I've also made MoveFocuser() and SetFilterOffset() into public methods in AquireSupport.wsc. Here are the script and results.

    MoveFocuser()
    Code:
    Option Explicit                     ' Enforce variable declarations
    
    Dim SUP, F                             ' Global for annunciators
    
    Sub Main()
    
        Set SUP = CreateObject("ACP.AcquireSupport")
        Set F = CreateObject("FocusMax.Focuser")
        
        SUP.Initialize
    
        Console.PrintLine "Start Position: " & F.Position
        
        Console.PrintLine "MoveFocuser "
        Call SUP.MoveFocuser (40, False)
        
        Console.PrintLine "End Position: " & F.Position
    
        SUP.Terminate
    
    End Sub
    Result
    ---------
    Initializing AcquireSupport V8.0.7
    Telescope is ACP->AstroPhysicsV2, driver V2
    MaxIm DL is version 6.14
    Imager is SBIG Universal
    Using focus offsets and star mags from FilterInfo.txt
    Selecting filter OIII from previous ACP run at 20170801@100428 UTC
    Imager readout modes:
    0 is Raw
    1 is Raw w/RBI pre-flash
    Guider is SBIG Universal (no rotator)
    Guider plate scale is 2.5 arcsec/pix. Guided dither with main imager pixels
    Max unguided exposure 60 sec.
    (assuring that FocusMax is running now...)
    Calculated unbinned plate scales (arcsec/pix): H = 1.29 V = 1.29
    Calculated field of view (arcmin): H = 72.2 V = 54.5
    Plate solving With GSC 1.1 (ok for wider fields)
    All-sky plate solving will be attempted when needed
    Start Position: 29386
    MoveFocuser
    End Position: 29386
    ------------

    Code:
    SetFilterOffset()
    
    Option Explicit                     ' Enforce variable declarations
    
    
    Dim SUP, F                             ' Global for annunciators
    
    
    Sub Main()
    
    
        Set SUP = CreateObject("ACP.AcquireSupport")
        Set F = CreateObject("FocusMax.Focuser")
        
        SUP.Initialize
    
    
        Console.PrintLine "Start Position: " & F.Position
        SUP.SetFilterOffset 4
        
        Console.PrintLine "End Position: " & F.Position
    
    
        SUP.Terminate
    
    
    End Sub
    Result:
    -------------
    Initializing AcquireSupport V8.0.7
    Telescope is ACP->AstroPhysicsV2, driver V2
    MaxIm DL is version 6.14
    Imager is SBIG Universal
    Using focus offsets and star mags from FilterInfo.txt
    Selecting filter OIII from previous ACP run at 20170801@100428 UTC
    Imager readout modes:
    0 is Raw
    1 is Raw w/RBI pre-flash
    Guider is SBIG Universal (no rotator)
    Guider plate scale is 2.5 arcsec/pix. Guided dither with main imager pixels
    Max unguided exposure 60 sec.
    (assuring that FocusMax is running now...)
    Calculated unbinned plate scales (arcsec/pix): H = 1.29 V = 1.29
    Calculated field of view (arcmin): H = 72.2 V = 54.5
    Plate solving With GSC 1.1 (ok for wider fields)
    All-sky plate solving will be attempted when needed
    Start Position: 29386
    Focus change of 208 steps required
    End Position: 29386
    ------------

    Perhaps I'm doing something wrong with MoveFocuser() and SetFilterOffset(), but I can't even get the simple move() function to work by connecting directly to FocusMax. I can obviously communicate with FocusMax because I can get the focuser position, but for some reason move() does nothing.

    Let me know what you think.

    Thanks.
    Sam

  6. #6

    Default

    Ok. There seems to be something strange happening with the communication between ACP and FocusMax on this particular PC.

    I tested the same scripts on another virtual machine and they all worked moving the focuser in simulation mode as expected.

    I tried reinstalling FocusMax on my main PC and still am not able to get ACP to issue move() commands to FocusMax.

    I'm not sure what else I can do.

    Please let me know if you have any ideas on how to fix this.

    Thanks.
    Sam

  7. #7
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    26,843

    Default

    The smoking gun is the first test where you are directly calling FocusMax. If you can't get the focuser to move by calling Focuser.Move() then no amount of upstream trickery can change that. My first inclination is that the focuser is simply broken. It should be generating errors if it can't move, but... It's certainly not anything broken in the Windows Object function calling mechanism. If that were broken all hell would break loose. I've never seen that happen (thank goodness).

    One thing you can do to eliminate FocusMax (and I seriously doubt it is the problem) is to change your script to directly create an instance of your focuser. Use the ASCOM Profile Explorer to find your focuser's ID, for example ASCOM.Simulator.Focuser. So:

    Code:
    Option Explicit 
    Sub Main()
        Dim F  ' Here is fine, SUP not needed for this simple test
        Set F = CreateObject("ASCOM.Simulator.Focuser")        
        Console.PrintLine "Start position: " & F.Position & " - Focuser is absolute: " & F.Absolute    
        Console.PrintLine "Adding 40 Steps"
        F.Move(F.Position + 40)    
        Console.PrintLine "End Position: " & F.Position
    End Sub
    I'll bet you will see the same results, indicating that the problem is in the focuser. If this isn't enough to convince you, you can alter the script so it is run outside of ACP, in Windows using its script runner. No Sub Main() (an ACP-specific thing). Each WScript.Echo() will result in a popup box but the effect will be the same:

    Code:
    Option Explicit 
    Dim F
    Set F = CreateObject("ASCOM.Simulator.Focuser")        
    WScript.Echo "Start position: " & F.Position & " - Focuser is absolute: " & F.Absolute    
    WScript.Echo "Adding 40 Steps"
    F.Move(F.Position + 40)    
    WScript.Echo "End Position: " & F.Position
    Save this as Test.vbs or whatever on your desktop. Double-click it. Make sure neither FocusMax or ACP are even running at all. I'm betting you will get the same results... no movement. If this runs in a console window then somehow the Windows script system was confgigured that way (by some other program or ??). THen start up a CMD shell, change directory to the desktop, then run the above as

    C:\blahblah\> cscript Test.vbs

    Well you can do this anyway, instead of double-clicking it. It will give you a nice little command shell display of the results, and you can use up-arrow to repeat etc.
    -- Bob

  8. #8
    Join Date
    Oct 2005
    Location
    Mesa, AZ
    Posts
    26,843

    Default

    Strange... that log has either Linux (LF-only) or Mac (CR-only) line endings. Is that a clue? It's a first for me. ACP makes internet/Windows standard (CR-LF line endings). Anyway I'll read on with your other messages. It also explains the 2 count difference.
    -- Bob

  9. #9

    Default

    Thanks for your reply Bob.

    I reverted my system to a backup from a couple of weeks ago and my tests scripts work now. I'm not sure whats going on but in the last couple of weeks I have been installing and uninstalling Maxim DL quite a bit to try and understand some of the bugs 6.14 has. Perhaps all the installing broke something in the way ACP communicates with FocusMax.

    I did try your test script to connect directly with the ASCOM component but it didn't work. I got this:

    **Script Error**
    Source: ASCOM.FocusLynx.Focuser
    Message: Operation cannot be completed. Device is not connected.
    Location: line 5 column 5.


    How do you connect an ASCOM Device?

    Anyway things are working now but I would like to find out what went wrong. I kept a version of the PC that was not working and I will try and find out some more.

    Regarding the log I posted, it had mac line endings because I just copied the log info from my browser (Safari).

    Thanks
    Sam

  10. #10

    Default

    Hi Bob.

    I did manage to get your script to connect directly with the ASCOM driver and surprisingly it moved the focuser!

    I just needed to add a line to connect the ASCOM focuser.

    Code:
    Option Explicit 
    Sub Main()
        Dim F  ' Here is fine, SUP not needed for this simple test
        Set F = CreateObject("ASCOM.FocusLynx.Focuser")
        F.Connected = True        
        Console.PrintLine "Start position: " & F.Position & " - Focuser is absolute: " & F.Absolute    
        Console.PrintLine "Adding 40 Steps"
        F.Move(F.Position + 40)    
        Console.PrintLine "End Position: " & F.Position
    End Sub
    So there seems to be something broken with FocusMax and it's connection with ACP. Perhaps it's something in the registry. I posted a message on the CCDWare forum so maybe they can shed some light on this.

    I also tried to reinstall FocusMax but it had no effect.

    Thanks.
    Sam

 

 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Focus offsets
    By Jamil Ahmed in forum Pre-Sales Technical Questions and Help
    Replies: 2
    Last Post: Jun 21, 2014, 21:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •