Menu

Application SW issues

brownrb
2014-10-14
2016-06-09
1 2 > >> (Page 1 of 2)
  • brownrb

    brownrb - 2014-10-14

    To discuss any issues with the application software please post here

     
  • Jim Stefancic

    Jim Stefancic - 2015-02-19

    The focuser works beautifully on my Win8.1 PC. I am trying to get it to work on a Win7 laptop so I can do remote astro. After installing thee main app myFocuserWin_1433, I try to execute it and get a Windows error. Doesn't know what to do with the .appref-ms extension.What do I need to change on my PC setup?

    Jim

     
  • brownrb

    brownrb - 2015-02-22

    Please ensure that you have the .NET framework installed, preferably .NET Framework 4 Client Profile. The install program should ask if to install it if its not present, the framework must be installed to be able to support running these applications.

     
  • Rodney Mothersbaugh

    Hello GREAT idea, I am having issues with the software myFocuserWin. When I click connect the application just freezes and must be terminated via task manager. I have hooked up another serial interface to my arduino and I do not see the data coming from the application (:GM#). I added a println to the arduino loop and i see that the arduino is responsive. I have also added println in the serialevent so it sends everything that is get from the USB serial to the added serial. I have verified that I have the .NET client profile. I was wondering if you had any suggestions on where to look to help fix the issue. I am going to try and skip the application and use the ASCOM driver. I will let you know how that works out in the next five minutes or so. Thanks for your help in advance... Rodney

    *UPDATE I have verified that I cannot use any of the software, ASCOM or windows app. I have also verified that the SerialEvent is not triggered. (I added a println to the debugging serial interface directly after the SerialEvent fucntion.)

    UPDATE #2: I am sorry I found the issue I think. I will keep you posted.

     

    Last edit: Rodney Mothersbaugh 2015-03-16
  • brownrb

    brownrb - 2015-03-16

    Hi Rodney
    I would use control panel to uninstall the previous install.
    Then download the latest version of myFocuserWinApp and install it using administrator privledge

    If that does not work, you can install the myFocuserAApp - it talks to the ascom driver and verifies everything is ok.

    First thing I would do though is load up the Arduino IDE environment and load the latest firmware into the controller.
    Then us the serial monitor in the Arduino IDE to view the serial port - you wont see anything - just type :GP# and then you should see the current focuser position, also try sending :XY# and it should then dump all the parameters - if you see this then the serial is working fine. be sure to use the same comport in Arduino as in the application

    Otherwise it could be an issue with the USB cable?
    Check that you have .NET 4.5 installed, older versions will not work or have issues

     
  • brownrb

    brownrb - 2015-03-16

    If none of that works, please email me direct and I will send you a special debug version that will help trace where the problem is.

     
    • Rodney Mothersbaugh

      I changed all the communication over to my added com port and it is working great. I wonder if it the upgrade i did to the arduino software today. Thanks again for your help ... GREAT PROJECT

       
  • brownrb

    brownrb - 2015-03-16

    Hi Rodney
    Glad to hear the problems are sorted.

     
  • Dan

    Dan - 2015-04-24

    Hi Guys!
    Thank you Robert for this project, it is very useful!
    I have one trouble with application. When i try to read temperature by pressing button GET temperature application returns error message: "Input string was not in a correct format -> continue & quit."
    When i manualy send :GZ# in port, arduino answers 24.62#. Thus it works.
    What do i do wrong? Do i have mistake in DNA? lol)

    PS: By the way, ASCOM control does not see temperature too. Print "Input string was not in a correct format"
    Thanks in advance.

     

    Last edit: Dan 2015-04-24
  • brownrb

    brownrb - 2015-04-24

    Hi Dan
    I believe it has to do with With Windows Locale settings (language settings) in that currency etc, its set so that the dot (.) seperator is something else (your regional setting is not US EN). ???

    The ascom code returns the string with "xx.xx" and thus windows trys to convert it to a double type but expects it to be "xx,xx" instead or some other seperator type depending on the locale setting, hence the application error which is caught. Ascom/windows = same error

    I have some code examples somewhere on how to c# code it to be insenstive to locale (culture insensitive i think they call it), had looked at coding this before but got sidetracked. memory is a hit hazy. Could take digging.
    Cheers
    robert

     
  • brownrb

    brownrb - 2015-04-24

    Hi Dan
    I have modded the Windows application as that is easiest to test.

    Try the new beta sw in the beta folder and report back. If that works I will then port that code to the ASCOM driver as well.

    Cheers
    Robert

     
  • brownrb

    brownrb - 2015-04-25

    Hi Dan
    If that doesnt work let me know as I have another way that will, but it means new firmware and app/asccom code. What driver board are you using in case I need to make that mod ready for you to try if the above does not work (I think it should, I tested it here and it appears to work fine when I change the region settings).
    Cheers
    Robert
    brown_rb at yahoo dot com

     
  • Dan

    Dan - 2015-04-26

    Robert, you were absolutely right! The whole thing was in windows local settings. Decimal point was "," after changing this to "." all worked normal.
    I use A4988 driver. It's an almost full copy of DRV8825. It lacks 1/32 microstepping only. I had to make minor changes in arduino code.
    I also tested your new beta version of WinApp, all works with dot and comma.
    Good job! Thanks a lot! Clear sky for you))

     
  • brownrb

    brownrb - 2015-04-26

    Hi Dan
    I will go ahead and make the same changes to the ASCOM drivers and post those soon then.
    Cheers

     
  • brownrb

    brownrb - 2015-04-26

    Hi Dan
    Changes are done, new ASCOM and Windows app are uploaded. Let me know if there are any issues.

     
  • Michael Glibstrup

    Hi Robert,
    This is really a great project you've got going here. I'm having a lot of fun building it and debugging the arduino code :-) With regard to the Windows side of things I get a persistent error when moving the stepper motor. I get it when trying to move the motor. Up to 80 steps work no problem but 85 and above throws an exception - see below. I get the error in both the ASCOM test program and in the full blown Windows program. I also get an exception error in the program I use when imaging (APT) but it doesn't show the type of exception. I was wondering if it would be possible to get all the code for this project? It would help in debugging my setup a lot.
    Cheers,
    Michael

    ASCOM.DriverException: CheckDotNetExceptions ASCOM.myFocuserASCOM.Focuser Position Get System.FormatException: Could not find any recognizable digits.
    at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32 currPos)
    at System.Convert.ToInt32(String value, Int32 fromBase)
    at ASCOM.myFocuserASCOM.Focuser.get_Position() (See Inner Exception for details) ---> System.FormatException: Could not find any recognizable digits.
    at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32
    currPos)
    at System.Convert.ToInt32(String value, Int32 fromBase)
    at ASCOM.myFocuserASCOM.Focuser.get_Position()
    --- End of inner exception stack trace ---
    at ASCOM.DriverAccess.MemberFactory.CheckDotNetExceptions(String memberName, Exception e) in c:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 543
    at ASCOM.DriverAccess.MemberFactory.GetTargetInvocationExceptionHandler(String memberName, Exception e) in c:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 664
    at ASCOM.DriverAccess.MemberFactory.CallMember(Int32 memberCode, String memberName, Type[] parameterTypes, Object[] parms) in c:\ASCOM Build\Export\ASCOM.DriverAccess\MemberFactory.cs:line 231
    at ASCOM.DriverAccess.Focuser.get_Position() in c:\ASCOM Build\Export\ASCOM.DriverAccess\Focuser.cs:line 152
    at ASCOM.myFocuser.myFocuser.movefocusercmd(Int32 steps)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

     
  • brownrb

    brownrb - 2015-06-14

    Hi Michael
    It appears to be a serial port issue.
    ASCOM.DriverException: CheckDotNetExceptions ASCOM.myFocuserASCOM.Focuser Position Get System.FormatException: Could not find any recognizable digits.
    at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32 currPos)
    indicates that the arduino did not respond with a valid focuser position.
    This could be due to a number of things - intermittent buggy rs232 connection, other code running on the arduino or a modified arduino file? using a different serial port on the arduino? power supply issues?

    Turn on logging.
    Connect, then do move when it does not fail (like 10 steps)
    Then do a move when it fails (like 100 steps)
    Then email me the log file please. brown_rb at yahoo dot com
    Also let me know yout ascom version, your windows version.

     
  • brownrb

    brownrb - 2015-06-17

    Hi Michael
    Have you had a chance to look at your issue?

     
  • Michael Glibstrup

    Hi Robert,
    I have looked at the issue and it was my mistake. I used a new copy of the arduino file and that fixed it. I made a few changes as the push-buttons on the electronics didn't work and I must have missed something there. Maybe you could take a look at those? You check the variable gotonewposition which isn't set in the code where you check if the buttons have been pressed. Might be something there?

     
  • brownrb

    brownrb - 2015-06-20

    The push buttons are pretty tricky, its worthwhile running the test program to ensure that you are getting the correct values. The appendix in the document pdf (pg71) is also good as it tells you the values to expect. It has to be wired correctly to work, to A0.
    If the push buttons are wired wrong then you will get strange results. So best to run a check to see what values are being returned when pb1 is pushed, pb2 is pushed, pb1+pb2 is pushed and when none is pushed.
    basically the arduino code then uses a boundary check (both sides, like -40 to +40) around each of these values.
    For example if pb1 returned 681 then the check for PB1 would look like

    int readpbswitches(int pinNum) {
    // sw1 (681) 650-720, sw2 (338) 310-380, sw1 and sw2 (509) 460-530
    int val = 0; // variable to store the read value
    digitalWrite((14 + pinNum), HIGH); // enable 20k internal pullup, 14=A0
    val = analogRead(pinNum); // read the input pin
    if ( val >= 650 && val <= 720 ) {
    return 1; // toggle sw1 ON and SW2 OFF
    }

    You need to run the test program to find out what your values are. They should be close to that above if the wiring is correct and you have used the correct value resistors.
    // sw1 (681) 650-720, sw2 (338) 310-380, sw1 and sw2 (509) 460-530

    If not, then you will need to make changes.

    A testprogram like this will show the values on the Arduino serial port monitor
    / Test program 1
    requires push button switches, LEDS IN and OUT, Buzzer
    /

    include <Arduino.h>

    // define Push Buttons, use voltage divider network for two push button switches using A0
    // use software debouncing

    define PBswitchesPin A0 // push button switches wired to A0 via resistor divider network

    int PBVal = 0; // holds state of pushbutton switches

    // read the push button switches and return state of switches
    // 1 = SW1 ON AND SW2 OFF, 2 = SW2 ON AND SW1 OFF, 3 = SW1 ON and SW2 ON, 0 = OFF
    int readpbswitches(int pinNum) {
    // sw1 (681) 650-720, sw2 (338) 310-380, sw1 and sw2 (509) 460-530
    int val = 0; // variable to store the read value
    digitalWrite((14 + pinNum), HIGH); // enable 20k internal pullup, 14=A0
    val = analogRead(pinNum); // read the input pin
    return val;
    }

    // Setup
    void setup() {
    // initialize serial for ASCOM
    Serial.begin(9600);

    Serial.println("Test Program 1A:");
    }

    // Main Loop
    void loop() {
    // check pushbutton switches
    PBVal = readpbswitches(PBswitchesPin);
    Serial.println(PBVal);
    }

    After that, yes you right, the PB got broken from v1.34, I will post updated code today.

    Cheers
    Robert

     
  • Tomas Wikander

    Tomas Wikander - 2015-07-12

    Hi and thanks for all the effort put into this project! Very inspiring!

    I have just managed to get the things together and I'm testing my device, DRV8825, NEMA17 stepper and a DB18B20 temp probe. No buttons and no display.

    I am using the Focuserv143_DRV8825_F.ino. The lines in "Special note" are deleted and no LCD is connected. Everything works just fine when using myFocuserWinApp, everything also works fine when using Maxim DL 5 and myFocuserASCOM.

    When it comes to FocusMax I run into problems... When connecting mFocuserASCOM to FocusMax, FocusMax becomes slow and delayed. Also when jogging the stepper it does not run continuously, it stops after 30-40 steps, pauses and moves 30-40 steps again until it reaches whatever value I've chosen.

    I have tried using Focuserv141_DRV8825_M.ino and everything works fine also with FocusMax, but without temperature information. No slow and delayed program execution in FocusMax.
    When adding the lines for the temperature probe in the Focuserv141_DRV8825_M.ino the problems start again when using FocusMax. Operation in Maxim DL5 is not affected.

    Is the focuser locking up FocusMax, does the reading of the temp probe "choke" the software?
    Maybe I'm trying to do something that can't be made or is there a solution to my problem?

    Best regards from Sweden,
    Tomas W

     
  • brownrb

    brownrb - 2015-07-12

    Hi
    I do not have focusmax so am not sure what it may be doing. I suspect that its trying multiple things whilst the focuser is moving (like GP and GZ get Temp calls.) That would definately slow down the focuser a lot, as each temp call takes around 750ms to process (sometimes longer).

    Try the code v144 in the beta folder, which enforces blocking of temp calls and let me know.

    If this works fine, but we might also need to update the ascom driver. its version 145 at present.

     
  • brownrb

    brownrb - 2015-07-12

    What I did was add another variable "lasttempval", and if the focuser is 1) moving - then do not do a temp call but return lasttempval, and 2) if not moving, then do a temp call, copy ch1tempval into lasttempval and send back the temp reading.

    I believe focusmax is issuing focuser get temp calls and this will explain the delays when moving. Using the winapp program actually blocks the call.

    The ASCOM driver doesnt. I might rewrite the ascom driver to return the last temperature reading if the focuser is already moving. That would do the same thing as the v144 arduino firmware code, but be cleaner in stopping unnecessary comms traffic. I remember seeing this done in other drivers.

    Let me know if v144 of the arduino firmware in the beta folder resolves your issue and I'll then change the ascom driver (email me brown_rb at yahoo dot com )

    Thanks
    Robert

     
    • brownrb

      brownrb - 2016-06-04

      As an update, yes FocusMax was sending calls every second to the focuser. This is historical behaviour in FocusMax. After communicating with Steve Brady on this issue, the new release of FocusMax has a setting where you can alter the delay between requests for updates to a more manageable time, such as 5s which would be recommended
      Robert

       

      Last edit: brownrb 2016-06-04
  • Jon Rista

    Jon Rista - 2016-06-04

    Hello Robert,

    I just downloaded the latest version of your ASCOM driver and windows test program, as I am working on getting a focuser configured for a Canon lens. I've got the Arduino firmware uploaded and the Arduino with the L293D shield connected via USB to the computer. Windows shows it on COM5.

    When I try to install the windows software, it seems to install, then as it starts up, it throws an error about not being able to access C:. If I continue the program runs, however clicking any button results in teh same error about not being able to access C:. It also does not list any com ports, so I cannot select the controller and do any testing to make sure the motor is working.

    I am using Windows 8.1, running an administrator account.

    Do you have any ideas as to what the issue may be?

    Thanks!
    Jon

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.