Knowledge Base: Applicom / Direct-Link PC Network Interfaces
Knowledge Base: Applicom / Direct-Link PC Network Interfaces
Implementation
This chapter provides information in addition to the chapter “Implementation”.
Hardware-Related Problems:
Board x fault number XXXXXXXX............
Physical defect on the board. Please contact the applicom international Technical Support
Team.
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.
Cannot initialize the board(s) since applications are using the DLL!
Close all application using the applicom® product.
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.
Information messages:
The PCINITService was installed.
This message is displayed when you carry out an installation.
Error messages:
The PCINITService could not be removed.
You cannot deinstall PCINITService right now.
This command is used to load a task in an applicom® interface (No. is the board number, NAME is
the name of the task).
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.
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).
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.
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).
Full detailed explanations concerning remote use via a TCP/IP connection are included in the
documentation supplied with the product dedicated to your environment.
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).
*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
The following table shows the default formats and the suffixes which can be used according to the
data type:
Format
Data type
Default Permitted
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.
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.
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.
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.
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.
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.
Name: DCOM
Port number: 125
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.
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”.
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.
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.
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
Select the applicom OPC Server and click on the Properties … button to start the configuration of
the parameters specific to the OPC server.
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.
To work with the OPC server, only the access rights and the run rights have to be configured:
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.
“General” tab
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”
Caution:
The screen dumps were made on a French Windows 2000 station. They may be different on
another system.
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.
To define a DDE access name, select the command /Special/access names... (in WindowMaker).
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.
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.
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):
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.
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.
Remark: To install the hardware solution (with an applicom® board) on a machine not containing
the software solution, refer to applicom documentation.
Once the software is installed, install the applicom® board by consulting the applicom®
help section “Installing hardware”, from applicom documentation.
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).
Using these two identifiers, the IP addresses can be divided into 5 different classes:
Class D:
Class E:
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.
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.
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.
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.
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.
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
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”.