Hello Matrix Team,
inte the above constellation I see here the following problems:
1. Servo Frame duration is frequently dropping, it stays not constant let´s say at 15 or 20ms. This is disturbing the servo
2. Using 16Bit Uint variable hex value 0xfffe creates a servo puls duration in the range of 3.9ms. Far to long, it should be maximum at 2.2ms at high value and 800uS at low value.
Attached the FC file.
BR
Dirk
Servo Component and Pic dsPIC30F3012 Problem
-
- Posts: 89
- http://meble-kuchenne.info.pl
- Joined: Fri Dec 04, 2020 11:03 am
- Has thanked: 6 times
- Been thanked: 12 times
-
- Matrix Staff
- Posts: 1739
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 440 times
- Been thanked: 603 times
Re: Servo Component and Pic dsPIC30F3012 Problem
Hello Dirk,
In your program Build -> Project options the watchdog timer is enabled and so this may be causing a periodic glitch on the output. I see you have auto clear watchdog turned on but maybe try disabling the watchdog just to try and see if it improves things.
It's also worth doing a 1 second flasher test to confirm the device is running at the correct speed.
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
You might want to try adding a delay into your loop so you're not constantly writing to the SetPositionInt macro. this could potentially be causing glitches? As your not currently altering the value you could try and move the SetPositionInt call to before the loop.
If none of the above solves the issue then let me know, it seems the output is 2x larger then it should be so maybe there is a fundemental issue with the timings calculations for this specific device family.
In your program Build -> Project options the watchdog timer is enabled and so this may be causing a periodic glitch on the output. I see you have auto clear watchdog turned on but maybe try disabling the watchdog just to try and see if it improves things.
It's also worth doing a 1 second flasher test to confirm the device is running at the correct speed.
https://www.flowcode.co.uk/wiki/index.p ... ED_flasher
You might want to try adding a delay into your loop so you're not constantly writing to the SetPositionInt macro. this could potentially be causing glitches? As your not currently altering the value you could try and move the SetPositionInt call to before the loop.
If none of the above solves the issue then let me know, it seems the output is 2x larger then it should be so maybe there is a fundemental issue with the timings calculations for this specific device family.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Servo Component and Pic dsPIC30F3012 Problem
Hi Ben
many thanks for the reply. I will check out your suggestion with in the next days. At the moment I`ll use the ESP32 for my servo stuff and it looks much better.
BR
Dirk
many thanks for the reply. I will check out your suggestion with in the next days. At the moment I`ll use the ESP32 for my servo stuff and it looks much better.
BR
Dirk
Happy FC9, FC-8 and FC-6 professional user