BASEstartm Open DAS
for Modicon®
on Tru64tm UNIX®
Installation and User's Guide


Previous Contents Index

2.3.1.4 DAS Configuration Files

Example 2_4 and Example 2-5 are samples of the ODS and BSTR configuration files for the DAS for Modicon programmable controllers.

Example 2-4 ODS Configuration File

#! /bin/csh 
#********************************************************************! 
#                                                                    ! 
#    This is a template for the Modicon-specific                     ! 
#    ODS configuration command file.  Rename and edit this command   ! 
#    procedure template to reflect your site-specific                ! 
#    configuration.  You must manually execute this command          ! 
#    procedure to configure ODS to provide line configuration        ! 
#    information for your devices.                                   ! 
#                                                                    ! 
#    Add comments to the site-specific changes here.                 ! 
#                                                                    ! 
#********************************************************************! 
# 
setenv ODSCL /usr/bin/odscl 
# 
#  Register the ODS definitions. 
# 
$ODSCL << _register_end_ 
REGISTER DIRECTORY NAME "/LINE=MODBUS" ATTRIBUTES "OC=MODBUS_LINE/PORT=tty06 
/RETRIES=3/SPEED=9600/PARITY=none/MODEM=0/TIMEOUT=3/TRACE=0" 
 
REGISTER DIRECTORY NAME "/PATH=MOD984_PATH" ATTRIBUTES "OC=MODBUS_PATH 
/LINE_NAME=(/LINE=MODBUS)/SLAVE_ADDRESS=20/TRACE=0" 
REGISTER DIRECTORY NAME "/PATH=MOD884_PATH" ATTRIBUTES "OC=MODBUS_PATH 
/LINE_NAME=(/LINE=MODBUS)/SLAVE_ADDRESS=21/TRACE=0" 
REGISTER DIRECTORY NAME "/PATH=MOD584_PATH" ATTRIBUTES "OC=MODBUS_PATH 
/LINE_NAME=(/LINE=MODBUS)/SLAVE_ADDRESS=22/TRACE=0" 
REGISTER DIRECTORY NAME "/PATH=MOD484_PATH" ATTRIBUTES "OC=MODBUS_PATH 
/LINE_NAME=(/LINE=MODBUS)/SLAVE_ADDRESS=23/TRACE=0" 
REGISTER DIRECTORY NAME "/PATH=MODTCP984_PATH" ATTRIBUTES "OC=MODTCP_PATH 
/IP_ADDRESS=19.20.20.5" 
EXIT 
_register_end_ 

To execute the ODS command file, enter the following command at the user prompt:


/ods/scripts/ods_mod_config.template 

Example 2-5 BSTR Configuration File

! 
!  Create the protocol profile definitions for the Modicon Micro84, 
!  Modicon 184, Modicon 384,  Modicon 484, Modicon 584, Modicon 884, 
!  and Modicon 984 family of programmable controllers. 
!  Protocol profile IDs uniquely identify protocol support to OMNI. 
! 
CREATE PROTOCOL_PROFILE mod_m84 \
 -APPLPROFID 101 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE mod_184 \
 -APPLPROFID 102 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE mod_384 \
 -APPLPROFID 103 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE mod_484 \
 -APPLPROFID 104 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE mod_584 \
 -APPLPROFID 105 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE mod_884 \
 -APPLPROFID 106 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE mod_984 \
 -APPLPROFID 107 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
CREATE PROTOCOL_PROFILE modtcp_984 \
 -APPLPROFID 109 -MAXPDUSIZE 1024 -SMA_MODE ENABLED -LOG 
! 
!  Create VMD definitions. 
!  Use the ODS entries and protocol profile names created earlier. 
! 
CREATE VMD mod_984 -MODEL "Modicon_984" \
                    -VENDOR "Modicon" \
                    -DVM_ACCESS_POINT "/PATH=MOD984_PATH":mod_984 \
                    -DESCRIPTION "Modicon 984 programmable controller" \
                    -LOG 
CREATE VMD modtcp_984 -MODEL "Modicon_984" \
                    -VENDOR "Modicon" \
                    -DVM_ACCESS_POINT "/PATH=MODTCP984_PATH":modtcp_984 \
                    -DESCRIPTION "Quantum Automation Series" \
                    -LOG 
CREATE VMD mod_884 -MODEL "Modicon_884" \
                    -VENDOR "Modicon" \
                    -DVM_ACCESS_POINT "/PATH=MOD884_PATH":mod_884 \
                    -DESCRIPTION "Modicon 884 programmable controller" \
                    -LOG 
CREATE VMD mod_584 -MODEL "Modicon_584" \
                    -VENDOR "Modicon" \
                    -DVM_ACCESS_POINT "/PATH=MOD584_PATH":mod_584 \
                    -DESCRIPTION "Modicon 584 programmable controller" \
                    -LOG 
CREATE VMD mod_484 -MODEL "Modicon_484" \
                    -VENDOR "Modicon" \
                    -DVM_ACCESS_POINT "/PATH=MOD484_PATH":mod_484 \
                    -DESCRIPTION "Modicon 484 programmable controller" \
                    -LOG 
! 
!  Create actors/activities for the VMDs 
! 
CREATE NODE mod_node -PHYSICAL "your_node" -LOG 
CREATE DOMAIN /mod_984 
CREATE DOMAIN /modtcp_984 
CREATE DOMAIN /mod_884 
CREATE DOMAIN /mod_584 
CREATE DOMAIN /mod_484 
CREATE ACTOR /mod -LOG 
SET CONTEXT /mod 
CREATE PROGRAM mod_server -PROGRAM_KIND DATADEV -LOG 
CREATE PROGRAM modtcp_server -PROGRAM_KIND DATADEV -LOG 
CREATE ACTIVITY modbus_984 -PROGRAM mod_server \
                    -NODES (mod_node) \
                    -DOMAINS (/mod_984) \
                    -VMDS (mod_984) \
                    -LOG 
CREATE ACTIVITY modtcp_984 -PROGRAM modtcp_server \
                    -NODES (mod_node) \
      -DOMAINS (/modtcp_984) \
                    -VMDS (modtcp_984) \
                    -LOG 
CREATE ACTIVITY modbus_884 -PROGRAM mod_server \
                    -NODES (mod_node) \
                    -DOMAINS (/mod_884) \
                    -VMDS (mod_884) \
                    -LOG 
CREATE ACTIVITY modbus_584 -PROGRAM mod_server \
                    -NODES (mod_node) \
                    -DOMAINS (/mod_584) \
                    -VMDS (mod_584) \
                    -LOG 
CREATE ACTIVITY modbus_484 -PROGRAM mod_server \
                    -NODES (mod_node) \
                    -DOMAINS (/mod_484) \
                    -VMDS (mod_484) \
                    -LOG 

To execute the BASEstar Open command file, enter the following command at the user prompt:


cli_bstr -f $BSTR_ETC/bstr_mod_config.template 

For more information about maintaining protocol profile and device definitions, refer to the BASEstar Open for Tru64 UNIX Command Language Interface. For more information about maintaining ODS definitions, refer to the Compaq OMNI for Tru64 UNIX Guide to Using Omni Directory Services.


Previous Next Contents Index