Beckhoff#TwinCAT3 Using TF6281 Configure An Ethernet/IP Scanner

TwinCAT3 TF6281 is a function that allows the Intel PC based Controller and Real-time Ethernet Driver to implement the EtherNet/IP Scanner functions.

The Ethernet/IP adapter can be Generica Node or any EDS Files that are provided from manufacturer.

EtherNet/Ip, Ethernet Industrial Protocol ,EIP. A realtime Protocol that was designed and managed by ODVA.This Protocol is based on TCP/UDP and IPV4 technology.

System Requirement

TF6281 can be implemented as a Scanner or Adapter. As mentioned before, This function needs an Intel chipset.if you are using Beckhoff PLC, Real-time Ethernet Driver is defaultly installed.

EDSInstallation

As same as Profinet needs GSDML to configure the network, Ethernet/IP also need EDS Files to create the configuration. EDS is an Electronic Data Sheet, a text based format document that has all the communication settings.

Molex – TCDEI-8D0P-DYU-G02

This time we will use the ethernet/ip TCDEI-8D0P-DYU-G02 that made by Molex.you can download the EDS files by follow link:

https://www.molex.com/molex/mysst/doCenter.action

Choose the first searching result and Download it.

you can see all the EDS files after unzipping the files.

Codesys

Please reference to these Link:

Codesys#EtherNet/IP Adapterとして使う
Codesys#EtherNet/IP IP Scannerとして使う

Insert the Scanner

Let’s insert the Ethernet/IP Scanner.

go to the I/O>Devices>Add New Item.

Choose Ethernet/IP Scanner from Ethernet/IP.

Open your Ethernet/IP Scanner Configuration, access the Adapter tab.

press the search button to scan all the Network card adapters in your PC.

Choose the Network card interface that you can connect to Adapter and Press OK.

Now we can start to Configure our IP Scanner.

There are 2 views in the Configuration view.

0xF800 are the parameters that will be used while startup.

0xF900 are the parameters that the current system is running.

Let’s click the EIP Scanner.

F800:21 is the IP Address that runs inside the runtime – it is a virtual IP. But you need to set it.( and also F800:22, it is Network Mask).

You can Double Click it and input the values.

Same as Network Mask.

EDS File Import 

Molex

Right Click the IP Scanner that you inserted before, and click import EDS files.

I do not know why TwinCAT can not import all EDS files at the same time.

you need to choose it one by one.

Codesys

Just import the EDS files that you export from Codesys IDE.

There are some devices that TwinCAT3 does not support.

If you can see the below popup, TwinCAT3 accepted your EDS File.


Insert Adapter

Molex

Right click the IP Scanner that you inserted before > Add New Item.

Choose the EIP Device that you inserted before, and click OK.

You can see the Adapter is inserted now.

Do not forget to set the IP address, go to Settings>IP Address.

Enter your IP Address.

Finally, Right Click the Adapter that you inserted.

Append IO Connection>Input Onlyします。

Choose your application type. In this post I Will use Input Only.

Create Variables as defined in EDS files?yes.

Codesys

Choose the devices that you imported before.

same as above, right click and Change your ip address.

Enter it.

Finished.

IP Adapter>Append IO Connection>Exclusive Owner(It is depends on your applications).

Create Variables as defined in EDS files?yes.

Finished!

Create some variables in your program.

And then use it in your POU.

(The value will not be updated if following variables are not used in your program)

Then assign these to the Inputs/Outputs.

Press the Linked to.. Button.

Choose the Variables that you added.

Result

Check the connection status by accessing the State variable.

the value is 0x0000 now  – Communication is Normal.

You can also confirm in the Codesys side.

you can also use WireShark to confirm it.

There are some CIP I/O Packets flowing in the network.

But the data is just only in some non-meaningful Hex value.

What you can do – Stop the adapter first.

Then Open the wireshark again and start the adapter.

you can see the packets are encoded.


Be Careful!

Because I am using a USB to Network Adapter Converter , and also configured with raspberry pi, a timeout may happen sometime.

please adjust the update cycle.

And Also the Freerun cycle(ms)

Byebye!

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

シェアする

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

フォローする