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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Force data storing when value not change

mmancin
9-Granite

Force data storing when value not change

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?

1 ACCEPTED SOLUTION

Accepted Solutions

We resolved with this: 

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

View solution in original post

5 REPLIES 5
PaiChung
22-Sapphire I
(To:mmancin)

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

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?

PaiChung
22-Sapphire I
(To:mmancin)

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.

We resolved with this: 

AddIntegerValueStreamEntry
 
With this method, we re-add value into valuestream as Pai mention in first reply.
 
Thanks
slangley
23-Emerald II
(To:mmancin)

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

Top Tags