Menu

Motor does not run in NINA

2022-12-09
2024-01-19
  • David Vautier

    David Vautier - 2022-12-09

    Hello,

    I have a problem with my focuser pro 2 in NINA.

    In the myFP2 windows APP I manage to make the focuser work.
    In the ASCOM APP, I also manage to make the focuser work.

    But in NINA although this one is recognized, it does not rotate when I command a movement.

    I used the latest firmware myFP2_ULN2003_321 and I have the ASCOM 661 platform and myFP2ASCOM_Setup284.
    Moto 28BYJ-48 & ULN2300.

    I can't figure out where the problem is coming from.

    Is it from this message in the IDE?
    C:\Users\Astro-PC\Desktop\Focuser\myFP2F-321\myFP2_ULN2003_321\myFP2_ULN2003_321.ino: In function 'void loop()':
    C:\Users\Astro-PC\Desktop\Focuser\myFP2F-321\myFP2_ULN2003_321\myFP2_ULN2003_321.ino:935:27: warning: comparison is always false due to limited range of data type [-Wtype-limits]
    if ( backlash_count < 0 )
    ~~~~~~~~~~~~~~~^~~

    Thanks for your help.

    David

     
  • brownrb

    brownrb - 2022-12-12

    Hi David

    That is a warning from the Arduino IDE compiler. Please goto File Preferences and set compiler warnings to default

    I assume you used ASCOM driver v284?

    Can I just recap things so far
    Works with Windows
    Works in ASCOM with ASCOM APP
    Does not work in NINA, when same ASCOM driver is selected.

    So I need a log file.
    When in NINA, click on the sidebar Equipment then Focuser
    Click on the cogwheel button after the focuser name myFocuser2ProASCOM
    In the connection tab, make sure that Trace on is checked.

    Now click the connect in Nina

    Then do the steps you did prior - try to move the focuser.
    After a few attempts, please exit Nina then goto to
    /yourid/documents/ascom/logs dat.../ folder
    and send me the ASCOM.myFP2ASCOMxxxxx.txt files

    probably best to send them to my gmail address, it would be quicker. (see pdf or firmware or view using control panel, it will list ASCOM.myFP2ASCOM Driver 284 and show the publisher info

    Regards
    Robert

     
  • Antiath

    Antiath - 2024-01-08

    I don't think my specific issue is the same as the original poster but since the title suits my problem I guess it's also ok to post here.
    So I recently too experienced some issues regarding the MyFP2 ascom driver and Nina.
    Same as above on apprearance. I can run the focuser fine with the test client provided on this sourceforge repo. But not on Nina and it's a recent thing because I did not have problems running MyFP2 before. Unfortunatly I would not be able to tell what change I made when the issue started ( like a month ago). I was in the process of setting up lots of things at the same time so the focuser issue just was ignored until I could tackle it.

    Now Nina is able to connect to the focuser fine. It just won't answer move orders, stay fixed and end up triggering the time out warning of nina. Again, with the test client, no problem so I know the board, wiring and configuration is fine ( also, it was fine before so no reason to suspect something there).
    The setup is the following:
    Windows 10
    Nina 3.0 beta (but also tried V2.3 HF2 to be safe and nothing changed)
    Latest ASCOM platform
    MyFP2 firmware 330 and driver 300.
    Focuser is as simple as possible, Motor driver A4988 with 0 options ( no lcd, no homebutton etc)

    Here is the log :

    DATE|LEVEL|SOURCE|MEMBER|LINE|MESSAGE
    2024-01-07T23:10:28.6651|ERROR|FocuserVM.cs|MoveFocuserInternal|238|Focuser move failed
    System.Exception: Focuser stuck at position 5000 beyond 00:01:00 timeout
    at NINA.Equipment.Equipment.MyFocuser.AscomFocuser.MoveInternalAbsolute(Int32 position, CancellationToken ct, Int32 waitInMs) in C:\Projects\nina\NINA.Equipment\Equipment\MyFocuser\AscomFocuser.cs:line 104
    at NINA.WPF.Base.ViewModel.Equipment.Focuser.OvershootBacklashCompensationDecorator.Move(Int32 position, CancellationToken ct, Int32 waitInMs) in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Focuser\OvershootBacklashCompensationDecorator.cs:line 60
    at NINA.WPF.Base.ViewModel.Equipment.Focuser.FocuserVM.<>c__DisplayClass18_0.<<movefocuserinternal>b__0>d.MoveNext() in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Focuser\FocuserVM.cs:line 218
    2024-01-07T23:10:28.7945|ERROR|NotifyTaskCompletion.cs|WatchTaskAsync|35
    System.Exception: Focuser stuck at position 5000 beyond 00:01:00 timeout
    at NINA.Equipment.Equipment.MyFocuser.AscomFocuser.MoveInternalAbsolute(Int32 position, CancellationToken ct, Int32 waitInMs) in C:\Projects\nina\NINA.Equipment\Equipment\MyFocuser\AscomFocuser.cs:line 104
    at NINA.WPF.Base.ViewModel.Equipment.Focuser.OvershootBacklashCompensationDecorator.Move(Int32 position, CancellationToken ct, Int32 waitInMs) in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Focuser\OvershootBacklashCompensationDecorator.cs:line 60
    at NINA.WPF.Base.ViewModel.Equipment.Focuser.FocuserVM.<>c__DisplayClass18_0.<<movefocuserinternal>b__0>d.MoveNext() in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Focuser\FocuserVM.cs:line 218
    --- End of stack trace from previous location ---
    at NINA.WPF.Base.ViewModel.Equipment.Focuser.FocuserVM.MoveFocuserInternal(Int32 position, CancellationToken ct) in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Focuser\FocuserVM.cs:line 200
    at NINA.WPF.Base.ViewModel.Equipment.Focuser.FocuserVM.MoveFocuserRelative(Int32 offset, CancellationToken ct) in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Focuser\FocuserVM.cs:line 180
    at NINA.Core.Utility.NotifyTaskCompletion1.WatchTaskAsync(Task task) in C:\Projects\nina\NINA.Core\Utility\NotifyTaskCompletion.cs:line 33 2024-01-08T01:28:21.3849|ERROR|AscomDevice.cs|Connect|229 ASCOM.DriverException: Connect failed: UnauthorizedAccessException ---> System.Exception: Connect failed: UnauthorizedAccessException --- End of inner exception stack trace --- at ASCOM.Com.DriverAccess.DynamicAccess.CheckDotNetExceptions(String memberName, Exception e) at ASCOM.Com.DriverAccess.DynamicAccess.TrySetMember(SetMemberBinder binder, Object value) at CallSite.Target(Closure, CallSite, Object, Boolean) at ASCOM.Com.DriverAccess.ASCOMDevice.set_Connected(Boolean value) at NINA.Equipment.Equipment.AscomDevice1.set_Connected(Boolean value) in C:\Projects\nina\NINA.Equipment\Equipment\AscomDevice.cs:line 131
    at NINA.Equipment.Equipment.AscomDevice`1.<connect>b__37_0() in C:\Projects\nina\NINA.Equipment\Equipment\AscomDevice.cs:line 222</connect></movefocuserinternal></movefocuserinternal>

     
  • Antiath

    Antiath - 2024-01-08

    Let me also point out that I already "fixed" the issue...kind of. By making a quick ascom driver myself, reimplementing the Comms Protocol for the few commands I needed. The focuser is moving fine now in Nina with this little driver. But of course, it would be better to solve this problem for the people experiencing something similar and not familiar with ascom development :)

     
  • brownrb

    brownrb - 2024-01-09

    Hi
    There are many things going on here.

    So you found it was working fine. But now it does not.
    Can you remember when you last upgraded the firmware?
    Can you remember when you last updated NINA?

    What was the state of temperature compensation (TC) in the focuser at the time?
    The focuser will not move if temperature compensation is ON in the focuser. This is the standard for all v2 interface for ASCOM Focuser types.

    v3 Interface is dirfferent and the client (NINA) can send move statements when TC is ON.
    But this is a v2 Interface driver. and NINA would discover this and send the commands differently

    The NINA log file - it would be better to view the myFP2 ASCOM driver output because the log for NINA is not very useful because what we need to see what is being sent and recieved by the ASCOM driver.

    Connect failed: UnauthorizedAccessException
    

    Seems to point to something else. Was NINA running as Administor?

    *Focuser move failed
    System.Exception: Focuser stuck at position 5000 *

    The myfp2 ASCOM log is required in order to progress futher.

    Can you please run the ascom test app, when you select the driver, check properties and check what the version actually is, again, this is written to the myfp2 ascom driver log. The check box on the ascom driver dialog box called Trace On, needs to be checked so that a log file can be written.

    It is possible to "install" the ASCOM driver but for whatever reason (it is Windows) the older .dll file is not overwritten, usually you can chack the setupdialog Properties form which could say it was v329 instead of v330. It is alwats best to use Control Pabe to remove the older ASCOM driver, check the following
    C:\Program Files (x86)\Common Files\ASCOM\Focuser
    that all myFP2 files are erased, Then run the installer for the latest driver

    In the attached image, Trace On is enabled and TC On is unchecked

    Regards
    Robert

     

    Last edit: brownrb 2024-01-09
  • brownrb

    brownrb - 2024-01-19

    Hi
    I have found an issue with the myFP2 ASCOM drivers.
    v290 works, but the latest does not.

    The fault occurs when the focuser disconnects using ASCOM clients. If an attempt to reconnect again during the same session, the focuser will either deny the request :unathorized access, of go into ostrich mode (head in the sand, ignore any commands)

    I am working on it.

    regards
    Robert

     

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.