CMM Manager Handbook - Test If Part Is Loaded Correctly Using VB Script

The following is an excerpt from the CMM Manager Handbook

We will write VB Script into the program that will measure an angled plane to verify if the part is seated in the fixture correctly before we execute the program.

Two ways to approach the programming:

·        Load your fixture on the table and run the fixture alignment and click the Save icon and save as a Fixture REF Frame. Recall Fixture Ref Frame into your part program.

·        Use Free Point after the part is loaded into the fixture to establish the origin.

Measure the angled plane. It can be a simple measurement as it is just a Error Proofing check.

Now report the angle. Here we need to set Feature 2 to the Z axis since we have no other measurement plane/ line to calculate to. Tolerance does not matter since we will set that up in the VB Script.

VB Script

Under the Program tab select the Add VB Script icon.

Enter the following.

Error_Proof = GetReportInfo( "Angl BT Plane1 and Z Axis", "3D", 2 )

Error-Proof is just the name of the variable we are using you can choose your own name.

This command will get the report information (“Angle BT Plane1 and Z Axis”) and retrieve the actual (2) of the 3d angle (“3D”) of the plane.

Add one more VB Script to the program.

If Error_Proof <> 60.2 Then

  MsgBox("Part is not properly on the fixture - Stop Program and re-fixture the part")

End If

NOTE: the angle requirement in this code was used to create the error result. Following I will show you the code to create some tolerance allowance and not a strict angle requirement. We will need to have some allowance to accommodate individual machine parts and keep some parameters that will keep the probe from shanking.

As you can see the part is loaded incorrectly and the program must be stopped and the part should be reloaded into the fixture.

A more reasonable test would be to construct the HHL code to the following.

If Error_Proof < 60.0 Then

  MsgBox("Part is not properly on the fixture - Stop Program and re-fixture the part")

End If

If Error_Proof > 60.5 Then

  MsgBox("Part is not properly on the fixture - Stop Program and re-fixture the part")

End If

Previous
Previous

Calypso Handbook

Next
Next

Better Measurement Data Reporting to Improve GD&T Effectiveness