Image
Takuya Anzai
MCU Engineer
Published: April 7, 2020

I’m Anzai, a novice engineer who has been working hard to learn microcontroller technology, while doing day-to-day work every day.

What is your image of “development of industrial network equipment”?
Choosing the chip suitable for the protocol, doing troublesome initial setting of the chip and supporting multiple protocols? I am overwhelmed just thinking about all these extremely tough development challenges.

Would you wish for a microcontroller that supports multiple protocols with readily available initial settings and optimized protocol stacks to significantly reduce development time?

The RX72M industrial network solution is exactly the solution for you. It solves users’ problems and contributes to reducing development time.

Let’s look at the items provided by the solution as follows:

  • Evaluation board for the development of industrial network. (RSK+ for RX72M, TS-RX72M-COM by TESSERA TECHNOLOGY INC.)

rsk for rx72m

  • Sample programs for 10 types of protocol stack, including EtherCAT.

logos

By utilizing these tools, users can easily and quickly complete building the development environment, such as the preparation of prototype boards, a protocol layer, and initial settings of the microcontroller. Accordingly, users can focus on the development of an application layer.

In particular, EtherCAT is a hot protocol whose market share is increasing yearly. Its greatest feature is precise time synchronized control between devices and higher throughput compared to general-purpose Ethernet and other industrial networks. Therefore, this protocol is suitable for all industrial applications such as industrial sensors, robots, and PLCs.

Let's start environmental development using this EtherCAT.

*Please refer to the application note for build-up operations information located in the sample program: Communication Board EtherCAT Start-up Manual (R01AN4672EJ0100)

Firstly, prepare the below items.

ethercat

   
PC e2 studio: SSC tool, TwinCAT3 (Download from EtherCAT Technology Group (ETG)
Emulator E2 emulator Lite
Evaluation board TS-RX72M-COM by TESSERA TECHCNLOGY INC.

When all these items are ready, download the sample program that consists of 10 types of protocol stack and application notes, from the Renesas website. 

The EtherCAT sample program is entitled “ecat_demo_comrx72m.zip”.

The sample program contains a program to check the initial settings of RX72M and EtherCAT communication. Since the EtherCAT protocol stack is not included, we need to create it using the SSC tool.

*I asked my senior colleague why the EtherCAT protocol stack is not included, and he said that according to the rules of ETG, it is prohibited to directly distribute the protocol stack generated by our company with SSC tool to users.

The code suitable for the RX72M can be generated by simply reading the configuration file in the sample program into the SSC Tool. So, I could operate it easily, although I’m not an expert in this protocol.

slave-stack-code-tool

The preparation for the program has been completed. Next, install the sample program into the evaluation board with e2 studio.

It takes just ten minutes to complete the development environment! There is no need to perform initial settings of the microcontroller while checking the manuals, or develop a protocol layer, which is so complicated that you can’t see the finishing goal. That’s why I was able to advance my work very easily and quickly even though I’m a novice engineer in embedded development.

Next, let’s check EtherCAT communications.

Since I don’t have a programmable logic controller which serves as a master device at hand, I use the ”TwinCAT3”, a convenient software that can simulate the connection with the master device.

visual studio screen

The connection check is performed using the typical functions of the TwinCAT3.
Firstly, the bus scan function. I can check the recognition of the PHY mounted on the evaluation board and the LAN connection.

Next is the actual communication. The typical communication of EtherCAT is periodic communication (PDO) and asynchronous communication (SDO). At this time, I will rewrite the slave objects with PDO access. The initial state of the object in the sample program is 0000h (LED off), which can be rewritten to any 4 bits to control turning the LED on and off.

The value entered this time is "1111", and if all the red LEDs light up, the communication has succeeded.

ethercat board led

Amazing! I succeeded in turning on the LED.

By following the steps of the application note, even a novice engineer like me, who has never operated TwinCAT3, completed the process from operating TwinCAT3 to LED lighting in about 10 minutes. Hence, I recommend this sample program to users who are considering EtherCAT communication in the future!

Although I introduced EtherCAT as an example, users can start up the development environment for other protocols easily and quickly because we have prepared similar sample programs and application notes.

We strongly recommend using the RX72M industrial network solution when you develop industrial slave devices.

EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.

Share this news on

Documentation

Type Title Date
Application Note PDF 324 KB 日本語
1 item