Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Use the Pareto Chart Widget to visualize how issues compound to cause problems.
The Pareto Chart Widget is a useful method of displaying aggregate information.
In particular, it is often used to display multiple issues and how they combine to form an overall, larger problem.
This can be helpful when trying to determine "easy wins" by pointing out where your efforts will have the greatest impact.
NOTE: This guide's content aligns with ThingWorx 9.3. The estimated time to complete this guide is 30 minutes
In this guide, we'll assume a scenario where a factory is being automated using ThingWorx Foundation. In particular, this factory has some known issues with a robot arm that performs welding at a point along a conveyor belt.
When this welding robot has these issues, the factory line has to come to a complete halt while maintenance is performed on it.
Management has decided that these slow-downs are costing enough money that the robot arm needs some extra attention, up to and including modification to help alleviate these maintenance stops.
However, they're not sure what to tackle first. Every issues leads to a slow down, but some happen more frequently than others.
After talking with maintenance, four primary issues are identified, i.e.
Your task, then, is to start counting the number of times each of these failures occur. In addition, you need to create a small GUI which displays both how often these errors occur, and how they contribute to the overall downtime.
To accomplish this, you'll use a Pareto Chart Widget.
In this scenario, we'll store the Pareto Chart's data in a Property type called an Info Table.
An Info Table is a spreadsheet-like Property, but in order to define the columns of the table, we first have to define a Data Shape. We'll do that in this step.
Name | Base Type |
excess_temperature | NUMBER |
need_lubricant | NUMBER |
low_filler | NUMBER |
low_gas | NUMBER |
Now that we have our Data Shape, we can create a Thing to hold the collected counts of various issues.
As already mentioned, we'll use an Info Table Property, formatted by the previously-created Data Shape, to do so.
Now that we have our Thing instantiated, we want to both add an Info Table Property, as well as set some Default Values.
Now that we have a place in which to store spreadsheet-like values, we'll do so manually for testing.
Field Name | Value |
month | January |
excess_temperature | 5 |
need_lubricant | 2 |
low_filler | 1 |
low_gas | 2 |
Field Name | Value |
month | February |
excess_temperature | 7 |
need_lubricant | 1 |
low_filler | 3 |
low_gas | 2 |
6. Click + Add again, enter the following values, and finish input by clicking Add, as per above.
Field Name | Value |
month | March |
excess_temperature | 6 |
need_lubricant | 2 |
low_filler | 1 |
low_gas | 1 |
7. On the pop-up, click Save.
8. At the top, click Save.
Now that we have our data in-place for testing (and could be connected to automated systems after we finish testing), we need to visualize the data.
As mentioned, we'll use a Pareto Chart Widget, but first, we need to create a Mashup into which we can place the Widget.
Click here to view Part 2 of this guide.