Tag_define – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual
Page 247

API Library of Routines
Appendix B
TAG_DEFINE
B-116
Adds an entry to the control-coprocessor TAG table.
C Syntax
#include <copro.h>
unsigned TAG_DEFINE (name_id,tag_addr,
tag_name,tag_size,access)
unsigned *name_id;
unsigned tag_addr;
unsigned char *tag_name;
unsigned tag_size;
unsigned char access;
Parameters
name_id
Name_id is used to return a handle assigned by the TAG library to the
TAG name.
tag_addr
Pointer to the start of the user’s tagged area.
tag_name
Specifies the name of the user’s TAG. This is a null-terminated
ASCII string of up to 9 characters. The TAG name can contain the
following characters: A-Z, a-z, 0-9, and _. The first character
must be alphabetic.
tag_size
Specifies the number of consecutive bytes starting at the tag_addr to be
included in the tagged area. This number must be
≤
240.
access
Specifies either READ or READ/WRITE access to the tagged area by
other processes. Possible values are:
Value
Symbolic Name
¬
Access
0
TG_READ
Only the process that created the TAG can modify it;
other processes can only READ the TAG
1
TG_MODIFY
Any process can READ or modify the TAG
¬
These symbols are in COPRO.H.
TAG_DEFINE