I thought I understood this part but I guess I did not fully, however, that is what I am trying to do. I have a tag object I want to execute from an expression:
runScript(customFunctionHere())
I tried moving it to a Vision window for easier troubleshooting, but if you're saying that won't work, I've tried to move it back to the tag and still get an error configuration when doing it this way:
runScript(chris_test_module.test2.addtest(1))
Tag JSON:
{
"expression": "runScript(chris_test_module.test2.addtest(1))",
"dataType": "Int4",
"executionMode": "FixedRate",
"name": "Avg Pressure Reading",
"tagType": "AtomicTag"
}
I am not looking to share this across multiple projects or anything like that. My end goal is to run
system.tag.queryTagCalculations
From a function that is executed by a tag so I can get a rolling 12 hour history inside of a tag itself.
My tag would have something like:
runScript(customHistoryCall("path_to_tag_I_want_history_on"))
Which would call the custom function running:
def customHistoryCall(path):
historyDS = system.tag.queryTagCalculations(paths=[path], calculations=["simpleAverage"], rangeHours=12
historyValue = historyDS.getValueAt(0,0)
return historyValue