johan76swart - 2016-05-23

Hello All,

I have an application that crashes after running for 3 to 4 hours, I use a Webvisu visualization on local host. I have been keeping a keen eye on the PLC Logger and as soon as the VisuFctCheckForUnusedClients message comes up the local host visualization crash with the "an error occurred: will restart automatically". Below is a screen shot of the PLC Logger.

I don't see any exceptions in the PLC Logger to indicate what the possible problem could be. The other problem is when I go offline in Codesys while this problem is occurring, I am unable to go back online until I log on via putty and give the "sudo service codesyscontrol stop" and then "sudo service codesyscontrol start" commands. The application restarts and the Webvisu visaulization seems OK and I am able to go online again.

I would appreciate it, if any one could point me in the right direction to trouble shoot this problem.

Best regards,

Johan.


I have found the problem causing the application to halt.

It was a combination of using a shell script to write the wlan0 ip address into a text file every 10 seconds, and then reading the information with SysFileRead function every 15 seconds. As time elapsed on the application the two programs would access the file at the same time causing the exception in my application.

The problem is that the PLC logger does not point to the problem in the program, so if anybody else use SysFile functions be sure that you check your read and write to a text file, and not try to access it at the same instance.

Good luck and Happy coding!

IMG: webvisu_Problem.png