Skip to main content
15-Moonstone
February 26, 2020
Question

how to avoid milliseconds while using query named property history service

  • February 26, 2020
  • 6 replies
  • 4420 views

I have two properties voltage and current for which data is coming from kepware for every second. based on this i need to calculate the power. So i wrote a subscription with input as any data change event(for current and voltage)then multiplied current and voltage there and stored it in a property called power. 

 

now when i "query named property history" for current and voltage i got the result as values updated in seconds difference but when i query for power it gives me result updated in milliseconds. For all the three properties the data change type is Always.

 

I have attached the screenshots of the result.

 

 

6 replies

19-Tanzanite
February 26, 2020

Hi @Sruthi 

 

Not sure I understand your point, both screenshots show time down to milliseconds.

However if you want to change the format of the time it seems you can't do it from the service directly but you can configure it if you use the output in a grid in a mashup for example (under Configure Grid Columns)

 

See https://www.ptc.com/en/support/article/CS311654

 

Regards

Christophe

 

Sruthi15-MoonstoneAuthor
15-Moonstone
February 26, 2020

Actually, if you see in the first picture I got updated values for the same second.  For 12:24:33 second I got many records with the same value. Instead of this, I need my updated values for every 1 second or at different seconds like one value at 12:24:33, next value(can be same as previous) at 12:24:34, next value(can be same as previous) at 12:24:35, etc.

19-Tanzanite
February 26, 2020

@Sruthi 

 

Thank you for the explanation I did not understand well initially.

From the screenshots it is difficult to make a statement, especially because they do not show the data at the same timestamp. Can you check the history of current and voltage on 26th Feb 2020 between 12:20 and 12:30 ... just to make sure the frequency of incoming data at the time.

Also you mention data comes in every sec, but looking at the screenshot for Current, that does not look the case, it is coming very irregular interval.
Could be useful to give details/screenshots of:

- the subscription definition

- the current, voltage and power properties' attributes and advance attribute (to see push/pull parameters)

- screenshot of Current Power and voltage history all at the same timestamp

 

Thanks

Christophe