BASEstartm Open DAS
for Allen-Bradley Data Highwaytm
on Tru64tm UNIX
Installation and User's Guide


Previous Contents Index

3.2.4 Receiving Indications

An indication is data that is sent to the DAS from the PLC without the DAS specifically requesting the data. The DAS supports write and abort indications.

Note

Information reports are also supported for PLC-2, PLC-3, and PLC-5 for backward compatability purposes only. Configurations should be migrated to use the write indication support as soon as possible.

Table 3-5 lists the indication functions available through the OMNI (API) interface.

Table 3-5 Indication Interface Access
Interface Function Name
API omni_get_indications
  omni_get_indications_a

3.2.4.1 Write Indications

The write indication is used when the PLC is sending data to the host. In order to use the write indication function, a variable must be created on the host's local VMD that matches the address and size of the data being sent by the PLC.

Example 3-7 shows an example of how to configure VMDs, actors and activities to receive write indications from a PLC-5 that has been configured to send PLC-2 type messages to the host. A PLC-2 VMD is configured in BASEstar Open to receive the write indications. Note that the PLC-2 has been configured using the PLC-5 protocol profile since it will be receiving write indications from a PLC-5.

Note

The path on the PLC-2 is not used since the VMD is only used to receive the write indications and is not used in establishing communications to the PLC.

Example 3-7 Write Indication Configuration

CREATE PROTOCOL_PROFILE ab_plc5 \
                    -APPLPROFID 53 \
                    -MAXPDUSIZE 1024 \
                    -SMA_MODE ENABLED \
                    -LOG 
CREATE VMD plc_2_30 -MODEL "PLC_2_30" \
                    -VENDOR "AB" \
                    -DVM_ACCESS_POINT "/PATH=PLC_2_30_PATH":ab_plc5 \
                    -DESCRIPTION "PLC 2/30" \
                    -LOG 
CREATE VMD plc_5_40 -MODEL "PLC_5_40" \
                    -VENDOR "AB" \
                    -DVM_ACCESS_POINT "/PATH=PLC_5_40_PATH":ab_plc5 \
                    -DESCRIPTION "PLC 5/40" \
                    -LOG 
! 
!  Create actors/activities for the VMDs 
! 
CREATE NODE ab_node -PHYSICAL "your_node" -LOG 
CREATE DOMAIN /ab_data 
CREATE ACTOR /AB_IND -LOG 
SET CONTEXT /AB_IND 
CREATE PROGRAM ab_data_srv -PROGRAM_KIND DATADEV \
                    -PARAM /usr/param/AB.PAR \
                    -LOG 
CREATE PROGRAM ab_event_srv -PROGRAM_KIND EVENT \
                    -LOG 
CREATE ACTIVITY ab_data_act -PROGRAM ab_data_srv \
                    -NODES (ab_node) \
                    -DOMAINS (/ab_data) \
                    -VMDS (plc_5_40) \
                    -LOG 
CREATE ACTIVITY ab_event_act -PROGRAM ab_event_srv \
                    -NODES (ab_node) \
                    -DOMAINS (/ab_data) \
                    -LOG 

The CREATE PROGRAM command shown in Example 3-7 has an additional attribute, the -PARAM attribute, that specifies a parameter file to be read by the ab_data_srv program. The parameter file contains the name of the local VMD to receive the write indications as shown in Example 3-8. See BASEstar Open for Tru64 UNIX Management Guide for more information on possible contents of the parameter file.

Example 3-8 AB.PAR Contents

/AB_IND/ab_data_srv.env: BSTR_LOCAL_VMD_NAME=plc_2_30 

Only one parameter file can be specified per program so BASEstar Open limits the number of local VMDs that can be specified to one per program. This limitation means that all write indications for a particular program must be directed to one local VMD, so all PLCs connected to that line must use unique addresses to ensure that the data from the PLC is uniquely identified. Also, mixing of types writes (i.e. PLC-2 and PLC-5) is not supported.

Example 3-9 shows an example that creates variables, device data points, events, triggers and enboxes to receive write indications from the PLC-5 configured in Example 3-7.

Example 3-9 Write Indication Example

BSTR> EXECUTE ACTOR /AB_IND -WAIT
BSTR> CREATE UNNAMED_VARIABLE plc_2_30.p1 \
      -DATATYPE UNSIGNED_16 \
      -ADDRESS "200" \
      -ADDRTYPE UNCONSTRAINED
BSTR> CREATE DEVICE_DATA_POINT /ab_data/p1 \
                    -DATATYPE UNSIGNED_16 \
                    -UPDATE_POLICY UNSOLICITED \
                    -ACCESS_POLICY ON_REQUEST \
                    -DEVICE_ACCESS READ \
                    -VMD_NAME plc_2_30 \
                    -VAR_NAME p1 \
                    -VAR_CLASS UNNAMED
BSTR> CREATE ENBOX /ab_data/enbox1 \
                    -QUEUE_KIND SEQUENTIAL \
                    -ENBOX_KIND SYSTEM_BUFFERING \
                    -MAX_NOTIFICATIONS 10
BSTR> CREATE EVENT /ab_data/e1 \
                    -PARAMETER_TYPES (INTEGER_16)
BSTR> CREATE TRIGGER /ab_data/t1 \
                    -STATE ENABLED \
                    -TRIGGER_EVALUATION ON_WRITE \
                    -DATA_POINT /ab_data/p1 \
                    -EVENT /ab_data/e1 \
                    -EVE_PARAMETERS (/ab_data/p1:VALUE)
BSTR> ADD SUBSCRIPTION EVENT /ab_data/e1 /ab_data/enbox1 \
                    -NOTIFICATION PARAMETERS_LIST \
                    -STATE ENABLED
BSTR> CONNECT ENBOX /ab_data/enbox1
BSTR> RECEIVE NOTIFICATION ENBOX /ab_data/enbox1
Event              : /ab_data/e1 
Origin             : /ab_data/t1 
Priority           : 0 
Confirmation       : NOT_CONFIRMED 
Notification_id    : 1 
User_parameter     : 0 
Notification_format: PARAMETERS_LIST 
Time               : Fri Mar 17 08:26:50 2000 
 
Parameter 1 value: 
1
BSTR> DISCONNECT ENBOX /ab_data/enbox1
BSTR> REMOVE SUBSCRIPTION EVENT /ab_data/e1 /ab_data/enbox1

The use of the value INIT_UNSOLICITED for the -UPDATE_POLICY qualifier is not supported for write indications since the address of the variable in the remote VMD is not available. If an application requires the value of an unsolicited variable when starting, before the value has been updated by the device, create a device data point and unnamed variable on the remote VMD and use that to read the initial value.

If a PLC has been programmed to send data to the host and a variable is found that matches the address of the data being sent, a write indication is generated specifying the variable that was found. If more than one variable is configured that matches the address of the data being sent, then an indication is generated for only the first variable found.

Table 3-6 lists the functions to use when programming the PLC to send data to the host for each PLC family. Sending PLC-2 protected or unprotected writes is supported for all PLC families.

For SLC controllers use the 485CIF target device to send PLC-2 messages. Also for SLC controllers the destination address is specified as a decimal byte offset. This value must be converted to a word octal address to obtain the unnamed variable address to use for the message coming from the device.

Table 3-6 Supported PLC Write Functions
PLC Family    
Remote VMD Local VMD Function Name Address Type
PLC 2 PLC 2 Protected or Unprotected Write PLC-2 address
PLC 3 PLC 2 Protected or Unprotected Write PLC-2 address
PLC 3 PLC 3 Word Range Write PLC-3 Logical binary address
PLC 5 PLC 2 Protected or Unprotected Write PLC-2 address
PLC 5 PLC-5 Typed Write PLC-5 Logical binary or ASCII address
SLC PLC 2 Protected or Unprotected Write PLC-2 address
SLC SLC Protected Typed Logical Write SLC address

3.2.4.2 Abort Indications

An abort indication is generated by the DAS when it loses a connection to the PLC. The DAS detects that a connection is broken under the following conditions:


Previous Next Contents Index