Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

watch dog timer control

I have a panel_PC from advantech with xp professional. I am trying to figur out how to program the watch dog timer using labview 7.1.
 
Advantech listed up a programming example in basic. What is the easiest way to solve this problem. Can I implement basic into labview or
is it possible to read/write to I/O port 443 (hex) directly?
 
In advance Thanks.
Tor Ivan Karlsen
 

Appendix A Programming the Watchdog

Timer

A.1 Supported input timing modes

In order to program the watchdog timer, you must write a program which

writes I/O port address 443 (hex). The output data is a time interval value.

The value range is from 01 to 3E (hex), and the related time interval is 1

second to 62 seconds.

Data Time Interval

01 1 sec.

02 2 sec.

......

3E 62 sec.

After data entry, your program must refresh the watchdog timer by rewriting

the I/O port 443 (hex) while simultaneously setting it. To disable the

watchdog timer, your program must read I/O port 443 (hex).

The following example shows how to program the watchdog timer in

BASIC.

10

REM Watchdog timer example program

20 OUT &H443, data

REM Start and restart the watchdog

30 GOSUB 1000

REM Your application task #1

40 OUT &H443, data

REM Reset the timer

50 GOSUB 2000

REM Your application task #2

60 OUT &H443, data

REM Reset the timer

70 X=INP (&H443)

REM Disable the watchdog timer

80 END

1000

REM Subroutine #1, your application task

.

1070 RETURN

2000

REM Subroutine #2, your application task

.

2090 RETURN

 

TIK
0 Kudos
Message 1 of 2
(3,850 Views)
Attached is a demonstration of how the BASIC code might be implemented in Labview 7.1

Please note that this may (read probably) not be the ideal solution for your application or be the best way to implement such a system in Labview, however the principle is clear and as such you shoud be able to understand the process; which was the object of the demonstration code.

Possibly a better way to implement a watch dog system in Labview would be to use the Timed Loop function.

Sorry I don't have your hardware, so I am not in a postion to test the software with the hardware. Thus please feedback if the software works.

0 Kudos
Message 2 of 2
(3,828 Views)