Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 71

Advertising
background image

Chapter 5

Developing Programs

5-11

Important: For the 1771-DMC1 and -DMC4 modules, the default size
allows you to create 1024 TAGs; the -DMC module default size is zero.

Use the following sections to select the appropriate TAG function for your
application. See Appendix B, Application Program Interface Routines, for
the following information on these TAG functions: description, required
parameters, condition values, and a C program example.

TAGĆTable Configuration Functions

Use these TAG configuration functions to establish a TAG table for TAG
functions:

Table 5.I

TAGĆTable Configuration Functions

Function

What It Does

TAG_DEFINE

Places a TAG name entry into the TAG table

TAG_UNDEF

Removes a TAG name or TAG names from the TAG table

TAG_DEF_AVAIL

Determines the number of TAG definitions available in the TAG table

TAG_GLOBAL_UNDEF

Removes a TAG or TAGs from the TAG table defined by any process

TAG_LINK

Gets a handle (offset) for a TAG table entry

Read and Write Functions

Use these TAG functions to read and write to coprocessor memory:

Table 5.J

TAG Read and Write Functions

Function

What It Does

TAG_READ

Reads data from a tagged memory area

TAG_READ_W

Reads data from a tagged memory area after the tag has been written by TAG_WRITE_W

TAG_WRITE

Writes data to a tagged memory area

TAG_WRITE_W Writes data to a tagged memory area, returns only after the tag has been read by TAG_READ_W

Lock/Unlock Functions

Use the TAG_LOCK and TAG_UNLOCK functions as a pair in your
program. The TAG_LOCK function protects against concurrent access to
the tagged area of control-coprocessor memory. The TAG_UNLOCK
function is an unlock to the TAG locked by the TAG_LOCK function.

Important: Failure to use a TAG_UNLOCK function to complement a
TAG_LOCK function in a program may cause the system to hang-up.

Advertising