For this tutorial download the file stks_example.stk: Download. This file is a human readable text file which contains seven stackup calculations. Here is an image of the machine to which this stackup applies: stks_example.png

Now let's load this example data into python and have a look at it. This will give a quick idea of how this program works. Start up the stackups program and then load the data. The variale name s will store the data.

In [1]:
from stackups import *   # start up the stackups program



The above steps loaded data into variable name s. The path name in this example is for Linux operating system. If you are using Microsoft Windows, then your path name will look something like this: 'C:\\downloads\\stks_example.stk'. Note that for python on MS Windows, a double backslash, \\, MUST be used, and NOT a single backslash, \.

Seven stack up calculations have been stored in s. To see stackup number one within s, type s[1] and hit enter to see the first stackup. Other stackups are *s[2], s[3], ..., s[7].

In [2]:
s[1]

Out[2]:
[1] PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)
r  su  σ  j     d        dt     pn & n
1  12  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
2   8  6  + 10.4860 ± 0.0100  PN07, Overall width
3  12  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
4   2  6  -  0.9031 ± 0.0024  NJ2210E, Bearing width
5  10  6  -  0.5780 ± 0.0050  PN14, Width
6   9  6  -  1.4070 ± 0.0050  PN12, Width
7  11  6  -  6.0390 ± 0.0050  PN15, Lf brg shldr to gear shldr
8   2  6  -  0.9031 ± 0.0024  NJ2210E, Bearing width
------------------------------------------------------------
0.0177 ± 0.0397  [-0.0220, 0.0574]  100% possible
0.0177 ± 0.0154  [0.0024, 0.0331]  6σ, 99.73% probable
0.0177 ± 0.0102  [0.0075, 0.0280]  4σ, 95.46% probable
0.0177 ± 0.0051  [0.0126, 0.0228]  2σ, 68.26% probable
σ = 0.00512

The result of the stackup above, with six sigmaprobability, is .0177 ± .0154. That is, there is a .0024" clearance between parts and the parts dimensioned as shown above will work.

How to visualize the system to which a stackup is applied: Look at the image of the assembly (link) for which this stackup was made. At the gap under consideration (#1), imagine parts at the left of the gap pushed as far as possible to the left, and those parts to the right of the gap pushed as far to the right as possible. Then start at the left of the gap and work your way through the dimensions to get the the right of the gap.

Why is the data ordered the way it is? We start out with the .319 inch dimension. The and move is towards the left. With a move to the left, j is set equal to -1, that is, a negaive value. The next dimension is 10.486 and the movement is to the right. j is positive. Continue until you get to the right side of the gap.

With stackups 2 and 3 shims are present that vary in width in order to set the bearings to a certain preload. Look at these stackups in order to see how to account for shims.

The value of sigma, σ, for each dimension is left equal to 6 unless more accurate data is available based on actual machined parts. This tutorial does not deal with adjusting this value. Six works just fine, especially with protoype parts.

In [3]:
s[1][3]   # for viewing, this pulls out Stackunit no. three from s[1]

Out[3]:
{'d': 0.319, 'su': 12, 'sigma': 6, 'pn': 'PN16', 'dt': 0.005, 'n': 'Mounting face to rt. end'}
< Previous | Next >