Meta point - Execution delay
-
Hi IA,
I have an alphanumeric META point, that will only change state if the execution delay is 5 seconds or under.
This appears to be a bug.Please see this post (EDIT: Go to post 6)
https://forum.infiniteautomation.com/topic/4781/http-sender-publisher/3I need to add an execution delay of 5 minutes.
Many thanks
-
I suspect this has something to do with they context update of the meta point. Terry will be able to answer that but he will probably need more information on the meta point.
context event type?
update interval of the context point. -
On the Meta point, "context event type" is - Update
The point updating the context is a Virtual point, so I assume is instant.
Here is the Meta data point:
{ "purgePeriod":1, "setExtremeLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368, "intervalLoggingType":"INSTANT", "dataSourceXid":"DS_1467c3b6-808b-4f6f-8fe4-0cfe54292b77", "discardHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368, "deviceName":"Meta", "enabled":true, "rollup":"NONE", "purgeOverride":false, "chartRenderer":{ "limit":10, "type":"TABLE" }, "xid":"DP_8d626457-cc93-4d96-a580-53ecc1463373", "eventDetectors":[ ], "textRenderer":{ "useUnitAsSuffix":false, "type":"PLAIN", "suffix":"" }, "loggingType":"ON_CHANGE", "overrideIntervalLoggingSamples":false, "defaultCacheSize":1, "readPermission":"", "setPermission":"", "intervalLoggingPeriodType":"MINUTES", "intervalLoggingSampleWindowSize":0, "tolerance":0, "purgeType":"YEARS", "plotType":"STEP", "intervalLoggingPeriod":1, "discardExtremeValues":false, "tags":{ }, "unit":"", "pointLocator":{ "contextUpdateEvent":"CONTEXT_UPDATE", "variableName":"my", "executionDelaySeconds":6, "dataType":"ALPHANUMERIC", "scriptPermissions":[ ], "updateCronPattern":"", "script":"if(input1.value >= 28){\n return \"Redlands Growth room 28 - Temperature HIGH\";\n}\nelse return \"Redlands Growth room 28 - Temperature NORMAL\";", "logCount":5, "settable":false, "logLevel":"NONE", "updateEvent":"NONE", "context":[ { "varName":"input1", "dataPointXid":"DP_32e6bd9b-a5a9-4b98-9b30-6e44dc96a6af", "updateContext":true } ], "logSize":1 }, "discardLowLimit":-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368, "setExtremeHighLimit":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368, "name":"Redlands Growth room 28 - Temperature", "chartColour":"", "preventSetExtremeValues":false, "simplifyType":"NONE" },
EDIT: This is my test setup:
-
A virtual numeric point
-
An alphanumeric meta point that reads the value of that point, with a script that returns a string depending on the script.
-
The Meta point has an execution delay, and the Meta point WILL NOT change state if the execution delay is over 5 seconds.
if(input1.value >= 28){ return "Redlands Growth room 28 - Temperature HIGH"; } else return "Redlands Growth room 28 - Temperature NORMAL";
-
-
I looked into this and I am able to get delays longer than 5 seconds but the max delay possible is the update interval of the context point. If you go to the administration --> system status --> work items you will see only one work item is created for each meta point XID:
Meta delay for DP_b2fc2661-2f8a-4054-9d62-8e7224fef067
. If the delay period is longer than the update interval then the old work item gets cancelled and a new one is created and scheduled for update time + delay. -
I could see this being a new feature/change to the way it works. Instead of only having a single delay task we could have many. For example if your meta point is context updating every 1s and your execution delay is 1hr after 1hr of running you will have 3600 tasks sitting around with 1 executing every second after that. Execution delays were not really designed for that though as if you were to stop mango or that data source you would lose 3600 point values in the tasks that had not yet run.