Closed qoomon closed 7 months ago
Would it work for you to include timestamps at value level by setting the "TimestampLevel" configuration to "Channel" or "Both"?
Unfortunately no. System Time
was probably a little confusing, it is rather the write time of the sensor measurement. For our use case we need pretty accurate data, because of network delay we can not use the sfc system time.
So basically you need an filter a value, in case the system date-time, if after applying the filters, one or more other values are included in the output set of values.
Yes, i need a piggyback
filter. e.g.
{
"Type": "Piggyback",
"Channels": [ "OtherChannelA", "OtherChannelB" ],
}
if "Channels"
is not set or empty, it should be send, if any other channel of the corresponding schedule is send.
Implemented in version 1.1.1 by adding Condition filtering.
https://github.com/aws-samples/shopfloor-connectivity/tree/mainline/docs#condition-filters
Add the new Condition filters section at top level of config
"ConditionFilters":{
"NotJustTheTimeStamp": {
"Operator" : "only",
"Value" : "false"
}
}
}
Add
"ConditionFilter" : "NotJustTheTimeStamp"
to the timestamp channel for your sources
Thanks a lot
What would be the easiest solution for ConditionFilters to send Channel A and B Values only if any other channel has a value? Or would it work if I apply NotJustTheTimeStamp on channel A and B?
The easiest way is to use the "present" operator in a condition filter. The condition filter named "OnlyIfCExists" (use any name you want) will check if channel C has a value in it's source.
"CondtionFilters" : {
"OnlyIfCExists" : {
"Operator" : "present",
"Value" : "C"
}
}
Then apply this filter to channel A and B. A and B are only in the output if C has a value.
"Channels" : {
"A": {
"NodeId": "ns=0;i=2256",
"ConditionFilter" : "OnlyIfCExists"
},
"B": {
"NodeId": "ns=0;i=2259",
"ConditionFilter" : "OnlyIfCExists"
}
"C": {
"NodeId": "ns=0;i=2260"
}
}
If you also have a ChangeFilter or a ValueFilter on a channels, these are applied first on all these channels before the condition filter is applied. So if C has a value, but is filtered out using a Value or a ChangeFilter, the because of the ConditonFilter A and B will filtered out as well.
There is a rich set op operators which let you test if channels are present or absent, or if any, none or all channels in a list of channels are present. It is even possible to combine multiple operators using the or and and operators. See complete list of operators and examples at https://github.com/aws-samples/shopfloor-connectivity/tree/mainline/docs#condition-filters
For my current customer setup I need to read multiple parameters from an S7 PLC in high frequency (10ms)
The parameters change infrequently so i make use of a change filter (
{"Type": "Always", "AtLeast": 60_000}
). One parameter issystem time
however this change rapidly by its nature, however I only need this parameter if any other parameter has changed.Is the any way to achieve this behaviour?