Spoke calcualtions using Casio Programable calculator

NeilP

1 GW
Joined
Nov 27, 2010
Messages
5,012
Location
49.17303, -2.05354 Jersey, Europe
I have just finished ' writing/programming' a prog to punch in to my old casio FX7700 programable calculator.

You can enter either Spoke angle AND rim hole angular spacing, for those weird lacing patterns, or just enter whole number or decimal crosses.


By spoke angle I am referring to the angle between "big hand and small hand" from Rim end of spoke to centre of the hub to hub end of spoke, as in this picture stolen from the page also linked to

http://www.sheldonbrown.com/mismatch/

angle1c.png


Also allows for dished wheels..calculates both side spoke lengths,
You can also enter a rim spoke hole offset for those rims where the spoke holes zigzag along the rim, left and right.


Has to be typed in by hand..I never had a data cable for mine,

but if any one has (or gets one of these) , then they are more than welcome to have this little 'program'

http://www.ebay.co.uk/sch/i.html?_kw=casio+calculator+fx+7700



$_1.JPG



"Spoke length"
"ERD"?→Z:Z>0⇒Z÷2→R
"RIM HOLE OFFSET"? →Q
"LH HUB DIA"? →Z:Z>0⇒Z÷2→D
"RH HUB DIA"? →Z:Z>0⇒Z÷2→G
"L FLNGE – CNT"? →Z:Z>0⇒Z-Q→I
"R FLNGE – CNT"? →Z:Z>0⇒Z-Q→J
"SPOKE HOLE DIA"? →Z:Z>0⇒Z÷2→O
"CROSS OR ANGLE"? →Z:Z>4⇒Goto1:Goto2
Lbl 1:Z→A:"RIM HOLE ANGULAR SPACING"? →Z:Z>0⇒Z→B:A÷2B→X:"CROSS=":X◄
Goto3
Lbl 2:Z→X:"NUMBER OF RIM HOLES"?→Z:Z>0⇒Z→H:((720÷H)X)→A:"SPOKEANGLE=":A◄
Lbl 3
((√(R2+D2+I2-(2RDcos A)))-O)→M
((√(R2+G2+J2-(2RGcos A)))-O)→N
"LEFT LENGTH=":M◄
"RIGHT LENGTH=":N◄

The formula lines, in Label 3 subsection, 4 lines.
from the end: R D I R, G Z & J. those are the "memory value Squared", not "memory value x 2"
For some reason the superscript "2" has not worked

When this program runs, after it displays the spoke lengths , it starts again at the beginning.
If you enter Zero for Any entry Except :
"RIM HOLE OFFSET"? →Q
"CROSS OR ANGLE"?

it remembers your last used entry. So if for instance you were calculating spoke lengths for the same motor, with different rims, you would enter the new ERD, then zero on each subsequent answer, except for the two above. need to think about changing that ..but since ou are the first person to try this in the year this post has been here, it is hardly a pressing issue.


Screengrab 2015-04-08 at 11.25.14.jpg
 
This screams NERD, but is super cool! :D
 
:p

I had the calculator for years...and also have plenty of time sitting aroudn waiting in my job, so over the past week or so stuck in various airports around the UK, I have been doing it.

Far easier nowadays on a spreadsheet of course....but that is not the point :D


I have done it so if you are only changing one variable, entering 0( zero) when the prompt appears, does not store zero, but instead keeps the value that is already in that particular memory and skips to the next stage

"LH HUB DIA"? →Z:Z>0⇒Z÷2→D

So in the above...
"LH HUB DIA"? appears on the screen and it is stored in memory "Z"
If Z is greater than Zero then Z is divided by 2 and stored in Memory D.
If the statement "Z>0" is not true, then "Z÷2→D" is skipped and the command onthe next line is carried out.
 
Hi Guys, I have a Casio FX4000p that originally had a spoke length program on it, but batteries died and I lost it. I replaced the batteries and tried entering your program, but I cannot get it to work. Question; when entering a program like this, is it one long running line without spaces? Also, with that said, the way you have it written there are 17 lines. Is there some special way I have to enter it so the calculator see's it like that.

So I entered as one long sentence like this;
"Spoke length""ERD"?→Z:Z>0 Z÷2→R"RIM HOLE OFFSET"? →Q"LH HUB DIA"? →Z:Z>0⇒Z÷2→D"RH HUB DIA"? →Z:Z>0⇒Z÷2→G"L FLNGE – CNT"? →Z:Z>0⇒Z-Q→I"R FLNGE – CNT"? →Z:Z>0⇒Z-Q→J"SPOKEHOLE DIA"? →Z:Z>0⇒Z÷2→O"CROSS ORANGLE"? →Z:Z>4⇒Goto1:Goto2Lbl 1:Z→A:"RIMHOLE ANGULAR SPACING"? →Z:Z>0⇒Z→B:A÷2B→X:"CROSS=":X◄Goto3Lbl 2:Z→X:"NUMBER OF RIM HOLES"? →Z:Z>0⇒Z→H((720÷H)xX) →A:"SPOKEANGLE="A◄Lbl 3((√(R2+D2+ I2-(2RDcos A)))-O)→M((√(R2+G2+ J2-(2RGcos A)))-O)→N"LEFT LENGTH=":M◄"RIGHT LENGTH=":N◄

The first Syn error I get is at step 14, which is the second quotation mark after spoke length- "Spoke length""

Would love it if you had some advice,

Thanks.
 
Sorry for late reply
I open this yesterday on the computer, then got involved in something else. Just seen it on iPhone this morning.

But no, not as one line.

Each line is indrpendant line.

I have only tried on my version of thd calculator. i don't know the one you have. You will need to have a full set of 26 Alphabetically named memories, - as the program uses many.

Also, I guess you found the correct way to enter the Pause symbol, the black triangle. I coild not find the correct shape triangle on my computer keyboard map.

It has to be as independent lines, since each line is a separate argument. The End of line indicates a new argument. without the end of lines then it all becomes just one long string .

I suppose if you did want to enter as one line, you would have to replace the end of lines with another 'argument separator character" Without diggn out the manual , I believe that would be either black triangle...which is an argument separator AND a pause. or the " : " colon, which is just a separator
 
Thanks so much! I will try this over the weekend with the triangle or the :. Either way, I purchased the calculator you are using on Ebay for $15. So I'll get there..

Thanks a lot for getting back to me...Much appreciated. I'll let you know how I go.
 
Where are you .

Please fill in your location information..it can help us to help you . You never know, I or someone else on here, may well be next door to you

Look in your User Control panel and add your info

If you are in the UK...are you any where near either Oxford or Southampton? I am often killing time at both those airports. My job sees me going there, then hanging around for a few hours.
 
Well, I got the fx-7700g. I am trying to enter the program now, but I have another question. On this calculator I do not an option for the " (quotation) marks. Do you know how to get that on the screen when writing this program?

Thanks
 
Yes, the Alpha Key first then it tells you which F key.

think the triangle symbol and many of the others are like that too.

Shift,Range button (Prgm , gives the triangle, the : and the JMP (F1) brigns up the sub menu of jump commands

like "Therefore, Jump , goto etc
 
Mode 2 is Wrt mode
Reg mod 4 Linear
Cal Mode+

Just all the basic factory defaults .

There is a reset button behind the unit.

I guess pressing that will set it all to defaults,

Then go to Mode 2 WRT..find an empty Program slot
Write it then Mode 1 to run

Oh and get a good stock of quality batteries, CR2032 I think. it eats them ! At least mine does, but I don't remember it doing that when it was new. Mayb I have crap batteries here.

Think it takes 4 of them. Three are th main run batteries and the 4th is a backup. Only take out one set at a time once you have programmed it. unless you have the external backup cable

..which i dont
 
Great...Thanks a lot.
Sorry for all the question. 2 more.
1. On the "ERD" line of your program Is the ⇒ symbol missing between 0 and Z, or does it not go there at all on that line.
2. on almost every line there is a space between the ? and →, is this how it should be entered into the calculator.

Thanks for all your help again

Cheers
 
No. 1
I guess so
No.2
Looking at the calculator, looks like no space needed

I need new batteries to check again
 
Here is how to read the lines

as an example

"ERD"?→Z:Z>0⇒Z÷2→R

"ERD"?
The ERD within the quotes displays the word ERD not he screen with a question mark
This prompts you to enter the ERD value in mm

→Z
Sends the value entered in to Memory Z

:
Is a Break for a new statement. Could have use a Return character, but since it was part of the ERD entry line a : keeps it all together

Z>0
An IF / THEN argument, to see if the entered value is greater than Zero.

If the Value IS greater than Zero, the command after the ( therefore) symbol is actioned.
So

Z÷2→R
Value in memory Z is divided by two and sent to the memory R. I used R as this is the RADIUS


If the Value of Z had been entered as Zero, then the operation after the ( therefore) symbol is ignored and the calculation jumps to the next line.
The idea of that is that you can do multiple runs of the program, and for figures for your wheel that don't change, you can just enter Zero, so the value in the memory is not changed.


I have used Z as the temporary import register for new figures, testing them for Zero or not, to decide wether to send the entered figure to the Memory that is used in the later calculations.
 
EDIT. NO, THIS WILL NOT WORK, IT WILL SCREW UP IF YOU WANT AN ENTRY OF ZERO AND YOU PREVIOUSLY HAD USED THE PROGRAM AND USED A FIGURE WITH AN OFFSET FROM A PREVIOUS CALCULATION OF GREATER THAN ZERO
THERE IS ANOTHER WAY AROUND THIS WITH ANOTHER LOOP THAT ZEROS ALL REGISTERS AT THE VERY START ONLY ..BUT THAT IS FOR ANOTHER DAY



You could change

"RIM HOLE OFFSET"? →Q

to

"RIM HOLE OFFSET"?→Z:Z>0⇒Z→Q


I think.




See if you can get that one running and I'll then try and copy and post up the ones I have not he calc now
 
Thanks Buddy.
I'm getting there! I did not make your above changes (yet) as I have progressed pass that point in the program. My next error message is on the following line at the first character past "H" (which is a bracket "(".

Lbl 2:Z→X:"NUMBER OF RIM HOLES"? →Z:Z>0⇒Z→H((720÷H)xX) →A:"SPOKEANGLE="A◄

Obviously all this text for the calculator is not familiar to me. I build wheels every now and then and my past program was awesome, so i am trying to get back to it as i am sure you can tell.

Thanks a lot.
 
Missing A. :


If you look at it you should be able to see that.


Lbl 2:Z→X:"NUMBER OF RIM HOLES"?→Z:Z>0⇒Z→H((720÷H)xX)→A:"SPOKEANGLE="A◄

Lbl 2:Z→X:"NUMBER OF RIM HOLES"?→Z:Z>0⇒Z→H:((720÷H)X)→A:"SPOKEANGLE="A◄

It is the same 'Greater than Zero' comparsion as in all other lines.
Z>0⇒Z→H
Followed by another expression. So it needs a break
You are sending the value in Z to memory H
It then uses H to calculate the angle between rim holes on one side of the wheel only . That is why it use the figure 720, and not 360.

Also get rid of the extra multiplication sign.

If yo make a mistake, no need to delete and re type the program, you can go back and use the INS key..which is "INSERT" It is Shift DEL,
Can be used in conjunction with Alpha lock too.
 
I have edited the first post

but look at this link

http://www.sheldonbrown.com/mismatch/


In line 8:
"CROSS OR ANGLE"? →Z:Z>4⇒Goto1:Goto2
When the program asks for spoke angle, the angles it is asking for is the angle as mentioned in post 1 of this thread and the article linked to above.


If you enter a number greater than 4, it assumes an angle has been entered and jumps to label 1 via the Goto1 command
if the number is 4 or less it it assumes a "number of crosses " has been entered jumps to label 2

So if you enter a 1, it assumes a single Cross pattern and gives you the spoke angle figure..
if you enter a Spoke angle, it gives you the Cross pattern number...which for some weird patterns with mismatched hubs and rims, you get non whole decimal cross numbers
 
Made most of the changes!

I now get an error message on line 12 at the A in red below;

Lbl 2:Z→X:"NUMBER OF RIM HOLES"?→Z:Z>0⇒Z→H:((720÷H)X)→A:"SPOKEANGLE="A

how do I create the "squared" value on the calculator to adjust label 3? I have not tried to adjust that line yet, but figured I should ask before I go searching through the calculators functions

And "Spoke Hole Dia". Is this the width of the individual spoke hole in the hub? I have been entering zero as I am not sure.

Thanks
 
Just off to look at someones Honda e-bike.. it is 1120 in morning here.

But briefly

Squared is entered after the memory letter has been entered.

squared is second in from the LHS, bottom row of black keys, it need site Shift key first.
 
that A error in ln e12

another typo on my part.

a missing :

check the line above
"CROSS=":X◄

it should be

"SPOKEANGLE=":A◄
 
Thanks!

Hope all went well with the E-Bike.

got another error at the red bracket below,

((√(R2+D2+ I2-(2RDcos A)))-O)→M

Also, the "spoke hole dia", is that the actual size of the actual size of the hole in the hub? Just have never come accross that before and have been entering zero.
 
Yes spoke hole diameter is the diameter of the hole in the hub. The calculation takes it, divides by two and subtracts this from the spoke length. On smaller spokes and holes it wont make much difference, but start going with bigger spoke holes and diameter, you will get a difference..OK, not much, but a mm or so difference.


No idea about the bracket, that is how I have it on the calculator here, 4 pairs of brackets . Maybe it is another issue, related to what is within that pair of brackets.

There should be no spaces between any of the characters on any line.


I guess you worked out how to inset the > more than character.. Shift PRGM then F2 to bring up the Relative Operator Keys


I am not sure what is the issue with my calculator. I have bought a lot of batteries int eh last year or so. A pack of 20 from a reputable electronics supplier , ( RS Components) and the batteries did not last very long...like a fe hours.
Used all of those and just suspected dodgy old cells.

Bought another 30 the other month, a good quality brand name.
I put new cells in this morning, and checked what you were asking. Not used it, but just now I go to check your latest question, and it is saying Low battery again. within a few hours and maybe 2 minutes use.




Oh yes the e-bike I went to help with. Old near dead SLA batteries, so as soon as you put load, it cut out with red warning on the handlebar display.
 
Back
Top