beautypg.com

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

Page 134

background image

Appendix A

Sample Applications

A-12

// Initiate the continuous copy from VME to a PLC data file
plc540v_init_cont_copy_from_VME(

cc_from.vmeDataAddr,
cc_from.wordCount,
cc_from.vmeCmdBlkAddr,
cc_from.baseAddr,
kVME_D16_DATA_WIDTH,
kVME_A24_ADDR_SPACE,
cc_from.fileNumber,
cc_from.elementNumber,
kVME_NO_INT_LEVEL,
0,
kVME_NO_INT_LEVEL,
0,
&status);

display_status(&status);
}

/***************************************************************************/
/************************* TEST_HALT_CC_FROM_VME ***************************/
/***************************************************************************/
void test_halt_cc_from_vme(void)
{
// Disables the previous started continuous copy to a PLC data file from
// VME memory.

// Status information
PLC540V_STATUS_TYPE status;

// Verify that a continuous copy operation has been initialized.
if (cc_from.isInitialized == 0)
{

show_error(”You must first initialize continuous copy from VME.”);
return;

}

// Stop the continuous copy operation...
plc540v_halt_cont_copy_from_VME(

cc_from.vmeDataAddr,
cc_from.wordCount,
cc_from.vmeCmdBlkAddr,
cc_from.baseAddr,
kVME_D16_DATA_WIDTH,
kVME_A24_ADDR_SPACE,
cc_from.fileNumber,
cc_from.elementNumber,
kVME_NO_INT_LEVEL,
0,
kVME_NO_INT_LEVEL,
0,
&status);

display_status(&status);
}