Skip to content

Time Behavior

Time Aspect of HF (high frequency) and Parameter Service Data

  • A SINUMERIK Adapter provides HF-data stamped by NCU time to applications
  • An AdapterParameterService provides Parameter Service data without a timestamp but a timestamp can be read by an individual parameter service call

How to Meet Application’s Time Need?

Applications have two timing sources:

  • NCU time which queried by AdapterParameterService
  • Edge device system time which can be queried within container in a read-only manner

How to Upload Application’s Timeseries Data to Cloud?

  • Applications are responsible to set the timestamp for timeseries data
  • Timeseries data to cloud should be in one of the below formats:

2017-04-10T08:06:27.317234 2017-04-10T08:06:27.317

Cycle Based Timestamp Calculation

If there is a datapoint with the address value CYCLE, Timeseries uploader will take into account the value items of CYCLE datapoint.

{
"header" : {
"message_type" : "dataobject",
"key" : "dataobject",
"source_id" : "sinumerik_adapter_840Dsl"
},
"body" : {
"datapoint" : [
{
"address" : "CYCLE",
"timestamp" : "2094-01-01T07:18:06.354000",
"quality_mode" : "hf",
"period_ms" : 2,
"content" : [
{ "value" : [ 6, 8, 9, 10 ] } ]
},
{
"address" : "ENC1_POS|1",
"timestamp" : "2094-01-01T07:18:06.354000",
"quality_mode" : "hf",
"period_ms" : 2,
"content" : [
{ "value" : [ 20.000000, 30.000000, 40.000000, 50.000000, 60.000000 ] } ]
},
...
so while uploading the ENC1_POS or any other datapoint values to Insights Hub, the first value will have the timestamp value of 2094-01-01T07:18:06.354000 and based on the index differences, next value will be calculated based on the following formula:

current_timestamp = ((current_idx_cycle_value - previous_idx_cycle_value) * period_ms) + previous_timestamp
and the timestamp value for the second value of ENC1_POS will be 2094-01-01T07:18:06.358000 since ((8-6)*2) (ms) + 2094-01-01T07:18:06.354000.

If there is an inconsistency on the length of value arrays between CYCLE (length of value array [ 6, 8, 9, 10 ] is 4) and any other target datapoint like in this case ENC1_POS|1 (length of value array [20.000000, 30.000000, 40.000000, 50.000000, 60.000000 ] is 5) for trailing values in this case 60.000000 Timeseries uploader will assume that missing cycle value is next sequence number in this case 11 (since the last proper cycle value is 10) and will apply the previous formula.

If there is no CYCLE datapoint in the payload, Timeseries upload will assume hypothetical cycle value array will have sequential values like [1,2,3,4,5] and apply the previous formula.

For single value datapoints like low frequency (lf) data, as long as it is adapted to payload format, it is possible to upload them as well if the following conditions are met:

  • "period_ms" value should be a positive integer.
  • "value" array should contain single value.
  • required mapping for the target datapoint should be done on Insights Hub side.

So sample payload segment for lf data could be like:

{
"header" : {
"message_type" : "dataobject",
"key" : "dataobject",
"source_id" : "sinumerik_adapter_840Dsl"
},
"body" : {
"datapoint" : [
{
"address" : "my_lf_datapoint",
"timestamp" : "2094-01-01T07:18:06.354000",
"quality_mode" : "lf",
"period_ms" : 1,
"content" : [
{ "value" : [ 20.000000] } ]
},
...
]
...

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the The Siemens Inner Source License - 1.1.