Download CheckSight user manual
Transcript
CheckSight user manual Camera features and their control application needs to periodically reset the watchdog timer — the resets serve as the application “heartbeat”. As long as each new heartbeat is issued withing a specified timeout duration, the watchdog stays silent. However, if the watchdog timer expires and the reset command is not issued, the watchdog assumes the application (or entire system) is locked and reboots the camera. The watchdog functionality is implemented in the FPGA, independently from the main camera control, so it remains functional even if the operating systems itself gets locked. After the camera boots, the watchdog is always inactive. If desired, the application has to enable it explicitly (Watchdog Enable), specifying the desired Watchdog Timeout Duration. Once enabled, the application is responsible issuing the Watchdog Reset signals in period lower than the configured timeout to prevent the watchdog timeout expiration and device reboot. The watchdog can be disabled again. Furthermore, the current Watchdog Timer Value (time remaining until expiration) can be queried. It is important that the application always disables the watchdog timer whenever it intends to stop updating it regularly, such as when the application shuts down — otherwise the system would be rebooted as soon as the timer expires. The watchdog timer is never disabled automatically. Finally, the integer Watchdog Failure Count provides information about how many watchdog failure reboots happened in the device lifetime. Note that all the watchdog related features are in “guru” feature visibility level. LvHDevice hDev; // open the device to get the handle // possibly read number of watchdog failures in device's lifetime LvGetInt32 (hDev, LvDevice_LvWatchdogFailureCount, &IntVal); // configure and enable the watchdog timer... LvSetFloat (hDev, LvDevice_LvWatchdogTimerDuration, 20.0); // in seconds LvSetBool (hDev, LvDevice_LvWatchdogEnable, 1); // ...and immediatelly start feeding it with regular reset signals LvCmdExecute (hDev, LvDevice_LvWatchdogTimerReset); // the actual value of the watchdog timer can be queried double FloatVal; LvGetFloat (hDev, LvDevice_LvWatchdogTimerValue, &FloatVal); // when not needed any more, disable the watchdog timer LvSetBool (hDev, LvDevice_LvWatchdogEnable, 0); // possibly read number of watchdog failures in device's lifetime read_int (LvWatchdogFailureCount) // configure and enable the watchdog timer... write_float (LvWatchdogTimerDuration, 20.0) // in seconds write_bool (LvWatchdogEnable, true) // ...and immediatelly start feeding it with regular reset signals exec_cmd (LvWatchdogTimerReset) // the actual value of the watchdog timer can be queried read_float (LvWatchdogTimerValue) // when not needed any more, disable the watchdog timer write_bool (LvWatchdogEnable, false) Copyright © Leutron Vision 166 Leutron Vision