equal
deleted
inserted
replaced
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 <PyFile> |
2 <PyFile> |
3 <variables> |
3 <variables> |
4 <variable name="Test_Python_Var" type="INT" initial="0"/> |
4 <variable name="Test_Python_Var" type="INT" initial="4"/> |
|
5 <variable name="Second_Python_Var" type="INT" initial="5"/> |
5 </variables> |
6 </variables> |
6 <globals> |
7 <globals> |
7 <![CDATA[ |
8 <![CDATA[ |
8 import time,sys,ctypes |
9 import time,sys,ctypes |
9 Python_to_C_Call = PLCBinary.Python_to_C_Call |
10 Python_to_C_Call = PLCBinary.Python_to_C_Call |
16 res = i.value |
17 res = i.value |
17 print "toC:", arg, "from C:", res, "FBID:", FBID |
18 print "toC:", arg, "from C:", res, "FBID:", FBID |
18 else: |
19 else: |
19 print "Failed Python_to_C_Call failed" |
20 print "Failed Python_to_C_Call failed" |
20 res = None |
21 res = None |
|
22 print "Python read PLC global :",PLCGlobals.Test_Python_Var |
|
23 PLCGlobals.Second_Python_Var = 789 |
21 sys.stdout.flush() |
24 sys.stdout.flush() |
22 return res |
25 return res |
23 |
26 |
24 async_error_test_code = """ |
27 async_error_test_code = """ |
25 def badaboom(): |
28 def badaboom(): |