Beckhoff#Using TwinCAT TF6100 to startup OPCUA Server

Good morning and Hope all of you are having a good day.

This time I will explain how to use TF6100 to start up an OPCUA Server, then using uaexpert software to test whether the server can be accessible or not.

Installation

please access the following link.

https://www.beckhoff.com/en-en/products/automation/twincat/tfxxxx-twincat-3-functions/tf6xxx-tc3-connectivity/tf6100.html

Go to Software Download >EXE download the installation file.

Choose English.

Next.

Agree the License , and Press Next.

Enter your Information , and Next.

Choose Complete, and Next.

Because Visual Studio 2015 is installed in my system, I will choose Visual Studio 2015.

Press Next.

Next.

Press Install.

If your setup is completed,  the following popup is displayed.

You can see Inside the path of C:/TwinCAT/Functions, folder TF6100-OPC-UA is created.

System Requirment

OPC UA Server Configuration

After TF6100 is installed, we need to configure the OPC UA Server. The setup is very sample and no need to worry.You need to separate your TwinCAT Project for PLC and Connectivity Project for OPCUA.(but these projects can be integrated as a Visual Studio Solution.)

Here is the Working Flow:

  • Step 1: Setup the variables that link to OPC UA Server.
  • Step 2: Set up the symbol file.
  • Step 3: Enter your License.
  • Step 4: Download your project.
  • Step 5: Establish the connection between OPC UA Server and client

TwinCAT Project Side

Go to Project>PLC>PLC Project>Settings and put the checkbox of “TMC File”.

Let’s create some variables for OPC UA Server.

Enter your GVL Name.

Please enter the following statement before your variables. The server will define whether that variable is visible or not.

{attribute ‘OPC.UA.DA’ := ‘1’}

In this Example, Client can access bArray but i16Array can not.

you need to add the statement line by line.

Finally ,please rebuild the project and activate the Configuration again.

Then Download your Project to Runtime. 

TwinCAT Connectivity Project Side

Insert the TwinCAT Connectivity Project.

You can see the TwinCAT Connectivity project is inserted in the Solution Explorer.

Right Click the Connectivity Project > Add> New Item.

Choose TwinCAT OPC-UA Server Project and then Add.

You can see the OPC-UA Server is added.

Right click the Data Access > Add Device Type.

Etner 851 for the Ads Port.

You can confirm the AMD NetId.

Go to the Taskbar and right click the TwinCAT System.

Go to Router>Change AMS NetId.

このAMS Ned IdをCopyします。

Access the Solution Explorer>Data Access>Devices that you created before.

Set the AMS Net ID in the Properties window.

Go to View>Toolbars and activate the OPC UA Configurator.

You can see the OPC UA Connection items are inserted.

Click the Add Target OPC-UA Server and Add a new Target.

The UA Server Configuration screen is shown.

Press the Add button to create a new server.

In my case the endpoint is opc.tcp://localhost:4840.

if you want to use IP Address or let other PC to access your server,

Please check your IP address of the network card.

In my case – my ip is 192.168.0.52.

So, the endpoint should be opc.tcp://192.168.0.52:4840.

Finished!

After Server configuration is finished,Now you can select the endpoint that you need to connect.

Press the Connect Button.

Just Choose Anonymous and OK.

Do you want to load the current configuration?

Yes.

The Configuration is Finished.

Test

Finally , Let’s use the uaexpert to test the connection.

Do not worry , This software is free.

Please access this linkt to download it. 

https://www.unified-automation.com/downloads/opc-ua-clients.html

Click the uaexpert.

Download the UaExpert Setup File- Windows and install it,


Start the UAExpert , go to Servers>Add.

Click the Loadl OPCUA Server that you created before.

Choose the Sign up method and OK.

Press Conenct.

Check the Accept the server certificate temporaily for this session Checkbox,

Press Continue.

You can see the connection is established.

Access the Root>Objects>PLC1>GVL_OPCUA>bArray, it is the variable that you created for OPC UA Server before.

You can also click the variable to change the value.

Let’s try to write True inside.

you can see the first element of the variable had become to True.

Footer_Basic

Please Support some devices for my blog

Amazon Gift List

Find ME

Twitter:@3threes2
Email:soup01threes*gmail.com (* to @)
YoutubeChannel:https://www.youtube.com/channel/UCQ3CHGAIXZAbeOC_9mjQiWQ

シェアする

  • このエントリーをはてなブックマークに追加

フォローする