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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Add Values from variable KepWare to Chart

AitorP
6-Contributor

Add Values from variable KepWare to Chart

Hi

I'm want just to graph random data value from kepware to a chart in a mashup but I can not achieve this goal.

I can do it with a gauge or LED display but not with a Chart. Some idea? Have i to save the data before in a data storage or something?

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:AitorP)

use services like QueryPropertyHistory or QueryNumberPropertyHistory or QueryNamedPropertyHistory

they will all be part of the Thing.

so in your mashup as you add data, browse to your Thing, then in services pick one of these and map the return to your chart.

To go fancier, map to the ThingTemplate and set it to dynamic and have an Entity picker.

View solution in original post

7 REPLIES 7
PaiChung
22-Sapphire I
(To:AitorP)

Yes you indeed have to save the data first so you have a table of information to display.

Create the tag in Kepware from simulation function within kepware. then Bind it to a Logged tag in a Thing. Be sure to assign a ValueStream to the Thing.

Now you can use services like QueryPropertyHistory or QueryNumberPropertyHistory or QueryNamedPropertyHistory to get the recorded values to display in a chart.

AitorP
6-Contributor
(To:PaiChung)

Hi PaiChung,

 

Thanks for your answer,

I have a thing with 2 properties:

AP_9996685_0-1627314880448.png

And I have a valueStream asigned to the thing too:

AP_9996685_1-1627314939723.png

So now, is it necessary to create some event or service on the thing or on the ValueStream? or Have I to use the services directly on the mashup?

 

Thanks.

 

 

PaiChung
22-Sapphire I
(To:AitorP)

use services like QueryPropertyHistory or QueryNumberPropertyHistory or QueryNamedPropertyHistory

they will all be part of the Thing.

so in your mashup as you add data, browse to your Thing, then in services pick one of these and map the return to your chart.

To go fancier, map to the ThingTemplate and set it to dynamic and have an Entity picker.

AitorP
6-Contributor
(To:PaiChung)

Hi,

Thanks for the answer,

I have added the thing and the service to the Mashup. 

I have added a Line chart widget and a Table and then I linked "All Data" to the graph ant to the table. As you can see, in developing mode, The values appear on the table but not on the chart:

AP_9996685_1-1627316362988.png

 

When I click on view mashup, nothing appears:

AP_9996685_2-1627316481217.png

 

Do I have to do something else?

PaiChung
22-Sapphire I
(To:AitorP)

I recommend a time series chart which will auto configure for the line graph you'll have to define the x and y

AitorP
6-Contributor
(To:PaiChung)

Hi,

I dont have time series chart, I dont know why:

AP_9996685_0-1627316918883.png

And I dont Understand why the table is blank when I click "View Mashup"

 

PaiChung
22-Sapphire I
(To:AitorP)

Line chart can still work, do you have the 'widget switch' set to show all widgets?

Top Tags