Zeal Posted July 14, 2020 Share Posted July 14, 2020 I AM USING AZEOTECH SCADA V16.3. I AM CONNECTING 4 NOS OF PLCS. WHILE I AM NOT CONNECTED WITH ANYONE PLC THE SCADA SOFTWARE IS HANGGING TOO MUCH. SO THAT I HAVE WRITTEN THE BELOW SCRIPT. while(1) if (device.PLC1.Connected) device.plc1.ClearBypass() else device.plc1.SetBypass() endif if (device.plc2.Connected) device.plc2.ClearBypass() else device.plc2.SetBypass() endif if (device.plc3.Connected) device.plc3.ClearBypass() else device.plc3.SetBypass() endif if (device.plc4.Connected) device.plc4.ClearBypass() else device.plc4.SetBypass() endif endwhile THE ABOVE SCRIPT IS ON AUTO START MODE. ISSUE IS WHEN I AM DISCONNECTING THE NO.1 PLC(PLC1) THE SCADA APP CRASHES AFTER 20-30SECONDS. AND THE ERROR CODE IS AS BELOW. RESOLUTION NEDDED IS:- IF I WANT TO CONNECT 4 PLCS THEN WHAT IS THE CODE I HAVE TO PUT.(WHICH WILL NOT CAUSE SCADA HANGGING ISSUE OR APP CRASH.) Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted July 14, 2020 Share Posted July 14, 2020 I'm not completely sure it is causing the crash, but you have a while(1) loop with no delay in it, so that sequence, when run, is going to run as fast as the CPU will allow and use all the CPU power of one of your cores. I would add at least a delay(0.1) before the endwhile and see if that helps. If it does not, then you should consider upgrading to the latest release. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.