Menu

Temp Compensation - what am I doing wrong?

2017-02-26
2017-03-01
  • Tim Gillespie

    Tim Gillespie - 2017-02-26

    I completed the UNO/L293D MT build and everything works well. I even got it working with my Moonlite CHL. I seem to be having problems getting temp compensation to work though. When I enter a temp coefficient and enable temp compensation, the Windows app correctly reflects that temp comp is enabled and displays the coefficient. However, the focuser does not move even after several degrees of temp change have occurred. I am assuming that it is something simple that I am missing, but I am currently clueless. Can you give me some ideas of what to check?

    On a related note, my scope will move just slightly out of the CFZ after a 1 degree change. I can tweak the code, I think, so that it makes a compensation move at less than a degree, but for a future update, it might be a good idea to consider allowing a user-settable temperature delta that triggers a move.

    Finally, would it be possible to toggle temp compensation from within the ASCOM driver? I use SGP and will often need to use the focus control button to manually command a focus move - particularly when first setting focus. Best I can tell, this can't be done when the ASCOM TempComp property is enabled. It would be nice to be able to toggle temp compensation on and off so I could use focus control to manually change focus. It seems to me that SGP probably should check for, and disable TempComp when I use the manual focus control buttons, but it apparently does not. I'll aks the developers about that.

    Thanks again for the effort you put into this. It is truly a great project.

    Tim

     
    • brownrb

      brownrb - 2017-02-26

      Hi Tim
      The ascom driver already supports enabling/disabling temperature compensation - this is done by the client app. To test this you can try the ASCOM APP tester client, enable temperature compensation, try a move (which the focuser will not do), disable temperature compensation, try a move (and the focuser will move).

      Manual push buttons should be disabled when focuser is in temperature compensation mode.

      To check the moving when enabled, (enable logging!) first hold down the probe in your hand/fingers to warm it up by about 5 degrees, then turn on temperature compensation. The focuser should move once the temperature drops by 1 degree. Set it to autoupdate the temperature every 10s. If the focuser does not move there is a problem and you will need to send me the log files and the value of the temperature co-efficient.

      Adding a user configurable temperature delta is a possibility for a future release. Am working hard on the next major release of mySQM which has a raft of new features and changes so it could be a while.

      Hope the above is helpful
      Cheers
      Robert

       
  • Tim Gillespie

    Tim Gillespie - 2017-02-26

    Thanks, Robert. I have been doing a little more testing. Temperature compensation now works fine when enabled in the Windows app. I'm not sure why it didn't work yesterday, but I'm sure it is something I overlooked. I haven't tried the ASCOM APP tester client and will this evening.

    Unfortunately, Sequence Generator Pro does not offer a way to either enable or disable TempComp. It will automatically disable it when it goes through an autofocus routine, and then re-enable it again when the routine is done, but there is no way for me to change the status of TempComp within SGP myself. So when I start a session, I can't enable it.

    I did notice some odd behavior with the ASCOM driver. If I click the checkbox to send the temperature coefficient in the ASCOM interface and then connect, it acts as though TempComp is enabled, since I can't send any manual moves to the focuser through the SGP focus control buttons, but no compensation takes place. I can open the ASCOM interface again, uncheck the send coefficeint box, hit refresh, and I can then manually adjust focus with the SGP focus control buttons.

    Anyway, I'll try the ASCOM App tester and let you know what I find.

    Thanks so much for your help.

    Tim

     
  • brownrb

    brownrb - 2017-02-27

    Hi Tim
    You are doing nothing wrong. I have uploaded v239 of the ASCOM driver which addresses this issue.

    Regards
    Robert

     
  • Tim Gillespie

    Tim Gillespie - 2017-02-28

    Robert:

    Thanks so much! I'll give it a try.

    Tim

     
  • Tim Gillespie

    Tim Gillespie - 2017-03-01

    Hi Robert:

    I got a chance to try everything and temperature compensation is working with the ASCOM driver. However, I noticed two issues you might want to be aware of. First, no matter what temperature coefficient I enter, the focuser moves 50 steps for each compensation event. Also, when I disconnect from the ASCOM driver and close the app tester, the focuser will continue to send temp compensation moves to the focuser. I need to unplug the controller to get it to stop.

    I understand that you are very busy with the mySQM project (which looks very interesting and I may have to try it myself) and I'm in no hurry since the focuser really isn't of much use to me unless I have a way to toggle TempComp anyway. Having said that, I wonder if you would be willing to share the source code for the ASCOM driver. I could possibly add a Temp Comp toggle button for my use.

    Thanks again.

    Tim

     
  • brownrb

    brownrb - 2017-03-01

    Issue 2 first. Yes, I understand that, the focuser has no way of knowing that it should stop temp comp mode, I guess the app/ascom should send that before disconnecting! I will make the changes

    Issue 1. 50 steps? I am assuming that you entered and set a temperature compensation value. 50 as a value is interesting because that value is the max permissible, the minimum being 0.

    Using the windows app first, one can use the settings menu, temperatue compensation, activate ... , enter a value less than 50 and enable. Then you can use the next setting menu get temperature compensation etc to check the values in the controller - they should match - mine do - just checked.

    Next ASCOM driver.
    I just tried this and the ascom trace log shows that the temp comp value on the setup dialog form is not being sent, so will address that at the same time.

    Cheers
    Robert

     
  • brownrb

    brownrb - 2017-03-01

    Hi Tim
    v240 of ASCOM driver uploaded. For some reason one of the application variables state was not being saved. Mustve been a Windows thing. Anyhow it will now send the temp comp value on connect if the checkbox is enabled.So that fixes the 50 steps issue. I have yet to do the 2nd ascom driver, will do that tomorrow.

    Now, 2nd part. YES, this is confirmed behaviour and EXPECTED. Under ASCOM we do not have an equivalent disconnect function, as an exception could occur at anytime (lost serial connection for example), so there is no method Disconnect() for example that one can use to send commands to a focuser controller before disconnecting. The ASCOM client can just quit at any time.

    I have been pouring over the methods and properties in ASCOM this afternoon. I don't see anything that can prevent this from happening.

    The only thing I can think of is a not to self to disable temperature compensation before dropping the driver. If the ASCOM client was written correctly it would have available functions to test and do this (ie enable/disable compensation).

    The ASCOMApp available does this, but I know APT does not have it inbuilt. I guess other clients also.

    One saving grace. The controller will boot with temperature compensation disabled. So you could reboot the controller without loosing any settings by just connecting using the windows program and sending a reset to the controller?

    Or leave off the power-on reset circuit and simply disconnect, wait 3s then reconnect. Then shut everything down?

    I know its messy but from what I have gleaned of the ASCOM interface standard totally expected? I could be wrong and am happy to be corrected.

    Cheers
    Robert

     
  • Tim Gillespie

    Tim Gillespie - 2017-03-01

    Robert:

    Thanks for the help. Maybe this is an unintend consequence in ASCOM. It is easy enough to manage now that I know it is expected behavior. Unfortunately, SGP does not have any way to enable/disable tempcomp exposed to the user. I have mentioned it to the developers and they have said it will be some time before they can address this.

    Did you have any thoughts on sharing the ASCOM driver source code? If not, I think I have a somewhat clunky workaround in mind. I can connect to the focuser in SGP via the POTH hub and I can then run the tester app simultaneously and be able to toggle the TempComp property using the tester app whenever I need it.

    Thanks again. The support you providde is amazing.

    Tim

     
  • brownrb

    brownrb - 2017-03-01

    Hi Tim
    email me at yahoo and we can discuss your ideas and requirements off-line
    Regards
    Robert

     

    Last edit: brownrb 2017-03-02
  • Tim Gillespie

    Tim Gillespie - 2017-03-05

    I just wanted to share my thanks for Robert and that this is now working perfectly. For those wondering if this will work with Moonlite focusers, it works just fine for me after a full nite of testing last night. It also works with the Rigel focusers (also unipolar motors).

     

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.