Pedro Coimbra
Hello.
I want to report a possible bug in OpenPlc.
I have a project that in an older version of OpenPlc compiled without any errors, but when I updated to the latest version of OpenPlc it started giving the following error:
Erro_OpenPlc1.png
 
Erro_OpenPlc.png
On another machine running Linux, I have an older version of OpenPlc, and the same project compiles without any errors.
Screenshot_20240213_010158-2.png
Can you please check if this is a bug, or if I'm doing something wrong.
Thanks.
Reply 0 0
thiagoralves
You’re not on the latest version. Update to the latest version and you will be good
Reply 0 0
Pedro Coimbra
I just updated to the latest version, but the error persists.
Queimador_1_2_Bug.png
Reply 0 0
thiagoralves
Ok. Send me the bug report from the latest version please and I’ll check
Reply 0 0
Pedro Coimbra
sending bug report 
Reply 0 0
Pedro Coimbra

    After commenting on “ssross” post (Type error between list and string during run), I did some more tests:    

1- I started a new project and copied the rung (and nothing else) that gave the error to this project. After compiling the result was the same, it gave the same error.

Ladder_Bug_test1.png

    However, and just for testing purposes, by modifying the logic as you can see in the image below, the error disappears.  

Ladder_Bug_test2.png

2- These are the transitions that give an error, (Tr2, Tr5 and Tr9)

Tr2.png

Tr5.png

Tr9.png

If we now rearrange them like this, the errors will go away.

Tr2_Mod.png

Tr5_Mod.png

Tr9_Mod.png

Now it compiles without any errors.

Queimador_1_2_Bug_test1.png

Of course this is just for testing, as it screws up all my logic.

 

3- As I said before, the project compiled well in the old version (python2) of OpenPLC, and only started to give errors when I updated to the new version of OpenPLC (python3). 

Unfortunately I don't have the old version of OpenPLC (python2) anymore in this pc, but I tried compiling with BeremizIDE and the results are the same:

In Beremiz1.2 (python2) it compiles normally without errors.

Queimador_1_2_Beremiz1.2_test.png

But in Beremiz1.4 (python3), the error is the same.

Queimador_1_2_Beremiz1.4_test.png

 

In conclusion:

The error happens in Ladder code with slightly more complex rungs.

The transition to Python3 is likely the cause of this bug.

 

I hope this helps in some way.

Reply 0 0
thiagoralves
Thanks Pedro for the detailed report! I already knew that the issue is with the new Python 3 code. I’ll check that once I have some more time as it is not an easy fix 
Reply 0 0
thiagoralves
Reply 1 0
Pedro Coimbra
Great, it works. Thanks
Reply 1 0
Write a reply...
Reply