8ć18, Sample code for vmebus operations – Rockwell Automation 6008-SV2R VMEbus remote I/O Scanner User Manual

Page 152

Advertising
background image

Chapter

Programming the Scanner

8

8Ć18

sample code for VMEbus operations

/*
**
** BUS.C –– Sample Code VME bus operations
**
*/

#include ”6008sv2.h”
#include ”busmgr.h”

/*
**
** INIT_BUS_OPS() –– initialize VMEbus access
**
**

This function checks for the EPC Bus Manager driver, then enables interrupts

**

on IRQ4, the VMEbus interrupt used by the 6008SV2 as a default.

**
*/

void
init_bus_ops (void)
{

int

i;

/* check for bus manager */
if (EpcCkBm() != EPC_SUCCESS) {

fprintf(stderr, ”Bus Manager not loaded\n”);
exit(–1);

}

for (i = 1; i < 8; i++)

EpcEnIntr((unsigned short) i);

return;

}

Advertising
This manual is related to the following products: