Allen-Bradley 1784-KTX Reference Manual page 85

Table of Contents

Advertisement

Appendix B
Programming Examples
/*===========================================================================
KTX_DUALPORT
– defines the structure of the dual port memory (shared by
both the PC Host and the KTX Z84 microprocessor).
============================================================================*/
typedef struct
{
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
CONFIG_DATA
UBYTE
RUNNING_STATUS
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
OPERATING_STATUS
ADAPTER_STATUS
COMMAND
CONFIRMATION
UWORD
UWORD
/*
**
The following are KTX hardware registers.
**
the right column are hex offsets from the start of the dualport.
*/
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
UBYTE
} KTX_DUALPORT;
/*****************************************************************************
**
**
NON–DUALPORT STRUCTURE DEFINTIONS
**
*****************************************************************************/
typedef struct
{
UBYTE
count;
UWORD
data[8];
} IO_BUFFER;
typedef UBYTE
TABLE_NAME;
typedef
struct
{
UBYTE
count;
UWORD
bt_data[64];
Allen-Bradley Parts
} BT_BUFFER;
#endif
B-6
boot_code[4];
link_state;
link_address;
link_protocol;
link_baud_rate;
reserved1;
config_data;
init_status;
running_status;
int_status_to_host;
int_status_from_host;
host_dead_counter;
reset_diags_counters;
reserved2[2];
alive_flag;
duplicate_node;
off_ktx;
stopped_flag;
module_state;
COS_link_address;
reserved3[100];
num_adapter_addresses;
num_faulted_adapters;
operating_status;
adapter_status_table[128];
cmd_buffer;
confirmation_buffer;
input_image_table[256];
output_image_table[256];
reserved_reg_1;
host_to_ktx_int_reg;
assert_reg;
deassert_reg;
status_reg;
reserved_reg_2;
reserved_reg_3;
reserved_reg_4;
host_ack_of_ktx_int_reg;
undefined_1;
card_control_write_reg;
undefined_2;
card_control_read_reg;
undefine_3;
reserved_reg_5;
undefined_4;
The numbers in
/* :800
*/
/* :801
*/
/* :802
*/
/* :803
*/
/* :804
*/
/* :805
*/
/* :806
*/
/* :807
*/
/* :808
*/
/* :809
*/
/* :80A
*/
/* :80B
*/
/* :80C
*/
/* :80D
*/
/* :80E
*/
/* :80F
*/

Advertisement

Table of Contents
loading

This manual is also suitable for:

1784-ktxd1784-kts

Table of Contents