Diagnostic counter reset, Ać14 – Rockwell Automation 6001-F2E AB STANDARD DRIVER SFTW User Manual
Page 36
![background image](/manuals/580009/36/background.png)
Application Program Examples
Appendix A
A-14
/* ––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/*
DH/DH+ Application Library (c) 1989 Allen–Bradley
APPLICATION: Diagnostic Counter Reset
SYMBOL: PLCx_RC
Include files:
Linkable Driver:
#include “krdefs.h”
#include “stddrv.h”
Application Variables:
int
size,
PLC_FCT;
unsigned int status,
io_stat[2],
timeout;
char device[]= “KR:0”;
unsigned char destination;
unsigned char d_buff[...];
struct SD_FB DHP_MSG;
*/
/* Initialize the DH-485 function block */
DHP_MSG.dev = device; /* Communication device */
DHP_MSG.stat = &io_stat[0]; /* I/O status */
DHP_MSG.L_R = 0;
DHP_MSG.dst = &destination; /* DH-485 address */
DHP_MSG.dta = (unsigned char *)NULL;
DHP_MSG.len = 0; /* Size not applicable */
DHP_MSG.buf = (unsigned char *)NULL;
DHP_MSG.TO = timeout; /* Reply timeout in sec */
Diagnostic Counter Reset