Hi Brown,
My system is Windows 10 with NINA 3.0, 3.1 beta.
Atmega32u4 (arduino micro) with myFP2F_TMC2209SG_328 firmware.
Everything was fine when using myFP2ASCOM 3.0.0. Once I upgrade to myFP2ASCOM 3.0.1, when I disconnect focuser and closed NINA. Next time I connect to focuser ASCOM, the maxsteps will be change to "1024" from 60000. I have to change ascom setting up from 60000 (display 60000, but reading from EEPROM is 1024) to another number then change to 60000 again. Then ASCOM can work correct without warning message about corrent position exceed the maxstep limit.
I removed myFP2ASCOM 3.0.1 and installed myFP2ASCOM 3.0.0, the error will not occurr again.
You need to update the firmware to version 334.
The procedure is as follows
1. Program controller chip with ClearEEPROM (attached) which sends a message on the Serial port when erasure is complete
2. Load the 334 firmware, set the settings in the config file and program the controller chip
After that, u can use the Windows app to set settings like StepSize, StepMode, Position and MaxStep, stepsize enable. motor speed,
Set stepmode to 1/4 for the TMC2209
Once set use the Windows App menu, Settings and then "Write Settings EEPROM" option.
After that exit Windows
Remove the 3.0.0 driver using Control Panel
Make sure that there are no myfp2 files in the folder
C:\Program Files (x86)\Common Files\ASCOM\Focuser
any myfp2 .dll files or folders - delete them
Next install ASCOM driver 3.0.1 driver
Start NINA, access the Setup Dialog for the ASCOM 3.0.1 driver
On the Connection tab, check TRACE on
On the Update on Connect tab, Clear all check boxes,
on Connection tab click
Back in Nina click Connect.
You are now connected and the driver will write a logfile.
After any change to a focuser setting like MaxStep etc, the data is cached in memory.
The firmware will run a counter, and when that counter expires, will save the cached settings in memory to EEPROM storage. Depending on how that is configured, it could be anywhere from 10-30 seconds.
Wait for that to do, then Exit Nina and wait a minute or so, then reconnect to the driver.
If it is not fixed, there is now a log file, so please post that and we will look to see what the log has recorded.
The Update On connect is only needed Once - when setting up the controller.
If you used the Windows app to do the post configuration (setting up step mode, stepsize, maxsteps, position as described in the pdf (page 103 ) "INITIAL SETUP FOR ALL CONTROLLERS"
After that the controller is setup correctly. Once that is done, do not use Update On Connect in the ASCOM driver. If you do, the chances of a stuff-up is very high with the controller settings being changed.
Regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have what I think is the same, focuser crashed and when it reconnected (automatically) the max step size was the same as the current position it therefore failed when doing an autofocus mid sequence as it reached its limit.
log file attached max step size was supposed to be 120000 went to 16932
version 301 driver
version 334 firmware
I see the ascom driver you are using, it is version 301
0:09:06.628 DriverInfo Get myFP2 ASCOM driver, R Brown
00:09:06.628 DriverVersion Get 3.0.1
00:09:06.628 MaxStep() Get MaxStep: 120000
00:09:06.628 MaxIncrement() 120000
00:09:06.628 MaxStep() Get MaxStep: 120000
00:09:06.628 MaxStep() Get MaxStep: 120000
Now looking at the logfile I see
00:09:06.357 Connected Get MaxSteps
00:09:06.357 IsConnected Get True
00:09:06.357 Sending :08#
00:09:06.412 Sending success
00:09:06.412 GetResponse raw response: M120000#
00:09:06.412 GetResponse returning: 120000
00:09:06.413 Connected focuser reply = 120000
00:09:06.413 Connected Get maxSteps=120000
so Maxsteps from the Controller was 120000
and position was 17719
00:09:06.649 Position() Get 00 Position
00:09:06.649 ReadPosition START
00:09:06.649 IsConnected Get True
00:09:06.649 Sending :00#
00:09:06.700 Sending success
00:09:06.700 GetResponse raw response: P17719#
00:09:06.700 GetResponse returning: 17719
00:09:06.700 ReadPosition response: 17719
00:09:06.700 ReadPosition Focuser_Position = 17719
00:09:25.472 MaxStep() Get MaxStep: 120000
00:09:29.478 MaxStep() Get MaxStep: 120000
00:09:38.602 MaxStep() Get MaxStep: 120000
00:09:48.555 MaxStep() Get MaxStep: 120000
00:10:04.963 MaxStep() Get MaxStep: 120000
etc
00:11:59.377 MaxStep() Get MaxStep: 120000
00:11:59.377 Move From 16942 to 16932
00:11:59.377 Sending :0516932#
hr:mm:ss:ms
**The last time Get MaxStep was at 00:11:59.377
and the next occured at 00:45:34.431
Thats a significant gap of 32 minutes, **
Considering that maxStep is essentially a const type,
there is NO set maxStep command in ASCOM
00:45:34.431 MaxStep() Get MaxStep: 16932
00:45:42.365 MaxStep() Get MaxStep: 16932
00:45:42.585 MaxStep() Get MaxStep: 16932
00:45:52.363 MaxStep() Get MaxStep: 16932
00:45:52.581 MaxStep() Get MaxStep: 16932
00:46:06.920 MaxStep() Get MaxStep: 16932
00:46:07.104 MaxStep() Get MaxStep: 16932
00:46:21.054 MaxStep() Get MaxStep: 16932
00:46:21.273 MaxStep() Get MaxStep: 16932
00:46:35.004 MaxStep() Get MaxStep: 16932
00:46:35.231 MaxStep() Get MaxStep: 16932
00:46:41.011 MaxStep() Get MaxStep: 16932
ISSUES
00:13:40.818 Temperature() START
00:13:40.818 IsConnected Get True
00:13:40.818 Sending :06#
00:13:45.822 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
00:13:45.824 Temperature Get Temperature Error = return value was null
00:13:45.824 Temperature ERROR: Null reply Timeout error: No response to Get Temperature: 5s elapsed without a reply Next, there was a reconnect
00:13:47.061 Connected Connecting to port COM4
00:13:47.062 Connected Get baudrate: 19200
00:13:47.062 Connected Setting baudrate to 19200
I strongly suggest that reset the baudrate to 9600.
This is caused by previous error., like a ripple effect
00:14:20.871 Read_IsMoving SEND request for ismoving
00:14:20.871 IsConnected Get True
00:14:20.871 Sending :01#
00:14:20.930 Sending success
00:14:20.930 GetResponse raw response: Z11.50#
00:14:20.930 GetResponse returning: 11.50
00:14:20.930 Read_IsMoving response: 11.50
**00:14:20.931 Read_IsMoving ERROR 01 read IsMoving: **
System.FormatException: Input string was not in a correct format.at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at ASCOM.myFP2ASCOM.Focuser.Read_IsMoving()
Response error: Get IsMoving received a response for GetTemperature
00:42:55.836 GetResponse ERROR: Exception
System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
00:42:55.836 Read_IsMoving response:
00:42:55.836 Read_IsMoving ERROR 01: IsMoving null
I strongly suggest that reset the baudrate to 9600.
Reset baudrate and run again to test for any more timeouts.
The problem is that changing the serial timeout value does not help because NINA will set the serial timout on its recieve side, I assume 5s, so if the ascom driver was set for a timeout of 10s NINA will just ignore it. Unless that has been built into NINA (which I doubt)
regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You would need to have high quality (mil spec) shielded and shorter cables (1m) and a good pc to run 19200 or higher. I have run things to 57600 without issue, but again, not something I recommend or support.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I ran a session last night and had the same issue after the session had finished this iswith 335 and baud 9600.
alas I didnt have trace switched on so no log but i have switched it back on now and with tonight looking clear I may get another go
I did email you ref driver hope all is well
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the ASCOM driver starts, and for example you click the properties to bring up the SetupDialog form (which has tabs and connect button etc), any value that you see is NOT what the focuser setting is.
What the ascom driver does is try to remember the last values. When the driver starts it is NOT connected to the controller. So any values displayed on the form are in the driver, not the controller.
When NINA connects to the ASCOM driver, it sets the driver to method Connected.
The driver opens a serial connection to the controller, sends whatever is on the Update on Connect tab first, then reads back things like temp, position, maxstep, stepsize, temp comp available etc. The driver saves these into its profile settings (which you see using the Profile Explorer) and when NINA requests a focuser setting, the driver sends the value back to NINA.
For some settings, like position, ismoving, temperature, these settings change. But other settings do not change (maxsteps, stepsize, tempcomp available, absolute) so they are read once by the driver when it opens a connection to the controller, and from that point on the cached value is sent to NINA when they are requested,
The only was for these cached settings to change would only happen once, when the driver first opens a serial connect and sends any Update On Connect settings to the controller. In ASCOM, the settings that are cached - has no set() method, there is only a get() method,.
Indicates the firmware version is for ULN2003 and Version 335
(Note that this was actually Set and not Get because
22:21:37.790 Connected Sending mexstep on connect
22:21:37.791 MaxStep() Set MaxStep: 0
22:21:37.791 Connected Sending new Max_Step value now: 0
22:21:37.791 MaxStep() Set MaxStep: 0
22:21:37.794 IsConnected Get True
22:21:37.795 Sending :070#
22:21:37.795 Connected Send: Success
from the log indicates that the Update On Connect tab of the ASCOM Driver has the MaxStep checkbox ticked. (Sending mexstep on connect)
The MaxStep value inside the text field on the Connection tab at that tiime was 0. ( Sending new Max_Step value now: 0)
(22:21:37.795) 07 means set maxstep, value 0, then end of command #, which was rec'd by the controller, but it did not change maxstep in the controller because of the rules for maxstep (cannot set it to 0)
Next we have this sequence
22:21:37.889 Connected Get MaxSteps
22:21:37.889 IsConnected Get True
22:21:37.889 Sending :08#
22:21:37.950 Sending success
22:21:37.950 GetResponse raw response: M8378#
22:21:37.950 GetResponse returning: 8378
22:21:37.950 Connected focuser reply = 8378
22:21:37.950 Connected Get maxSteps=8378
was send request 08 to the controller which responds with value of Maxstep as 8378
Next Position
22:21:38.229 IsConnected Get True
22:21:38.229 Position() START
22:21:38.229 Position() Get 00 Position
22:21:38.230 ReadPosition START
22:21:38.230 IsConnected Get True
22:21:38.230 Sending :00#
22:21:38.279 Sending success
22:21:38.279 GetResponse raw response: P8378#
22:21:38.279 GetResponse returning: 8378
22:21:38.279 ReadPosition response: 8378
22:21:38.279 ReadPosition Focuser_Position = 8378
returned a position of 8378
which is actually the same as MaxStep value.
Next I see this
22:21:38.496 DriverVersion Get 3.0.1
That is the Driver version 301, not 302. Did you access and install the 302 driver from the shared drive?
Moving along
22:23:00.461 IsConnected Get True
22:23:00.461 Sending :00#
22:23:05.482 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
22:23:05.482 ReadPosition response:
22:23:05.482 ReadPosition ERROR 00
Request for Position null response, timeout error
and the controller dropped the connection
Nina then reconnects
22:23:07.235 Connected Connecting to port COM4
then another null response occurs athis time ismoving
22:24:02.680 IsConnected Get True
22:24:02.680 Sending :01#
22:24:03.227 IsConnected Get True
22:24:03.227 IsMoving() read ismoving
22:24:03.227 Read_IsMoving START
22:24:03.227 Read_IsMoving SEND request for ismoving
22:24:07.682 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
22:24:07.682 Read_IsMoving response:
22:24:07.682 IsConnected Get True
22:24:07.682 Read_IsMoving ERROR 01: IsMoving null
22:24:07.682 Sending :01#
22:24:07.682 GetResponse ERROR: Exception, ASCOM.NotConnectedException: Serial
NINA reconnects
22:24:08.516 Connected Connecting to port COM4
then another error null response this time temperature
22:29:30.465 Temperature() START
22:29:30.465 IsConnected Get True
22:29:30.465 Sending :06#
22:29:35.486 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
22:29:35.486 Temperature Get Temperature Error = return value was null
22:29:35.486 Temperature ERROR: Null reply
NOTE:
You can see now a pattern. Works for a while then stops, does not answer, connection dropped, then NINA reconnects etc.
hh:mm:ss
xx.xx.30 send request
xx.xx.35 - no answer, 5s timeout
There is a 5 second timeout -
22:29:30.465 Sending :06#
22:29:35.486 GetResponse ERROR: Exception,
so it means that Driver is working on a 5s receive timeout.
Something to try: ascom driver, delays tab, increase serial read timeout to 10s.
and so on. It seems to be happening not at the same interval. sometimes every minute, sometines 5 minutes etc
Note that it is not the same request all the time. It happens on different ones. And because it is different each time, it probably points to a faulty USB cable?
Something to try, replace USB cable.
Question: How long is the USB cable that connects to the focuser?
At no time since connecting is MaxSteps changed, it remains at a value of 8378 from start to finish. That makes sense because maxsteps is a read only value in ASCOM.
When started, maxstep (in the controller) was
22:21:37.889 Connected Get MaxSteps
22:21:37.950 GetResponse raw response: M8378#
and the position(in the controller) was
22:21:38.229 Position() Get 00 Position
22:21:38.230 ReadPosition START
22:21:38.279 ReadPosition response: 8378
so the start was Position = MaxStep
Note:
I cannot see any log messages from the ASCOM Setup Dialog box, I assume you just started NINA and connected without brining up the properties window. As there is no log messages from the properties form this seems to indicate that it was the case.
If you start NINA and then just ask to connect to the driver, the properties is not displayed.
The firmware is 335 (version 336 is ready for release).
Do you have the ASCOM Profiler installed. I think its under Start ASCOM Platorm 6, Profile explorer.
You can run that, screenshot attached. It lists all the driver settings, and has the ability to change then as well. Its easy enough to check what the ascom driver is configured to do and what values it works with.
Been a very long day, will catch up again tommorrow
thanks Robert
the connection is bluetooth not usb if that makes any difference?
tbh i was thinking of changing it to a usb connection and i have a spare port very close to it so may do that and bin the BT all together
you didnt email me the link for 302 driver :(
all the best
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Bluetooth looks like a serial port in Windows - hence it uses the Serial Read Timeout values
I suggest that in the ASCOM driver (delay tab) you specify the Serial Read timeout as 8 seconds. Then check the ascom trace log for any errors (search keyword = ERROR
As from the log it was timeing out like every 1-2 minutes, so scanning the new ASCOM log file for error would give you an indication as to whether that is better. If there are less errors, but less than before, I would slowly increase it till the serial read time out errors are gone. (anything > 10) would point to something else.
Regards
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Dave
a playground ascom driver - try this instead of 331.
make sure to uninstall previous ascom driver - use control panel
Install this one
Enable trace in the ASCOM driver properties. You will know if the driver was installed because the properties window is significanly different from v301.
the driver is for testing the maxStep issue only.
To other users: Don't use this driver, and please do not expect me to answer any questions or feedback about tis ascom driver.
Hi Dave
a playground ascom driver - try this instead of 331.
make sure to uninstall previous ascom driver - use control panel
Install this one
Enable trace in the ASCOM driver properties. You will know if the driver was
installed because the properties window is significanly different from v301.
the driver is for testing the maxStep issue only.
To other users: Don't use this driver, and please do not expect me to answer
any questions or feedback about tis ascom driver.
Hi Brown,
My system is Windows 10 with NINA 3.0, 3.1 beta.
Atmega32u4 (arduino micro) with myFP2F_TMC2209SG_328 firmware.
Everything was fine when using myFP2ASCOM 3.0.0. Once I upgrade to myFP2ASCOM 3.0.1, when I disconnect focuser and closed NINA. Next time I connect to focuser ASCOM, the maxsteps will be change to "1024" from 60000. I have to change ascom setting up from 60000 (display 60000, but reading from EEPROM is 1024) to another number then change to 60000 again. Then ASCOM can work correct without warning message about corrent position exceed the maxstep limit.
I removed myFP2ASCOM 3.0.1 and installed myFP2ASCOM 3.0.0, the error will not occurr again.
please send me email to my gmail account - look in pdf.
I have an updated ASCOM driver for you to try
Regards
Robert
I have an updated ASCOM driver
myFP2ASCOM302
Please send a request to my gmail address so I can assign you access
regards
Robert
Hi
You need to update the firmware to version 334.
The procedure is as follows
1. Program controller chip with ClearEEPROM (attached) which sends a message on the Serial port when erasure is complete
2. Load the 334 firmware, set the settings in the config file and program the controller chip
After that, u can use the Windows app to set settings like StepSize, StepMode, Position and MaxStep, stepsize enable. motor speed,
Set stepmode to 1/4 for the TMC2209
Once set use the Windows App menu, Settings and then "Write Settings EEPROM" option.
After that exit Windows
Remove the 3.0.0 driver using Control Panel
Make sure that there are no myfp2 files in the folder
C:\Program Files (x86)\Common Files\ASCOM\Focuser
any myfp2 .dll files or folders - delete them
Next install ASCOM driver 3.0.1 driver
Start NINA, access the Setup Dialog for the ASCOM 3.0.1 driver
On the Connection tab, check TRACE on
On the Update on Connect tab, Clear all check boxes,
on Connection tab click
Back in Nina click Connect.
You are now connected and the driver will write a logfile.
After any change to a focuser setting like MaxStep etc, the data is cached in memory.
The firmware will run a counter, and when that counter expires, will save the cached settings in memory to EEPROM storage. Depending on how that is configured, it could be anywhere from 10-30 seconds.
Wait for that to do, then Exit Nina and wait a minute or so, then reconnect to the driver.
If it is not fixed, there is now a log file, so please post that and we will look to see what the log has recorded.
regards
Robert
Hi
Any progress?
Ive taken a look at the source code and nothing leap out as a likely cause
Did you do the firmware update to 334?
Did you disable the Update on Connect checkboxes?
I have isolated NINA as a cause.
An ascom driver trace log could prove useful
Regards
Robert
Thank you.
My firmware is still in 328. I will test it next weekend.
By change the setting to:
On the Connection tab, check TRACE on
On the Update on Connect tab, Clear all check boxes,
on Connection tab click
Then the problem was fixed. The MaxStep will not be changed to 1024.
But if I did not check "TRACE on" and "Update" setting like 1st what I posted, the problem will occur no matter firmware of 328, 334 or 335.
Hi
The Update On connect is only needed Once - when setting up the controller.
If you used the Windows app to do the post configuration (setting up step mode, stepsize, maxsteps, position as described in the pdf (page 103 ) "INITIAL SETUP FOR ALL CONTROLLERS"
After that the controller is setup correctly. Once that is done, do not use Update On Connect in the ASCOM driver. If you do, the chances of a stuff-up is very high with the controller settings being changed.
Regards
Robert
I have what I think is the same, focuser crashed and when it reconnected (automatically) the max step size was the same as the current position it therefore failed when doing an autofocus mid sequence as it reached its limit.
log file attached max step size was supposed to be 120000 went to 16932
version 301 driver
version 334 firmware
weird!
Hi Dave
Update firmware to v335
https://sourceforge.net/projects/arduinoascomfocuserpro2diy/files/ARDUINO%20FIRMWARE/myFP2-Firmware-335.zip/download
I see the ascom driver you are using, it is version 301
0:09:06.628 DriverInfo Get myFP2 ASCOM driver, R Brown
00:09:06.628 DriverVersion Get 3.0.1
00:09:06.628 MaxStep() Get MaxStep: 120000
00:09:06.628 MaxIncrement() 120000
00:09:06.628 MaxStep() Get MaxStep: 120000
00:09:06.628 MaxStep() Get MaxStep: 120000
Now looking at the logfile I see
00:09:06.357 Connected Get MaxSteps
00:09:06.357 IsConnected Get True
00:09:06.357 Sending :08#
00:09:06.412 Sending success
00:09:06.412 GetResponse raw response: M120000#
00:09:06.412 GetResponse returning: 120000
00:09:06.413 Connected focuser reply = 120000
00:09:06.413 Connected Get maxSteps=120000
so Maxsteps from the Controller was 120000
and position was 17719
00:09:06.649 Position() Get 00 Position
00:09:06.649 ReadPosition START
00:09:06.649 IsConnected Get True
00:09:06.649 Sending :00#
00:09:06.700 Sending success
00:09:06.700 GetResponse raw response: P17719#
00:09:06.700 GetResponse returning: 17719
00:09:06.700 ReadPosition response: 17719
00:09:06.700 ReadPosition Focuser_Position = 17719
00:09:25.472 MaxStep() Get MaxStep: 120000
00:09:29.478 MaxStep() Get MaxStep: 120000
00:09:38.602 MaxStep() Get MaxStep: 120000
00:09:48.555 MaxStep() Get MaxStep: 120000
00:10:04.963 MaxStep() Get MaxStep: 120000
etc
00:11:59.377 MaxStep() Get MaxStep: 120000
00:11:59.377 Move From 16942 to 16932
00:11:59.377 Sending :0516932#
hr:mm:ss:ms
**The last time Get MaxStep was at 00:11:59.377
and the next occured at 00:45:34.431
Thats a significant gap of 32 minutes, **
Considering that maxStep is essentially a const type,
there is NO set maxStep command in ASCOM
00:45:34.431 MaxStep() Get MaxStep: 16932
00:45:42.365 MaxStep() Get MaxStep: 16932
00:45:42.585 MaxStep() Get MaxStep: 16932
00:45:52.363 MaxStep() Get MaxStep: 16932
00:45:52.581 MaxStep() Get MaxStep: 16932
00:46:06.920 MaxStep() Get MaxStep: 16932
00:46:07.104 MaxStep() Get MaxStep: 16932
00:46:21.054 MaxStep() Get MaxStep: 16932
00:46:21.273 MaxStep() Get MaxStep: 16932
00:46:35.004 MaxStep() Get MaxStep: 16932
00:46:35.231 MaxStep() Get MaxStep: 16932
00:46:41.011 MaxStep() Get MaxStep: 16932
ISSUES
00:13:40.818 Temperature() START
00:13:40.818 IsConnected Get True
00:13:40.818 Sending :06#
00:13:45.822 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
00:13:45.824 Temperature Get Temperature Error = return value was null
00:13:45.824 Temperature ERROR: Null reply
Timeout error: No response to Get Temperature: 5s elapsed without a reply
Next, there was a reconnect
00:13:47.061 Connected Connecting to port COM4
00:13:47.062 Connected Get baudrate: 19200
00:13:47.062 Connected Setting baudrate to 19200
I strongly suggest that reset the baudrate to 9600.
This is caused by previous error., like a ripple effect
00:14:20.871 Read_IsMoving SEND request for ismoving
00:14:20.871 IsConnected Get True
00:14:20.871 Sending :01#
00:14:20.930 Sending success
00:14:20.930 GetResponse raw response: Z11.50#
00:14:20.930 GetResponse returning: 11.50
00:14:20.930 Read_IsMoving response: 11.50
**00:14:20.931 Read_IsMoving ERROR 01 read IsMoving: **
System.FormatException: Input string was not in a correct format.at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at ASCOM.myFP2ASCOM.Focuser.Read_IsMoving()
Response error: Get IsMoving received a response for GetTemperature
00:42:55.836 GetResponse ERROR: Exception
System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
00:42:55.836 Read_IsMoving response:
00:42:55.836 Read_IsMoving ERROR 01: IsMoving null
I strongly suggest that reset the baudrate to 9600.
Reset baudrate and run again to test for any more timeouts.
The problem is that changing the serial timeout value does not help because NINA will set the serial timout on its recieve side, I assume 5s, so if the ascom driver was set for a timeout of 10s NINA will just ignore it. Unless that has been built into NINA (which I doubt)
regards
Robert
Hi Robert ok will update firmware i had set the baud to 19200 as a test tbh was running 9600 previously.
BR
You would need to have high quality (mil spec) shielded and shorter cables (1m) and a good pc to run 19200 or higher. I have run things to 57600 without issue, but again, not something I recommend or support.
Hi Dave
I have a new update ASCOM driver available for test if you are interested, please let me know via gmail.com please
Regards
Robert
I ran a session last night and had the same issue after the session had finished this iswith 335 and baud 9600.
alas I didnt have trace switched on so no log but i have switched it back on now and with tonight looking clear I may get another go
I did email you ref driver hope all is well
log attached looks like at first it sets the max steps to 0
then to what the position was
Hi Dave
this will ne a long reply
When the ASCOM driver starts, and for example you click the properties to bring up the SetupDialog form (which has tabs and connect button etc), any value that you see is NOT what the focuser setting is.
What the ascom driver does is try to remember the last values. When the driver starts it is NOT connected to the controller. So any values displayed on the form are in the driver, not the controller.
When NINA connects to the ASCOM driver, it sets the driver to method Connected.
The driver opens a serial connection to the controller, sends whatever is on the Update on Connect tab first, then reads back things like temp, position, maxstep, stepsize, temp comp available etc. The driver saves these into its profile settings (which you see using the Profile Explorer) and when NINA requests a focuser setting, the driver sends the value back to NINA.
For some settings, like position, ismoving, temperature, these settings change. But other settings do not change (maxsteps, stepsize, tempcomp available, absolute) so they are read once by the driver when it opens a connection to the controller, and from that point on the cached value is sent to NINA when they are requested,
The only was for these cached settings to change would only happen once, when the driver first opens a serial connect and sends any Update On Connect settings to the controller. In ASCOM, the settings that are cached - has no set() method, there is only a get() method,.
On with the log file.
22:21:37.695 Sending :04#
22:21:37.774 Sending success
22:21:37.774 GetResponse raw response: FULN2003_M_MT_F_BT335#
Indicates the firmware version is for ULN2003 and Version 335
(Note that this was actually Set and not Get because
22:21:37.790 Connected Sending mexstep on connect
22:21:37.791 MaxStep() Set MaxStep: 0
22:21:37.791 Connected Sending new Max_Step value now: 0
22:21:37.791 MaxStep() Set MaxStep: 0
22:21:37.794 IsConnected Get True
22:21:37.795 Sending :070#
22:21:37.795 Connected Send: Success
22:21:37.889 Connected Get MaxSteps
22:21:37.889 IsConnected Get True
22:21:37.889 Sending :08#
22:21:37.950 Sending success
22:21:37.950 GetResponse raw response: M8378#
22:21:37.950 GetResponse returning: 8378
22:21:37.950 Connected focuser reply = 8378
22:21:37.950 Connected Get maxSteps=8378
was send request 08 to the controller which responds with value of Maxstep as 8378
Next Position
22:21:38.229 IsConnected Get True
22:21:38.229 Position() START
22:21:38.229 Position() Get 00 Position
22:21:38.230 ReadPosition START
22:21:38.230 IsConnected Get True
22:21:38.230 Sending :00#
22:21:38.279 Sending success
22:21:38.279 GetResponse raw response: P8378#
22:21:38.279 GetResponse returning: 8378
22:21:38.279 ReadPosition response: 8378
22:21:38.279 ReadPosition Focuser_Position = 8378
returned a position of 8378
which is actually the same as MaxStep value.
Next I see this
22:21:38.496 DriverVersion Get 3.0.1
That is the Driver version 301, not 302. Did you access and install the 302 driver from the shared drive?
Moving along
22:23:00.461 IsConnected Get True
22:23:00.461 Sending :00#
22:23:05.482 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
22:23:05.482 ReadPosition response:
22:23:05.482 ReadPosition ERROR 00
Request for Position null response, timeout error
and the controller dropped the connection
Nina then reconnects
22:23:07.235 Connected Connecting to port COM4
then another null response occurs athis time ismoving
22:24:02.680 IsConnected Get True
22:24:02.680 Sending :01#
22:24:03.227 IsConnected Get True
22:24:03.227 IsMoving() read ismoving
22:24:03.227 Read_IsMoving START
22:24:03.227 Read_IsMoving SEND request for ismoving
22:24:07.682 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
22:24:07.682 Read_IsMoving response:
22:24:07.682 IsConnected Get True
22:24:07.682 Read_IsMoving ERROR 01: IsMoving null
22:24:07.682 Sending :01#
22:24:07.682 GetResponse ERROR: Exception, ASCOM.NotConnectedException: Serial
NINA reconnects
22:24:08.516 Connected Connecting to port COM4
then another error null response this time temperature
22:29:30.465 Temperature() START
22:29:30.465 IsConnected Get True
22:29:30.465 Sending :06#
22:29:35.486 GetResponse ERROR: Exception, System.Runtime.InteropServices.COMException (0x80040402): Timed out waiting for received data at ASCOM.Utilities.Serial.ReceiveTerminated(String Terminator) in C:\ASCOM Build\Export\ASCOM.Utilities\ASCOM.Utilities\Serial.vb:line 1204 at ASCOM.myFP2ASCOM.Focuser.GetResponse(String tcmd)
22:29:35.486 Temperature Get Temperature Error = return value was null
22:29:35.486 Temperature ERROR: Null reply
NOTE:
You can see now a pattern. Works for a while then stops, does not answer, connection dropped, then NINA reconnects etc.
hh:mm:ss
xx.xx.30 send request
xx.xx.35 - no answer, 5s timeout
There is a 5 second timeout -
22:29:30.465 Sending :06#
22:29:35.486 GetResponse ERROR: Exception,
so it means that Driver is working on a 5s receive timeout.
Something to try: ascom driver, delays tab, increase serial read timeout to 10s.
22:32:04.562 Sending :01#
22:32:09.569 GetResponse ERROR: Exception,
22:23:00.461 Sending :00#
22:23:05.482 GetResponse ERROR:
22:24:03.227 Read_IsMoving SEND request for ismoving
22:24:07.682 GetResponse ERROR:
22:29:30.465 Sending :06#
22:29:35.486 GetResponse ERROR:
and so on. It seems to be happening not at the same interval. sometimes every minute, sometines 5 minutes etc
Note that it is not the same request all the time. It happens on different ones. And because it is different each time, it probably points to a faulty USB cable?
Something to try, replace USB cable.
Question: How long is the USB cable that connects to the focuser?
At no time since connecting is MaxSteps changed, it remains at a value of 8378 from start to finish. That makes sense because maxsteps is a read only value in ASCOM.
When started, maxstep (in the controller) was
22:21:37.889 Connected Get MaxSteps
22:21:37.950 GetResponse raw response: M8378#
and the position(in the controller) was
22:21:38.229 Position() Get 00 Position
22:21:38.230 ReadPosition START
22:21:38.279 ReadPosition response: 8378
so the start was Position = MaxStep
Note:
I cannot see any log messages from the ASCOM Setup Dialog box, I assume you just started NINA and connected without brining up the properties window. As there is no log messages from the properties form this seems to indicate that it was the case.
If you start NINA and then just ask to connect to the driver, the properties is not displayed.
The firmware is 335 (version 336 is ready for release).
Do you have the ASCOM Profiler installed. I think its under Start ASCOM Platorm 6, Profile explorer.
You can run that, screenshot attached. It lists all the driver settings, and has the ability to change then as well. Its easy enough to check what the ascom driver is configured to do and what values it works with.
Been a very long day, will catch up again tommorrow
Regards
Robert
thanks Robert
the connection is bluetooth not usb if that makes any difference?
tbh i was thinking of changing it to a usb connection and i have a spare port very close to it so may do that and bin the BT all together
you didnt email me the link for 302 driver :(
all the best
Hi Dave
Well that explains a lot,
Bluetooth looks like a serial port in Windows - hence it uses the Serial Read Timeout values
I suggest that in the ASCOM driver (delay tab) you specify the Serial Read timeout as 8 seconds. Then check the ascom trace log for any errors (search keyword = ERROR
As from the log it was timeing out like every 1-2 minutes, so scanning the new ASCOM log file for error would give you an indication as to whether that is better. If there are less errors, but less than before, I would slowly increase it till the serial read time out errors are gone. (anything > 10) would point to something else.
Regards
Robert
Hi Dave
a playground ascom driver - try this instead of 331.
make sure to uninstall previous ascom driver - use control panel
Install this one
Enable trace in the ASCOM driver properties. You will know if the driver was installed because the properties window is significanly different from v301.
the driver is for testing the maxStep issue only.
To other users: Don't use this driver, and please do not expect me to answer any questions or feedback about tis ascom driver.
Regards
Robert
Hi Robert
I cant get this to load in NINA it will open the config box and shows the
version 302 but gets stuck half way and locks NINA
See attached screenshot and log
All the best
Dave
From: discussion@arduinoascomfocuserpro2diy.p.re.sourceforge.net
discussion@arduinoascomfocuserpro2diy.p.re.sourceforge.net On Behalf Of
brownrb
Sent: Thursday, August 1, 2024 7:17 AM
To: [arduinoascomfocuserpro2diy:discussion]
general@discussion.arduinoascomfocuserpro2diy.p.re.sourceforge.net
Subject: [arduinoascomfocuserpro2diy:discussion] myFP2ASCOMSetup301 will set
maxsteps to 1024 once it disconnected
Hi Dave
a playground ascom driver - try this instead of 331.
make sure to uninstall previous ascom driver - use control panel
Install this one
Enable trace in the ASCOM driver properties. You will know if the driver was
installed because the properties window is significanly different from v301.
the driver is for testing the maxStep issue only.
To other users: Don't use this driver, and please do not expect me to answer
any questions or feedback about tis ascom driver.
Regards
Robert
Attachments:
https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/thr ead/87221f1616/863e/attachment/myFP2ASCOMSetup302.exe (452.6 kB;
application/x-msdownload)
myFP2ASCOMSetup301 will set maxsteps to 1024 once it disconnected
https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/thr ead/87221f1616/?limit=25#863e
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/arduinoascomfocuserpro2diy/discussion/general/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
i did run a session last night with 336 and 301 driver and had no issues