Skip to main content
1-Visitor
July 27, 2020
Solved

Force data storing when value not change

  • July 27, 2020
  • 2 replies
  • 2241 views

Hello, I have a variable on kepware of a setpoint value that is sent to thingworx only on the data change. This variable can remain fixed for days but I need to view daily trends with related reports with this variable. Is it possible to force scripts that, once a day, this value is still written to the database even if it has not changed?

Best answer by mmancin

We resolved with this: 

AddIntegerValueStreamEntry
 
With this method, we re-add value into valuestream as Pai mention in first reply.
 
Thanks

2 replies

22-Sapphire I
July 27, 2020

When you retrieve from the value stream you should be able to get the most recently recorded value and extrapolate that.

else use a scheduler/time to insert a value directly into the valuestream

I don't remember if there is a force transmit from kepware or not based on cycle of the reading, but if it doesn't change much to send regardless of value change every kepware read cycle seems very wasteful

mmancin1-VisitorAuthor
1-Visitor
July 27, 2020

Ok thanks. However, I cannot use the valuestream but it is necessary to retrieve this data externally and therefore it would still be necessary to bring the last data read at least at 0:01 at the beginning of the day. Is it possible to change the saving type of a property from "valuechanged" to "always" and vice versa?

22-Sapphire I
July 28, 2020

I recommend against doing what is a 'design' change because each time you change between always and value, it will restart the Thing itself and reset the connection.

From your scenario it sounds like besides checking the history, you could just retrieve the Property VTQ and check the Value and Time of it to do what you need with it.

Community Manager
August 4, 2020

Hi @mmancin.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Thank you for participating in our community.

 

Regards.

 

--Sharon