RadiSys 6200plus Series Manual de usuario Pagina 171

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 275
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 170
Sample
API Modules
Appendix B
B-13
/*****************************************************************************
*
* PURPOSE: This function will transmit notification of a new command
* block awaiting processing by the PLC-5/40V. Prior to calling
* this function, the programmer must copy the command block
* into VME memory.
*
* INPUT: ULONG baseAddress contains the base address of the PLC-5/40V.
*
* ULONG vmeCmdBlkAddr contains the VME address of the command
* block.
*
* VME_ADDRESS_MODIFIER_TYPE addrSpace contains an indicator
* as to which address space contains the command block.
*
* 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 baseAddress = 0xFC00;
* ULONG vmeCmdBlkAddr = 0x80000;
* VME_ADDRESS_MODIFIER_TYPE addrSpace = kVME_A24_ADDR_SPACE;
* PLC540V_STATUS_TYPE *status;
* plc540v_send_cmd(baseAddress,
* vmeCmdBlkAddr,
* addrSpace,
* &status);
*
* Copyright Allen-Bradley Company, Inc. 1993
*
****************************************************************************/
void plc540v_send_cmd(ULONG baseAddress,
ULONG vmeCmdBlkAddr,
VME_ADDRESS_MODIFIER_TYPE addrSpace,
PLC540V_STATUS_TYPE *status)
{
/* The command word. */
ULONG command = 0;
/* The value read from the command control register. */
UWORD cmdctlReg = 0;
/* Let’s initialize the status variable to success. */
memset((char *) status, 0x0, sizeof(PLC540V_STATUS_TYPE));
/* Build the command word. */
if (addrSpace == kVME_A24_ADDR_SPACE)
command = 0x00000000L | (vmeCmdBlkAddr & 0x00FFFFFFL);
else
command = 0x01000000L | (vmeCmdBlkAddr & 0x0000FFFFL);
Vista de pagina 170
1 2 ... 166 167 168 169 170 171 172 173 174 175 176 ... 274 275

Comentarios a estos manuales

Sin comentarios