Thursday 1 August 2013

Solid Edge ST6: Holes, Threads, and Pattern Recognition

In order to talk about Hole and Pattern Recognition, I have to first talk about Hole features, and we might as well pick up Threads along the way. You can find the Hole icon on the Ribbon on the Solids group. The Hole icon has a dropdown that includes Hole, Thread, Slot and Recognize Holes.

Holes

The Hole feature creates Simple, Threaded, Tapered, Counterbored, or Countersunk holes as features. These are editable as holes in both Synchronous and Ordered modeling. If you are used to some of the other CAD packages out there, ST6 does not have a list of standard screw sizes from Machinery’s Handbook. Solid Edge requires you to enter these values on your own. You can save all the various sizes you use frequently to reuse them so you don’t have to enter them a second time.

Threaded holes, however, do come with a list of inch and metric thread sizes, and callouts are added to the feature. For example, a 10-32 UNF hole is actually created with a .156” dia hole, which is close to the .159” tap drill size cited in my Machinery’s Handbook #27 (pg 1934). If this won’t work on your drawings, you can change the value in the Holes.TXT file found in your Solid Edge installation directory in the Preferences folder. Before you mess with this file, make sure to save a copy as a backup, and use comments to flag changes from the original. Be sure also to restart Solid Edge after making any changes to this file. The format of the data in the file is easy to understand and explained inside the file itself.

Changes you make to Holes.txt won’t update any existing holes, but new holes will use the new values entered. This file only covers threaded holes (and threaded protrusions). Other hole types (such as counterbored or countersunk) do not have standardized sizes assigned by Solid Edge, as mentioned earlier. (In case you’re wondering, yes, this would be a great point to add an enhancement request).

Threads

Threads can be applied to any internal or external cylindrical face using the Threads command (Home >Solids>Hole>Threads). Solid Edge will again use the Holes.txt file to size and classify the thread. A couple of tips are in order here. First, do not apply your own dimension to the cylindrical face, it will interfere with the function of the command. Second,  the cylindrical face for a female thread must be modeled to the internal minor diameter as specified in Holes.txt. The cylindrical face for a male thread must be modeled to the nominal diameter.

Hole Recognition
Hole recognition was added to Solid Edge in ST5, but I’m including it in this discussion with ST6’s Pattern Recognition because the two topics really go together. In order for Solid Edge to perform a Pattern Recognition, the holes that you want to put into a pattern must be in a hole feature first. So if you get an imported part with a pattern of holes and you want to edit the pattern or the holes, you must first run hole recognition, and Solid Edge will place the geometry in one or more hole features, grouping identical instances into a single feature. Then you can edit the holes, and change all of the holes in a single feature to a different type of hole. For example, change 10 identical counterbored holes into 10 identical countersunk holes. You can change any of the hole parameters, such as cbr depth, diameter, and so on.

After the hole is recognized and edited, you can recognize and edit the pattern or multiple patterns. You can find the Recognize Pattern tool in the Pattern group. For example, below is an imported part. Solid Edge recognized all 24 holes as a single hole feature, since they are all the same. Then Pattern Recognition saw two different patterns. I tried to get it to make a single pattern of two holes, but I wasn’t able to do that.

Pattern Recognition

If you are trying to recognize a pattern, and the icon won’t light up, one of two things is probably wrong. First, you might not have any hole features, so go through the Recognize Hole step. Second, you might not have anything selected. It’s best to select the hole collector (the entry at the top of the list of holes – this could be less confusing by using a different name or icon for the collector). If you select one of the holes listed under the collector, the icon lights up, but the interface for the function does not fully appear.

After the patterns have been recognized, the collector for this particular part only shows two hole features, and two pattern features. It shows two hole features because there is one seed feature for each pattern. It would be convenient in cases like the one shown here to have two seed features for a single pattern, but that may be an enhancement for a later release.
Summary

ST6's new patterning and pattern recognition are slick. Combined with last year's hole recognition, you've got some great tools for making native changes to imported holes and patterns. I'd like to put some standardized hole sizes on my wish list for the Hole feature for next year.


Wednesday 31 July 2013

Teamcenter POM Query

POM Query is one of important ITK  module in teamcenter from perspective on Data extraction and performance. Teamcenter POM query is API layer provided to query database through API rather then  direct query in database, as Teamcenter doesn't officially expose the underline database design. Developer often prefer to use POM Query rather then going for sets of ITK api to get the desired object from Teamcenter because of performance factor as well using one set of call for getting desired object. Once you understand POM Query mechanism it is very easy to implement complex query cases through it rather then going through lengthy set of ITK API calls . In this blog I will give basis of POM query. With this basic understanding you can build complex query through it. I am assuming the reader will have basic understanding of Teamcenter Data Model. If not please refer my previous blog on Teamcenter Data Model
Introduction 
POM query is noting but sql query which wrapped around ITK program for extraction of data from teamcenter database. I will explain  POM query through simple SQL example which we will convert to POM query. Let assume we want to extract some item based on specific item id and item type . If we want to do it through SQL query, the sql statement look like this
Select puid from item where itemid = “1234”  and object_type = “Item”;
So there are three main constituent of any sql query.
  •   Select (attributes)
  • From (table)
  • Where (condition)
    • And /OR

SQL statement  is a function, constituting above three aspect. If you want to covert the above statement in to POM query, all the above aspect formS the building block for POM query.
Following are basic characteristic of POM Query.

  • POM Query has unique identification.
  • POM query will have select attribute from  POM Classes
  • POM Query has expression which specified where condition
  • All expressions are binding through POM query API with logical clauses
  • POM query required to be executed to get the results
          Steps for building POM Query

  1. Create the query by unique name
  2. Add select attribute on POM query by defining attribute and corresponding POM class
  3. Build the  query with all specified expression\condition against query identification.
  4. Bind the expression through logical value .
  5. Execute the query and get the results.
  6. Delete Query
Let see how the sample sql statement can be converted to POM query

Create Query
Unique identification for query
POM_enquiry_create (“get_itemid”)
Teamcenter identify  query through unique string name in a given session. Hence it is good practice to clear the query after it is used.
Select attributes
const char * select_attr_list[] = {"puid"};
POM_enquiry_add_select_attrs(“get_itemid”, “Item”,1,” select_attr_list)
The above api set the select attribute agaist POM Class (It item in this case). You can have multiple attribute defined for select attributes in array and specified that in api. We defined 1 as we have only select attribute in our case.
Build Expression
const char * itemid[] = {"1234"};
POM_enquiry_set_attr_expr(“get_itemid”, "ExprId1", "Item", "item_id", POM_enquiry_equal, “valueId1”)
POM_enquiry_set_string_value (“get_itemid”, "valueId1", 1, itemid, POM_enquiry_bind_value )

The above set condition expression of the query. This is equal to item_id= ‘1234’. The expression is identified  by unique string  identification  which in this case is ExprId1. The value required to be binding through unique identified because of different data type binding. The value identifier valueId1 is then binding by value through proper API call based on attribute type to which it is binding. In our case binding is with string attribute, hence we call set_string_value api. If you have any other data type for attribute  then you have to  call appropriate API. Following data type are supported for POM Query.
Int  : POM_enquiry_set_int_value
Double : POM_enquiry_set_double_value
Char : POM_enquiry_set_string_value
String : POM_enquiry_set_string_value
Logical POM_enquiry_set_logical_value
Date : POM_enquiry_set_date_value
Tag : POM_enquiry_set_tag_value
This expression is binded by query by providing query identification which ‘get_itemid’ in our case. Similar expression will be for other condition of object type
 const char * itemtype[] = {"Item"};
POM_enquiry_set_attr_expr(“get_itemid”, "ExprId2", "Item", "object_type", POM_enquiry_equal, “valueId2”)
POM_enquiry_set_string_value (“get_itemid”, "valueId2", 1, itemtype, POM_enquiry_bind_value )
Expression Binding
Now the two expression should be combined for where clauses. The logical binding between expression is done through api call
POM_enquiry_set_expr(“get_itemid”, "ExprId3", "ExprId1", POM_enquiry_and, "ExprId2")
The above api will bind ExprId1 and ExprId2 with and clause. This is equal to
itemid = “1234”  and object_type = “Item”;
To identify the binding a new expression id is created. This expression id can be used now to develop complex binding if there are more then two condition clauses.
Expression can be binded by and, or and not condition. This is similar to sql condition binding.
Once the expression binding is completed, then we required to put as where clause in expression. This is done by calling API
POM_enquiry_set_where_expr(“get_itemid”, "ExprId3")
This set the where clause against expression ExprId3 which in binding expression for ExpId1 and ExpId2.

Query Execution
The above steps completes POM query which is now equivalent to SQL query. Now query required to be executed. Which is done by calling API
POM_enquiry_execute(“get_itemid”, &rows,&cols,&results)
Where row, col and report are output. 
rows : number of results.
cols : Number of column for each result
results : result of query in two dimension array. This is array of void pointer
The above binding can be better understand by below diagram.

Once query is executed and results are stored in array, they required to extracted and type cast for specific type based on select attributes provided for POM Query. For example is above case we extracted puid which is nothing but object tag. So we required to convert our output to tag pointer. Below psedo code shows how to extract and store it in tag array.
if(rows > 0 )
      {
            int reportrow = 0 ;
            tag_t *objs = Null Tag
            (objs) = (tag_t *)MEM_alloc( (objs), ( rows) *sizeof(tag_t)));
            for ( int i= 0; i< rows; i++)
            {
                  (objs)[i] = (*(tag_t *)( results [i][0]));
                 
            }
           
      }
Once results are stored after type cast then this object can be used as a any tag object id in teamcenter.

Delete Query
After executing the query and storing the result in appropriate object type we required to delete the query. Remember the each query is unique and identified through its string name. If we don’t delete the query, then query will remain in given state in a session and again if it hit same code it will trough a error as query with the given name is already registered in a session.
POM_enquiry_delete ( “get_itemid” )
That’s all for introduction POM query. Once you understand basic of POM query, you can implement various complex query by joining two tables and having multiple expression hierarchy. Most of the SQL statement can be converted to POM query. I suggest for complex query better to first visualize in term of SQL statement and then design POM query.
http://teamcenterplm.blogspot.in/

Teamcenter FMS Overview

File Management System (FMS) is one of the Teamcenter component for managing files or vault in Teamcenter. FMS is responsible for all transaction related to files from Teamcenter server and client. In this blog we will discuss the basic architecture of FMS and its interaction with Teamcenter Application.
FMS Overview:
FMS is independent tool which run as service in server (as FSC) and client machine (as FCC). Teamcenter Application Tier and Client Tier interact with FMS framework through HTTP or HTTPS protocol. The two components of FMS are FMS server cache (FSC) and FMS client Cache. As name suggest FSC is service running in server side which basically cache file in server and serves multiple user request where as FMS client cache work in client machine where it serve request for single user and also interact with FSC for getting latest or new files from server.
Architecture of FMS:
As discussed in FMS Overview, FMS has two components: FSC and FCC. For basic installation you usually have one FSC and multiple FCC based on number of user using the Teamcenter Client. Each of portal clients will have one FCC running on client machine. But in production Environment where user can be in multiple geographical location or number of user are so high that single FSC can’t service so many users. Also if volumes are mounted in different server then also we required FSC on each volume server as FSC is must for each of the volume server. Hence we required to have multiple FSC running in different server to server different geography or set of user or volume server. This multiple FSC server are distributed in such a way that they can be near to each of geographical location.  Due to multiple FSC server architect we then required to define one FSC server as master for managing request and routing to different FSC server. The below diagram shows FMS architecture.
FMS Configuration
Configuration of FMS is managed through xml files. Basically there are three types of Files
·         FMS Master
·         FSC
·         FCC
FMS master configuration file is master configuration file resides in master FSC server. FMS master configuration file which define various FSC sites in cluster or FSC Group. Apart from FSC information it may information of Volumes related to FSC. It will also have default configuration information for FSC and FCC which can be override by respective configuration
FSC configuration file is installed in each of the FSC server. FSC configuration basically contain two main elements
FMSMaster : Defines FMS master location from where FMS Master Configuration file can be read by FSC. FMS Master information help FSC to route the file request in case it doesn’t resides in it volume or cache.
FSC: Defined detail of installed FSC in server. In has different parameter which defines files transfer characteristic as well error and log information. Also it has parameter related to FSC cache for files as well cache location. The parameter vale basically decided based on load, file size, performance requirement as well overall FSC architecture.
FCC configuration installed in each client. It has two main elements
fccdefault : This override FCC configuration from FSC. This has various configuration parameter related to client cache and request.
parentfsc : This define FSC which FCC refer to for downloading FMS configuration. You can have multiple FSC defined as a backup for failover.
Communication Flow between FMS and Teamcenter :
Below is the process for communication between Teamcenter and FMS.
1.       User try to retrieve file from dataset.
2.       Whenever there is any request of file in teamcenter by user, application server forward the request to FMS for retrieving file from Vault.
3.       FMS create a FMS ticket corresponding to file retrieval from vault. FMS ticket is sent to client end which then request to FMS with FMS Ticket.
4.       FMS request is routed to FCC installed in client site for File retrieval.
5.       FCC check if the file cached in FCC and not modified. Modification check of file is done through concept of GUID which is associated with every file in Teamcenter. GUID is a business neutral identifier for file contents, to determine when to pull a file from its local cache. Every file in a Teamcenter vault has a single file GUID associated with every replicated copy of the file. Any change in File results in having a new GUID for the file. In this way FCC check for modification.
6.       If file doesn’t resides in FCC or changes, then FCC sent request to FSC associated with the site id. The priority defines FSC request sequence if the FCC is configured with multiple FSC for given sites id.
7.       FSC check if files is cached in its own server and belong to its own volume. Otherwise it will forward it to corresponding FSC. The other FSC site information its retrieve from FMS Master config file.
8.       FSC sent the file to FCC which in turn route it to client request.
The below diagram depict the overall flow of  FMS request.
Hope this will help to understand FMS working and configuration.

http://teamcenterplm.blogspot.in

Teamcenter Data Model

Data Model is core of any Packaging software. To have a good technical command in any package, it is important to have a good understanding of its Data Model. Teamcenter is no difference with it.  In this blog, I will explain basic data model of Teamcenter as well corresponding schema in Database. This will help people new to Teamcenter to have a better understanding of Teamcenter system.
Teamcenter Data model can be categorized in to three distinguish layer. They are
·         POM or Schema Layer
·         Business and Relation Object Layer
·         Business Rules
POM or Persistence Object Model is lowest layer, which basically represent mapping for underlying Data Base of Teamcenter. It is not always one to one mapping, but closest to DB Tables for most of classes. Developer should know detail aspect of POM layer for customization and extension of system.
Business and Relation Object Layer resides above POM layer. This layer represents actual entity to Business and its process. Mainly Business Analyst or Solution Architect interacts at this layer.  Business Object and Relation defines overall Data Model from Business process perspective.
Business Rules are the top level layer of Data Model. This layer basically constitutes Business Object behavior based on the rules configured in BMIDE. Business rules along with Business Object encapsulate overall PLM business process. Teamcenter provided both configurable like naming rule, conditions etc or custom like extension for defining business rules.
Below diagram shows the basic building block of Teamcenter Data Model.
 

POM Schema of Teamcenter Data Model:
Teamcenter Data Model Schema is hirierachy based, it means there is base level object through which all the object in the stystem are derived. The base object in Teamcenter is called POM_object. It is base parent object for all object defined in Teamcenter. POM level object  are represented as tables in Teamcenter data base. All derived class of Teamcenter Data Model is represented as corresponded table in data base. Under POM_object classes there many immediate child classes which are mainly used as storage classes like form storage class. Out of which one important class is POM_application_object class. This is important class from perspective of it actually representing all Business object of Teamcenter.  Workspace object which represent as parents of all objects which user can see in the teamcenter is derived from POM_application_object class.
All Business classes in Teamcenter either directly or indirectly (through hierarchy) is derived from workspace object. For example Item class is derived from workspace object. Same is valid for Folder, Dataset or ItemRevision. Below diagram shows the class hierarchy for basic workspace object.
 

Most of time you create custom type by extending data model of Item or form type. Once deploy from BMIDE, it will create a new table in Data base with columns having custom attribute defined in BMIDE. All inherited classes automatically inherit parent attributes. Hence child attributes are combination of parent attributes plus child attributes.
Business Object:
The building block of Teamcenter is Business Object. It resides above POM Objects or DB Classes. Business Object can be seen as actual representation of real life entity which are encapsulated as Business object. The underlining objects are still persistence schema classes.  Teamcenter UA provides hundred of OOTB business objects. Following are major characteristic of Business Object.
1)      Business Objects are related to each other through relations.
2)      Business Objects have property which can be persistence (attributes from underlining classes) or Dynamic (evaluated run time).
3)      Business Objects behavior can be controlled through rules which are defined in BMIDE. Rule can be either configurable (Ex: Naming Rules) or customization (extension, user_exit etc).
GRM Relation: Teamcenter Relation is second building block. Relation defined the inter dependent of various Business Object with each others. In Teamcenter Relation can be categorized in to two groups.
a)      Reference by : The Business Object underline schema classed direct has reference to other object through attributes. It can be compare to pointer reference to other classes in object orient concept. For example POM_application object has reference to owning group or user.
b)      GRM Relation : Other way relation between is created by creating a relation object which encapsulate both Business object through concept of primary and secondary object. Advantage of using GRM relation rather than direct relation is that of having more flexibility in term of defining business rules. For example you can define DeepCopy Rules or GRM Rules. Also different relation type object can be created to defined different Business rules.
Property:
Properties define business objects. All attributes which are present in underline POM Class for given Business Object are automatically become property of Business Object. Apart from persistence property, there are other properties which are either derived from other relation object or created run time by writing custom codes. Teamcenter property can be classified in following four categories.
a)      Persistence Property: Attributes which are stored in database. This are defined in underline schema classes.
b)      Compound Property: It a property which basically propagates property of other object which is related to target business object through either reference or relation. Example of this can Form property shown at Item or Item Revision.
c)       Runtime Property: These are property define dynamically through custom code. The custom code required to be written, which executes when the property value is fetch from server.
d)      Relation: This is property which defines relation between target object and source.
That’s all from Teamcenter Basic Data Model Perspective. Hope this provide good starting point  for people who want to understand Teamcenter Data Model.
 Source: http://teamcenterplm.blogspot.in

Monday 29 July 2013

DO MORE with Your PLM Software

We all know Aras is a full-featured enterprise PLM system, offering functionality such as complex configuration management, change management, product management, etc., but what you may not realize is that Aras goes way beyond "traditional PLM."

Recently I sat down with Rob McAveney, Director of Product Management, and he told me about several different ways in which customers are using Aras, including tooling management, formula & recipe management and customer relations management.

Aras manages the entire product lifecycle, not just the CAD design phase. Aras is involved in manufacturing planning & execution, quality systems, the extended supply chain and maintenance, repair & overhaul.
Watch the video to learn more and see how you can apply Aras in your business.