cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Modular Datamodel

Christian_S
6-Contributor

Modular Datamodel

At the moment we are designing our datamodel with thingworx.

We encountered an problem when we are trying to design our modular machine.

Basicly we are having a thing consisting of "part-things" and we cannot design this at the moment.

 

For example we have a machine(thing) which can contain different modules. How would be best partice for a modular datamodel?

 

Example:

 

1. We have a Truck

2. We have a Sand-Transportation-Trailer

3. We have a Silo-Trailer

4. We have a Sleepingcabin

5. We have a Light-Package Plus

6. We have a Light-Package Minimal

 

So now there can be any combination of this like e.g.

A) A truck with Silo-Trailer and Sleepingcabin

B) A truck with Silo-Trailer and Light-Package Plus

C) A truck with Sand-Transportation-Trailer and Sleepingcabin and Light-Package Plus

 

A  logisticmanager now wants to see all of his trucks with the filling-percentage of the trailers.

So the percentage could either be taken from a Silo-Trailer or a Sand-Transportation-Trailer but can be compared cause in both cases the value is a number.

 

The datamodel idea we had was creating a ThingTemplate "Truck" and all other parts can be "Shapes" with properties, so that we can put all modules on a thing dynamicly. But in this case we have to do this for all shapes when we are creating a new Thing. So this would be probably a hard word to say, "okay we have a new thing, and this contains this,... and this... and this.." And all of this should be somehow comparable.

Especialy when some modules contain same properties (name conflict in thingworx).

 

Can someone help us here? Is there any guide for a modular thing datamodel? 

 

Best regards

 

2 REPLIES 2

When you have common attributes that can be shared across different templates, put them on a "common" shape.  You could create something calling TruckCommonTS and put all the shared attributes on it so you don't have to worry about attribute naming conflicts between shapes. You can also start with a basic truck template and add just your common shape to it.  Then create new templates based on your basic truck template and add in the other shapes you need.  Don't limit yourself to just a single truck template.  When you need to create new instances of things, just use of of your templates that accurately defines the type of thing you need.

 

Also, if you need a common reference point to make your entities easily searchable you can use a thing shape almost like an interface and just attach it to all your things. I create a thing shape called SearchableTS and add it to all my templates to which I want to access to via the entity picker or the spotlight search service.

Christian_S
6-Contributor
(To:wposner-2)

Thanks for your fast reply.

The only pain here would be to manage templates for all combinations right? 

 

I read about Networks and thought if this could also be an option, to be more "modular" but i couldn't get it work to build up a kind of menu/navigation because I only got a "name" as string and couldn't go any further.

So I think I have to think about my datamodel again and how to structure my shapes.

 

And also thanks for the idea of a searchable shape, this solved another point on my list :-)

 

Top Tags