Skip to main content
Jul 26, 2021 11:10 AM UTC
Solved

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?

PaiChungAnswer
Jul 26, 2021 4:01 PM UTC

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.

7 replies

Jul 26, 2021 3:51 PM UTC

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.

AitorPAuthor
Jul 26, 2021 3:57 PM UTC

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.

 

 

PaiChungAnswer
Jul 26, 2021 4:01 PM UTC

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.

Jul 26, 2021 4:30 PM UTC

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