Skip to main content
16-Pearl
March 2, 2018
Solved

Value Stream Questions, Timed Logging and Reassigning VS's

  • March 2, 2018
  • 1 reply
  • 4089 views

At one point I thought that someone had created a topic on logging Thing data to a Value Stream based on a Timer, but I haven't been able to find it.  So does anyone know if there's a way to use Value Streams to log Thing Property data based on a timer?  I'm guessing data is logged based on the 'Data Change' settings of a Property, but it doesn't give an option for timing (at least in Thingworx 7.1, don't know if newer versions added it).  

 

My other question is about changing a Thing's designated Value Stream.  In the case that we needed to change the Value Stream for a Thing, what would be the best way to transfer the data from the original Value Stream to the new one?  I've found that changing the Value Stream for a Thing doesn't automatically move the data to the new Value Stream, however, it also doesn't delete the data from the original Value Stream.  If I change the VS back to the original, the old data is still there.  

 

I'm using Thingworx 7.1 although updating to 8 should be on the horizon.

Best answer by PaiChung

I don't recommend using a timer for writing to a valuestream, it would mean you have to determine each payload and call the service to log. While using the log aspect, the system automatically will log based on the values updating.

Is there a specific reason you want to use a timer for this?

 

As far as moving data from one stream to another, I actually can't think of a really clean way to do it. You can extract and write it to another stream and purge the original, that is probably the one scenario I can think off.

When we had JSON exports for data, you could potentially manipulate that, but now that is all binary.

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
March 2, 2018

I don't recommend using a timer for writing to a valuestream, it would mean you have to determine each payload and call the service to log. While using the log aspect, the system automatically will log based on the values updating.

Is there a specific reason you want to use a timer for this?

 

As far as moving data from one stream to another, I actually can't think of a really clean way to do it. You can extract and write it to another stream and purge the original, that is probably the one scenario I can think off.

When we had JSON exports for data, you could potentially manipulate that, but now that is all binary.

16-Pearl
March 5, 2018

Thanks for the reply.

I ask about using a timer for logging because we've considered the idea of logging data on a consistent periodic basis.  I'm trying to plot more consistent points in the time series chart widget.  We are getting most of our data through KEPServer, so maybe it would be better to configure those settings to schedule how often it sends data? 

Also, is it the DataChange event that triggers a Thing to log a Property?

 

22-Sapphire I
March 5, 2018

Correct the DataChange configuration setting determines both when a DataChange event fires and when a value is logged.

Never - never

Always - every time an update is written even if the value is the same

Value - When the actual value of the property changes

On / Off - when a boolean goes to True or False