Appendix b – Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual

Page 183

Advertising
background image

Sample API Modules

Appendix B

B-25

void plc540v_init_cont_copy_from_VME(ULONG vmeDataAddr,

UWORD vmeDataSize,
ULONG vmeCmdBlkAddr,
UWORD baseAddress,
VME_DATA_WIDTH_TYPE width,
VME_ADDRESS_MODIFIER_TYPE addrMod,
UWORD fileNumber,
UWORD elementNumber,
VME_INTERRUPT_LEVEL_TYPE cmdIntLevel,
UBYTE cmdStatusId,
VME_INTERRUPT_LEVEL_TYPE operationIntLevel,
UBYTE operationStatusId,
PLC540V_STATUS_TYPE *status)

{

plc540v_cont_copy(kPLC540V_CONT_COPY_FROM_VME,

kPLC540V_CONT_COPY_ENABLE,
vmeDataAddr,
vmeDataSize,
vmeCmdBlkAddr,
baseAddress,
width,
addrMod,
fileNumber,
elementNumber,
cmdIntLevel,
cmdStatusId,
operationIntLevel,
operationStatusId,
status);

}

/*****************************************************************************
*
* PURPOSE: This function configures the PLC–5/40V to stop the
* continuously copy of VME memory to processor file memory.
* The input parameters MUST be identical to the ones used in
* the plc540v_init_cont_copy_from_VME() function call.
*
* INPUT: ULONG vmeDataAddr contains the VME address where the
* VME memory will be read from.
*
* UWORD vmeDataSize contains the number of 16 bit words which
* will be written.
*
* ULONG vmeCmdBlkAddr contains the VME address where the
* command block will be copied to so the PLC–5/40V can
* access its information.
*
* UWORD baseAddress contains the base address of the
* PLC–5/40V.
*
* VME_DATA_WIDTH_TYPE width contains the data width that
* should be used for the copy operations. It can be D16
* or D08.
*
* VME_ADDRESS_MODIFIER_TYPE addrMod defines the address space
* in which the VME data is accessed. It can be A16 or A24.
*
* UWORD fileNumber contains the PLC–5/40V data file number
* which will be continuously read from for the data transfer.
*
* UWORD elementNumber contains the element number in the
* PLC–5/40V data table file at which the data transfer is to
* begin.
*

Advertising