Come faccio a scaricare i dati storici del sensore nell'applicazione Creo Product Insight da un server ThingWorx.
I hope the translation of google is so far ok:
"How do I download historical sensor data into the Creo Product Insight application from a ThingWorx server."
Could you, you please, provide more details about the intention the goal what you want to achieve?
So far, I understand you have a value stream data, right?
Let say it represents a measurement for an angle of mechanism part for some time range.
Also, in Creo Parametric you have an mechanism which should use this angle as measurement.
So now I suspect you want to use this data /historical data associated to the measurement of your mechanism in Creo Parametric (in Creo Dimension on a pin join)
When you configure /setup Creo Insight you are prompted to select a thing having a value stream (let say with angle property) . so, what I believe you can do - > is to copy your historical data to this value stream. To copy a data to a stream I think the simplest way is to use custom service which read you historical data and will write to the value stream.
Unfortunately, I have currently Installation of Thingworx server without Creo If there is more details required - in this case I need to check it more deeper and , of course , to install the Creo Inside to my current environment.
This video shows all the steps to achieve this, so hopefully it can be helpful.
Hi @titurbina ,
I am sorry for the delay! Now I installed the Creo Insight on Thingworx 8.4 and tested with Creo Parametric 18.104.22.168.
So I used on the server side as mentioned Thingworx (ThingWorx 8.4.0-b2013)
The first point I want to mention is that you need license for Creo Parametric to be able to use the sensor menu:
You can check if you have this license when you call in Creo Parametric the menu #File>Help>System Information
- you mentioned in your feedback that you have historical data. The question is in what of format do you have the historical data.
This data could be a Thingworx thing which have some value stream where data is recorded or this data is another file excel or csv file. For the both option there should be no problem to use this data in Creo Insight but also you can transform the data form Thingworx value stream to excel and vice versa.
Let check it first only for the Creo Parametric Interface. When you have the PRODUCT_INSIGHT license option you will be able to see the following menu items:
Important is that when you define a sensor - this is a part with name (let say sensor_1.prt). You will be able to define a part as sensor if you have the PRODUCT_INSIGHT option.
So later as already shown in the video you can load the sensor.
In the example model I used I have 2 sensors:
1.) If I have the data in csv format I could load the data to Creo parametric .
The question here is -what is the correct format?
Here I have a part with the name "SENSOR_1.PRT" and sensors (mdl of sensor_1.prt parameters) named "ANGLE" and "TEMP"
The data should be csv format ( there are a lot of ways to convert any data to CSV and also excel directly could save to it or read it )
In this case the file should have the following syntax:
Set Name,SENSOR_1/TEMP,SENSOR_1/ANGLE 2019-09-27T07:00:30.126Z,229.661615,1.516545 2019-09-27T07:00:31.126Z,-174.518596,36.837679 2019-09-27T07:00:32.126Z,-95.971392,24.702305 2019-09-27T07:00:33.126Z,69.389865,81.987879 2019-09-27T07:00:34.126Z,197.526367,51.298425 2019-09-27T07:00:35.126Z,181.306855,65.065420 2019-09-27T07:00:36.126Z,225.430527,1.770463 .... further lines .... 2019-09-27T07:00:48.126Z,-163.583834,3.932845 2019-09-27T07:00:49.126Z,-182.624593,22.908542
The same data here below in Excel:
So in this format for this particular sensor definition you could load the data to Creo Parametric (without connection to the server!) And could for example used it to set different states of the measurements (something similar to family table) example:
2.) the second option is if you have the data already in Thingworx as value stream property. You can download the data from thingworx. For example for the sample sensors above I defined the a thing using logged property with value stream. Then I could print an output of the entities in a particular time range using the QueryPropertyHistory service:
Now I could connect this Thing with data - in this case I generated the data by some funciton using random inputs (... but this could be also your historical data).
To connect the data we need to use the "TW.AnalysisServices.AnalysisMainMashup" mashup. We can simple start this mashup in Thingworx in preview mode.
How to create Analysis provider and how to get this mashup is shown in the video mention above.
The essential part here to create an event for this thing.
Now you can receive a data from the value string of the properties "ANGLE" and "TEMP" of TES_stream - Things - for particular time range into Creo:
Then you can load data from the server and run it:
We can run only a data set or run all sets from the table.
We have the option save the data to csv format and work later with Excel but there is also an option to export the data to server and possibly to override an existing data, but this required another type event where the source is Creo and target Thingworx. I tested this option, but I could not get it working so may be if someone have idea how to setup the event in the analytics manager will be great. Actually we can also import such data directly to a thing in Thigworx by some customized services (and csv parser extension)
I checked, the license in Creo Parametric PRODUCT_INSIGHT is available to use the sensor menu.
Now how do I upload the file containing the sensor characteristics?
I need the characteristics of three sensors, extensometer, accelerometer, thermometer.
Where can I find the sensor file in CSV format?
Can you send me the file in CVS for a strain gauge, accelerometer or thermometer?
Hi @titurbina ,
I am not sure if I understand correctly your request because I think it repeat simple partially the same question what I tried to answer in the post above. Did you check all points I provided in my previous post?
So, no let me , please, try here to answer it so far I understood it:
- you are working only in CreoInsight - we will not consider here the connection to the Server.
1.) you need define a sensor. You need to open the part which should be used as sensor and then to click the Creo commands File>Prepare>Model Properties > and select the sensor Item change:
So here this will open a dialog box where you can:
a.) specify an xml file - >and this is your first question. There is no such definition as template by default. So, means you can save you own sensors in this format to use it later for definition. But if you create your first definition you have to omit this step.
b.) then if you do not provide a xml file Creo will open simple a parameter box. And the definition of your sensor is SIMPLE PARAMETER DEFINITON as we are familiar with Creo Parameter Definition in a Part :
And when you defined the parameters for the sensor - you can save/ export them as xml file which could be used furher for the same sensor defintion.
This is all! It is very simple!
Here is the format for sample definition of 2 parameters with untis:
<?xml version="1.0" encoding="UTF-8"?> <CreoParamSet> <Parameter Name="ACCELERATION"> <Unit>mm / sec^2</Unit> <Value>0.000000e+00</Value> </Parameter> <Parameter Name="TEMPERATURE"> <Unit>K</Unit> <Value>0.000000e+00</Value> </Parameter> </CreoParamSet>
2.) now when we have the sensor definition, then we need to have some values - To get such values we need to use csv file.
Of course , we need to define this sensor file . The format is very simple:
Set Name,<SENSOR PART NAME>/<Parameter1>,<SENSOR PART NAME>/Parameter 2, .....<SENSOR PART NAME>/Parameter N time stamp 0, value0 of parameter 1,value 0 of parameter 2, ....,value 0 of parameter N ...... ...... time stamp m, value m of parameter 1,value m of parameter 2, ....,value m of parameter N
so and here an example of this file for the mentioned parameter definition above. For simplification of the creation I used the same values for different time stamps - (the time stamps should be different to have consistent data if we want later to transfer it to Thingworx - same value of sensor means it will not change over particular time range
Set Name,SENSOR_1/ACCELERATION,SENSOR_1/TEMPERATURE 2019-09-27T07:00:30.126Z,1.111,5.5555 2019-09-27T07:00:31.126Z,1.111,5.5555 2019-09-27T07:00:32.126Z,1.111,5.5555 2019-09-27T07:00:33.126Z,1.111,5.5555 2019-09-27T07:00:34.126Z,1.111,5.5555 2019-09-27T07:00:35.126Z,1.111,5.5555 2019-09-27T07:00:36.126Z,1.111,5.5555 2019-09-27T07:00:37.126Z,1.111,5.5555 2019-09-27T07:00:38.126Z,1.111,5.5555 2019-09-27T07:00:39.126Z,1.111,5.5555 2019-09-27T07:00:40.126Z,1.111,5.5555 2019-09-27T07:00:41.126Z,1.111,5.5555 2019-09-27T07:00:42.126Z,1.111,5.5555 2019-09-27T07:00:43.126Z,1.111,5.5555 2019-09-27T07:00:44.126Z,1.111,5.5555 2019-09-27T07:00:45.126Z,1.111,5.5555 2019-09-27T07:00:46.126Z,1.111,5.5555 2019-09-27T07:00:47.126Z,1.111,5.5555 2019-09-27T07:00:48.126Z,1.111,5.5555 2019-09-27T07:00:49.126Z,1.111,5.5555
And then we can load the data to sensor and use it lo run all or only specific parameter set:
(in this example we have always the same value, but we can edit them and set different measurment values and then if we use some relation we can see a change when we run a set!)
I hope now is clear. If not then , please, let me know!
Sorry we're almost there, I wanted to know how do you create the table below?
Hi @titurbina ,
this file I created manually -> simple by copy and paste! And this should be only an example which should demonstrate the correct format as described in the previous post.
Where the data is coming from – this is your own business.
So, need to pay attention , it is important the first line for the parameters / sensors
And then is following the time with the parameter’s values.
I do not know where you have your data but csv format is a format which is most common and it could be retrieved by the most possible application like Excel, Creo etc.
For example, in the past I wrote in Creo some Toolkit program where I did write parameters values to csv. So it depends on it where you have your data saved. Of course, the mean idea is not to write this data manually but by some program or by export /import feature. But this is different for the different tools (databases Cad application, Spreadsheets (e.g. Excel) )
If you have a data in Thingworx stream /Thing you can export it to a csv file format and replace only the first line!
To export a Thingworx data to csv you need the CSVParser extension
You must import CSVParser extension from the marketplace: https://marketplace.thingworx.com/tools/csv-parser
If you have the data in excel then it could save excel sheet to csv ... etc.
Sorry again, but when I created the file in cvs format
How do I upload data to the sensor and use them?
Hello @titurbina ,
unfortunately I did not see your comment/quesiton. I am sorry for the delay!
So, when I am reviewing your quesiton here- I think , a possible answer will depend on your current status.
So you need to have /requirement - the sensor definition. Some thing like this:
In your case (the file content in your post ) the paramaters what you should see in the dialog box should be double /float an named ACCELERATION and TEMPERATURE
When you have now the correct sensor_1.prt definiton / with corresponding parameters you can then read the file as shown in the picture below:
One time the data was successfully loaded you can run it to check the sensor values / respectively some sensor relations, which could lead to dimensions change in Creo Parametric: