Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Creating machine templates allows us to have specific levels of consistency with all of our machinery, no matter the purpose of the machine. As it goes towards more specific a machine, it will have it's own unique features and properties.
In the ThingWorx Composer, click the + New in the top left of the screen.
Select Data Shape in the dropdown.
In the name field, enter Fizos.MachineInspections.DataShape and set a Project (ie, PTCDefaultProject).
Click Save. All of our machine inspections will be based on this Data Shape.
Name | Base Type | Aspects | Description |
GUID | GUID | Primary key | String used as unique identifier for the inspection |
FactoryID | Integer | 0 minimum | Factory identifier at time of inspection |
DateRequest | Date | N/A | Date the inspection was requested |
DateCompleted | Date | N/A | Date the inspection was completed |
Report | JSON | N/A | This will hold the inspection report data |
The properties for the Fizos.MachineInspections.DataShape Data Shape are as follows:
In the ThingWorx Composer, click the + New in the top left of the screen.
Select Thing Template in the dropdown.
5. Open the Properties section. Create the following list of properties.
Name | Base Type | Aspects | Description |
FactoryID | Integer | 0 minimum, default 0 | The factory ID in which this machine is currently located |
Type | String | N/A | Type of machine |
SerialNo | String | N/A | Serial number of the machine |
Model | String | N/A | Machine make and model |
State | String | Default: Idle | Machine state (Idle, Working, Warning, Failed) |
Status | String | Default: Active | Machine status (Active, Inactive, etc) |
Inspections | InfoTable | DataShape: Fizos.MachineInspections.DataShape | List of inspection reports |
These properties should match the following:
6. Open the Alerts section. Create the following list of alerts.
Name | Property | Configuration |
StateFailedAlert | State | Equal Failed |
StateWarningAlert | State | Equal Warning |
StatusInactiveAlert | Status | Equal Inactive |
These alerts should match the following:
Here at Fizos, we specialize in brauts and regular sausages. That being said, we will have some machines that are specific to each product. We will also have machines that are generic in nature and shared between the two systems. The template we just created will work for the machines that are common between both product lines. We'll now create two templates that will be specific to brauts and regular sausages. We are doing this to show the levels of granularity that can be done. In some cases, you might not want to create another template level based on your design.
In the ThingWorx Composer, click the + New in the top left of the screen.
Select Thing Template in the dropdown.
In the name field, enter Fizos.BrautsMachine.ThingTemplate. All of our brauts machines will be based off this template.
In the Base Template field, enter Fizos.Machine.ThingTemplate and set a Project (ie, PTCDefaultProject).
Name | Base Type | Aspects | Description |
CookTemperature | Number | default 155, units - minutes | The standard the machine cooking temperature |
CookTime | Number | default 78.5, units - minutes | The standard the machine cooking temperature |
EggLevel | Number | 0 minimum, 100 maximum, default 0, % units | The percentage of eggs left in the machine |
CreamLevel | Number | 0 minimum, 100 maximum, default 0, % units | The percentage of cream left in the machine |
6. Open the Alerts section. Create the following list of properties.
Name | Property | Configuration |
EggLevelWarningAlert | EggsLevel | Below 20 |
EggLevelDepletedAlert | EggsLevel | Below 5 |
CreamLevelWarningAlert | CreamLevel | Below 20 |
CreamLevelDepletedAlert | CreamLevel | Below 5 |
Now for the more general sausages.
In the ThingWorx Composer, click the + New in the top left of the screen.
Select Thing Template in the dropdown.
In the name field, enter Fizos.SausageMachine.ThingTemplate. All of our sausage machines will be based off this template.
In the Base Template field, enter Fizos.Machine.ThingTemplate and set a Project (ie, PTCDefaultProject).
Name | Base Type | Aspects | Description |
CookTemperature | Number | default 150, units - minutes | The standard the machine cooking temperature |
CookTime | Number | default 72.5, units - minutes | The standard the machine cooking temperature |
Next, we'll create our services for how these machines will work.
Click here to view Part 3 of this guide.
Hello
There is an error in the Property "CookTemperature", the unit shold be °C or °F instead minutes, for both thing templates