<?xml version='1.0' encoding='utf-8'?>
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml">
<variable name="Test_Python_Var" type="INT" initial="4"/>
<variable name="Second_Python_Var" type="INT" initial="5"/>
Python_to_C_Call = PLCBinary.Python_to_C_Call
Python_to_C_Call.restype = ctypes.c_int
Python_to_C_Call.argtypes = [ctypes.c_int, ctypes.POINTER(ctypes.c_int)]
def MyPrintFunction(msg):
PLCObject.LogMessage(msg)
if(Python_to_C_Call(arg, i)):
print("toC:", arg, "from C:", res, "FBID:", FBID)
print("Failed Python_to_C_Call failed")
print("Python read PLC global :",PLCGlobals.Test_Python_Var)
print("Python read PLC global Grumpf :",PLCGlobals.Grumpf)
PLCGlobals.Second_Python_Var = 789
async_error_test_code = """
from threading import Timer
print("py_runtime init:", x, ",", y)
print("py_runtime cleanup")
print("py_runtime start", x * x + y * y)