0% found this document useful (0 votes)
182 views63 pages

Knowledge Base: Applicom / Direct-Link PC Network Interfaces

Uploaded by

alberto murguia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
182 views63 pages

Knowledge Base: Applicom / Direct-Link PC Network Interfaces

Uploaded by

alberto murguia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Knowledge base

applicom® / Direct-Link™ PC Network Interfaces

a product of Woodhead Software & Electronics

Knowledge base 1 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Knowledge base 2 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Table of contents

1. Knowledge base ............................................................................4


Implementation........................................................................................................4
OPC Server ...........................................................................................................14
DDE/SuiteLink server ............................................................................................50
Switching from a software solution to a hardware solution ...................................54
TCP/IP appendix ...................................................................................................58

Knowledge base 3 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


1. Knowledge base

Implementation
This chapter provides information in addition to the chapter “Implementation”.

Error Messages during Initialization


This article lists the main error messages that you may encounter during the initialization phase,
and it includes some possible troubleshooting options. Some of these messages exist only in a
hardware solution or conversely in a software solution.

Hardware-Related Problems:
Board x fault number XXXXXXXX............
Physical defect on the board. Please contact the applicom international Technical Support
Team.

Board x not installed or configuration error or No signature for board x


Check that the applicom® board is inserted in the bus of your PC
For PC104-type boards, check that the jumper is correctly positioned and that the
memory zone for the board is not already in use.
This message may also appear for a configuration-related problem (see below).

ERROR - INITAP – the dongle is not installed on one of the configured boards.
Dongle-related problem. Please contact the applicom international Technical Support
Team.

Board x prom test OK, but version Vy.z is not compatible or ERROR - INITAP –
minimum required prom version is X.X. Here, prom version Y.Y is installed
The prom version of the board is not sufficient for this version of the software. Please
contact the applicom international Technical Support Team.

Knowledge base 4 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Configuration-Related Problems:
Board x not installed or error in your configuration. Check your configuration.
Check that boards are declared in the console. For PC104-type boards, check in
particular that the declared memory implantation address in the console coincides
with the physically validated address on the applicom® board.
It may be necessary to reboot the machine if you have declared new boards.
Try to resave your configuration and start a new initialization.

ERROR - PCLOAD - file confapli.ap(x) not found


Configuration file problem. Try to resave your configuration and start a new initialization.

Other Possible Problems:


Please close the emulator before starting PCINIT
Close the emulator by giving a right click on its icon in the toolbar.

Cannot initialize the board(s) since applications are using the DLL!
Close all application using the applicom® product.

Messages containing status = 93 or ERROR - INITAP - driver not loaded


If possible, reboot the machine, resave your configuration and try a new initialization.

ERROR - APLOAD - file <file name > not found


One of the files of the applicom® product is missing. Restart the set-up and choose Modify
mode. Ensure that all protocols that you are using have been selected:
If this is not the case, select the protocol and continue with the installation
process.
If this is case, a file has probably been destroyed. Then go back to choose
Repair mode and continue the installation process.

Channel 0 board 1: The protocol … was not ticked during installation. You must
reinstall applicom® and tick the box corresponding to this protocol.
Reinstall applicom® and tick the box corresponding to this protocol.

Knowledge base 5 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


applicom SelfStarting messages in the Event Viewer
Since applicom SelfStarting does not use the user interface, you will not be warned explicitly in
case of any errors (e.g.: display of error message on screen).
The application applicom SelfStarting saves all initialization errors in the text file
APPLICOM.LOG. Also, its uses the system's Events Viewer to save information or the errors
about its own operation.

To consult these operation messages:


Launch the icon Events viewer in the group Administration tools.
Select the Application Event Viewer.
In the list of events, select one of the events from the source applicom SelfStarting and
click on the line selected. An Event detail dialog box is displayed and you can read the
message in the Description part.

Information messages:
The PCINITService was installed.
This message is displayed when you carry out an installation.

The PCINITService was removed.


This message is displayed when you carry out a deinstallation.

The service was started.


This message is displayed each time PCINITService is run.

The service was stopped.


This message is displayed each time PCINITService is stopped by the system.

applicom® interface initialization OK.


PCINITService ends and the applicom® interface (or emulator) initialization is successful.

Error messages:
The PCINITService could not be removed.
You cannot deinstall PCINITService right now.

The initialization process failed.


Cannot initialize the service. Unable to load PCINITService.

The service received an unsupported request.


PCINITService received an unsupported request.

Knowledge base 6 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Can not run the service, mutex <APPLICOM_INIT> used by some application.
PCINITService cannot be loaded since the synchronization mutex is busy.

Can not find APPLICOM.DLL/APINIT.DLL.


PCINITService cannot load APPLICOM.DLL or APINIT.DLL.

Bad file APPLICOM.DLL/APINIT.DLL.


Bad file APPLICOM.DLL or APINIT.DLL.

No version info for APPLICOM.DLL/APINIT.DLL.


Bad file APPLICOM.DLL or APINIT.DLL, cannot obtain the file version.

Bad version number of APPLICOM.DLL/APINIT.DLL (VX.Y).


The version of file APPLICOM.DLL or APINIT.DLL must be greater than or equal to 2.9.

applicom® interface initialization failed. Please consult APPLICOM.LOG.


Cannot initialize applicom® interfaces (or emulator). Consult APPLICOM.LOG for the error
messages.

Knowledge base 7 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Loading additional application tasks
The applicom embedded task development kits enable you, in particular, to develop and download
application tasks run directly in the applicom® core. It is thus necessary to be able to download
these tasks each time the boards are reset. In order to do this, a commands file (if it exists) is
automatically run by the initialization tool at the end of this initialization sequence. This text file,
APPUSR.INI, can be used with your text editor and may contain the following command:

APLOAD No. NAME:

This command is used to load a task in an applicom® interface (No. is the board number, NAME is
the name of the task).

Knowledge base 8 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Saving and Replaying an Initialization Sequence
Concept
The applicom® product is a fully integrated Windows product that comes with a configuration
console and board initialization software. The applicom® product therefore enables you to use
applicom® boards (or emulator in the case of a software solution) installed locally on the MS-
Windows machine. In some special contexts, applicom® boards (or emulator) can also be used:
In MS-Windows-type environments designed for the embedded computing market
(Windows CE, NTE, XPE…).
In various other environments (DOS, Linux, VxWorks, QNX, etc.).

In the above two cases, configuration and initialization tools cannot be used on the target machine.
To remedy this, the applicom® product proposes two options enabling the user to configure and
initialize the boards in any environment:
Initialization via a TCP/IP link. Initialization is carried out via a TCP/IP LAN link between the
machine containing the configuration console and the remote machine containing the
applicom® board. This feature is dealt with in a separate article “Remote use via a TCP/IP
connection”.
Initialization by replaying an initialization file previously generated on a Windows platform.
In this case, the initialization can be replayed as many times as you wish, using a simple
utility for which the source (in C ANSI and thus easily recompiled in the target platform) is
available upon request.

Remark: The solution through a TCP/IP connection has the advantage of enabling automatic
detection of network devices.

Knowledge base 9 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Saving an Initialization Sequence
The file enabling initialization (or download into flash memory) must be generated on a machine
equipped with the following:
MS-Windows (XP, 2003 server or Vista)
An applicom® solution
This process is normally done with an applicom® console and it involves no special difficulties. The
device configuration philosophy is virtually unchanged. Some special features are outlined below.

To generate an initialization file (or download into flash memory), define a “without board”-type
configuration. To do this, open the Configuration Manager (File/Configuration Manager menu).

Knowledge base 10 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


In the configuration properties window, you can change the connection type of the applicom®
boards. Select Without then, the box Save the Initialization to Disk will be automatically checked

After you have selected the new configuration type, you have to restart the console in order to work
with this new configuration.
Once the configuration console has been restarted, the configuration is carried out like a
configuration in simulation mode.

Remark: By default, the “Save the Initialization to Disk” option is checked only for a simulation-
type configuration. However, it is possible to use this process on a local-type configuration (normal
use). Attention: In this case, the boards must be installed on the machine being configured.

Generation of an Initialization File


File generation is done using the normal commands of the console:
Board Initialization
This command generates an initialization file “applicom.ply” in the config\XXXX sub-directory
(where XXXX is the name of your configuration in mode without board). Once the initialization
phase has been completed, the file can be used to initialize applicom® boards (or the emulator)
installed on a remote machine (the installed boards must obviously conform with the declared
boards in the applicom® console).

Knowledge base 11 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Replaying the Initialization File
Initialization of applicom® boards (or emulator) is done by replaying an initialization file previously
generated on a Windows platform. This initialization can be replayed as many times as you want in
any environment by simple porting and recompilation of a utility whose source (in the form of a
Windows NT console application) is available upon request.
As an example, this utility software, known as player.exe (Windows XP, 2003 and Vista), comes
with the applicom® solution package. To start the initialization process from a file, open the player
utility without entering an argument. The utility then enables you to enter the name of the
initialization file.

To obtain the list of arguments accepted by this utility, open it by means of the /? option.

Once the initialization file has been run, the applicom boards will be initialized (in a volatile manner).

Knowledge base 12 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Remote use via a TCP/IP connection
The applicom solution (hardware or software) is also available under a number of environments,
other than the traditional operating systems in the Windows family. You can therefore benefit from
all the features and performance of the applicom product under environments such as VxWorks,
QNX, Windows CE, etc.
When using applicom product in these environments, however, no configuration tools are available
which run directly under these platforms. To carry out the configuration therefore, the entire series
of configuration and debugging tools can be used remotely, via the TCP/IP socket.
So, in the configuration manager when creating a new configuration you can choose remote use,
then specify the address of the target machine. This means you can use the implementation tools
just as though the configuration was being carried out locally.
You can also save and reload a configuration on the target machine. Consequently, it is easy to
reload a configuration made previously to make modifications, from any machine (Desktop,
portable, etc.)

Full detailed explanations concerning remote use via a TCP/IP connection are included in the
documentation supplied with the product dedicated to your environment.

Knowledge base 13 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


OPC Server
This chapter provides information in addition to the chapter “OPC server”

General introduction to OPC

The OPC concept


OPC is a communication standard based on the OLE / COM technology. This technology
constitutes the new means of information exchange recommended by Microsoft between MS-
Windows applications. The COM model is intended to provide interoperability between software
components developed independently by separate editors. This interoperability is independent of
the development languages used. COM can be considered as a “software bus” providing a “Plug
And Play” function between software modules.
COM is based on Client/Server architecture, independent of the development language used, but
“C++ oriented”. In effect, it is a protocol based on function calls (and not on messages like DDE)
through interfaces exposed by objects. An interface is in fact a grouping of logically interconnected
functions.

What is OPC?
OPC is in fact only the specification of a standard. This standard describes the set of objects and
their interfaces which any “OPC server” must implement so as to provide greater interoperability
between checking/control/supervision applications, for industrial equipment (API, sensors,
actuators) and automated office management applications.
The OPC concept is based on the client / server architecture of the COM model. The same client
application can call upon a number of “OPC servers” simultaneously and the servers can be located
either on the local machine or on remote machines (through DCOM, that is, distributed COM).

Knowledge base 14 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Data type returned by the OPC server
The OPC server returns the data to the clients in variant form. The following table shows the
different variant types returned by default when the type requested by the client (requested type of
the specification) is set to VT_EMPTY:

Data type Variant type Limits


Min Max
Bit VT_BOOL 0 1
Unsigned byte VT_UI1 0 255
Signed byte* VT_I1 -128 127
Unsigned word* VT_UI2 0 65535
Signed word VT_I2 -32768 32767
Unsigned double VT_UI4 0 232
word*
Signed double word VT_I4 -231 231
38
Float VT_R4 -3.402823466 3.40282346638
Double VT_R8 1.79e+308 1.79e+308
String VT_BSTR
Array VT_ARRAY|**

*These data types can be sent by the server only after modification of the default formats of the
byte, word or double word type variables. This modification is made using the check boxes of the
Data format section of the Expert tab of the OPC server parameters of the applicom® console.
** Can correspond to each of the usable unit types.

The following table shows the variant types returned when using predefined items:
Predefined item Variant type
READ_ERROR VT_I2
ADVISE_FAILED VT_I2
STATUS VT_I2
NB_POINT VT_I4
NB_TOPIC VT_I4

Knowledge base 15 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


The addition of a display format in the syntax modifies the data type. The following table shows the
variant types used according to the display format:
Format Data type Unit type variant Array type variant (VT_ARRAY|*)
Type returned Type returned

_B VT_* Unchanged Unchanged


_S VT_UI1 VT_I1 VT_I1
_S VT_UI2 VT_I2 VT_I2
_S VT_UI4 VT_I4 VT_I4
_S VT_I1, VT_I2, VT_I4 Unchanged Unchanged
* Can correspond to any of the usable unit types.

Display format modification suffixes


These suffixes modify the format of the data item returned to the client. All the formats are
exclusive. They are made up of a “_” followed by the sign for the format at the item name.
Eg: TOPIC1.W0_B
The following table summarizes all the suffixes available:
Format name Meaning
_S Signed value
_B The value will be converted to BCD format. If the
conversion cannot be performed, the quality associated
with the data item will be bad.

The following table shows the default formats and the suffixes which can be used according to the
data type:
Format
Data type
Default Permitted

Byte (8 bits) _S All


Word (16 bits) Unsigned All
Double word (32 bits) _S All
Float (32 bits) _S _S

Note:
It is possible to modify the default formats of byte, word and double word type variables using the
check boxes in the Data format section of the Expert tab of the OPC server parameters of the
applicom® console.

Knowledge base 16 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Enabling and disabling the Diagnostic mode
When the OPC server is first installed, the diagnostic mode is not enabled. To allow access to the
diagnostic mode:
Open the OPC server parameters configuration box (from the description area tree)
Select the Parameters tab
Enable the Allow the server diagnostic view check box.
When the server is next started up, a contextual menu linked to the icon present in the taskbar will
be accessible, and will allow access to the diagnostic mode.
In certain cases, it may be desirable to not display the icon for the OPC server in the taskbar. To do
this:
Switch the console into Expert mode (menu File/Preferences/Expert mode)
Open the OPC server parameters configuration box (from the description area tree)
Select the Expert tab
Disable the Enable OPC icon in taskbar check box.

Knowledge base 17 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Introduction to DCOM with an OPC Server

Introduction to DCOM
What is DCOM?
Com objects, such as the OPC server, do not necessarily have to be on the same machine as the
client. With DCOM (distributed COM), a client can create and use COM objects both on its own
system as well as on other machines. This means that the components of an application can be
spread over the network.

The COM library


A client does not address an object directly to start it or to use it, but goes via the COM library. The
library is part of the operating system. The COM library manages the information in the registry
base for all known COM objects in the system.

Transparency
For the client, the use of a COM object via DCOM or via the local COM mechanisms is completely
transparent. The operating system, via the COM library, manages the object and determines
whether it must be instantiated according to the configuration associated with the object.

Installation
When implementing the applicom® OPC solution you will have to carry out the following
operations:
Set up a “server station” (under Windows XP, 2003 server or Vista) containing the
applicom® solution that can be accessed, either from a local OPC client (running on the
machine), or from a remote OPC client (running on another machine)
Set up a “client station” (under Windows XP, 2003 server or Vista) and querying a remote
station.

Setting up a “server station”


After installation, the applicom® OPC server can be accessed by any OPC client running on the
local machine. To check, try to connect to the OPC server from the applicom® OPC client utility.
Setting up a “Client station” can be describes by the following sequence:
WindowsFirewall
ConfiguringDCOM
#OPCServerDCOMSetting

Setting up a “client station”


The package of the “OPC server” includes a file AppOpcServer.reg allowing the server to be
registered in the client station in the registers database, thus allowing it to be configured in the utility
dcomcnfg.
To register the OPC server, include the file AppOpcServer.reg in the register database by double-
clicking the file.

Knowledge base 18 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Setting up a “Client station” can be describes by the following sequence:
WindowsFirewall
ConfiguringDCOM

Windows Firewall
The Windows firewall allows traffic across the network interface when initiated locally, but by default
stops any incoming “unsolicited” traffic. However, this firewall is “exception based, meaning that the
administrator cans specify applications and ports that are exceptions to the rule and can respond to
unsolicited requests.

The firewall exception can be specified at two main levels, the application level and the port and
protocol level. The application level is where you specify which applications are able to respond to
unsolicited requests and the port and protocol level is where you can specify the firewall to allow or
disallow traffic on a specific port for either TCP or UPD traffic. To make any OPC client/server
application work via DCOM, changes need to be made on both levels.

Knowledge base 19 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Configuring the firewall

1. By default the windows firewall is set to “On”. This setting is recommended by Microsoft and by
OPC to give your machine the highest possible protection. For trouble shooting, you may which to
temporarily turn off the firewall to prove or disprove that the firewall configurations is the source of
any communication failure.

Note: if may be appropriate to permanently turn off the firewall If the machine is sufficiently
protected behind a corporate firewall. When turn off, the individual firewall settings outlined here
need not to be performed to allow OPC communication.

Knowledge base 20 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


2. Select the “Exceptions” tab and add all OPC Clients and Servers to the exceptions list. Also add
Microsoft Management Console (used by the DCOM configuration utility in the next section) and the
OPC utility OPCEnum.exe found in the Windows\System32 Directory.

Knowledge base 21 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


In the Add a Program dialog, there is a listing of most of the applications on the machine, but note
that not all of them show up on this list. Use the “Browse” button to find other executables installed
on the computer.

Note: Only EXE files are added to the exceptions list. For in-process Clients (DLLs and OCXs) you
will need to add the EXE applications that call them to the list instead.

Knowledge base 22 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


3. Add TCP port 135 as it is needed to initiate DCOM communications, and allow for incoming echo
requests. In the Exceptions tab of the windows Firewall, click on Add Port.

In the Add a Port Dialog, fill out the fields as follow:

Name: DCOM
Port number: 125

Knowledge base 23 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Choose the TCP radio button

DCOM Enhancements
“Service Pack 2 for Windows XP” and Vista has also made some security enhancements to DCOM;
two in particular need to be taken into consideration when using OPC on a network: First, the
default Launch and Access permissions dialogs have been modified to allow the user to configure
.limits on the permissions given to applications using DCOM. Secondly, for each user now defined
in the Launch and Access permissions, both local and remote access can be explicitly defined.

A brief background on default Launch and Access permissions in DCOM: Launch permissions
define who can launch a COM based application (such as an OPC server) both over the network or
locally. Access permissions define who can access that application once it has been launched.
Applications can get their Launch and Access permissions from one of three places: they can use
explicitly defined setting for their application, they can use the default permissions or they can set
their own permissions programmatically. Because an application could set its own permissions
programmatically, the explicitly defined or default settings, although set properly, may not be used
and therefore the user is not able to explicitly have control over these settings. To overcome this
security flaw, Microsoft has added “limits” to the DCOM security settings from Launch and Access
to limit the permissions that an application can use. This limit prevents the application from using
permissions beyond what is specified in the DCOM configuration settings. By default the limits set
by “XP Service Pack 2” and Vista will not allow for OPC communications over the network.

Knowledge base 24 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


In addition to the new permissions limits, one must now specify if the user or group specified has
permissions locally or remotely (or both). In order for OPC applications to work over the network
with DCOM, the permissions must be set such that remote users can launch and/or access the
OPC servers and clients on the machine.

Configuring DCOM
The program “DCOMCNFG”
Before a client can use a COM object on another machine, the properties of the COM object must
be configured on the client machine and on the remote machine. DCOM and the COM objects used
are configured by using the dcomcnfg program. After starting the program, for example by entering
the command dcomcnfg in the Run dialog box (Start menu), four tabs are available for the DCOM
configuration.

Note:
If you reduce the security parameters, you will still have to restart the system so that they are taken
into account.

Caution:
The screen dumps were made under Windows XP SP2, there may be some slight changes
between screen shoots done with Vista and 2003 Server.
Only the tabs which have to be modified are described.
The parameters specified in this documentation simply guarantee that the DCOM protocol can be
started. However, most Windows security parameters have been reduced. To obtain a higher level
of security, you must strictly respect a configuration in compliance with the DCOM principles. For
further information, refer to articles Q176799, Q158508 and Q169321 in the “Microsoft Knowledge
Base”.

Knowledge base 25 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Configuring the general DCOM properties on the server and client machines

Under Windows XP SP2, the utility dcomcnfg takes the following form:

To obtain the general properties configuration box, select the node “My Computer” in the tree
under \Console Root\Component Services\Computers\, then choose the Properties option in the
menu with a right click or in the Action menu.

Knowledge base 26 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“COM Security” tab

Do not use this tab. The OPC server rights will be set individually later on.
The following default rights can be set to use DCOM. These rights can be set individually for each
object and these default properties will then be ignored.

6. Edit the Limits for Access and Launch


a. Access Permissions. Edit Limits...
You need to check the Remote Access box for the user labeled ANONYMOUS LOGIN in this
dialog.

Note: This setting is necessary for OPCEnum.exe to function and for some OPC Servers and
Clients that set their DCOM 'Authentication Level' to 'None' in order to allow anonymous
connections. If you do not use OPCEnum you may not need to enable remote access to
anonymous users

Type of right Information


Access Permissions The Access Permissions are used to specify for all COM objects the user accounts which
can access the object, in other words, call its methods.
Launch and Activate The Default run rights are used to specify for all COM objects the user accounts which can
Permissions create a new instance of the object.

Knowledge base 27 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Launch and Activation Permissions . Edit Limits...
You need to check the remote boxes for the user labeled Everyone in this dialog.
Note: Since Everyone includes all authenticated users, it is often desirable to add these
permissions to a smaller subset of users. One suggested way to accomplish this is to create a
group named .OPC Users. and add all user accounts to this group that will execute any OPC
Server or Client. Then substitute OPC Users everywhere that Everyone appears in these
configuration dialogs.

Knowledge base 28 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Edit Default Permissions for Access and Launch
For each user (or group) that participates in OPC communication (e.g. .OPC Users.), make sure
that both the Local Allow and Remote Allow checkboxes are both checked.
Access Permissions per user:

Launch and Activation permissions per user:

Knowledge base 29 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Default properties” tab
The Default properties tab is used to specify the basic DCOM properties.

To use DCOM with the OPC server:


check Activate distributed COM on this computer
set the parameters to:

Type of network controller Authentication level ID adoption level


Workgroup (no domain server available for the authentication) None Anonymous
Domain server Connection Identifier

“Default security” tab


The Default security tab is used to specify the rights for the DCOM operations. These parameters
certify that only the clients with the necessary rights can use the server.

Knowledge base 30 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Configuring DCOM for an individual OPC Server
Follow these steps to configure DCOM for a specific COM server for OPC communications using
Windows XP Service Pack2:

1. Go to Start -> Run and type DCOMCnfg and click on OK.

2. Click on Component Services under the Console Root to expand it.


3. Click on Computers under Component Services to expand it.
4. Right click on My Computer in the pane on the right and select Properties.
5. Double Click DCOM Config.

Knowledge base 31 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


6. Select the applicom OPC Server, right click the selection and then click Properties

7. In the server property page select the “security tab”

Knowledge base 32 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


8. Edit the server permissions settings. Select Customize and click the Edit button.

Now repeat the configuration for OpcEnum.

Knowledge base 33 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Applications” tab
The Applications tab displays all the COM objects available from the machine.

Select the applicom OPC Server and click on the Properties … button to start the configuration of
the parameters specific to the OPC server.

Knowledge base 34 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Configuring the applicom OPC Server on the server machine
“General” tab
In the General tab you can change the authentication level of an object.

For the OPC server, leave this property set to default

Knowledge base 35 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Position” tab
The Position tab is used to specify the machine on which the server is started.

On the server station, select Run the application on this computer.

Knowledge base 36 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Identity” tab
The parameters of the Identity tab specify which accounts will be used to check the user's rights on
the object.

Several possibilities are available:

Type Action
Interactive user This is the recommended default choice for the applicom® OPC server.
The user account which opened the current session is used. If, however, no user is logged on
the machine, there is no interactive user and the COM object cannot be created. In this case,
select This user.
The running user The user account which started the OPC client is used. This user must then have the necessary
rights, and therefore belong to the Security tab. This mode generally results in the starting of a
server instance for each user running. This option must not be used with the applicom®
OPCserver.
This user The user account indicated is used. This user must then have the necessary rights, and
therefore belong to the Security tab. The user must have the default rights allocated to the
Users group of the machine, in other words, must belong to the Users group. This choice must
be used for the servers where no user is logged on.

Knowledge base 37 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Security” tab
You can specify the access rights for the applicom® OPC server from the Security tab. For the
three security aspects used by DCOM, you can either:
use the default rights
In this case, the account configured in the Identity tab must have the necessary rights in the Default
security tab (default access rights, default run rights).
use customized rights for the selected object
If you do not want a particular user to be able to access all COM objects available, you must use
customized rights.

To work with the OPC server, only the access rights and the run rights have to be configured:

Knowledge base 38 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Choose Use customized access rights
Press Modify and set the following rights:

Then choose Use customized run rights


Press Modify and set the following rights:

Note:
On the server machine as well as on the client machine, the accounts of the two persons logged on
must exist.
Example: The A user is logged on the machine hosting the server and the B user is logged on the
machine hosting the client. To use DCOM, a B account must exist on the server station (with the
same password as on the client machine) and an A account must exist on the client station (with
the same password).
If you work with a domain, you are recommended to use a group including the user accounts. The
rights are then managed from the domain server.

Knowledge base 39 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Configuring the applicom OPC Server on the client machine
For the client part, the following screen dumps propose a simple configuration to use the
applicom® OPC server via DCOM

“General” tab

Knowledge base 40 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Location” tab

Knowledge base 41 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Identity” tab
In the Identity tab you can specify the user account which will be used for the client machine. It is
logical to specify Interactive user, in other words, the user logged on the machine.

Knowledge base 42 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Security” tab

Access type: Allow access

Knowledge base 43 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Access type: Authorize start

Knowledge base 44 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


OPC Client in the Form of a Service
This article proposes a configuration possible allowing access to the OPC server from an OPC
client running as Windows service.
The program “DCOMCNFG”
Start the DCOMCNFG program in “Windows\System32” directory, for example by typing the
“dcomcnfg” command in the Run box of the Start menu. Four tabs are available.

Remark
Under Windows XP, the DCOM configuration utility DCOMCNFG is slightly different from that
present on a Windows 2000 or NT4 workstation. Refer to paragraph “DCOM configuration”

The Applications tab


The Applications tab displays all the COM objects available on your system.

Select applicom OPC Server.


Press the Properties button. A new properties box then opens, in order to configure the OPC
server.

Knowledge base 45 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Identity” tab
This tab is used to indicate the identity of the person whose rights will be tested by the system when
accessing the COM object.

Choose This user


Enter the name and password of a user with administration rights on the machine.

Knowledge base 46 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


“Security” tab
This tab is used to define which users have the right to load the OPC server and access it.

Choose Use customized access rights

Knowledge base 47 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Press Modify and set the following rights:

Then choose Use customized run rights


Press Modify and set the following rights:

Caution:
The screen dumps were made on a French Windows 2000 station. They may be different on
another system.

Knowledge base 48 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Equipment redundancy feature through OPC
The applicom OPC server allows the client application to manage a redundancy feature at the
equipment level. In this context, through the same variable image topic, the application can switch
all the communication requests from a physical device to another one of a same type. These two
physical devices can be connected
Either to the same applicom channel
Either to two different channels of the same applicom board
Either to two different channels of two different boards (however, the boards must
imperatively be located in the same computer)

This functionality can be activated by using a file: swap.ini. The structure of the file is defined as
followed:
[PRIMARY_TOPIC_NAME] This topic name has to correspond to a topic configured by the
normal way in the applicom console. At start of the OPC server, the parameters of this topic will be
used by default
Access Path for the secondary equipment (described as CARDx CHANNELy EQUIPEMENTz)
Card =x
Channel =y
Equipment = z

Example: A topic named “MYPRIMARY” has been defined in the topic configuration module of the
applicom console. This targeted equipment is corresponding to: Card 1, channel 0, equipment 1.
The secondary equipment is corresponding to: Card 1, channel 0, equipment 2
The swap.ini file is so formatted:
[MYPRIMARY]
Card =1
Channel =0
Equipment = 2

The OPC client application is always responsible for the switch between the primary and the
secondary equipment. To perform this operation, a particular item is available on each topic defined
in the swap.ini file: EQU_CHANGE
value = 0: primary equipment targeted
value = 1: secondary equipment targeted
In the case of our example, the OPC client can so use the ItemID: MYPRIMARY.EQU_CHANGE

Note:
When the EQU_CHANGE item is written by the application to switch the targeted equipment, some
communication requests can be at this moment ready to be sent. It’s so possible that during a short
time, few requests will be still transmitted to the previous targeted equipment.

Knowledge base 49 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


DDE/SuiteLink server
Example of using PCDDE

Using the PCDDE server with InTouch® 7.0 (Wonderware FactorySuite)


This chapter illustrates the interfacing of the PCDDE server with Intouch® software. To access an
Item in a device from InTouch®, a DDE access name must be defined for each device.

To define a DDE access name, select the command /Special/access names... (in WindowMaker).
The following dialog box is displayed:

Click on Add…The following dialog box is displayed:

Note: If New is selected, this dialog box will be empty the first time it is displayed. Data has been
entered to illustrate input possibilities.

Knowledge base 50 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Parameters description
Access Name Enter a name which will be used by InTouch® as definition of tagname in reference to the
topic (device). You are recommended in this case to use the same name as that
configured as topic in the applicom® PCDDE server.
Node Name For use in network, enter the name of the node containing PCDDE.
Application Name Enter the PCDDE “Application name”, designating the name of the DDE server program to
be used to access the devices.
Topic Name Enter the name of the topic configured in the applicom® PCDDE server to identify the
device which will be accessed by the Server.

Note: This will generally be the same as the “DDE Access Name”. If you want, however,
they can be different. In all cases, the “DDE Topic Name” must have the same name as
that defined by the PCDDE server application (for further details, refer to Configuring a
standard topic name).
Which protocol to Select the protocol used for the exchanges between InTouch® and PCDDE.
use
When to advise The option “Advise only active items” enables the DDE server to poll only the points in the
server active Windows and the points concerning the alarms, the logic and the trend curves.
Although this choice guarantees maximum performance, it must not be selected
systematically. This choice has the opposite effect for an application where the Windows
on screen switch rapidly. In this case, “View” permanently issues “advise” and “unadvise”
instructions, and in this case the PCDDE server spends most of its time calculating frame
optimization, resulting in a significant drop in performance.

To define the tagname associated with the new “Access Name” select the command
/Special/Dictionary... (in WindowMaker). The dialog box “Tagname Dictionary” is displayed:

Click on New and enter the “Tagname” (The “tagname” defined here is the one that InTouch® will
use). The DDE server does not see this name.

Knowledge base 51 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Select a variable type by clicking on the corresponding button. The dialog box “Tag Types” is
displayed:

To access the device Items, the type must be Discrete, Integer, Real or Message. Select the DDE
variable type.

The dialog box “Details” for the tagname is displayed (if the check box “details” is active):

Knowledge base 52 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Select the topic (device) by clicking on the button Access Name... The dialog box “Access Names”
is displayed:

Select the correct topic name and click on “Done”. (If the topic Access Name was not defined as
described previously, click on “Add...” and define the topic DDE now)

Enter the name of the item to be associated with this tagname in the Item field of the “details” box.
(Refer to the section item (Point) Naming for detailed information).

If you valid the check box “Use TagName as Item Name” then the field Item Name takes the same
value as that defined in Tagname.

Note:
In this case, the parameter tagname must respect the syntax defined in the section Item name.
Once all the values have been entered, click on the Save button at the top of the dialog box to
accept this tagname. To add a new tagname, click on the “New” button. To return to
WindowsMaker® main screen, click on the “Done” button.

Allowing closure of the server during connections


If connections are in progress between a client application and the DDE/SuiteLink server, it is not
possible to close the server. A message appears each time this is attempted to inform the user that
DDE links are still active.
Nevertheless, this restriction can be removed. To do this:
Switch the console into Expert mode (menu File/Preferences/Expert mode)
Open the DDE/SuiteLink server parameters configuration box (from the description area
tree)
Select the Expert tab
Enable the Allow to close server even during client connection check box
However, a message will always warn the user before closure.

Knowledge base 53 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Switching from a software solution to a hardware solution
Going from a software solution to a solution on an applicom® board is a simple process, you just
have to launch the applicom® installation program.

Your OPC client application using the applicom® OPC server with the software solution can run
without modification with the applicom® board solution. The topics and items configuration remains
unchanged and all features are of course available in a compatible manner.

Remark: the opposite operation, i.e. going to a software solution from a solution on an applicom®
board, is carried out in the same way. Since some features are available only with the hardware
solution, there may be minor compatibility problems.

Switching to the hardware solution


Prerequisite:
the software solution is already installed on the machine.

Remark: To install the hardware solution (with an applicom® board) on a machine not containing
the software solution, refer to applicom documentation.

Follow these steps:


Open an administrator session.
Run SETUP.EXE in the applicom® CD-ROM root. The setup will propose you to uninstall
the software solution (PC Network Interfaces).

Accept the uninstallation.

Once the software is installed, install the applicom® board by consulting the applicom®
help section “Installing hardware”, from applicom documentation.

Knowledge base 54 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Updating the configuration
Once the applicom® board is installed, open the Console. The following message
appears:

Click on OK to convert the configuration. The configuration with SW1000ETH or SW1000SER


software solutions will be converted to a configuration for applicom® PCI2000ETH and
PCI1000 boards, respectively. You can subsequently modify the type of board configured in the
Console. At the end of conversion, the following message appears:

Restart the Console and select the channel.


In the case of PPI Master and PROFIBUS protocols, the equipment previously configured
will not be converted and so must be recreated. For other protocols, the equipment previously
configured for the software solution remains configured (consult the on-line help for these
protocols for more details).

Knowledge base 55 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


In the case of a serial port configuration, if necessary configure the interface module on
the applicom® board by double-clicking on the channel node (consult on-line help for more
details).

For an Ethernet channel configuration, double-clicking on the channel node opens the
Channel properties. dialog box. In the settings, enter the type of connection (consult on-line
help for more details).

Knowledge base 56 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Then double-click on the TCP/IP node to access the TCP/IP dialog box. Enter the IP address of
the board (consult on-line help for more details).

Save and close the Console.


Reboot the machine: the switch to the hardware solution is complete.
Initialize the applicom® board with Pcinit, test the industrial communication with the
available test tools (diagnostic tool for the Profibus protocol and the Ethernet channel, Readwait,
etc). If there is a problem, use the applicom help.

Knowledge base 57 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


TCP/IP appendix
IP address

Each interface on a TCP/IP network or sub-network must have a unique IP address.

Determination of this address depends on the network type:


open type network (e.g.: Connected to the worldwide Internet), the address or set of
addresses must be issued by an authorized organization in the country where the network
is installed,
closed type network (network internal to the company), the addresses are issued by the
network administrator.

An IP address is represented on 4 bytes (or 32 bits. It is composed of:


a network identifier,
a machine identifier.

Using these two identifiers, the IP addresses can be divided into 5 different classes:

Class A: 128 networks and 16777216 stations

0 network id 7 bits station id 24 bits

Class B: 16384 networks and 65536 stations

1 0 network id 14 bits station id 16 bits

Class C: 2097152 networks and 256 stations

1 1 0 network id 21 bits station id 8 bits

Class D:

1 1 1 0 multicast group id 28 bits

Class E:

1 1 1 1 0 reserved for future use 27 bits

Which gives us in pointed decimal notation:

Class Range
A 0.0.0.0 to 127.255.255.255
B 128.0.0.0 to 191.255.255.255
C 192.0.0.0 to 223.255.255.255
D 224.0.0.0 to 239.255.255.255
E 240.0.0.0 to 255.255.255.255

The choice of an internal address will therefore depend on the number of stations on this network; a
class C address is generally sufficient.

Knowledge base 58 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Special case: “loopback” destination address 127.0.0.1, this address can be used to test the
TCP/IP layer. A packet with destination address 127.0.0.1 will not leave on the network, the packet drops
down to the IP layer then goes straight back to TCP.

Sub-network mask

Class A and B addresses include a large number of machines which are represented respectively
on 24 and 16 bits. It is therefore recommended to divide the machine identifier into sub-network identifier
and machine identifier.

For example, for a class B address:

1 0 network id 14 bits sub-network id 8 bits station id 8 bits

This breakdown authorizes 254 sub-networks, with 254 machines per sub-network.

The network mask can be used to specify the bits forming the sub-network mask.
This mask is a 32 bit word containing bits set to 1 for the network and sub-network identifiers, and
bits set to 0 for the machine identifier.

Example for a sub-network mask with class B address:

network id sub-network id machine id


16 bits 8 bits 8 bits
11111111 11111111 11111111 00000000

I.e. a sub-network mask of 255.255.255.0

Using its IP address and the sub-network mask, a machine can determine whether a packet is
intended for:
a machine on its own sub-network,
a machine on another sub-network (use of the gateway IP address),
a machine on a different network (use of the gateway IP address).

Example:
The gateway at IP address 140.152.3.25 with a sub-network mask of 255.255.255.0.
The address is therefore class B with a network ID of 140.152, a sub-network id of 3, and a
machine id of 25. The following equipments must be polled:
• Equipment 1 with address 140.152.7.10: identical network id (140.152), different sub-network id (7) =>
use of the gateway.
• Equipment 2 with address 140.152.3.20: identical network id (140.152), identical sub-network id (3),
different machine id (20) => sent directly to the equipment.
• Equipment 3 with address 194.204.26.43: different network id (class C) => use of the gateway.

Gateway

The TCP/IP IP layer (layer 3) can be used to change network or sub-network via a dedicated
machine called a gateway or router. This machine must have at least two links on two different
networks.
When the destination address is on a different network, IP therefore uses the gateway IP address
to send the packet. This gateway handles this packet completely and returns it on the destination
network.

Knowledge base 59 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Example, transfer to an internal sub-network:

The request intended for equipment 2 with address 140.152.7.10, is sent to the gateway
140.152.3.1 (transfer from network 140.152.3 to 140.152.7). The gateway returns the request to
equipment 2, which answers using gateway 140.152.7.1.

Knowledge base 60 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Time-out TCP

The TCP/IP protocol supplies a reliable transport layer, i.e. it manages the time-out and retry
procedures for packet acknowledgment.
The maximum number of retries is 12, and the time-out between each retry is variable. Initially, this
time is calculated using an estimation of the “d’return” time of a packet on the connection then increases
with the number of attempts exponentially up to a limit of 64 seconds, which generally produces:

We soon see that the wait time to know that a packet has not been acknowledged can be very long:
542.5 seconds, i.e. over 9 minutes. The gateway allows you to configure:
The number of retries,
The maximum interval between two retries.

To simplify the time-out calculation, it is easier to set the maximum interval between two retries to 1
second and then adjust the number of retries, by default the gateway uses 2 retries, which gives you a
time-out of about 3 seconds.
On very disturbed or very saturated networks (load greater than 30 %), it is recommended to set 4
retries.

Connection servicing

The TCP connections can be serviced with the “connection servicing” function in TCP/IP “Advanced
parameters” of (generally called “keep alive”). This servicing is used to keep the connection alive even if
there is no data circulating. Also, if the partner equipment no longer responds to this servicing, the
connection is automatically deleted.

The gateway can be used to validate or not this operating mode. The operating mode
characteristics (which cannot be modified) are:
Servicing frequency: 30 seconds
Retry frequency: 20 seconds
number of tries if no response: 8

Knowledge base 61 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


TCP/IP extended statuses

The extended statuses for TCP/IP are used to refine the statuses related to the protocol, they can
be accessed with the utility “Diagnostics TCP-IP & ISO” by validating “Expert mode”.

1035 Ressource temporarily unavailable


1036 Operation now in progress
1037 Operation already in progress
1038 Socket default
1039 Destination address required
1040 Message too long
1041 Protocol wrong type for socket
1042 Protocol not available
1043 Protocol not supported
1044 Socket type not supported
1045 Operation not supported
1046 Protocol family not supported
1047 Address family not supported by protocol family
1048 Address already in use
1049 Impossible address
1050 No network
1051 Network is unreachable
1052 Network dropped connection on reset
1053 Software caused connection abort
1054 Connection reset by peer
1055 No buffer space available
1056 Socket is already connected
1057 Socket is not connected
1058 Can't send after socket shutdown
1061 Connection refused
1064 Host is down
1065 Host is unreachable

Knowledge base 62 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.


Knowledge base 63 08/02/2008

Copyright © 2006 Woodhead Software & Electronics. All rights reserved.

You might also like