Automation Studio OPC Guide
Automation Studio OPC Guide
User’s Guide
Famic Technologies Inc. All rights reserved.©
REPRODUCTION
The acronym OPC stands for “OLE for Process Control”. The OPC standards allow Process
Control data communication. Its creation is the result of collaboration between
automation leaders and Microsoft.
There are actually seven OPC standards involving different aspects of process control.
Automation Studio™ is compatible with the data access standard, the advantages are:
● A large variety of equipments supporting this standard;
● The communication protocols between the server and the equipment are red so
the client application does not need to know the nature of the links between
them. The access is then made easier because of the accessible resources
through the OPC Server.
DECIMAL variables are not supported in the Automation Studio ™ OPC module.
Chapter 2 OPC Client: This chapter will introduce features used by the Automation Studio™
OPC client which allows access to API and databases configured on any compatible OPC
server.
Chapter 3 OPC Server: This chapter will demonstrate how to use Automation Studio as an
OPC server. In this case, the variables listed in the variables manager can be read or
written to through an OPC client application.
The wiring and the configurations of the equipment and the OPC Server are not within
the scope of this document. Please refer to the equipment’s manufacturer and the OPC
server referenced documents for further details.
1-2
2 OPC Client
The OPC module allows the user to build links between different Automation Studio™
elements (components, variables and SFC elements) and PLCs (Programmable Logic
Controller) through an OPC server.
All following functions are now accessible from the “Communication Manager”
instead of from the “Variable Manager”.
This section introduces configuration features of the Automation Studio ™ OPC client
allowing the configuration of items accessible from the OPC server.
The setup and configuration of the OPC server are not covered in this document. Please
refer to the equipment manufacturers and documentation produced by the OPC server
developers.
Many trial and free versions of OPC servers can be found through the internet. The
PLC manufacturers will recommend the most suitable options on the market.
2.1 Interfaces
This section covers the configurations necessary in order to setup a communication
between Automation Studio™ and one or multiple OPC servers.
Different interfaces allow the configuration of settings needed for an OPC client:
● Servers;
● Groups;
● Liens;
● Items.
These interfaces are accessible through the “OPC Client” Tab from the “Variables
Manager”..
The variable manager must be first open. You access it from the ribbon “Tools” Tab ->
“Management” Group.
2-2
OPC Client
Please refer to the Automation Studio™ User’s Guide for more details about the
variable manager.
To access all commands related to the servors, groups and OPC items, you first have to
configure the variable manager’s display by clicking the “Options…” command .
In this window, you can personnalize the display by adding the commands you need.
Select “Commands displayed in the toolbar” , choose the commands you need and
displace these commands with the arrow from the “Available” to the “Selected” group.
Click Apply. You will then be able to see these commands displayed in the toolbar.
If your license does not include the OPC module then this tab will be greyed out.
For more details about your licenses, click on the “Tools” tab, “Administration”
Group then “Licenses”.
Automation Studio™ can connect to one or multiple servers simultaneously. The sub
“Servers” tab of the “OPC Client” tab allows managing the servers list of the current
project.
2-4
OPC Client
Figure 2-6: “Variable Manager” Dialog Box, “OPC Client” tab and “ Servers” sub tab.
Column Description
Column Description
detailed status will appear when the cursor is placed on the server’s
tree icon.
Current Time Date and time of the last communication between the server and
Automation Studio™.
2-6
OPC Client
OPC servers can be installed on the same computer as Automation Studio™. You must
perform a search on the local machine in order to identify all available OPC servers and
select one that will be added to the list of servers within your project.
Click on “Add OPC Server” in the variable manager toolbar. The “Add OPC Server”
dialog box opens:
Figure 2-7 : Dialog box « Add OPC Server » for a local search
Choose the desired server type (v2.x, v3.x or both) and radio button “Local”;
Select the server that appears under “Found OPC Servers” then click on .
2-8
OPC Client
Found OPC servers This area displays the results of the server
search. To select a server, click on the
corresponding row in the list.
The OPC server can be installed on a remote computer but needs access to the same
network as the computer which has Automation Studio™ installed on. The remote
computer needs to be configured with proper DCOM settings and communicate through a
TCP/IP network. To properly configure those computers, please refer to the Microsoft
online help (MSDN).
From the “Add OPC Server” dialog box, you must perform a search on the remote
computer to identify all OPC servers and select one to be added in to the project.
Figure 2-8 : Dialog Box “Add OPC server” for a search on a remote machine
Once the “Remote” radio button is selected then the IP address field becomes editable.
Once the search completed, select the server that appears in the “Found OPC servers” list
then click on .
Ensure that the selected server is available. If the server is not responding or there is a
connection issue, the message “Server Busy” will appear. Wait a few seconds then retry
again. Also make sure that the DCOM permissions are configured properly.
Through variable groups, you can configure settings that influence data access. Accesses
to different variables can all be referred to the same group if you want them to have the
same access settings.
Several groups of access can be also defined, each with specific parameters.
Each link between OPC items and Automation Studio™ variables must belong to a
group.
The “Groups” sub tab from the “OPC Client” tab allows management of the access
2-10
OPC Client
groups.
Remove OPC Group This button allows removing a group from the
list.
Column Description
A tooltip details the status of the group when the mouse cursor is
placed over the icon. A detailed status is also given when the
cursor is over the icon in the server tree en the left pane.
Name Group name as entered within the panel. This name must be
unique among all OPC groups of the project.
2-12
OPC Client
Column Description
Items Field allowing selecting the items list used for the
group.
Deadband Lets you set the threshold required for the OPC server
or the API considers a data update.
Refresh Rate Allows you to set the refresh rate of the data read
from the server or written to the server.
2-14
OPC Client
Keep Alive Allows you to set the period during which the group
remains connected even if the server is not
responding.
It is essential to add at least one group to the list. To do this, click on “Add group”
and enter the parameters of the new group in the detailed panel
Once the OPC servers are discovered, added to the list and the access groups are created,
the last step is to link the Automation Studio™ variables to the items available on the OPC
server.
This is accomplished through the “OPC Client” tab “Links” sub tab of Variables
Manager:
Field Description
Filter
2-16
OPC Client
Variable
list
Address
Filter
Cumulative When this box is checked, the filter criteria for the
Filter OPC items will stack. The search results must meet
all these criteria.
OPC items This tree list allows you to set the read/write mode
list of any Automation Studio™ variable.
2-18
OPC Client
The configuration panel can be hidden. In order to have a better display of the
configuration group, extend the display area.
The group used must be “Active”. Refer to section 2.1.2 Managing Variable Groups
for further details.
2. If necessary, set a filter to facilitate the selection of variables and OPC items.
Representations of the selected variables are displayed at the bottom of the list. A
bound variable cannot be linked again.
Select the type of link (Read or Write) through the radio buttons.
1. Click on in order to create the link. The link will be added to link’s list as
displayed below.
The “Variables” tab from the variable manager displays the OPC links created in the
project.
2-20
OPC Client
To remove a link, select the link from the OPC client tab then click on the “Delete Link”
button .
The list of OPC items are read when Automation Studio™ connects to the server. If the
OPC server is reconfigured then the OPC link list will also change.
The “OPC Client” tab “Items” sub tab allows you to view added or deleted Items. .
List of OPC items List of all group of items within the project.
list
2-22
OPC Client
Filter
Cumulative Filter When this box is checked, the filter criteria for the OPC
items will stack. The search results must meet all these
criteria.
This will update the list of OPC items according the most
recent settings.
OPC Items List This tree list allows you to view the OPC items belonging
to a set of items selected within the top of the dialog
box.
Note that for the following example you may use any OPC DA server. The name of the
server will vary depending on your network.
2-24
OPC Client
5. Click on the button of the “Tools” ribbon bar in order to access the Variable
Manager;
8. Click on the button in order to open “Add OPC Server” dialog box (Figure 2-7 :
Dialog box « Add OPC Server » for a local search) ;
By default, the application searches for OPC servers available locally on the
computer but it is possible to search for an OPC server located on a remote
computer. Refer to section 2.1.1.2 Adding a Remote Server for further details.
11. Click on the button , the dialog box OPC Servers is refreshed.;
2-26
OPC Client
2-28
OPC Client
Since the variable “VAR_PROX” is transmitted to other variables, the “read” radio
button is greyed out.
4. Choose the OPC item to which variable you wish to link it.
Ensure that both selected variable and items have the same access type (Boolean,
Integer, Real, etc).
5. Click on the link button . The link is created and appears in the list of links.
6. Click on the Automation Studio™ variable “VAR_PROJECT”;
Since “VAR_PROJECT” is a global variable then the radio buttons “Read”, “Write”
and “Read/Write” are selectable.
7. Select the “Read” radio button and the OPC item to which you want to link the
variable;
2.2.4 Simulation
Automation Studio™ must be launched in order to communicate with the OPC server and
update its variables. The schematic will simulate accordingly to the refreshed OPC items
values. Similarly, the equipment connected through the PLC to the OPC server and
controlled with Automation Studio™ will act accordingly.
Automation Studio™ sends the AS variables to the OPC server every 10 ms.
Automation Studio™ receives data from a PLC or any other device connected to the OPC
server following 2 operating modes:
Automation Studio™ propagates the received values from the OPC server to the AS
variables every 10 ms of simulation time.
The simulated time is displayed in the lower right corner and can be lower then
the real time if the computational load of the project is too high.
In our example, the sensor status “VAR_PROX” within the hydraulic circuit and the
variable “VAR_PROJECT” assigned to a vumeter will be used with OPC resources.
2-30
Figure 2-30: Simulated circuit with external variables linked to internal variables
There are no limits to the number of external links. Automation Studio™ allows you to
create a multitude of variables in order to link them to components from ladder logic
diagrams and SFC diagrams.
This section of Automation Studio™ provides useful functions to configure the OPC server.
Automation Studio™ does not support direct communication with PLCs or other
similar equipment. Only Automation Studio™ variables can be accessed by other
OPC client applications. Please verify with your OPC server developer in order to
confirm the compatibility.
3.1 Management
The dialog box to configure the Automation Studio OPC server is available from the
Variable Manager window under the tabs “OPC Server” « Status ».
OPC Server Initialization Error Displays encountered errors during the initialization
of the OPC server.
3.1.2 Filter
You can choose which variable can be accessed by external applications and which one
remain non accessible. You will require defining one or more filters depending on your
needs. In order to add new filters, please use the left hidden panel from the “OPC Server
UA” “Custom Filters” of the Variable Manager. Expand the left panel with the symbol
To create a new filter in the left panel “OPC Server UA”, right click on “Custom
Filters” → “New Filter…”. Then, click on “Add a new simple relational operation”
A-2
available on the “Filter” sub tab toolbar.
OPC Server UA Area displaying all existing filters for the current project.
Custom Filters Branch of the tree allowing to add new filters through the
command “New Filter” of the pop out menu:
Filter List List of available filters. You can enable the filters when the
checkbox is checked. You may also copy, delete or rename the
filters.
Area/
Icon Command Description
Hit the CTRL key, select multiple terms then click on the “Group
relational operations” button.
A-4
Area/
Icon Command Description
Filter
Display
area of the equation the selected filter in the left panel.
Area/
Icon Command Description
Editing
filter field
A-6
Figure 3-3: The required variables have been created
5. Activate the Automation Studio™ OPC server through the options as shown on the
following figure:
a. Click on the Automation Studio™ button;
b. Choose Automation Studio™ Options;
c. Select the state for the Automation Studio ™ OPC server.
Depending on the option selected previously, the Variable Manager will show the OPC
server state on the “OPC Server” tab “Status”.
AS allows access to all these variables. Now it will be possible to add filters.
A-8
11. Click on the button “Add a new relational operation” ;
12. Highlight the term “Address LIKE Var*”;
13. Click on “Add a new relational operation” button and set the second term as “Type =
BOOL”;
14. Click on “Add a new relational operation” button and set the third term as “Address
LIKE Test*”;
15. Select the first and second terms of the equation and hold down on the CTRL key;
Figure 3-7: The filter equation is complete and the filter is active
20. Launch an OPC client and connect it to the Automation Studio™ OPC server.
The OPC client may vary but it is essential that this application is compatible with
the OPC standard. Multiple free applications can be found on the internet.
If the client application is located remotely on a different network then you need
to configure the DCOM security parameters. For further details, refer to the
Microsoft MSDN.
21. Verify that the items available to the client application are similar to the ones in the
following picture:
Options Description
OPC Server State Default state of the OPC server when a new project is
created.
UA Services TCP Port Default TCP “UA Services” Port used when a new
project is created.
UA Discovery Services TCP Port Default TCP “UA Discovery Service” Port used when a
new project is created. Port used when OPC clients
are looking for servers.
In order to access the main menu, click on the Automation Studio™ button.
A-10
Figure 3-9: Button in order to access the main menu
Options Description
OPC Server status The default state of the OPC server when creating a new
project. (choice: active, inactive, read only active)
TCP port of UA Default "UA Services" TCP port number used when creating a
services new project.
TCP Port for UA The Default TCP Port Number "Discovery Service" used when
Discovery Services creating a new project.
A-12
4 CAN J1939
Please contact the Technical Support of Famic Technologies to have more information and
documentations regarding the CAN J1939
https://www.famictech.com/fr/support/support-technique.html
A Glossary
COM
Acronym which stands for “Component Object Model”. COM is used by Windows
applications to communicate between each other.
DCOM
OPC Foundation
Industry consortium that creates and maintains standards for open connectivity of
industrial automation devices and systems. The OPC standards specify the communication
of industrial process data, alarms and events, historical data and batch process data
between sensors, instruments, controllers, software systems, and notification devices.
OLE
Acronym which stands for “Object Linking and Embedding”. It is a technology developed
by Microsoft that allows embedding and linking to documents and other objects.
OPC
Acronym which stands for “OLE for Process Control”. It is a group of specification
standards for real-time communication used in the industrial or commercial industry.
OPC DA
Acronym which stands for OPC “Data Access”. OPC DA is a group of standards that
provides specifications for communicating real-time data from data acquisition devices
such as PLCs to display and interface devices like Human-Machine Interfaces (HMI). The
specifications focus on the continuous communication of data.
A-14
Glossary
OPC UA
Acronym which stands for OPC “Unified Architecture”. OPC Unified Architecture is the
most recent OPC specification from the OPC Foundation.
PLC
Acronym which stands for “Programmable Logic Controller”. A PLC is a digital computer
used for automation of electromechanical processes, such as control of machinery on
factory assembly lines, amusement rides, or lighting fixtures. PLCs are used in many
industries and machines.
Variable Manager
The variable manager allows creating, modifying and managing AS variables. It also
includes tabs for OPC configuration.
B-2
C Index
C-2