Hello Martin,
M.Keller wrote:
Yes, and it also depends on other factors. The data type of the variable(s), for example. The monitoring was developed for the debugging of IEC code. What do you want to accomplish with your script?
the script above has been simplified to demonstrate the phenomenon. Actually I have a script for testing a function block in codesys (similar like unittest), the main function of this script is:
1. write values to the inputs of FB
2. read output values of FB as actual outputs
3. compare actual output with expected outputs (test pass or fail)
4. repeat 1-3 with different values of inputs (I have more than 200 testing inputs)
After executing this script, I've found as you mentioned, a time delay between step 1 and 2 is necessary, and I was confused about how much should the time delay should be and its background.
Question:
Could you explain more about "The monitoring was developed for the debugging of IEC code"?
Any suggestion about the application of my script? better ideal (solution)?
M.Keller wrote:
What do you mean with "without opening codesys"? Does your batch file execute CODESYS with the parameter for executing a python script?
Code:
@echo off
SET PROJECT=C:\Users\gong\Documents\01 MeinArbeit\10 Aufgaben\Sequencer\LIB\Sequencer.library
echo Starting Codesys ....
start /wait CoDeSys.exe --Profile="CODESYS V3.5 SP4 Patch1 pbF" --noUI --runscript="C:\Users\gong\Documents\01 MeinArbeit\10 Aufgaben\Sequencer\TestScript\unittest\unittest.py"
pause
I've listed my batch file above. If I call the script from batch file I need to increase the delay time between step 1 and 2, as I run this script directly via "Tools->scripting->execute script file".