P40vapc.h, B-46, Appendix b – Rockwell Automation 1785-Vx0B, D17856.5.9 PLC-5 VME VMEbus Programmable Controllers User Manual User Manual
Page 204
Sample API Modules
Appendix B
B-46
/* Let’s establish the command packet contents... Note that
since we set this block with zeros originally, we don’t
need to explicitly set them here.
*/
cmdPacket.cmd = kPLC540V_PCCC_WBP_CMD;
cmdPacket.fnc = kPLC540V_PCCC_WBP_FNC;
cmdPacket.addr = plcAddress;
memmove((char *) cmdPacket.data, (char *) data, dataLength);
plc540v_send_pccc_command(
vmeCmdBlkAddr,
&cmdPacket,
kPLC540V_PCCC_WBP_CMD_SIZE,
reply,
kPLC540V_PCCC_WBP_RPY_SIZE,
baseAddress,
kVME_NO_INT_LEVEL,
0,
width,
addrMod,
status);
}
#ifndef P40VAPC_H
#define P40VAPC_H 1
///////////////////////////////////////////////////////////////////////////////
// Definitions for the PCCC APPLY PORT CONFIG COMMAND AND REPLY PACKETS //
///////////////////////////////////////////////////////////////////////////////
#include ”p40vspcc.h”
#pragma pack(1)
/***************************************************************************/
/************************ INTEL VERSION OF DEFINITIONS *********************/
/***************************************************************************/
/* The PCCC Apply Port Configuration command packet structure. */
typedef struct
{
UBYTE reserved[4];
UBYTE cmd;
UBYTE sts;
UWORD tns;
UBYTE fnc;
PLC540V_PCCC_DATA_TYPE data;
} PLC540V_PCCC_APC_CMD_TYPE;
#define kPLC540V_PCCC_APC_CMD_SIZE (sizeof(PLC540V_PCCC_APC_CMD_TYPE))
P40VAPC.H