Appendix b – Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual
Page 181
Sample API Modules
Appendix B
B-23
void plc540v_halt_cont_copy_to_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_TO_VME,
kPLC540V_CONT_COPY_DISABLE,
vmeDataAddr,
vmeDataSize,
vmeCmdBlkAddr,
baseAddress,
width,
addrMod,
fileNumber,
elementNumber,
cmdIntLevel,
cmdStatusId,
operationIntLevel,
operationStatusId,
status);
}
/*****************************************************************************
*
* PURPOSE: This function configures the PLC–5/40V to continuously copy
* from VME memory to processor file memory once per scan cycle
* in the processor.
*
* 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 read.
*
* 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.
*