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

Page 150

Advertising
background image

Chapter

Programming the Scanner

8

8Ć16

/* try to lock the table entry buffer */
if (lock_conbt_entry(entry) != 0) {

/* could not lock buffer */
unmap_channel(chan);
return –1;

}

/* copy the data in or out */
if (block–>cmd == CMD_CONBTREAD) {

/* continuous BT read */
for (i = 0; i < block–>datalen; i++) {

block–>data[i] = entry–>data[i];

}

} else {

/* continuous BT write */
for (i = 0; i < block–>datalen; i++) {

entry–>data[i] = block–>data[i];

}

}

/* unlock the table entry buffer */
unlock_conbt_entry(entry);
unmap_channel(chan);
return 0;

}

Advertising
This manual is related to the following products: