MIAC-RC LawnMower
Moderator: Benj
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Is anyone here knowing what to do in the codes above, to see 0 to 255 in the display?
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: MIAC-RC LawnMower
Hi,
I would help to see some more values, between the two extremes, as the values look to be the wrong way round (min and max)
As there are a few possibilities, such as the shorter pulses being missed, the pulse being inverted.. etc.,
It is difficult to suggest further without having hardware to test, which you have, so we rely upon your tests and observations
I would help to see some more values, between the two extremes, as the values look to be the wrong way round (min and max)
As there are a few possibilities, such as the shorter pulses being missed, the pulse being inverted.. etc.,
It is difficult to suggest further without having hardware to test, which you have, so we rely upon your tests and observations
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
LeighM
I can get more values.
By changing the numbers between the two limits, 800 (3523) and 2200 (1517) "
But not from that 800 = 0 and 2200 = 255 bit
I can get more values.
By changing the numbers between the two limits, 800 (3523) and 2200 (1517) "
But not from that 800 = 0 and 2200 = 255 bit
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: MIAC-RC LawnMower
Yes, "changing the numbers between the two limits, 800 (3523) and 2200 (1517)" is what I mean.
So that we can see if the numbers from MIAC go up or down or jump value suddenly at some point.
Example: 1100(?) 1400(?) 1700(?) 2000(?)
So that we can see if the numbers from MIAC go up or down or jump value suddenly at some point.
Example: 1100(?) 1400(?) 1700(?) 2000(?)
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM
You can see below at numbers from MIAC go up or down or jump value suddenly at some point.
Example: 1100(?) 1400(?) 1700(?) 2000(?)
From Servo Tester
1100
MAP = 0
TSUM = 741
1400
MAP = 239
TSUM = 2111
1700
MAP = 255
TSUM = 3399
2000
MAP = 0
TSUM = 642
2200
MAP = 131
TSUM = 1517
Hope you can use the above measured data?
And see where it goes wrong..
You can see below at numbers from MIAC go up or down or jump value suddenly at some point.
Example: 1100(?) 1400(?) 1700(?) 2000(?)
From Servo Tester
1100
MAP = 0
TSUM = 741
1400
MAP = 239
TSUM = 2111
1700
MAP = 255
TSUM = 3399
2000
MAP = 0
TSUM = 642
2200
MAP = 131
TSUM = 1517
Hope you can use the above measured data?
And see where it goes wrong..
Best Regard
Monie
Monie
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: MIAC-RC LawnMower
Hi Monie,
Please try this new version (007) edit: If my calculations are correct, that should give you a tsum range of 7000 to 19250
I which case the parameters of Map should be ...
Please try this new version (007) edit: If my calculations are correct, that should give you a tsum range of 7000 to 19250
I which case the parameters of Map should be ...
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM
From file MAC dsPIC-LawnMower-007.cfx
There I get tsum range of 7045 to 19358
Output from Map valus range of 87 to 255
From file MAC dsPIC-LawnMower-007.cfx
There I get tsum range of 7045 to 19358
Output from Map valus range of 87 to 255
Best Regard
Monie
Monie
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM
It looks better then
I have tried using 7045 and 19358 as parameters to Map - and it works fine.
Ouput MAP Value from 0 to 255 works very well.
It looks better then
I have tried using 7045 and 19358 as parameters to Map - and it works fine.
Ouput MAP Value from 0 to 255 works very well.
Best Regard
Monie
Monie
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM
The codes seem very fine now.
Thank you very much for your help and your great diligence.
Proposals:
Since there are many who work with RC servor "Recevier system" for many purposes. I would like to make a suggestion.
Making a component so your work can benefit many people.
Was it a go idea?
The codes seem very fine now.
Thank you very much for your help and your great diligence.
Proposals:
Since there are many who work with RC servor "Recevier system" for many purposes. I would like to make a suggestion.
Making a component so your work can benefit many people.
Was it a go idea?
Best Regard
Monie
Monie
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
I'll send some pictures...LeighM wrote:Cool![]()
Thanks for letting me know.
And make sure we get some photos of the Lawnmower in action
Best Regard
Monie
Monie
-
jgu1
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
Re: MIAC-RC LawnMower
Hi LeighM!
Today I discover some new in your program (FC7).
I see in your program the macro MAP it is possible to add some variable. Never seen before. Are these only for use with local varabel. I can not see you have used these in any calculation other place in the program, what happen, I can¨t figure out
. I try to look in help, but don¨t understand. Will you please (when you get time) explain how to use and feature/benefit by these.( I dare, maybe create a very simple program/example wich is very easy to understand)
Thanks in advance
Jorgen
Today I discover some new in your program (FC7).
I see in your program the macro MAP it is possible to add some variable. Never seen before. Are these only for use with local varabel. I can not see you have used these in any calculation other place in the program, what happen, I can¨t figure out
Thanks in advance
Jorgen
- Attachments
-
- ProbMacro.PNG
- (27.18 KiB) Downloaded 10898 times
-
jgu1
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
Re: MIAC-RC LawnMower
Hi Monie!
Concerning these variable in a Macro, maybe, are you able to explain the above, please.
Br Jorgen
Concerning these variable in a Macro, maybe, are you able to explain the above, please.
Br Jorgen
-
kersing
- Valued Contributor

- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: MIAC-RC LawnMower
Local variabels can not be accessed from any other part of the program, they are private to the macro where they're declared. The advantage of local variables is that they do not permanently require memory.
Take a program with two macros, a and b. If the main routine call macro a and once a is finished calls b, the local variables of the macros can occupy the same memory locations, saving ram. If the main program calls a and a calls b the memory locations need to be different to make sure the values of a are not overwritten by b. To check which macros are 'exclusive' the compiler analysis the code while generating the compiled program.
Take a program with two macros, a and b. If the main routine call macro a and once a is finished calls b, the local variables of the macros can occupy the same memory locations, saving ram. If the main program calls a and a calls b the memory locations need to be different to make sure the values of a are not overwritten by b. To check which macros are 'exclusive' the compiler analysis the code while generating the compiled program.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
jgu1
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM
2xPWM With MI509-dsPIC
Have worked all weekend to get 2 outputs with PWM but it is not successful.
Please see the attached test program: MIACdsPIC-2xPWM Do you have a suggestion for setting up the 2 x PWM
Do you have a table or guide on how to set PWM to the 4 OuputON A, B, C and D?
I need an overview of possible PWM channel for MI509-dsPIC.
Can not see any description of the above only MIAC PIC (Old)
Do not hope there were too many questions
2xPWM With MI509-dsPIC
Have worked all weekend to get 2 outputs with PWM but it is not successful.
Please see the attached test program: MIACdsPIC-2xPWM Do you have a suggestion for setting up the 2 x PWM
Do you have a table or guide on how to set PWM to the 4 OuputON A, B, C and D?
I need an overview of possible PWM channel for MI509-dsPIC.
Can not see any description of the above only MIAC PIC (Old)
Do not hope there were too many questions
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: MIAC-RC LawnMower
Hi Monie,
You are very close, you just need to turn on the output drivers.
See Motor1 and Motor2 (Port F0 and F1) in the Chip View ...
The solid state drivers are explained in the MIAC (V3) datasheet ...
http://www.flowcode.co.uk/old_site/resources/file ... C-60-3.pdf
Hope that helps
Leigh
You are very close, you just need to turn on the output drivers.
See Motor1 and Motor2 (Port F0 and F1) in the Chip View ...
The solid state drivers are explained in the MIAC (V3) datasheet ...
http://www.flowcode.co.uk/old_site/resources/file ... C-60-3.pdf
Hope that helps
Leigh
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM
Thank you very much.
I must have overlooked this problem
.
Sorry for the inequality.
GO'Arbejdsdag
Thank you very much.
I must have overlooked this problem
Sorry for the inequality.
GO'Arbejdsdag
Best Regard
Monie
Monie
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi Leigh
So now there are 2 x PWM out on both motors running.
Thank you very much Leigh.
Your answer to jgu1 with MAP, I would like to learn about Setup and options for MAP.
Is it something you could or have time to describe the possibilities with the MAP device?
Many thanks in advance
So now there are 2 x PWM out on both motors running.
Thank you very much Leigh.
Your answer to jgu1 with MAP, I would like to learn about Setup and options for MAP.
Is it something you could or have time to describe the possibilities with the MAP device?
Many thanks in advance
Best Regard
Monie
Monie
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: MIAC-RC LawnMower
Hi Monie,
Sorry, I don't understand your question.
kersing explained about local and macro parameter variables.
The Map macro in your program came from your Ardunio example code I think.
It converts one range of values into another range of values, much like reading values from a straight line graph (with offset origin and fixed slope)
Hope that helps.
Sorry, I don't understand your question.
kersing explained about local and macro parameter variables.
The Map macro in your program came from your Ardunio example code I think.
It converts one range of values into another range of values, much like reading values from a straight line graph (with offset origin and fixed slope)
Hope that helps.
-
Monie Jacobsen
- Posts: 484
- Joined: Mon Jul 30, 2012 3:39 pm
- Has thanked: 17 times
- Been thanked: 46 times
Re: MIAC-RC LawnMower
Hi LeighM,
Many thanks for your description.
I would like to learn the use as well as possible.
Many thanks for your description.
I would like to learn the use as well as possible.
Best Regard
Monie
Monie