Using the snmpd daemon – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 108

Advertising
background image

Chapter 6

Using the Ethernet Interface

6-27

union

{

unsigned tmp;

unsigned char c[4];

} u;

unsigned make, year;

unsigned char model, type, color;

u.c[0] = pccc_rpl[13]; /* get the make from the reply buffer */

u.c[1] = pccc_rpl[14]; /* and put it in the temp buffer */

u.c[2] = pccc_rpl[15];

u.c[3] = pccc_rpl[16];

make = u.tmp; /* store make in make variable */

model = pccc_rpl[17]; /* get model from reply buffer */

type = pccc_rpl[18]; /* also type */

color = pccc_rpl[19]; /* as well as color */

u.c[0] = pccc_rpl[21]; /* get the year from the reply buffer (skip */

u.c[1] = pccc_rpl[22]; /* over pad byte at offset [21]) and put it */

u.c[2] = pccc_rpl[23]; /* in the temp buffer */

u.c[3] = pccc_rpl[24];

year = u.tmp; /* store year in year variable */

u.tmp +=1; /* increment year in tmp */

pccc_col_year[25] = u.c[0]; /* move it to write data in pccc buffer */

pccc_col_year[26] = u.c[1];

pccc_col_year[27] = u.c[2];

pccc_col_year[28] = u.c[3];

printf (”make = %X model = %X type = %X color = %X year = %X\n”,

make,model,type,color,year); /* display the ”Car” tag */ }

SNMPD is a daemon that provides Simple Network Management Protocol
(SNMP) services between the control coprocessor and a host computer.
This daemon supports MIB-1 variables. After installing the SNMPD
daemon on the control coprocessor, you have the ability to:

allow 6200 Series PLC-5 Programming Software to identify the

coprocessor on the Ethernet network using the “WHO” function.

monitor MIB-1 variables from a host computer running SNMP-

monitoring software.

Using the SNMPD Daemon

Advertising