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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Factory Line Automation Part 2

100% helpful (1/1)

 

 

Step 2: Creating Machine Templates

 

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.

 

  1. In the ThingWorx Composer, click the + New in the top left of the screen.

    select_new.png

     

  2. Select Data Shape in the dropdown.

    create_new_datashape.png

     

  3. In the name field, enter Fizos.MachineInspections.DataShape and set a Project (ie, PTCDefaultProject).

    new_machineinspection_ds.png

     

  4. Click SaveAll of our machine inspections will be based on this Data Shape.

  5. Add the list of fields below:

Name

Base Type

Aspects

Description

GUIDGUIDPrimary keyString used as unique identifier for the inspection
FactoryIDInteger0 minimumFactory identifier at time of inspection
DateRequestDateN/ADate the inspection was requested
DateCompletedDateN/ADate the inspection was completed
ReportJSONN/AThis will hold the inspection report data

 

The properties for the Fizos.MachineInspections.DataShape Data Shape are as follows:

 

minspect_ds_fields.png

Create Machine Template

  1. In the ThingWorx Composer, click the + New in the top left of the screen.

    select_new.png

     

  2. Select Thing Template in the dropdown.

    create_new_thingtemplate.png

     

  3. In the name field, enter Fizos.Machine.ThingTemplate. All of our machines will be based off this template.
  4. In the Base Template field, enter GenericThing and set a Project (ie, PTCDefaultProject). In real world examples, you would likely use a RemoteThing.

    new_factory_template.png

5. Open the Properties section. Create the following list of properties.
 

Name

Base Type

Aspects

Description

FactoryIDInteger0 minimum, default 0The factory ID in which this machine is currently located
TypeStringN/AType of machine
SerialNoStringN/ASerial number of the machine
ModelStringN/AMachine make and model
StateStringDefault: IdleMachine state (Idle, Working, Warning, Failed)
StatusStringDefault: ActiveMachine status (Active, Inactive, etc)
InspectionsInfoTableDataShape: Fizos.MachineInspections.DataShapeList of inspection reports


These properties should match the following:

new_factory_props.png

6. Open the Alerts section. Create the following list of alerts.
                   

Name

Property

Configuration

StateFailedAlertStateEqual Failed
StateWarningAlertStateEqual Warning
StatusInactiveAlertStatusEqual Inactive


These alerts should match the following:

new_factory_alerts.png

Create Machine Template By Product

 

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.

 

  1. In the ThingWorx Composer, click the + New in the top left of the screen.

    select_new.png

     

  2. Select Thing Template in the dropdown.

    create_new_thingtemplate.png

     

  3. In the name field, enter Fizos.BrautsMachine.ThingTemplate. All of our brauts machines will be based off this template.

  4. In the Base Template field, enter Fizos.Machine.ThingTemplate and set a Project (ie, PTCDefaultProject).

    new_brauts_template.png

     

  5. Open the Properties section. Create the following list of properties.
                                         

Name

Base Type

Aspects

Description

CookTemperatureNumberdefault 155, units - minutesThe standard the machine cooking temperature
CookTimeNumberdefault 78.5, units - minutesThe standard the machine cooking temperature
EggLevelNumber0 minimum, 100 maximum, default 0, % unitsThe percentage of eggs left in the machine
CreamLevelNumber0 minimum, 100 maximum, default 0, % unitsThe percentage of cream left in the machine

 

6. Open the Alerts section. Create the following list of properties.

Name

Property

Configuration

EggLevelWarningAlertEggsLevelBelow 20
EggLevelDepletedAlertEggsLevelBelow 5
CreamLevelWarningAlertCreamLevelBelow 20
CreamLevelDepletedAlertCreamLevelBelow 5

 

Now for the more general sausages.

  1. In the ThingWorx Composer, click the + New in the top left of the screen.

    select_new.png

     

  2. Select Thing Template in the dropdown.

    create_new_thingtemplate.png

     

  3. In the name field, enter Fizos.SausageMachine.ThingTemplate. All of our sausage machines will be based off this template.

  4. In the Base Template field, enter Fizos.Machine.ThingTemplate and set a Project (ie, PTCDefaultProject).

    new_sausage_template.png

     

  5. Open the Properties section. Create the following list of properties.

Name

Base Type

Aspects

Description

CookTemperatureNumberdefault 150, units - minutesThe standard the machine cooking temperature
CookTimeNumberdefault 72.5, units - minutesThe 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.

 

Comments

Hello

There is an error in the Property "CookTemperature", the unit shold be °C or °F instead minutes, for both thing templates

Version history
Last update:
‎Mar 07, 2023 02:39 PM
Updated by:
Labels (1)
Contributors