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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Value Stream Questions, Timed Logging and Reassigning VS's

Ascherer17
14-Alexandrite

Value Stream Questions, Timed Logging and Reassigning VS's

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.

1 ACCEPTED SOLUTION

Accepted Solutions
PaiChung
22-Sapphire I
(To:Ascherer17)

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.

View solution in original post

4 REPLIES 4
PaiChung
22-Sapphire I
(To:Ascherer17)

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.

Ascherer17
14-Alexandrite
(To:PaiChung)

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?

 

PaiChung
22-Sapphire I
(To:Ascherer17)

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

To log data on specific timing using kepware ( we are doing it ) you should use Scheduler Plugin for Kepware.

 

To change assigned value stream, you are out of luck, you should export old data (for instance to csv), purge it before removing the valueStream, and then assign the new ValueStream and import the data to the new one (using Add"baseType"ValueStreamEntry)

Top Tags