man8/WDtask2_v2

Table of Contents

Name

WDtask2_v2 - CAMAC watchdog timer module I/O service version 2

Synopsis

WDtask2_v2 <argument list>

Description

Watchdog/timer I/O service for CAMAC version 2.

This program supports a Kinetic Systems KSC3792 CAMAC module.

This program can be run in place of WDtask(8) .

It offers more control over the operation of watchdog timer module and also provides status read capability to the AccelNET database.

This allows watchdog timeout functionality to be incorporated in places where it might be desirable to do things like turn off status controls if the watchdog timer times out or if a power fail occurs.

It provides a choice of automatically resetting the timeout (like WDtask) or allowing the user to reset the timer from the control system.

There is also a choice of whether or not to reset the timeout at startup time.

When running it writes an update message to the module to prevent it from timing out. The tmo update message is written every 3 seconds.

When enabled the module initialization commands are written every 10 seconds. This allows the program to automatically reinitialize the module if the crate is switched off/on.

The program registers with dbman as WDtask.

Arguments

Argument processing is done using Unix long argument syntax.

The values of all of the parameters listed here (whether or not they were supplied on the command line) are printed on stderr when the program starts.

--dbman_host <hn>

The host where dbman is running.

If this argument is not supplied the default is "localhost".

--dbman_name <rn>

Sets the name used by the program to register with dbman.
--dev <path>

The pathname of the device to open.

If this argument is not supplied the default is "/dev/camac".

--drv <drv>

The Driver key.

If this argument is not supplied the default is "CAMAC".

--cmin <C>

The minimum crate number.

If this argument is not supplied the default is "1".

--cmax <C>

The maximum crate number.

If this argument is not supplied the default is "99".

--no_startup_init

Normally when the program is started it will issue commands to reset the watchdog timer and power fail detection.

This argument prevents this from happening on startup. It is then up to the user to explicitly issue the commands to clear both functions.

--auto_init

Normally the program will not automatically reset the watchdog timer or power fail functions.

This argument causes the program to periodically issue the reset commands.

Supplying this argument causes the program to imitate the behavior of WDtask(8) .

--diag

Don’t close stdin and stdout and allow SIGINT to kill the program.
--show_tbl

Print the contents of various tables to stderr.
--verbose=<level>

Print more information. If <level> is missing it defaults to 1.

--persist

Run the program in persist mode.

--tagname_ctl

parameter name to use for task control.

--tagname_status

parameter name to use for reporting task status.
--help

Print program help to stderr.

If this argument is supplied the internal help is printed to stderr and the program exits.

Module Jumper Settings

The Timeout Period Select jumper should be set to the 10 second position.

The BUSY-XEQ jumper should be set to the XEQ position. This causes the module’s timer to be reset by commands sent by WDtask.

If this jumper is set to the BUSY position (the factory default) then any I/O to the crate will reset the timer. This may be OK, however, XEQ is the prefered settting.

The INH jumper should be set to the INH position to allow the module to control the dataway inhibit line. This is necessary if the module is to be used to control a KSC3075 module.

The MN jumper should normally be set to the no MN position unless it is desired to monitor an outside voltage. See the module manual for more information.

The E12 jumper should normally be set to the E12 position unless a very old crate which doesn’t supply +/-12V is used.

The TONE jumpers for power fail and watchdog timeout should probably be set to the no TONE position to prevent the annoying beeper in the module from sounding.

Device Types used by this program

3792sr - required

Status reads. This record must be present in the database for the module to be serviced by the program.

The bit field usage is:

   0 - watchdog timeout occurred

   1 - power fail occurred

   7-2 - not used

   8 - mains power failed

   9 - -12V power failed

   10 - +12V power failed

   11 - -24V power failed

   12 - +24V power failed

   13 - -6V power failed

   14 - +6V power failed

When the bits are set they indicate the listed condition.

Note: "mains power failed" requires setting the MN jumper and connecting a voltage source to the front panel connector. See the module manual for more information.

Note2: +/-12V power fail detection depends on the setting of the E12 jumper. Normally this is enabled. However some very old CAMAC crates do not provide +/-12V and require setting the jumper to the disabled position. See the module manual for more information.

3792sc - optional

Status controls.

The bit field usage is:

   0 - reset the watchdog timeout

   1 - reset the power fail

The bits are "momentary". Asserting them actuates the listed function.

Notes

When the program is started it reads the status register (F0A0) and prints the bit information to stderr. Part of the status register information is about jumper settings. It will print a complaint if the time out jumper isn’t properly set.

The sc DATA register status is not being properly set if the module is missing. However sr DATA register status is working properly. We’ll ignore this for now.

Examples

#
# this example limits service to crates 1 thru 4
# dbman is running on the same host
#
WDtask2_v2 --cmin 1 --cmax 4
#
#
# this example emulates the behavior of WDtask
# dbman is running on the same host
#

WDtask2_v2 --auto_init

Manual page revision

$Id: WDtask2_v2.8,v 1.1 2009/03/26 16:29:25 mcnamer Exp $


Table of Contents