Dtl_read_w, C syntax, Parameters – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 196: Returns

Advertising
background image

API Library of Routines

Appendix B

DTL_READ_W

B-65

Reads data from the PLC-5 programmable-controller data table to the
control-coprocessor memory.

C Syntax

#include <copro.h>

unsigned DTL_READ_W (name_id, variable, iostat)

unsigned name_id;

void *variable;
unsigned *iostat;

Parameters

name_id

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

variable

Address of a buffer that stores the data read from the data item. Ensure
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.

Returns

Status

Symbolic Name

Meaning

0

DTL_SUCCESS

Operation successful

19

DTL_E_NOINIT

DEFINE table not initialized

20

DTL_E_BADID

Definition ID out of range

24

DTL_E_FAIL

I/O completed with errors

32

DTL_E_NODEF

No such data item defined

157

CC_E_NOTCONNECT

PLC is not connected or offline

DTL_READ_W

Advertising