# BASEstartm Open DAS
for Modicon®
on OpenVMStm
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 programmable controller without the DAS specifically requesting the data. The DAS supports write and abort indications.

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 device is sending data to the host. Write indications are only supported for Modbus Plus and Modbus TCP/IP connections which support peer-to-peer communications. With Modbus Plus and Modbus TCP/IP, the host can receive slave commands as well as issue master commands.

In order to use the write indication function, a variable must be created on the host that matches the address and size of the data being sent by the programmable controller.

If a programmable controller 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 only for the first variable found.

When programming the programmable controller to send data to the host, use the special master function (MSTR) block with the write data function code (1).

When using Modbus Plus any slave path that has been configured on the MODPLUS_LINE can be used when sending data to the host. See Table 2-4 for information on how to configure the number of slave paths available.

The DAS supports writing from the programmable controller to the host only. Reads from the programmable controller to the host are not currently supported.

Example 3-7 shows an example of how to configure VMDs to receive write indications from a Modicon 984 with a Modbus Plus connection. The Modicon 984 has been configured to send messages to the host. A Modicon 984 is configured in BASEstar Open to receive the write indications.

Note The path specified for the local VMD uses a different ODS class than the path for specifying the remote VMD. This difference is only true when using programmable controllers with a Modbus Plus connection. See Table 2-4 for details on how to configure this ODS Modbus Plus class. The path on the local 984 is used to obtain the node number of the SQ/SA-85 card which is then used as one of the parameters used to read data from the slave path.

Example 3-7 Modbus Plus Write Indication Configuration

    CREATE PROTOCOL_PROFILE modplus_984 \
                        -APPLPROFID 108 \
                        -MAXPDUSIZE 1024 \
                        -SMA_MODE ENABLED \
                        -LOG
    CREATE VMD mod_984_remote \
                        -MODEL "Modicon 984" \
                        -VENDOR "Modicon" \
                        -DVM_ACCESS_POINT "/PATH=MODPLUS984_SLAVE_PATH":modplus_984 \
                        -DESCRIPTION "Modicon 984 programmable controller" \
                        -LOG
    CREATE VMD mod_984_local \
                        -MODEL "Modicon 984" \
                        -VENDOR "Modicon" \
                        -DVM_ACCESS_POINT "/PATH=MODPLUS984_NODE_PATH":modplus_984 \
                        -DESCRIPTION "Modicon SQ/SA-85 card" \
                        -LOG

Example 3-8 shows an example of how to configure VMDs to receive write indications from a Modicon 984 with a Modbus TCP/IP connection. The Modicon 984 has been configured to send messages to the host. A Modicon 984 is configured in BASEstar Open to receive the write indications.

Note The path on the local VMD 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-8 Modbus TCP/IP Write Indication Configuration

    CREATE PROTOCOL_PROFILE modtcp_984 \
                        -APPLPROFID 109 \
                        -MAXPDUSIZE 1024 \
                        -SMA_MODE ENABLED \
                        -LOG
    CREATE VMD mod_984_remote \
                        -MODEL "Modicon 984" \
                        -VENDOR "Modicon" \
                        -DVM_ACCESS_POINT "/PATH=MODTCP984_PATH":modtcp_984 \
                        -DESCRIPTION "Modicon 984 programmable controller" \
                        -LOG
    CREATE VMD mod_984_local \
                        -MODEL "Modicon 984" \
                        -VENDOR "Modicon" \
                        -DVM_ACCESS_POINT "/PATH=MODTCP984_PATH":modtcp_984 \
                        -DESCRIPTION "Modicon 984 programmable controller" \
                        -LOG

Example 3-9 shows an example of how to configure actors and activities to receive write indications from a Modicon 984 that has been configured above.

Example 3-9 Modbus Write Indication Configuration

    !
    !  Create actors/activities for the VMDs
    !
    CREATE NODE mod_node -PHYSICAL "your_node" -LOG
    CREATE DOMAIN /mod_data
    CREATE ACTOR /MOD_IND -LOG
    SET CONTEXT /MOD_IND
    CREATE PROGRAM mod_data_srv -PROGRAM_KIND DATADEV \
                        -PARAM MOD_PARAM:MOD.PAR \
                        -LOG
    CREATE_PROGRAM mod_event_srv -PROGRAM_KIND EVENT \
                        -LOG
    CREATE ACTIVITY mod_data_act -PROGRAM mod_data_srv \
                        -NODES (mod_node) \
                        -DOMAINS (/mod_data) \
                        -VMDS (mod_984_remote) \
                        -LOG
    CREATE ACTIVITY mod_event_act -PROGRAM mod_event_srv \
                        -NODES (mod_node) \
                        -DOMAINS (/mod_data) \
                        -LOG

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

Example 3-10 MOD.PAR Contents

    /MOD_IND/mod_data_srv.env: BSTR_LOCAL_VMD_NAME=mod_984_local

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 programmable controllers connected to that line must use unique addresses to ensure that the data from the programmable controller is uniquely identified.

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

Example 3-11 Write Indication Example

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

    Parameter 1 value:
    1
    BSTR> DISCONNECT ENBOX /mod_data/enbox1
    BSTR> REMOVE SUBSCRIPTION EVENT /mod_data/e1 /mod_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 programmable controller 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.

### 3.2.4.2 Abort Indications

An abort indication is generated by the DAS when it loses a connection to the device. The DAS detects that a connection is broken in different ways depending on the type of connection to the device.

For an RS-232 connection, the DAS aborts the connection when an error other than a time timeout is returned from a QIO call or if retries are exhausted. In these cases all connections using this port are aborted. The DAS aborts the connection to an individual device if there is a timeout.

For a Modbus Plus connection, the DAS aborts the connection when any QIO error occurs when reading from the device. In this case all connections using this port are aborted.

For a Modbus TCP/IP connection, the DAS aborts the connection when any I/O error occurs when reading from the device.

Previous | Next | Contents | Index