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

Page 157

Advertising
background image

Chapter

Programming the Scanner

8

8Ć23

/*
**
** READ_CSA() –– read control status area
**
**

This function reads a 6008–SV2 channel’s control/status area and returns the data

**

to the caller.

**
**

parameters:

pointer to a csa_data struct

**

return value:

none

**
*/

void
read_csa (channel far *chan, csa_data far *param)
{

csa_data far *csaptr;

/* map channel & establish pointers */
map_channel(chan);

csaptr = (csa_data far *) chan–>ControlStatusArea;

/* copy VME csarea to local structure */
param–>opstat

= csaptr–>opstat;

param–>cnfstat

= csaptr–>cnfstat;

param–>cmd

= csaptr–>cmd;

param–>addr

= csaptr–>addr;

param–>tag

= csaptr–>tag;

param–>irq

= csaptr–>irq;

param–>semaphore

= csaptr–>semaphore;

param–>datalen

= csaptr–>datalen;

/* unmap the channel */
unmap_channel(chan);

return;

}

Advertising
This manual is related to the following products: