How to use tag functions – Rockwell Automation 1771-DMC_DMC1_DMC4_DXPS Control Coprocessor User Manual User Manual

Page 70

Advertising
background image

Chapter 5

Developing Programs

5-10

For example, a PLC-5 programmable controller initiates an unsolicited
READ MSG instruction to the control coprocessor. The READ MSG
instruction transfers one word of data. The order of events is:

The

control coprocessor program

responds with a

MSG_READ_HANDLER or

MSG_READ_W_HANDLER

then

The

MSG_READ_HANDLER or

MSG_READ_W_HANDLER triggers

a DTL_WRITE in the program, based

on the one word that was sent

Note: The DTL_WRITE function writes data from the

control coprocessor to the PLCĆ5 programmable controller.

Check Status of Asynchronous MSG Functions (MSG_WAIT)
When your application program uses asynchronous MSG read/write
functions, you must include at least one MSG_WAIT in your program.
MSG_WAIT checks for the completion of any combination of pending
read/write message number and updates the message number in a read
and write mask.

Mask Functions
Use the MSG_ZERO_MASK function to zero all the bits in a mask from
previous operations when you use a MSG_WAIT function in your
program. All the mask functions are used with the MSG_WAIT function.

Table 5.H

Mask Functions for Unsolicited, Asynchronous Read and Write Functions

Function

What It Does

MSG_CLEAR_MASK

Clears the bits in the message read/write masks associated with a specified message number

MSG_SET_MASK

Sets the bits in the message read/write masks associated with a specified message number

MSG_TST_MASK

Tests the bits in the message read/write masks associated with a specified message number

MSG_ZERO_MASK

Used to zero all the bits in a specified message number

Clear Pending Messages
See page 5-13 for information on using the CC_MKILL utility to clear
pending messages from the message handler.

TAG functions provide a means for the user to specify access to control-
coprocessor memory. Use TAG functions to access memory for:

external intelligent devices—i.e., ControlView connected to a serial port
multiple processes interacting on OS-9

You can configure the size of the TAG table using the CC_CFG utility.
The default size allows the creation of 1024 TAGs.

How to Use TAG Functions

Advertising