Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Right, this is what I got:
Potentiometer 1
Covering Range - 020 - 345 Degrees
Potentiometer Value Range: 253 - 7
This Pot does NOT cross 0, so there's no point working out 0 -1 degrees.
Potentiometer 2
Covering Range: 346 - 019 Degrees
Potentiometer Value Range: 115 - 134
This Pot DOES cross 0, so we'll work out the 0 -1 cross here.
360/0 Degrees = Pot 130
001 Degrees = Pot 128
So that's practically a ratio of 2 Degrees values for every 1 Pot value. If I turn the motor really slow, I can get tiny increments in Pot value, acutally working out to a ratio of 1.87 Degrees for every 1 Pot Value.
END DATA
So, I'm really confused here. Which values do I use? I take it that I'll need the 130, 128 and maybe the ratio value, but how? Referencing to Gery's post I cannot work it out.
I apologise, but I've spent 1.3 hours working it out and am starting to get a headache!:-?
Kindest regards,
Jack
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Quote:
Originally Posted by
Boeing 747 Flyer
Okay, so in Decimal (base 10), the number 394 is...
3 x (10 power 2) + 9 x (10 power 1) + 4 x (10 power 0) = 300 + 90 + 4 = 394?
Indeed, that was easy. A final test to check whether you have understood:
What is 123 (decimal) in the hexadecimal notation?
Nico
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Well Nico, 123 in Base 16 is written below (you provided the answer), so I shall do another number to prove I'm not cheating.
512 in Hexadecimal...
5 x (16 power 2) + 1 x (16 power 1) + 2 x (16 power 0) = 1280 + 16 + 2 = 1298
Is this correct or not?
Also, surely Gery's method only works if "0 Degrees 04CE" = "0 Degrees Pot"? Of course, mine equals 130 Pot when 04CE = 0, so I can't work out the dividing factor.
Regards,
Jack
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Quote:
Originally Posted by
Boeing 747 Flyer
Well Nico, 123 in Base 16 is written below (you provided the answer), so I shall do another number to prove I'm not cheating.
No Jack .... I did not provided the answer, so my question remains: What is 123 (decimal) in the hexadecimal notation?
Or in other words what hexadecimal number is equal to 123?
Nico
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi Nico,
I have absolutely no idea how to convert backwards. Using online calculators, we frequently see the reading "7B", whatever that means.
What does this have to do with Offset 07CE?
Kindest regards,
Jack
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Jack
With a minimal amount of effort, it is not difficult to find out
http://www.webelfin.com/webelfindesign/dechex.html
David
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Quote:
Originally Posted by
fordgt40
I apologise, but I do not understand that link, clearly not a "minimal amount of effort".
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Jack
A minimal amount of effort to find on the web how to do it!!
Understanding it is clearly a step too far then
David
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Hi David,
I found many articles, identical to yours. It is not the effort that is lacking, it is the understanding.
I would just like to know how hexadecimal(s) relate to offset 04CE. I am still willing to learn, I just want to know the connection. Furthermore, I would like to know how you can get a common factor if 0 Degrees = 130 on the Pot, and 1 Degrees = 128 on the Pot.
Jack
Re: "Inner Circle" HSI - SIOC DC Motors Card Script
Jack
Understanding Hex should not be difficult and is often necessary in programming. Hex counts on a base or 16 therefore 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F - this equates to 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 in decimal. When, in hex, you go past F then it counts again as 10,11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F and so on.
In the example Gery gave:-
$04CE = 0 (degree) and pot1 = 0 (decimal)
$04CE = 1 (degree) and pot1 = 64 (decimal)
64 divided by 64 is 1. So if your pot is linear you should be able to divide all values by 64. Then your pot value is the same as your fsuipc value.
He was only pointing out the difference in number base to avoid any confusion as FSUIPC uses hex!!
You can ignore hex for the time being and focus on how you programme your pots. The info is all there, though I suspect again that your knowledge of SIOC is not to the standard required for such a task. Again, as previously advised, you should focus on becoming fully versant with less demanding SIOC coding before tackling this exercise.
David