denise01

Restart Runtime after PLC Power Down

4 posts in this topic

Hello,

I think that this problem has been touched on before so here goes. I use CX Supervisor to log data at our production plant using CJ1 and CJ2M PLCs. The system works fine until the weekends when the operators switch the electrical panels containing the PLCs off. When the panels are switched back on the data logging will not resume so I have to restart the runtime either manually in Developer or auto boot up by restarting the PC. Has anyone managed to beat this problem as there is no real information on it. I would have thought there would be a script that one could use to automatically restart the runtime but cannot find one.

 

Kind Regards

 

Peter 

Share this post


Link to post
Share on other sites

Hi Peter,

My understanding is ur talking about when CX-Supervisor is started, with the panels switched off  (and therefore the PLCs).  In this case the PLCs are not opened on startup, but are not retried later when the panels are eventually powered on.  As you say this is a topic touched on before I think.

Yes there is a script "OpenPLC()" to attempt connection, and this could be used many ways to try to make it automatic.

In fact there is an example of just that on myOMRON.com, see How To Keep Trying To Open A Device That Fails To Connect

I believe this should solve your issue.

Regards,

BB

Share this post


Link to post
Share on other sites

Many Thanks Berti,

In the end all I did was a general script with OpenPLC("Line 6") with the expression $Second==0 so if PLC not connected when minute at 0 seconds PLC connects.

 

Regards

 

Peter

Share this post


Link to post
Share on other sites

Hi Peter,

OK I guess the results show this seems to be working.

This script can cause you problems though - it means you're calling this script every minute... even when you are already connected and online. That's why you should add Boolean memory point e.g. PLCConnected and then only call the script if you're not connected. That is the plan of that example. Even thoufg it seems to be working, personally I would add this point to avoid the repetitive function call.

Either way, glad you got a solution:-2

Regards,

BB

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now