Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tripping a PLC watchdog - May be hard to trip something with 4 legs..

Status
Not open for further replies.

itsmoked

Electrical
Feb 18, 2005
19,114
I'd like to restart a PLC by tripping its watchdog.

Most PLCs use the scan time to discover they're hung.

Do you folks have any ideas on how to forcefully extend the scan time. Got any favorite infinite-loop code? Done anything that inadvertently caused WD trips on your PLCs?

Keith Cress
kcress -
 
Replies continue below

Recommended for you


Use a Call function, and have it call its self.
Or use a Jump to label then Jump back to another label just in front of the first Jump.
 
Thanks dV8r.

Turns out the CLICK is too bungle-proof to allow either of those errors.
1) It has no "jump" commands to control program flow.
2) You cannot "nest" any subroutine calls so Calling a Call doesn't fly.

HOWEVER! I did just figure out another way to trip the Watch Dog. The WD looks at the scan time. If the scan time exceeds the currently set WD time the dog will go down. The CLICK also shows you what the current scan times are taking. So all I needed to do was come up with something time intensive to execute on command. CLICK offers a FOR loop. I just used a couple of lines to request a register shift of one bit to each of a thousand spare registers I had laying around, and the scan time would jump from 12ms to 155ms. Next I set the allowed WD time from the default of 200ms down to 50ms and voila! A tripped watchdog on command.

Sadly..[!] This causes a 'System Error' which halts everything and takes human intervention to recover from.[/!] There's no error trapping or any other mechanism to force a restart on detection of a system error. Guess I was thinking too much like an embedded systems guy where we have full control of everything.

So thanks for the suggestions. I'm just going to have to reset all 60 states in 5 state machines and deal with whatever else needs to be modified to restart the menagerie.

Keith Cress
kcress -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor