Pccc.h, B-30, Appendix b – Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual
Page 188

Sample API Modules
Appendix B
B-30
if (status–>plc540vStatus == kPLC540V_SUCCESS)
{
/* If sending the command block address didn’t fail, then the
PLC–5/40V has started processing the command.
If the user of this function hasn’t set up any VME interrupts
to be generated, then we will poll the PLC–5/40V until the
its done processing the command. This is indicated by a
non–zero value in the response word of the command block.
If the user has set up VME interrupts, then we will simply
return to the caller.
*/
if ((cmdIntLevel == kVME_NO_INT_LEVEL) &&
(operationIntLevel == kVME_NO_INT_LEVEL))
{
/* Let’s poll the PLC–5/40V until its done. */
poll_plc540v_until_response(vmeCmdBlkAddr,
kVME_A24_ADDR_SPACE,
status);
}
}
}
else
{
/* Signal that we have an EPC error. */
status–>plc540vStatus = kPLC540V_COPY_CMDBLK_TO_VME_FAILED;
status–>statusCategory = kEPC_STATUS;
}
}
#ifndef PCCC_H
#define PCCC_H
///////////////////////////////////////////////////////////////////////////////
// Common definitions for the ALLEN-BRADLEY PCCC COMMANDS //
///////////////////////////////////////////////////////////////////////////////
#include ”common.h”
typedef unsigned char BOOL;
const BOOL kFalse = 0;
const BOOL kTrue = 1;
PCCC.H