Thursday, July 29, 2010

Cantilevered Coaster Catia Kinematics Trial #5

Monday, July 19, 2010

Steam Train Piston Assembly Kinematics Simulation in CATIA

Check out the train simulation I did in CATIA V5 with the DMU Kinematics workbench! Your assembly literally has to be perfect before you can even begin to attempt kinematic simulations. Which is why I often times assemble a few pieces and then simulate a small portion of whatever it is I am building just to make sure it is working, then I add on a little more and repeat. It takes longer but is easier to diagnosis problems this way. I use an Excel spreadsheet to help me keep track of the number of degrees of freedom of each part that is not fully constrained during assembly. This seems to help me a lot. What are your strategies?

Wednesday, July 14, 2010

How do you write a CATIA CATScript Macro?


A question I often get asked is "how do you create vba macros in Catia?" One solution is to write a script. No, not a script for a movie, a CATScript file! To create a CATScript macro for CATIA open Notepad and write your code, then save the file with whatever name you want and type extension .CATScript instead of .txt. Here is a simple CATScript you can use as an example. This CATScript will tell you which version of Catia you are currently using, including the service pack number. Copy and paste the code into Notepad then save as CatiaVersion.CATScript.


 

Sub CATMain()

Set SystemConfiguration1 = CATIA.SystemConfiguration

Msgbox "CATIA V" & SystemConfiguration1.Version & " R " & SystemConfiguration1.Release & " sp " & SystemConfiguration1.ServicePack
End Sub


Now you are on your way to writing your own CATScript macros and automating simple and repetitive processes!

Learn how to write CATScript macros Lesson 1.

Learn how to write CATIA CATSCRIPT MACROS

Tuesday, July 13, 2010

How do you write code for Catia’s Expert Check Editor?

I've been trying to use KBE (Knowledge Based Engineering) to try and automate a checking procedure on an NC machining process in CATIA V5. The customer requirement is for all cuts to be in the climb direction, not conventional. Using the expert check editor I can implement a checking system to easily make sure all machining operations are compliant with this requirement. Syntax is the trickiest part of the KWE language, so pay close attention to every key stroke you make when programming. Here are the steps:

Knowledgeware>Knowledge Expert Workbench>Expert Check Editor

Be sure to select the KWE Advanced Language from the pull down menu. Now enter the following code:

For All entry: FX:Mfg5AxisCurveMachining; CX:Mfg5AxisFlankContouring

Body entry: /* only interested in multi axis curve operations containing the word "Rough" */

if FX->Name()->Search("Rough")>=0

{

    if FX.MfgDirectionOfCut=="MfgClimb"

    {

        ThisCheck->AddTupleSucceeded (FX)

    }

    else

    {

        ThisCheck->AddTupleFailed (FX)

    }

}


 

/* only interested in multi axis curve operations containing the word "Finish" */


 

if FX->Name()->Search("Finish")>=0

{

    if FX.MfgDirectionOfCut=="MfgClimb"

    {

        ThisCheck->AddTupleSucceeded (FX)

    }

    else

    {

        ThisCheck->AddTupleFailed (FX)

    }

}


 

/* only interested in multi axis FLANK CONTOURING operations containing the word "Chamfer" */


 

if CX->Name()->Search("Chamfer")>=0

{

    if CX.MfgDirectionOfCut=="MfgClimb"

    {

        ThisCheck->AddTupleSucceeded (CX)

    }

    else

    {

        ThisCheck->AddTupleFailed (CX)

    }

}

Monday, July 12, 2010

Catia NC Programming using Check Editor Knowledge Based Engineering


I use the check editor in Catia V5 to improve the quality of NC machining process files. All of my chamfer cuts on this particular part need to have a Tanto Fan axis. I use the code below:

`Far Side Chamfer 1\MfgParameter.5\Tool axis strategy` == "MfgTantoFan" AND
`Far Side Chamfer 2\MfgParameter.5\Tool axis strategy` == "MfgTantoFan" AND
`Near Side Chamfer 1\MfgParameter.5\Tool axis strategy`== "MfgTantoFan" AND
`Near Side Chamfer 2\MfgParameter.5\Tool axis strategy` == "MfgTantoFan" AND
`Near Side Chamfer 3\MfgParameter.5\Tool axis strategy` == "MfgTantoFan"

All of the machining operations in my part need to be climb cut. Therefore, I used this code in the Catia check editor to let me know if it somehow gets changed by accident.

`Rough Far Side.1\MfgParameter.5\Direction of cut` == "MfgClimb" AND
`Rough Far Side.2\MfgParameter.5\Direction of cut` == "MfgClimb"

Keep in mind you can't just use a plain old equals sign, you need to use the double equals. Also, it took me awhile to figure out the correct syntax for  "MfgClimb". I tried "Climb" and MfgClimb unsuccessfully before stumbling upon the successful solution.

I use a parameter to control the depth periphery (depth of cut) and the distance on the rough profile from the tool to the part. Here are the simple formulas for the check editor.

Depth_Periphery == -2mm AND RoughProfile == 1.5mm

/*Check created by Me 7/12/2010*/