My First Stackup

First, load the stackups program into active memory. This assumes that stackups.py is installed on your system and that your python session is active (or better yet, your ipython session is active).

In [11]:
from stackups import *

Now create what's called a "Stacks" object. The Stacks object is assigned the variable name stks. (Though any suitable variable name you choose is OK.)

In [12]:
stks = Stacks()

Assign a title to stks.

In [13]:
stks.title('Example stacks, i.e. an example for stackups.py')

stks, a Stacks object, is designed to collect and manage Stack objects. Place the first Stack object within stks.

In [14]:
stks.append(Stack())
Example stacks, i.e. an example for stackups.py

[1] Stack title: None
r su  σ  j     d       dt     pn & n
------------------------------------------------------------


Each Stack is assigned an integer: 1, 2, 3, etc. The variable name for the first Stack is stks[1].

In [15]:
stks[1]
Out[15]:
[1] Stack title: None
r su  σ  j     d       dt     pn & n
------------------------------------------------------------

Assign a title to stks[1].

In [16]:
stks[1].title('PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)')
stks[1]
Out[16]:
[1] PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)

Next we begin adding Stackunit objects to stks[1]. We will not, however, do it thus: stks[1].append(Stackunit()). Instead a simplefied way of doing it is used. (A Stackunit contains, at minimum, a dimension, tolerance, part number pertaining to the dimension, and a description of the dimension.) Reference: image of the assembly. Note that the part number and description (both "strings" MUST BE surrounded by single quote or double quote marks (' or ").

In [17]:
stks[1].append(-0.3190, 0.0050, 'PN16', 'Mounting face to rt. end')
stks[1].append(10.4860, 0.0100, 'PN07', 'Overall width')
stks[1].append(-0.3190, 0.0050, 'PN16', 'Mounting face to rt. end')
[1] PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)
r  su  σ  j     d       dt     pn & n
1   1  6  - 0.3190 ± 0.0050  PN16, Mounting face to rt. end
------------------------------------------------------------
-0.3190 ± 0.0050  [-0.3240, -0.3140]  100% possible

[1] PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)
r  su  σ  j     d        dt     pn & n
1   1  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
2   2  6  + 10.4860 ± 0.0100  PN07, Overall width
------------------------------------------------------------
 10.1670 ± 0.0150  [10.1520, 10.1820]  100% possible
 10.1670 ± 0.0112  [10.1558, 10.1782]  6σ, 99.73% probable
 10.1670 ± 0.0075  [10.1595, 10.1745]  4σ, 95.46% probable
 10.1670 ± 0.0037  [10.1633, 10.1707]  2σ, 68.26% probable
  σ = 0.00373

[1] PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)
r  su  σ  j     d        dt     pn & n
1   1  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
2   2  6  + 10.4860 ± 0.0100  PN07, Overall width
3   1  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
------------------------------------------------------------
  9.8480 ± 0.0200  [9.8280, 9.8680]  100% possible
  9.8480 ± 0.0122  [9.8358, 9.8602]  6σ, 99.73% probable
  9.8480 ± 0.0082  [9.8398, 9.8562]  4σ, 95.46% probable
  9.8480 ± 0.0041  [9.8439, 9.8521]  2σ, 68.26% probable
  σ = 0.00408

The order of the Stackunit arguments is important. First the dimension is entered, then its tolerance, then the part number, and finally the description.

If you enter a positive (+) value for a dimension, then the direction (or jog) the dimension takes along a number line is positive; that is, the direction is to the right. If it is negative, then the jog is to the left. As mentioned in the introduction, doing a stackup is like going around a loop. You start at the left of a gap and you loop around until you end up at the right side of that gap. (Tip: If you fail to assign a minus or plus sign to your dimension, no problem. See the next section. Corrections are easy.)

The extend method supplies a way in which to append two or more Stackunits simultaneously. Here we finish up stk[1].

In [18]:
stks[1].extend((-0.9031,0.0024,'NJ2210E','Bearing width'), (-0.578,0.005,'PN14','Width'), (-1.4070, 0.0050, 'PN12', 'Width'), (-6.039,0.005,'PN15','Lf brg shldr to gear shldr'), (-0.9031,0.0024,'NJ2210E','Bearing width'))
[1] PN16/NJ210E - gap between cover and bearing (shaft pushed rt.)
r  su  σ  j     d        dt     pn & n
1   1  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
2   2  6  + 10.4860 ± 0.0100  PN07, Overall width
3   1  6  -  0.3190 ± 0.0050  PN16, Mounting face to rt. end
4   3  6  -  0.9031 ± 0.0024  NJ2210E, Bearing width
5   4  6  -  0.5780 ± 0.0050  PN14, Width
6   5  6  -  1.4070 ± 0.0050  PN12, Width
7   6  6  -  6.0390 ± 0.0050  PN15, Lf brg shldr to gear shldr
8   3  6  -  0.9031 ± 0.0024  NJ2210E, Bearing width
------------------------------------------------------------
  0.0178 ± 0.0398  [-0.0220, 0.0576]  100% possible
  0.0178 ± 0.0154  [0.0024, 0.0332]  6σ, 99.73% probable
  0.0178 ± 0.0103  [0.0075, 0.0281]  4σ, 95.46% probable
  0.0178 ± 0.0051  [0.0127, 0.0229]  2σ, 68.26% probable
  σ = 0.00513

Our first stackup is done. So what does the data tell us? The main line to look at is the 6σ line. More specifically, look at the minimum clearance. It is 0.0024. That is, based on probability, there will be running clearance between parts. Save the document.

In [19]:
stks.save('/home/ken/Documents/my_first_stackup.stk')

This is a pathname for a Linux operating system. For a Windows operating system, these pathnames will work:

  • r'C:\Documents\my_first_stackup.stk'

  • 'C:\\Documents\\my_first_stackup.stk'

  • 'C:/Documents/my_first_stackup.stk'

This will not work:

  • 'C:\Documents\my_first_stackup.stk'
< Previous | Next >