equal
deleted
inserted
replaced
155 char* PythonIterator(char* result) |
155 char* PythonIterator(char* result) |
156 { |
156 { |
157 char* next_command; |
157 char* next_command; |
158 PYTHON_EVAL* data__; |
158 PYTHON_EVAL* data__; |
159 //printf("PythonIterator result %%s\n", result); |
159 //printf("PythonIterator result %%s\n", result); |
|
160 /*emergency exit*/ |
|
161 if(PythonState & PYTHON_FINISHED) return NULL; |
160 /* take python mutex to prevent changing PLC data while PLC running */ |
162 /* take python mutex to prevent changing PLC data while PLC running */ |
161 LockPython(); |
163 LockPython(); |
162 /* Get current FB */ |
164 /* Get current FB */ |
163 data__ = EvalFBs[Current_Python_EvalFB]; |
165 data__ = EvalFBs[Current_Python_EvalFB]; |
164 if(data__ && /* may be null at first run */ |
166 if(data__ && /* may be null at first run */ |