PCI WATCHDOG TIME CARD

Active Control

6.1 Methods
The watchdog library provides OCX functions to let user to use Active X Control to develop application program, the methods are shown below
1. Long Disable ( )
Syntax
Long Disable()
Description
This is use to disable the watchdog countdown of the counter
Usage
Long=Watchdog.disable()
2. Long enable PCI Reset (bool status)
Syntax
Watchdog.EnablePCIReset(True)
Description
This option is use to specify whether the card will be affected by the PCI reset signal from the PC.
Usage
Long=Watchdog. EnablePCIReset(True)
3. Long EnableorLoad ( )
Syntax
Watchdog.EnableorLoad
Description
This is to enable or load the counter. This will start the countdown of the counter
Usage
Long= Watchdog.EnableorLoad ()
4. Long Getcounter ( )
Syntax
Watchdog.GetCounter
Description
This will return the current value of the counter.
Usage
Long= Watchdog.GetCounter()
5. Long PowerOff ( )
Syntax
WatchDog.PowerOFF
Description
This will trigger the Power Remote Box kit to turn OFF.
Usage
Long= WatchDog.PowerOFF()
6. Long PowerON ( )
Syntax
WatchDog.PowerON
Description
This will trigger the Remote Power Box Kit to turn ON.
Usage
Long= Watchdog.PowerON()
7. Long SetCounter (Long counter)
Syntax
Watchdog.SetCounter(counter)
Description
This is used to specify the counter.
Usage
Long = SetCounter(long)
8. SetTimeUnit (long Timeunit)
Syntax
Watchdog.SetTimeUnit(Long counter)
Description
This is used to specify the time Unit or the Frequency of the timer countdown.
Usage
Long = Watchdog.SetTimeUnit(Long)

Example of Timer Countdown

0 = 1 / 2048

1 = 1 / 1024

2 = 1 / 512

3 = 1 / 256

4 = 1 / 128

5 = 1 / 64

6 = 1 / 32

7 = 1 / 16

8 = 1 / 8

9 = 1 / 4

10 = 1 /2

6.2 Sample Source Code for Visual Basic (VB)
Private Sub cmdDisable_Click()
Timer1.Enabled = False !¢DEnable Program Timer

End Sub

Private Sub cmdEnable_Click()

Watchdog.SetTimeUnit (Val(cboTime.Text)) 'Set the Time unit

Watchdog.SetCounter (Val(txtCountDown.Text)) 'Set the counter

Watchdog.EnableorLoad !¢D Then Enable

Timer1.Enabled = True

End Sub


Private Sub cmdOff_Click()

Watchdog.PowerOFF !¢DTurn the Power Control Box to OFF

End Sub


Private Sub cmdOn_Click()

Watchdog.PowerON !¢D Turn the Power Control Box ON

End Sub


Private Sub Command1_Click()

End !¢DExit

End Sub


Private Sub Timer1_Timer()

txtCountDown.Text = Watchdog.GetCounter !¢DGet Current Count

If txtCountDown.Text = 0 Then

txtCountDown.Text = 0

Timer1.Enabled = False

End If

End Sub

NEXT