7 - Driving Constraints

advertisement
Driving Constraints
When a key is inserted into a lock and turned, a great many things happen. In
the average lock, five pins are pushed, compressing five springs, which in the
right position allows the cylinder to be rotated, which moves the bolt.
Assembly Constraints are applied to Part Models to dictate the relationship of
one part to another. A Constraint can be driven to produce Motion. The
purpose of this exercise is to produce relative Motion between parts based on
the Driven Constraint.
Procedure:
Launch the Inventor program, open the following files, and save them to a
designated folder. Open one file at a time and save it before opening the next
file. You will need to retrieve these files for an Assembly.
Click here to open the Peg.ipt
Click here to open the Gearshaft.ipt
Click here to open the Bearing Plate.ipt
Click here to open the Rack.ipt
Once you have saved each file, you may close the individual part files.
Assemble The Parts:
Begin by creating a new Inventor Standard .iam Assembly file.
Use the Place Components tool to import the four components you saved into
the assembly file. Make sure that the Bearing Plate is the Grounded component.
Arrange them so they are on your screen as follows:
Fig. 1 Part Arrangement
Place a Mate constraint between the rack and the slide base. Use an Offset of
0.
Fig. 2 Mate Constraint
Click Apply.
Place a Mate constraint between the side of the Rack and the side face of the
notch in the Slide Base as is shown in Figure 3. Use an Offset of 0.
Fig. 3 Second Mate
Select OK.
Left click on the green rack and hold. You should be able to slide the rack back
and forth parallel to the groove, but not move it up and down.
Now use the Mate constraint to align the center axis of the Gear Shaft with the
friction bearing in the Slide Base. Use an Offset of 0. (See Figure 4)
Fig. 4 Mating Axis of Gear shaft with that of hole
Use a Flush constraint to align the front of the Gear Shaft with the edge of the
Rack. The Offset should be 0. Select OK.
Fig. 5 Flush constraint
Try dragging the parts again. You will observe that the rack can travel back and
forth and the gear can rotate. In real life if the gear rotated, the rack would then
move with it. Additionally, the gear teeth would not be able to pass through the
rack.
We will apply an Angle constraint between the Bearing Plate and the Work
Plane of the Gear Shaft.
Fig. 6 Angle Constraint
Set the Angle to 0.00 deg. Click on Apply.
You will notice if you try to rotate the Gear shaft now, that it will no longer turn.
We can have the computer rotate the gear for us.
In the Browser, expand the Browser tree for the Gear Shaft. Right click on the
Angular constraint we just placed and select Drive Constraint. Change the
End Angle to 360 deg.
Fig. 7 Drive Constraint
Press the Play button and watch the gear turn.
Return the Gear Shaft to the 0 degree position.
Exit the Drive Constraint dialog box.
Turn off the Visibility of the Work Plane on the Gear Shaft. To do this, right
click on Work Plane 1 in the Browser and remove the checkmark from
Visibility.
Fig. 8 Work plane visibility
In order to mesh the gear teeth with the rack, there must be an alignment
between the two parts. To do this, we will use a Mate constraint between the
Work Axis of the Gear Shaft and the end of the Rack. An Offset of -.994 will
mesh the teeth. Click on Apply.
Fig. 9 Mate with offset of -.994 inches
The rack will no longer be able to move along the groove of the bearing plate.
The only way to move the rack is to use the drive constraint on the last Mate
constraint that was applied (which would allow the rack to move independently of
the gear) or to link the linear motion of the rack to the rotational motion of the
Gear Shaft (which would Synchronize the movement of the two parts with
respect to one another).
Understanding Motion
Synchronized motion is achieved by creating a relationship between the Gear
Shaft and the Rack.
The pitch (the distance from tooth to tooth) of the Rack is .262 inches.
There are 12 teeth on the Gear shaft.
(360 degrees/12 teeth = 30 degrees per tooth)
Therefore, every time the Gear Shaft rotates 30 degrees, the Rack should move
.262 inches. A full rotation of the Gear Shaft should move the rack 12*.262
inches.
There are two ways to create this relationship – using the Motion Constraint or
simply writing a formula that ties the assembly constraints together.
Using Formulae
Since the constraints we placed earlier all had offset and degree values, we only
have to build a relationship between them.
Fig. 10
Select the Parameters button from the Assembly Toolbar.
This will open the Parameters dialog box.
Fig. 11 Parameter dialog box
These parameters are all the Offsets and Degrees we applied with our
constraints. The Parameter Names will probably be different in your box. We
will start off with the last two constraints. The 0.00 deg and the –0.994 in are the
Gear Shaft Angle and the Rack Offset, respectively.
Click on the space for the Parameter Name for the Gear Shaft Angle and type in
“Gearshaft.” (The name cannot have any spaces.)
Rename the Rack Offset to “Offset.”
Fig. 12 Renaming Parameters
Now click on the -.994 in the Offset Equation column.
Enter the formula –0.994-Gearshaft*.262in/30deg.
Fig. 13 Entering the Formula
The equation will remain red until you add the final letter. The (in) and (deg) in
this formula are important. The constraint is expecting a distance in inches.
Gearshaft is in degrees and needs to be divided by the 30deg in order to cancel
out the degrees from the formula.
Select Done.
To create movement, go to the Browser.
Fig. 14 Driving Constraint
Expand Gearshaft in the browser tree. Right click on the Angle constraint and
select Drive Constraint from the options. Set the End Degrees to 360. Expand
the dialog box by selecting the more information button, as shown below. Set the
Increment to 3 degrees.
Fig. 15 Settings for Drive Constraint
Press the Play button.
The gear should rotate and the rack should move in synch with the gear’s
rotation.
Return the Rack to its original position. Exit the Drive Constraints dialog box.
It is possible to create a relationship when placing a constraint.
Place an Insert constraint between the Bottom of the Hole and the Bottom of
the Peg.
For the Offset enter: 0.00in+sign(Gearshaft-270deg)*3in.
Fig. 16 Adding the Insert Formula
In this example the formula uses the term “sign” in a mathematically different
way. To the program, the term sign means either positive or negative. When it’s
positive, it becomes the equivalent of the number 1. When it’s negative, it is the
same as the number 0.
In this case, when the Gearshaft rotates past 270 deg., the sign changes from
negative to positive, forcing the offset to change by 3 inches.
Drive the same angle constraint as before.
The Peg should pop out of the hole when the gear is driven forward, and pop
back in when the gear is driven in reverse.
The Motion Constraint
Using the motion constraint might be easier for some people to visualize,
although it is not as flexible as the formula method.
Select Place Constraint.
From the Constraints dialog box, select the Motion Tab.
Fig. 17 Motion Constraint
Select the Rotation Translation option in the Place Constraint dialog box.
In the solution section, select the Forward option.
Select the front of the Gear Shaft for the First Selection.
Fig. 18 Selection 1 Front of Gear
Now position your cursor on the edge of the Rack until you get an Arrow pointing
in the direction of desired motion.
Fig. 19 Selection of direction
After selecting the edge, enter the distance traveled for one rotation: 12*.262 in.
Fig. 20 Distance Formula
Before we can create motion between the Gear Shaft and the Rack, we need to
suppress the Mate constraint we used to line the rack up with the Gear Shaft. In
the browser, find the Mate constraint. From the right click menu, select
Suppress as is shown in figure 21.
Fig. 21 Suppressing the Constraint
Once the constraint is suppressed, we can then Drive the Angle constraint to
cause motion. In the Browser, select the Angle constraint. From the right click
menu select Drive constraint. (Figure 22)
Fig. 22
In the Drive constraint Dialog box, set the End Angle to 360 deg. When we hit
the Play button, the Rack should move with the Gear.
Fig 23 Drive Constraint Dialog Box
Return the constraint to 0 degrees and cancel out of the Drive constraint dialog
box.
Remove the Insert constraint from the peg by expanding it in the Browser.
Right click on the constraint and select Delete from the options.
Apply a Mate constraint between the center axis of the peg and the center axis of
the hole in the bearing plate. Leave the Offset to 0.0. Click on Apply.
Fig. 24 Axis mate
Apply another Mate constraint to the bottom face of the peg’s head and the top
face of the bearing plate. Leave the Offset at zero. Click on Apply.
Select the Motion Constraint tab. Set the type to Rotation-Translation. In the
Solution area, select Reverse. Set the Translation Distance to -1.00.
Select the front face of the Gear Shaft for the First Selection. The Second
Selection should be the Peg. (Figure 25) Click OK.
Fig. 25
You will have to suppress the second Mate constraint for the Peg in the
Browser, which mates it to the surface of the bearing plate.
Fig. 26 Suppressing the Constraint
Drive the Angle constraint for the Gear Shaft again. This time both the Peg and
the Rack should move when the gear rotates.
Download