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

Page 194

Advertising
background image

Sample API Modules

Appendix B

B-36

* UBYTE operationStatusId 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 operation interrupts.
*
* OUTPUT: PLC540V_STATUS_TYPE *status will contain the final status
* of requesting this function. This status could be and EPC
* or PLC-5/40V value.
*
* RETURNS: Nothing.
*
* EXAMPLE:
* ULONG vmeCmdBlkAddr = 0x90000;
* UWORD baseAddress = 0xFC00;
* VME_INTERRUPT_LEVEL_TYPE cmdIntLevel = kVME_NO_INT_LEVEL;
* UBYTE cmdStatusId = 0;
* VME_INTERRUPT_LEVEL_TYPE operationIntLevel=kVME_INT_LEVEL_3;
* UBYTE operationStatusId = 234;
* PLC540V_STATUS_TYPE status;
* plc540v_halt_handle_interrupts(
* vmeCmdBlkAddr,
* baseAddress,
* cmdIntLevel,
* cmdStatusId,
* operationIntLevel,
* operationStatusId,
* &status);
*
* Copyright Allen-Bradley Company, Inc. 1993
*
****************************************************************************/
void plc540v_halt_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_DISABLE,
vmeCmdBlkAddr,
baseAddress,
cmdIntLevel,
cmdStatusId,
operationIntLevel,
operationStatusId,
status);

}
/*****************************************************************************
*
* PURPOSE: This function configures the PLC-5/40V to 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.

Advertising