Allen-Bradley 1784-KTX Reference Manual page 48

Table of Contents

Advertisement

Chapter 4
4-10
The routine in Example 4.D instructs the scanner to replace the existing
fault group list with the new one specified in the command.
Example 4.D
#include "ktx_dp.h"
#include "ktx_err.h"
#include "ktxconst.h"
UBYTE set_fault_dependent_group (KTX_DUALPORT far *dp, SET_FAULT_GROUP_CMD
{
UBYTE
status;
/**** Initialize the command buffer ****/
dp–>cmd_buffer.host_command = SET_FAULT_GROUP;
dp–>cmd_buffer.transaction_num = trans_num;
dp–>cmd_buffer.command_length = sizeof(SET_FAULT_GROUP_CMD);
dp–>cmd_buffer.cmd.set_fault_group = *fdg;
/**** Send the command ****/
dp–>int_status_from_host = SCANNER_COMMAND_FROM_HOST;
dp–>host_to_ktx_int_reg = INTERRUPT_KTX;
/**** Get and process the confirmation
status = get_confirmation(dp, trans_num, timeout);
if ((status != CONFIRMATION_TIMED_OUT) && (status != TRANS_NUM_MISMATCH))
acknowledge_confirmation(dp);
return status;
}
/* 1784–KTX scanner dualport definition
/* 1784–KTX scanner error codes
/* 1784–KTX scanner constants
*fdg, UBYTE trans_num, USHORT timeout)
****/
*/
*/
*/

Advertisement

Table of Contents
loading

This manual is also suitable for:

1784-ktxd1784-kts

Table of Contents