Menu

ASCOM in APT

nicb
2021-12-16
2021-12-21
  • nicb

    nicb - 2021-12-16

    Hi,

    I am running a NEMA17 on Arduino Nano and DRV8825 and all works well in the windows application and the myASCOMclient.
    However, when using the ASCOM driver in APT it starts to work but then fails after 3-4 moves and freezes.

    The trace file appears to have the following exceptions logged. Any ideas? Is this an APT issue?

    Thanks

    17:59:16.045 Absolute Get              True
    17:59:16.045 Position                  cache: 1540 to client
    17:59:16.048 IsMoving.get              query controller for ismoving
    17:59:16.048 Sending                   :01#
    17:59:16.085 Sending                   success
    17:59:16.085 getresponse               raw response: New target=1580[0D][0A]I1#
    17:59:16.085 getresponse               returning: ew target=1580[0D][0A]I1
    17:59:16.085 IsMoving.get              response = ew target=1580[0D][0A]I1
    17:59:16.086 IsMoving.get              FormatException ew target=1580[0D][0A]I1,System.FormatException: Input string was not in a correct format.[0D][0A]   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)[0D][0A]   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)[0D][0A]   at System.Convert.ToInt32(String value)[0D][0A]   at ASCOM.myFocuser2ASCOM.Focuser.get_IsMoving()
    17:59:16.089 Absolute Get              True
    17:59:16.089 Absolute Get              True
    17:59:16.089 Absolute Get              True
    17:59:16.089 Absolute Get              True
    17:59:16.127 IsMoving                  cache: 0
    17:59:16.127 IsMoving                  cache: 0
    17:59:16.128 Absolute Get              True
    17:59:16.128 Absolute Get              True
    17:59:16.128 Absolute Get              True
    17:59:16.128 Absolute Get              True
    17:59:17.042 Absolute Get              True
    17:59:17.042 Position                  query controller for Position
    17:59:17.042 Sending                   :00#
    17:59:17.043 getresponse               err: Exception, ASCOM.NotConnectedException: Serial port is not connected - you cannot use the Serial.Transmit command[0D][0A]   at ASCOM.Utilities.Serial.Transmit(String Data) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1395[0D][0A]   at ASCOM.myFocuser2ASCOM.Focuser.getresponse(String tcmd)
    17:59:17.043 Position                  err: Null reply
    17:59:17.047 IsMoving.get              query controller for ismoving
    17:59:17.047 Sending                   :01#
    
     
    • brownrb

      brownrb - 2021-12-21

      in myDefines.h
      line 101 onwards
      does it look like this

      //#define DEBUG 1

      //#define STEPMODE_Debug 1
      //#define TEMP_Debug 1
      //#define SERIAL_Debug 1
      //#define HPSW_Debug 1
      //#define BOARD_Debug 1

       
  • nicb

    nicb - 2021-12-16

    Update:
    I uninstalled myFP2ASCOMSetup281.exe and tried 280, which seems to work fine and doesn't generate any exceptions in APT or NINA. I wonder if it's a setting configuration I had done on 281 which has been reset with the vanilla 280 install. Will probably try 281 again now to see if the error persists

     
  • brownrb

    brownrb - 2021-12-17

    Thank you for the errorlog.

    Starting with the basic questions
    Did you modify the firmware at all? Turn on debugging in the firmware? Insert any Serial.print statements?

    Next
    What version of the firmware are you using? 312

    Next
    When did you update the firmware to v312?

    Next
    Did you recently upgrade to a newer version of APT?

    I have looked at the logs, and can pinpoint where the controller had enough around 17:59:16.085

    I have seen something like this before months and months ago, not with myFP2 but with another ASCOM driver somewhere, but cannot remember right now where.
    I will need to do a little digging and that may take some time.

    I would suggest the following for the moment.

    If 280 works for you, then please use that.

    Regards
    Robert

     
  • nicb

    nicb - 2021-12-17

    Thanks for looking into this Robert,

    Firmware is myFP2-Firmware-312.zip and it is a new focuser build not an upgrade so I don't have a prior instance of it running correctly in APT.

    I haven't modified the firmware, it is just compiled per the instructions

    APT is running the latest version, upgraded a couple of weeks ago but I was not running a focuser before.

    I have also noticed that NINA experiences issues with my install of 281, reporting disconnections after a move is done.

    I am perfectly happy with 280 and tested it for a long time last night with both APT and NINA, so all is great.

    When I reinstall 281, does it retain previous config, because it continued to generate exceptions? Is there a cache or folder to clear somewhere? Happy to test things for you or send additional debugging if you like.

    Kind regards,
    Nick

     
  • brownrb

    brownrb - 2021-12-18

    yes.
    When upgrading the firmware, you should first save the settings (the windows app can do this)
    Then
    1. Run cleareeprom text program in the test folder - this wipes out any old data
    2. program new firmware
    3. connect the windows app and restore the saved settings to the controller

    R

     
  • brownrb

    brownrb - 2021-12-18

    Hi Nic
    What is the name of the firmware file you are using? Is it
    myFP2_DRV8825HW203_312

     
  • nicb

    nicb - 2021-12-18

    Hi Robert,

    It is myFP2_DRV8825_312.ino

     
  • nicb

    nicb - 2021-12-18

    Hi Robert,

    It is myFP2_DRV8825_312.ino

     
  • brownrb

    brownrb - 2021-12-21

    Just to let you know, I am looking at this issue in greater depth as time allows
    I found the previous issues that I referred to.

    Can you take a screen shot tof the ascom focuser setup form (that has the port number and speed etc) on it?

     
  • brownrb

    brownrb - 2021-12-21

    I think you are running an out date ascom driver. The errors you are getting looks very similar to one that was fixed earlier. Sometimes when a new driver is installed over the top of a previous one, some files sometimes do not get updated correctly. I think this is most likely your issue.

    Please uninstall the current ascom driver using control panel

    then go to the folder
    C:\Program Files (x86)\Common Files\ASCOM\Focuser
    and delete the followings file - they should not be there are uninstall, but sometimes they are
    ASCOM.myFocuser2ASCOM.Focuser.dll
    myFP2ASCOMReadme.htm
    myFP2ASCOMLanguage.htm

    After that install the latest driver from here
    https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/ASCOM%20DRIVERS/myFP2ASCOMSetup281.exe/download

    Please let me know what happens,
    Robert

     
  • nicb

    nicb - 2021-12-21

    Hi Robert, I have uninstalled, checked the directory and installed 281 from your link. The problem still exists. Screenshot of ascom client attached, as requested.

    • APT stopped working after 2 moves.
    • NINA issues upon 1st move.
    • MyFP2 ASCOM client works 100% fine
    • Uninstalling and then installing 280 works with APT & NINA 100% fine

    Many thanks,
    Nick

     
  • brownrb

    brownrb - 2021-12-21

    That is really odd because 280 has a recognized issue with NINA, and this got fixed with release 281.

    I have 281 running for for a number of hours today, doing focusing runs, using NINA, without issue. So there has to be something I am missing here. I no longer have APT so I can't really test that.

    I think I would need the full ascom trace log produced by the focuser, and the NINA log as well.

    What version of NINA are you using?

    In Nina, options, general what is the device polling rate set to?

    In Nina, options general what is the debug level set to?

    Are you using a USB connection or Bluetooth to the focuser?

    For this, close Nina.
    Now about the logs - this is whay I require
    In Nina, options general set the log file to Trace
    Go into your users appData/Local/Nina/Logs and delete the log files there
    mine is C:\Users\rob\AppData\Local\NINA\Logs

    Goto the Documents\ASCOM and delete the Logs....... folders
    Then start Nina
    Pull up the properties of the focuser, specify Trace On
    Then connect and do the things necessary for it to fail

    Then please send me the Nina logs and the ascom trace log.

    regards
    Robert
    You can send that to me at the email address in the pdf.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.