Welcome, Guest
Username: Password: Remember me
27 Feb 2017
INDI development team is happy to announce the release of INDI Library v1.4.0. This new exciting release builds on the maturity of INDI Library and comes with many new supported devices and fixes for existing drivers. Several improvements and enhancements are included in this release including native support for Cygwin and MacOS platforms in addition to Linux, BSD, and Windows (Client only).
Read More...
  • Page:
  • 1

TOPIC: Issues with indi_eqmod and custom MC

Issues with indi_eqmod and custom MC 1 week 4 days ago #17908

  • Platone
  • Platone's Avatar Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 7
Hi, I am facing some problems with my own motor controller, I wrote this firmware to be compatible with a SynScan HC and I'm trying to interfacing it with indi_eqmod.
The board works perfectly with my SynScan, but the INDI driver stops immediately after a track command.
If you check out the log attached, you'll see that it's waiting for a reply from the SetStepPeriod command ":I".
I checked for timing issues, put a small delay after the reception of this command, tried also to avoid setting the stepperiod variable in firmware, no luck.
I also think it may happen in set commands.
Do I miss anything? Does eqmod expect anything when issuing SetStepPeriod?
Thanks all,
Ilias.
Attachments:

Please Log in or Create an account to join the conversation.

If something has worked, it will work again.
Last Edit: by Platone. Reason: added attachment: code

Issues with indi_eqmod and custom MC 1 week 3 days ago #17915

Hi Ilia,
I think that the '=' answer is not sent because the StepPeriod is too short (000006) for your firmware.
The pic processor may be almost always in the timer interrupt routine, hence no time for send_string().
I would suggest to apply a min when setting stepperiod[axis] in the SetStepPeriod case, as the indi driver has no way to know this minimum.

Jean-Luc.
The following user(s) said Thank You: Platone

Please Log in or Create an account to join the conversation.

Issues with indi_eqmod and custom MC 1 week 3 days ago #17916

  • Platone
  • Platone's Avatar Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 7
Hi Jean-Luc, and thanks for your reply.
I will try to do like you said (setting the minimum at command reception), but if you see into SetMicrostep() (called after a StartMotion) the step period is set to a minimum of 30. Also gotos are not limited in speed and this applies in both motion mode cases SetMicrostep sets the stepperiod only in slewmode, and goto stepperiod is always set to this minimum (30). When I issue a goto from the SynScan, speed is set automatically at maximum, and I got no timing problem.
I tried also to check if there is any issue with signed types in my code, with no luck.

Please Log in or Create an account to join the conversation.

If something has worked, it will work again.
Last Edit: by Platone. Reason: clarification about minimum step period

Issues with indi_eqmod and custom MC 1 week 3 days ago #17923

  • Platone
  • Platone's Avatar Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 7
I solved by now by commenting out any read_eqmod after all SetXXX commands. It can now track and goto. I found some other bugs in my firmware but at least I can continue developing.

Please Log in or Create an account to join the conversation.

If something has worked, it will work again.

Issues with indi_eqmod and custom MC 1 week 3 days ago #17926

I didn't see your max(30, stepperiod...) on first reading.
Now I wonder why there is no answer from your firmware. Moreover it is ok when you start tracking:
2016-07-26T09:29:29: StartMotor() : Axis = 1 
2016-07-26T09:29:29: read_eqmod: "=", 2 bytes read 
2016-07-26T09:29:29: dispatch_command: ":I1560200", 10 bytes written 
2016-07-26T09:29:29: read_eqmod: "=101", 5 bytes read 
2016-07-26T09:29:29: dispatch_command: ":f1", 4 bytes written 
2016-07-26T09:29:29: SetSpeed() : Axis = 1 -- period=598 
Another point is the behavior of the hand controller: do you think there are no readings of the motor firmware answers ?

Please Log in or Create an account to join the conversation.

Issues with indi_eqmod and custom MC 1 week 3 days ago #17935

  • Platone
  • Platone's Avatar Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 7
To be honest I don't know if there's no reading. I don't think so however. Maybe it's a timing issue. Could a separate thread for reading from the MC help?

Ilias.

Please Log in or Create an account to join the conversation.

If something has worked, it will work again.

Issues with indi_eqmod and custom MC 1 week 2 days ago #17941

I don't know where the indi driver runs but I don"t think another thread for reading from the MC would help.
Maybe you could first try to check if there is an answer directly with picocom or microcom (or putty...).
Another solution is to debug the firmware, I use gpsim but your processor is not supported so that would need some tweakings to run it. I think you use xc microchip compiler (#include <xc.h>), I know the microchip IDE has a debugger but it does not support RS232 on Linux. Maybe on Windows but I've never tried that.

Please Log in or Create an account to join the conversation.

Issues with indi_eqmod and custom MC 1 week 9 hours ago #17997

  • Platone
  • Platone's Avatar Topic Author
  • Away
  • Junior Boarder
  • Junior Boarder
  • Posts: 20
  • Thank you received: 7
Hi Jean-Luc
I made some progress:
You were right, the interrupt routine was continuosly called by the timer, and it couldn't end its cycle, so I disabled interrupts into the isr, and re-enabled them at the end of the call.
It's now working! Tracking, gotos are doing what expected.
There is another problem now: when I try to abort, it starts StopWaitMotor and it can't end, my firmware is always telling that the motors are running. I should investigate about this.
By the way, thanks for your help, and if you have any other suggestion.. you're welcome!
Ilias

Please Log in or Create an account to join the conversation.

If something has worked, it will work again.
  • Page:
  • 1
Time to create page: 0.260 seconds

Login

3rd Party

Choose from the numerous 3rd party INDI drivers to suit your needs!

Got Problem?

Check out the FAQ, the forum, and the bug tracking system to resolve any issues you might have!
You can also subscribe to INDI newsletter and development mailing lists to get the latest updates on INDI!

Gallery

Replica

Why INDI

Replica