Skip to main content
1-Visitor
July 26, 2021
Solved

Add Values from variable KepWare to Chart

  • July 26, 2021
  • 2 replies
  • 2088 views

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?

Best answer by PaiChung

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.

2 replies

22-Sapphire I
July 26, 2021

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.

AitorP1-VisitorAuthor
1-Visitor
July 26, 2021

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.

 

 

PaiChung22-Sapphire IAnswer
22-Sapphire I
July 26, 2021

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.

22-Sapphire I
July 26, 2021

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