Link external programs that print temperature when called. This allows to connect meters that use any program language. Artisan will start the program each sample period. The program output must be to stdout (like when using print statements). The program must exit and must not be persistent. If only one termperature is provided it will be interpreted as BT. If more than one temperature is provided the values are order dependent with ET first and BT second. Data may also be provided to the "Program" extra devices. Extra device "Program" are the first two values, typically ET and BT. "Program 34" are the third and fourth values. Up to 10 values may be supplied. Example of output needed from program for single temperature (BT): "100.4" (note: "" not needed) Example of output needed from program for double temperature (ET,BT) "200.4,100.4" (note: temperatures are separated by a comma "ET,BT") Example of output needed from program for double temperature (ET,BT) and extra devices (Program and Program 34) "200.4,100.4,312.4,345.6,299.0,275.5" |
Example of a file written in Python called test.py: #comment: print a string with two numbers separated by a comma #!/usr/bin/env python print("237.1,100.4") Note: In many cases the path to the Python or other language executatable should be provided along with the external program path. On Windows it is advised to enclose the paths with quotation marks if there are any spaces, and use forward slashes '/' in the path. "C:/Python38-64/python.exe" "c:/scripts/test.py" Under Output a script can be specified which is called per sample interval with 4 arguments, ET, BT, Background ET and Background BT the output script also called if Prog is not selected as input source Example of a file written in Python called out.py: #comment: adds the script arguments ET, BT, ETB, BTB to "/tmp/out.txt" #!/usr/bin/env python import sys ET, BT, ETB, BTB = sys.argv[1:] with open("/tmp/out.txt", "w+") as file: file.write(f'ET: {ET}, BT: {ET}, ETB: {ETB}, BTB: {BTB};') |