OTee#Virtual PLC_Part06_Connecting with TwinCAT3 via TF6280 Ethernet/IP!

This is a new series where we’ll explore various topics using the OTee Virtual PLC. In Episode 6, we’ll launch an Ethernet/IP Scanner on the OTee Platform and connect it to the TwinCAT3 TF6280 Ethernet/IP Adapter (Slave). Want to try the Ethernet/IP Scanner in OTee Runtime but don’t have an Ethernet/IP Adapter handy? TwinCAT3 is your solution!

Additionally, we will now install OTea’s Virtual PLC on Berghof’s MC-Pi Pro and expand the article.

Let’s enjoy the FA.

Foreword

Thank you from the bottom of my heart for visiting my technical blog and YouTube channel.

We are currently running the “Takahashi Chris” radio show with Full-san (full@桜 八重 (@fulhause) / X) which I deliver every Wednesday night.

Sharing, not hoarding, technical knowledge

We publish technical information related to factory production technology and control systems for free, through blogs and videos.

With the belief that “knowledge should be accessible to everyone,” we share practical know-how and real-world troubleshooting cases from our own field experience.

The reason we keep it all free is simple: to help reduce the number of people who struggle because they simply didn’t know.

If you’ve ever thought:

  • “Will this PLC and device combination actually work?”
  • “I’m having trouble with EtherCAT communication—can someone test it?”
  • “I want to try this remote I/O, but we don’t have the testing environment in-house…”

Feel free to reach out!If lending equipment or sharing your configuration is possible, we’re happy to verify it and share the results through articles and videos.

(We can keep company/product names anonymous if requested.)

How can you support us?

Currently, our activities are nearly all unpaid, but creating articles and videos takes time and a proper testing environment.If you’d like to support us in continuing and expanding this content, your kind help would mean a lot.

Membership (Support our radio show)

This support plan is designed to enhance radio with Mr Full.

https://note.com/fulhause/membership/join

Amazon Gift List (equipment & books for content production)

Lists equipment and books required for content creation.

https://www.amazon.co.jp/hz/wishlist/ls/H7W3RRD7C5QG?ref_=wl_share

Patreon (Support articles & video creation)

Your small monthly support will help to improve the environment for writing and verifying articles.

https://www.patreon.com/user?u=84249391

Paypal

A little help goes a long way.

https://paypal.me/soup01threes?country.x=JP&locale.x=ja_JP

Just trying to share things that could’ve helped someone—if only they’d known.

Your support helps make knowledge sharing more open and sustainable.

Thank you for being with us.

soup01threes*gmail.com

https://x.com/3threes2

Technical knowledge shouldn’t be kept to ourselves.

Referece Link

http://soup01.com/en/category/otee_en/

Implementation

Now let’s actually create the project.

TwinCAT3 Side

First, set up the TwinCAT3 side.

Add Ethernet/IP Adapter

First, go to I/O → Devices → right-click and select Add New Item.

Select Ethernet/IP→Ethernet/IP Adapter (Slave)→Proceed by clicking OK.

Configure the Ethernet Interface to operate as an Ethernet/IP Adapter here, or configure it later in Cancel.

Configure Ethernet Driver

Click the Ethernet/IP Adapter (Slave) you just added → Adapter → Search.

Here, you can configure the Ethernet Interface to operate as an Ethernet/IP Adapter.

Done!

Ethernet/IP Setting

Next, we will configure the internal settings of the Beckhoff TwinCAT3 Ethernet/IP Adapter (Slave).

IP Setting

First, open the Settings tab.

Open 8000:0 and configure the IP address and network mask. This IP address must match the settings on the scanner side.

Configure it according to your actual application.

Add Assembly

Next, right-click the Ethernet/IP Adapter (Slave) → click Append IO Assembly.

Done!A new assembly has been added.

Add Inputs

Next, right-click on the Assembly Inputs you just added and select Add New Item.

This screen will change to the variable addition screen.

Set Muitiple to 8 and add 8 consecutive BYTE data items.

Done!

Add Outputs

cNext, right-click on the Assembly Outputs you just added and select Add New Item.

Set Muitiple to 8 and add 8 consecutive BYTE data items.

Done!

Check Ethernet/IP Configuration

Finally, let’s check the Ethernet/IP settings on the Beckhoff side.

Add PLC

Next, select PLC → Add New Item to add a PLC.

Click Standard PLC PLC Project, then click Add to add it.

GVL

Define the Process Input and Process Output variables, then compile the project.

{attribute ‘qualified_only’}
VAR_GLOBAL
arrInArray AT %I*:ARRAY[0..7]OF BYTE;
arrOutArray AT %Q*:ARRAY[0..7]OF BYTE;
END_VAR

Mapping Input

Click Inputs to map the input data for the assembly.

Select all the data you just added and perform a Change Multi Link.

Select the variable defined earlier.

MappingOutput

Click Inputs to map the Assembly’s output data.

Select all the data you just added and perform a Change Multi Link.

Select the variable defined earlier.

Activate Configuration And Download

Finally, download the project to TwinCAT Runtime.

OTee Side

Next, we will build the Berghof MC-PI side with OTee Runtime installed.

Add Ethernet/IP Config

Access the OTee Platform and click the + button within your project.

The new item addition screen will appear.

Configure the Driver Config from the drop-down list.

Next, configure EtherNet/IP from the Driver drop-down list.

Click Save to apply the settings.

Add Client

Next, open the Ethernet/IP settings screen and add a new Ethernet/IP Adapter using “Add a Client”.

Done!The new Ethernet/IP Adapter has been added.

Remote IP Address

Set the Remote IP Address field to match the IP address configured on the Beckhoff TwinCAT3 side.

Done!

Client Name

Next, let’s set it to something clear and easy to understand for the Client Name.

Add Connection

Next, use “Add Connection” to add a new connection to the Adapter you just configured.

This is the connection settings screen.

Configure Exchange Bytes

To change the number of bytes occupied by each connection, click Add Symbol at the bottom of the settings screen.

As shown in the figure below, the number of bytes has increased.

For example, we added 12 bytes as shown in the figure below.

As such, the data size was automatically updated to 12.

The same operation applies to the O→T side.

The Data Size for O→T has also become 12 bytes.

Configuration

Now let’s configure it to match the TwinCAT3 Ethernet/IP Adapter.

Let’s configure the settings while viewing both the OTea and TwinCAT3 configuration screens.

Configure Instance

The Config Instance is set to match the Configuration Instance on the TwinCAT3 side. In this example, it is set to 128.

Configure Data Size

Set the Config Instance data size to match the Configuration Instance data size on the TwinCAT3 side. In this example, it is 0.

T→O Instance

Set the T→O Instance number to match the Input Instance (T→O) on the TwinCAT3 side. In this example, it is 129.

T→O Size

Set the T→O Instance data size to match the Input Instance (T→O) size on the TwinCAT3 side. In this example, it is 12.

T→O Priority

T→O Priority must be set to Scheduled Priority.

TwinCAT3 only supports this Priority setting, so setting it to any other Priority will result in an “Invalid T→O Priority” error.

O→T Instance

Set the O→T Instance number to match the Input Instance (O→T) on the TwinCAT3 side. In this example, it is 130.

O→T Size

Set the O→T Instance data size to match the Input Instance (O→T) size on the TwinCAT3 side. In this example, it is 12.

O→T Priority

O→T Priority must be set to Scheduled Priority.

TwinCAT3 only supports this Priority setting, so setting it to any other Priority will cause an error: Invalid O→T Priority.

Header

Please enter the Run Program Header settings shown in the figure below for O→T.

Download

Finally, download the project to OTe Runtime.

Result

Done!CIP I/O message communication was possible between TwinCAT3 and OTee Runtime.

シェアする

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

フォローする