Rockwell Automation 6008-SV2R VMEbus remote I/O Scanner User Manual

Page 160

Advertising
background image

Chapter

Programming the Scanner

8

8Ć26

/*
**
** PRINT_LINK_CONFIG() –– print contents of link_config data structure
**
**

This routine prints the contents of a link_config structure, which is used by the

**

autocfg() and linkstatus() routines.

**
**

parameters:

pointer to link_config structure

**

return value:

none

**
*/

void
print_link_config (channel far *chan, link_config far *ptr)
{

unsigned short

ioaswblk_size;

unsigned short

i;

/* determine I/O adapter status word block size */
ioaswblk_size = (unsigned short)

((chan–>ScannerMode == MODE_COMPATIBLE) ? SVC_IOASWBLK_SIZE :
SVS_IOASWBLK_SIZE);

printf(”\n\track\tGRP0\tGRP1\tGRP2\tGRP3\n”);
for (i = 0; i < ioaswblk_size; i += 4) {

printf(”\t%d\t%XH\t%XH\t%XH\t%XH\n”, (i/4),

ptr–>ioaswblk[i+0], ptr–>ioaswblk[i+1],
ptr–>ioaswblk[i+2], ptr–>ioaswblk[i+3]);

}

printf(”\n\tscanlist length = %d\n”, ptr–>scanlist_len);
for (i = 0; i < ptr–>scanlist_len; i++) {

printf(”\tentry[%d] = %XH\n”, i, ptr–>scanlist[i]);

}

return;

}

Advertising
This manual is related to the following products: