Use the EMS to Create an Engine Simulator Part 3
- November 7, 2022
- 0 replies
- 656 views
Step 5: Create InfoTable
Now that we have connected values coming from our EMS engine simulator, we want a method of permanent storage whenever we feel it's appropriate to take a sample.
From repeated sampling, we'll be able to build up a historical record usable for both manual inspection, as well as automatic analysis via ThingWorx Analytics (though ThingWorx Analytics is beyond the scope of this guide).
To hold these records, we'll use an Info Table Property.
But any time that you create an Info Table, you first need a Data Shape to format the columns.
- Click Browse > MODELING > Data Shapes.

- At the top-left, click + New.

- In the Name field, type esimDataShape.

- If Project is not already set, search for and select PTCDefaultProject.
- At the top, click Field Definitions.

We now want to add a separate Field Definition for each entry of our engine simulator data, i.e. low_grease, s1_fb1 through s1_fb5, and s2_fb1 through s2_fb5.
In addition, we'll add an additional field named identifier which simply keeps a rolling count of the current log entry number.
- Click + Add.

- In the Name field on the right slide-out, type identifier
- Change the Base Type to NUMBER.
- Check Is Primary Key

- At the top-right, click the "Check with a +" button for Done and Add.

Repeatedly add additional definitions as per the chart below:
Note that you will NOT check the "Is Primary Key" box, as you only need one, i.e. identifier.Name Base type low_grease NUMBER s1_fb1 NUMBER s1_fb2 NUMBER s1_fb3 NUMBER s1_fb4 NUMBER s1_fb5 NUMBER s2_fb1 NUMBER s2_fb2 NUMBER s2_fb3 NUMBER s2_fb4 NUMBER - Create one additional entry for s2_fb5 and NUMBER, but click the "Check" button for DONE.
- At the top, click Save.

Create Info Table
Now that we have a Data Shape we can add an Info Table Property to EdgeThing.
- Return to the Properties and Alerts tab of EdgeThing.

- At the top-left, click + Add.

- In the Name field of the slide-out on the right, type infoTableProperty.

- Change the Base Type to INFOTABLE.

- In the new Data Shape field, search for and select esimDataShape.

- Check the Persistent checkbox.

- At the top-right, click the "Check" button for Done.
- At the top, click Save.

Click here for Part 4 of this guide.

