I'm working on a RFID project which also does MsSql queries.
This Codesys (3.14, updated to 3.16) programm runs on a Turck PLC (Tben-PLC). It used to work fine until today morning. It does some SQL queries with this library and text writting. Today after some experimeting with JSON libraries I got a runtime exception due to a plcload over 90. I rolled back to old builds, updated firmware (and downgraded it after not helping) and removed unused libraries and old code, but I keep getting a CPU overload. I even got another PLC of the same model and loaded the program. Raising the Task cycles helped tune down the CPU load but the task became too slow and didn't work properly.
I've read that tasks such as SQL-connections, Web clients etc. have a toll on the cycles due how these connections work, but it used to work fine until today which is very strange. My only clue would be that removed libraries still take space on the background despite being removed on the software. I also switched back and forth compliers after switching firmware-versions, to no avail.
I tried commenting specific parts of the program hoping it some bug on my code doing some kind of loop, but even if it helps with the load it doesn't seem to always be on a specific part. I also played around with the profinet cycles and slaves, but still didn't help.
Has anyone experienced a similar problem? Does removing libraries on the codesys app actually removes them from the PLC? I tried Clean all, factory reset... Nothing helped. On a Codesys Win runtime still works but it's no wonder due to its much bigger, multicore CPU...
Best regards
Epinikion
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The DB is quite small since it's just to temporarily store data in a file later (I checked the files get deleted from the PLC once they're sent so they don't overload the memory).
But I've seem to have found the problem: I updated the firmware from the PLC to it's latest version, and it seems to overload the cpu much more than before with these libraries. I rolled back to the old firmware and bam it's working again.
Best regards
Epinikion
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had the old version of the firmware (1.4.9.0), then upgraded to 1.5.40.0. Going back solved the problem. I need to look for an alternative library for the JSON-Queries (I was using iiot Utilities as demo) unfortunately, since it only works on newer versions. I've already seen this one though we'll see
Hi all,
I'm working on a RFID project which also does MsSql queries.
This Codesys (3.14, updated to 3.16) programm runs on a Turck PLC (Tben-PLC). It used to work fine until today morning. It does some SQL queries with this library and text writting. Today after some experimeting with JSON libraries I got a runtime exception due to a plcload over 90. I rolled back to old builds, updated firmware (and downgraded it after not helping) and removed unused libraries and old code, but I keep getting a CPU overload. I even got another PLC of the same model and loaded the program. Raising the Task cycles helped tune down the CPU load but the task became too slow and didn't work properly.
I've read that tasks such as SQL-connections, Web clients etc. have a toll on the cycles due how these connections work, but it used to work fine until today which is very strange. My only clue would be that removed libraries still take space on the background despite being removed on the software. I also switched back and forth compliers after switching firmware-versions, to no avail.
I tried commenting specific parts of the program hoping it some bug on my code doing some kind of loop, but even if it helps with the load it doesn't seem to always be on a specific part. I also played around with the profinet cycles and slaves, but still didn't help.
Has anyone experienced a similar problem? Does removing libraries on the codesys app actually removes them from the PLC? I tried Clean all, factory reset... Nothing helped. On a Codesys Win runtime still works but it's no wonder due to its much bigger, multicore CPU...
Best regards
Epinikion
What is the database size ? Depending on the requests you do, if the database is growing over time, that may explain some not rolled back issue.
Thanks for your reply.
The DB is quite small since it's just to temporarily store data in a file later (I checked the files get deleted from the PLC once they're sent so they don't overload the memory).
But I've seem to have found the problem: I updated the firmware from the PLC to it's latest version, and it seems to overload the cpu much more than before with these libraries. I rolled back to the old firmware and bam it's working again.
Best regards
Epinikion
Great news! Which firmware did you downgrade from/to?
Hi,
https://www.turck.de/en/product/100000272
I had the old version of the firmware (1.4.9.0), then upgraded to 1.5.40.0. Going back solved the problem. I need to look for an alternative library for the JSON-Queries (I was using iiot Utilities as demo) unfortunately, since it only works on newer versions. I've already seen this one though we'll see
https://forge.codesys.com/lib/pro-json/home/Home/