lc625

Hi, I am experiencing some problems with the editor’s simulation mode. I wonder if these problems are belonging to my program or to the state of development of the editor,

For Example: A simple function block i.e. GT (or GR, LT, LE…) does not change it’s out into true or false no matter what input is forced during running the simulation mode. After forcing the output to true, then to false and then unforce it the function block acts like expected (sometimes). Other function blocks (MUX, ADD etc) deny their work at all. I observed this behaviour only in simulation mode. The project’s program isn’t ready until now. Therefor I didn’t download the file to the runtime and cannot check if it is working correct in reality.

Is this a known problem? Are there any hints to solve the issue?

Quote 0 0
thiagoralves
It should work just fine. The engine behind the simulation mode is almost identical to the actual runtime. I’ve run many different programs with simple and complex function blocks and they all ran as expected. Just keep in mind that when you play with forcing variables, you can mess up with the logic of your program. For example, if you force a variable to true, and that variable is later associated with the output of a GT block, no matter what the GT outputs, the variable will remain true.
Quote 0 0
lc625

Thank you for your assistance. To check it out I and to reduce possible impacts, I wrote a very simple project in SFC. You’ll find it in the ZIP file. The problems described below are reproducible:

  • Run simulation. Look at debug instance of program0, TRANS_FALSE and TRANS_TRUE. Both transitions are neither true nor false. Force VAR_1 to i.e. 15.0. No changes in the transitions and program0 is not proceeding one step further. Force the result one of the Function blocks (GT or LT) in TRANS_TRUE or TRANS_FALSE to true or false and unforce it afterwards. Now the transitions are returning the correct value. Even if you force VAR_1 to different values.
  • If the simulation runs as desired, take a look at TRANS_TRUE and TRANS_FALSE in program0. Setting VAR_1 to different values opposite action of both transitions would be expected. Surprisingly they are changing to true or false in the same direction.
  • Provoking editor crash: Run simulation, force VAR_1 or do something else, stop simulation. Make a change in the program. I.e. change “LT” in TRANS_FALSE to “EQ”. Run simulation again. The editor will crash! The log file is attached.

If you find a few minutes please review my findings.

Quote 0 0
thiagoralves
Are you using SFC? Hmm...that might be the reason. I usually run things only on ladder logic, FBD or ST, and for those I know the editor is working well. I haven't touched SFC code from Beremiz, so I don't know how messy it is. I'll take a look at that once I have some free time.
Quote 0 0