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

Page 185

Advertising
background image

Sample API Modules

Appendix B

B-27

void plc540v_halt_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_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.
* This function is private to this file and is common to all
* the continuous copy functions: Initiate continous copy to VME,
* Initiate continuous copy from VME, Halt continuous copy to
* VME and Halt continuous copy from VME.
*
* INPUT: PLC540V_CONT_COPY_COMMAND ccCmd contains the continuous copy
* command which should be issued to the PLC–5/40V: continuous
* copy to VME or continuous copy from VME.
*
* PLC540V_CONT_COPY_MODE ccMode contains the mode of the
* continous copy command which is being sent to the PLC–5/40V:
* enable or disable continous copy.
*
* ULONG vmeDataAddr contains the VME address where the
* processor file memory will be written into.
*
* 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.
*

Advertising