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

Page 193

Advertising
background image

Sample API Modules

Appendix B

B-35

* plc540v_init_handle_interrupts(
* vmeCmdBlkAddr,
* baseAddress,
* cmdIntLevel,
* cmdStatusId,
* operationIntLevel,
* operationStatusId,
* &status);
*
* Copyright Allen-Bradley Company, Inc. 1993
*
****************************************************************************/
void plc540v_init_handle_interrupts(

ULONG vmeCmdBlkAddr,
UWORD baseAddress,
VME_INTERRUPT_LEVEL_TYPE cmdIntLevel,
UBYTE cmdStatusId,
VME_INTERRUPT_LEVEL_TYPE operationIntLevel,
UBYTE operationStatusId,
PLC540V_STATUS_TYPE *status)

{

plc540v_handle_interrupts(

kPLC540V_HANDLE_INTERRUPTS,
kPLC540V_HINTS_ENABLE,
vmeCmdBlkAddr,
baseAddress,
cmdIntLevel,
cmdStatusId,
operationIntLevel,
operationStatusId,
status);

}

/*****************************************************************************
*
* PURPOSE: This function configures the PLC-5/40V to not recognize the
* specified VME interrupts.
*
* INPUT: 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_INTERRUPT_LEVEL_TYPE cmdIntLevel contains the VME bus
* interrupt to be generated by the PLC-5/40V AFTER storing
* its response in the response word of the command block AFTER
* COMMAND completion. If kVME_NO_INT_LEVEL is specified, then
* no VME bus interrupts will be generated.
*
* UBYTE cmdStatusId contains a unique value which will be used
* by the interrupted host processor to run a specific
* interrupt service routine. This variable must be set to
* zero if you are NOT using any command interrupts.
*
* VME_INTERRUPT_LEVEL_TYPE operationIntLevel contains the VME
* bus interrupt to be generated by the PLC-5/40V AFTER each
* copy OPERATION. If kVME_NO_INT_LEVEL is specified, then
* ALL VME interrupts will be disabled.
*

Advertising