Open Core Interface - MLPI
MLPI-MotionLogicProgrammingInterface(mlpi4Java)  1.26.2
com.boschrexroth.mlpi.Watchdog Class Reference

Inherits com.boschrexroth.mlpi.MlpiComponent.

Collaboration diagram for com.boschrexroth.mlpi.Watchdog:
Collaboration graph

Classes

enum  WatchdogAction
 
enum  WatchdogState
 

Public Member Functions

native void setup (int timeout, WatchdogAction action)
 
native void start ()
 
native void stop ()
 
native void reset ()
 
native WatchdogState getState ()
 

Detailed Description

Class definition of the WatchdogLib.

Using the Watchdog library, you can establish a mechanism between your application and the firmware in order to react to exceptions or problems within your client program execution.

The following steps are necessary:

  • Setup the watchdog and specify the timeout in milliseconds as well as the action to execute when the timeout is reached.
  • Start the watchdog.
  • Reset the watchdog on a cyclic time basis that is lower than the specified timeout. As soon as you do not reset the watchdog in time, it will execute the action as specified during setup, e.g. stop the PLC or restart the device.

Definition at line 70 of file Watchdog.java.

Member Function Documentation

native void com.boschrexroth.mlpi.Watchdog.setup ( int  timeout,
WatchdogAction  action 
)

This method starts the watchdog supervision.

Parameters
[in]timeoutThe timeout of the watchdog in ms. The timeout is checked every millisecond.
[in]actionThe action that will be executed in case the watchdog expires.
Example Java:
//configure that the watchdog will fire a warning if it doesn't get reset within 2 seconds.
connection.watchdog().setup(2000, Watchdog.WatchdogAction.WATCHDOG_WARNING);
Note:
This method maps to the mlpiCore function mlpiWatchdogSetup, where you can find further documentation.
native void com.boschrexroth.mlpi.Watchdog.start ( )

This method starts the watchdog supervision.

Example Java:
connection.watchdog().start();
Note:
This method maps to the mlpiCore function mlpiWatchdogStart, where you can find further documentation.
native void com.boschrexroth.mlpi.Watchdog.stop ( )

This method stops the watchdog supervision.

Example Java:
connection.watchdog().stop();
Note:
This method maps to the mlpiCore function mlpiWatchdogStop, where you can find further documentation.
native void com.boschrexroth.mlpi.Watchdog.reset ( )

This method resets the watchdog. Has to be called in an interval which is shorter than the timeout that has been specified in setup method.

Example Java:
connection.watchdog().reset();
Note:
This method maps to the mlpiCore function mlpiWatchdogReset, where you can find further documentation.
native WatchdogState com.boschrexroth.mlpi.Watchdog.getState ( )

This method returns the current state of the watchdog. After expiring, the state will indicate that the watchdog has expired until it is started again.

Returns
The current state of the watchdog.
Example Java:
//print current state of watchdog
java.lang.System.out.println(connection.watchdog().getState().toString());
Note:
This method maps to the mlpiCore function mlpiWatchdogGetState, where you can find further documentation.

The documentation for this class was generated from the following file: