1. Hello Guest. You have limited privileges and you can't "SEARCH" the forums. Please "Log In" or "Sign Up" for additional functionality. Click HERE to proceed.

1986 Maxim-X XJ700 XS valve adjustment Pascal program

Discussion in 'XJ Technical Chat' started by VanNorman6, Feb 25, 2017.

  1. VanNorman6

    VanNorman6 New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    [​IMG] I am trying to explain what I have done to find the best set of buckets (a.k.a. tappets) and pads I could (re)use in setting my valve clearance for this bike. I wrote a Pascal program that finds as many matches as possible and suggests a solution for the ones that are still not matched.

    Perhaps it might be of use for others as well. If you are interested, let me know and I will then try to translate the terms and comments in the program into English and make the code available. (A Pascal runtime environment is available as the freeware Lazarus Project).

    I bought the bike in 2010 with 22.000 miles on the odometer. Having the valves adjusted would cost some 400 dollars. The manual states 25.000 miles for this, so I thought I still could ride it some before having the job done. Last October I noticed some power loss driving around town and decided it was time to do some checking.

    Adjusting the mixture screws and synchronizing do not help much. The ignition showed no problems, but the #3 exhaust would not warm up like the others. Therefore, I performed a compression test as well as a leak down test and found #3 being way out. The next step must be measuring the valve clearance and hope there would be no burnt valves.

    With the tank and ignition coils out of the way, one can remove the valve cover. All the clearances measured too small and some, among which #3, were not even measurable. On top of that, three cam lobes and almost all buckets showed damage beyond usability.

    I decided on buying a used engine block of which I was able to check clearances, lobes and buckets beforehand. Both cams and half of the buckets seemed usable. Still a risk, but new cams are 250 and buckets 45 dollars each, all without shipping and import taxes (some 25%). Through Ebay, I was able to find a very nice set of 12 buckets (out of a FZR1000) for a very reasonable price. I also found 5 pads (160).

    This left me with 22 buckets, 45 pads to distribute over 20 valves in providing the clearances the manual demands. Mind you, not all buckets are of the same thickness, as are the pads of course.

    Where to start? Think of it, the first bucket will fit 20 places (valves), the next one 19, the next one 18, and so on. This leads to 20 factorial (20!) possible combinations. The same goes for the 45 pads.

    I decided my head would not grasp that so I could use some help. With my dear friend Roy, we devised a Pascal program doing this. The very simplified routine resembles:

    for each valve,
    for each bucket
    for each pad
    if there is a match, do some administration, singling bucket and pad out and keep track of the number of matches found so far​

    This seems straight forward, but to do it right each valve has to be the number 1 in its own turn. However, the same goes for buckets and again for pads. The program does it all and reports the maximum number of matches found per iteration.

    Perhaps a visual representation of the problem can make it more clear:

    [​IMG]

    (I am not sure the image will actually be included here. If not, I will try to correct that below in a new post).

    The goal is to line up the holes in every disc for every possible combination. In order to give every hole on a disc its own chance to win to game, you will have to fully rotate the disc by starting every hole in the first position. Thus the red disc will make ‘number of holes’ full rotations for every hole in the yellow disc. The same goes for the yellow disc with respect to the blue one. Of course, a lot of combinations will be the same, but that is what computers are for. Just do it and be sure you forget no combination. I hope this is somewhat clear.

    We define a match found if:

    bucket thickness + pad thickness + (wanted) clearance = same sum in the initial measurement

    Per valve I removed the bucket and pad, measured them and wrote that down together with the clearance that was measured. Per valve this gives the number to strive for, when the clearance is substituted with the new value we strive for.

    It is obvious that the valves that showed no clearance at all will lead to an incorrect match in the first run and makes a second run unavoidable. To be honest, who thinks this will succeed in one run anyway?

    The thing I did not realize up front, that it would have been very convenient to be able to pre-define a set of matches before starting a new run. Now I am done, I am not sure I will implement this, but who knows ….

    The program needs input (in text files, one per line and some data from the screen):

    1. (file) valve measurements (sequence EX4B, EX4A, EX3B, ………………………, I1C, I1B, I1A)
    o example (20 lines)
    487.5
    489
    489.5
    492.5
    495
    490
    486.5
    487
    466
    470
    466
    457
    469
    465
    473
    474
    463
    475
    469
    470

    2. (file) with bucket sizes (sorted ascending)
    o example (only a few)
    277
    277
    278
    278.5
    279
    279
    280
    280
    280
    280
    280
    280
    280
    280
    280
    280
    281
    282
    282
    282
    282

    3. (file) with pad sizes (sorted ascending)
    o example (only a few)
    160
    165
    165
    165
    168
    170
    170
    170
    170
    170
    175
    175
    175
    176
    178
    178

    4. (screen) exhaust valve clearance
    o example
    25

    5. (screen) inlet valve clearance
    o example
    15

    6. (screen) maximum tolerance in previous two values
    o example
    1

    7. (screen) name prefix of output file


    It produces 2 output files:
    1. containing the matches
    2. log showing the iteration sequence
    No check on input is done, nor on end of files. In other words, the file contents must match the limits and formats expected and set in the program.

    All numbers are in 1/100 mm, i.e. 20 for 20/100

    As an example the (last) piece of an output file (Dutch into English) with matches. The clearances are 25 (exhaust) and 15 (inlet).

    Sol: 48 Tolerance 1,0 nr. of hits: 18
    Start valve: 13 Start bucket: 2

    1 E4B 487,5 279,0 183,0 25,5 (REMARK: exhaust valve 4 B, initial sum, bucket, pad, clearance)
    2 E4A 489,0 280,0 183,0 26,0 (REMARK: 489,0 means 489.0 x 0.01 mm !!!)

    3 E3B 489,5 280,0 185,0 24,5
    4 E3A 492,5 280,0 187,0 25,5

    5 E2B 495,0 280,0 189,0 26,0
    6 E2A 490,0 280,0 185,0 25,0

    7 E1B 486,5 280,0 182,0 24,5
    8 E1A 487,0 277,0 185,0 25,0
    -----------------------------
    9 I4C 466,0 281,0 170,0 15,0
    10 I4B 470,0 280,0 175,0 15,0
    11 I4A 466,0 ----suggest----> 280,0 171,0 15,0

    12 I3C 457,0 ---- suggest----> 280,0 162,0 15,0
    13 I3B 469,0 278,0 176,0 15,0
    14 I3A 465,0 280,0 170,0 15,0

    15 I2C 473,0 278,5 180,0 14,5
    16 I2B 474,0 277,0 182,0 15,0
    17 I2A 463,0 280,0 168,0 15,0

    18 I1C 475,0 282,0 178,0 15,0
    19 I1B 469,0 279,0 175,0 15,0
    20 I1A 470,0 280,0 175,0 15,0


    Buckets left: 282,0 (19) 282,0 (20) 282,0 (21) (REMARK: number in brackets is line# in input file)

    Pads left : 170,0 ( 4) 170,0 ( 5) 178,0 (11) 185,0 (20) 185,0 (21)
    Pads left : 185,0 (22) 185,0 (23) 187,0 (25) 187,0 (26) 187,5 (27)
    Pads left : 187,5 (28) 188,0 (29) 188,5 (30) 189,0 (32) 189,0 (33)
    Pads left : 191,0 (34) 193,5 (35) 193,5 (36) 194,0 (37) 194,0 (38)
    Pads left : 195,0 (39) 195,0 (40) 195,0 (41) 195,0 (42) 195,0 (43)
    Pads left : 196,0 (44) 198,0 (45)

    Hits| # | Solution number
    ----+----+---------------------------------------
    15: | (3)| 1 2 3
    16: | (8)| 4 5 6 7 8 9 10 11
    17: | (4)| 12 13 14 15
    18: |(33)| 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
     
    Last edited: Feb 25, 2017
  2. VanNorman6

    VanNorman6 New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    This is the image I referred to in the previous post.

    Rob
     

    Attached Files:

  3. k-moe

    k-moe Pie, Bacon, Bourbon. Moderator Premium Member

    Messages:
    19,613
    Likes Received:
    6,707
    Trophy Points:
    113
    Location:
    The City of Seven Hills
    Oh my, that's a alot of work to solve a relatively simple problem.

    The valve buckets aren't supposed to be swapped during a valve clearance adjustment, so keeping them in the original positions greatly reduces the complexity of the operation. I do see how what you wrote would be useful to someone building an engine from parts, which is becoming a more likely event as fewer of the Maxim X engines are around every year.

    As for the zero-clearance issue. The normal procedure is to have a set of the smallest available shim (they do not have to be made of hardened material, and can be shop-made since this is just for setting clearnaces and not running the engine). Swap the thin shims in for the clearnace check, consult the valve clearnace table from the shop manual, and then swap the required shims as normal.
     
    Last edited: Feb 25, 2017
  4. VanNorman6

    VanNorman6 New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    I agree the approach was perhaps a bit too general, but the goal was to try and reuse as many pads of my own as possible beacuse all buckets had to be replaced. Using small (d.i.y. measuring) pads would have forced me to place the buckets more or less at random and thus perhaps miss combinations that would have been a better choice in that respect. Making the program took app. 3 days, but was fun to do.
     
  5. hogfiddles

    hogfiddles XJ-Wizard, Host-Central NY Carb Clinic Moderator Premium Member

    Messages:
    14,635
    Likes Received:
    5,014
    Trophy Points:
    113
    Location:
    near utica, new york
    Just stick a replacement bucket in, remeasure to find your new needed shim size, replace, and be done.

    But, like you said......if you had other goals, then you had your fun.

    Me---I have a lot of other things that I could get done in three days after a valve shim adjustment----
     
  6. Timbox

    Timbox Well-Known Member

    Messages:
    2,284
    Likes Received:
    749
    Trophy Points:
    113
    Location:
    Wisconsin, Tomah
    This is what I will have to do on my bike. Just have to find them now. Thanks for the heads up.
     
  7. Timbox

    Timbox Well-Known Member

    Messages:
    2,284
    Likes Received:
    749
    Trophy Points:
    113
    Location:
    Wisconsin, Tomah
    The shims on our XJ700X's are the 7.48 mm size correct? I too have to do a double check on my valve line, way too tight so need a lot of the smaller ones to save time. Thanks
     
  8. hogfiddles

    hogfiddles XJ-Wizard, Host-Central NY Carb Clinic Moderator Premium Member

    Messages:
    14,635
    Likes Received:
    5,014
    Trophy Points:
    113
    Location:
    near utica, new york
    The X shims are the small ones that are a cap on the end of the valve stem---not much different than the size of an aspirin pill. The airheads got the 29mm flat shims
     
  9. Timbox

    Timbox Well-Known Member

    Messages:
    2,284
    Likes Received:
    749
    Trophy Points:
    113
    Location:
    Wisconsin, Tomah
    I was just wanting to make sure as I guess they make them in all different OD mm sizes. From what Hot Cams is telling me the little end cap type come in three sizes.
    7.48mm, 8.90mm, 9.48mm, 10.00mm, and 13.00mm
     
  10. hogfiddles

    hogfiddles XJ-Wizard, Host-Central NY Carb Clinic Moderator Premium Member

    Messages:
    14,635
    Likes Received:
    5,014
    Trophy Points:
    113
    Location:
    near utica, new york
    Wouldn't even bother to ask there---check with Len Chacal ( info@xj4ever.com ). He'll set you up with what you need before anyone else can even get anything to you
     
    Lightcs1776 likes this.
  11. VanNorman6

    VanNorman6 New Member

    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Timbox, sorry I missed your question.

    The pads measure OD 7, ID 5 and height 4.2 mm. The imprinted number on the side does not always match the actual thickness of the top.
     
  12. Timbox

    Timbox Well-Known Member

    Messages:
    2,284
    Likes Received:
    749
    Trophy Points:
    113
    Location:
    Wisconsin, Tomah
    Van,
    It is all good, got it taken care of some time ago. Getting the valves in spec was a learning experience to say the least. The bike sure does sound nice and starts like a dream. Thanks for getting back to me though.
     

Share This Page