Dtl_read_w_idx – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 198

Advertising
background image

API Library of Routines

Appendix B

DTL_READ_W_IDX

B-67

Reads any elements of a file, one element at a time, from the PLC-5
programmable controller to the control-coprocessor memory using only
one data definition.

Important: To use this function call, you must have the versions of the
ABLIB.L and CORPRO.H files that accompany Series A Revision D
(1.20) or later of the Program Development Software. Contact Allen-
Bradley Global Technical Support Services at (216) 646-6800 if you need
these updates.

C Syntax

#include <copro.h>

unsigned DTL_READ_W_IDX (name_id, variable, iostat, index)

unsigned name_id;
void *variable;
unsigned *iostat;
unsigned index;

Parameters

name_id

DTL_C_DEFINE returns this handle when the data file to be read
is defined.

variable

Address of a buffer that stores the data read from the file. Ensure that
the declared variable is the right type to match the data size that was
specified in DTL_C_DEFINE.

iostat

This parameter returns a final completion status. Possible completion
status values are:

Value

Meaning

0

DTL_SUCCESS = operation completed successfully

27

DTL_E_NOATMPT = I/O operation not attempted; see status variable for reason

41

DTL_E_CNVT = dataĆconversion error

xxx

¬

PCCC_E_xxx = operation refused by the PLCĆ5 programmable controller

¬

See Table B.A for PCCC errors.

index

This parameter specifies the element or structure level of the data-file
item to be read.

DTL_READ_W_IDX

Advertising