• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Activating Distributed Clock - EtherCAT (Slave-side)
Hi Community,

I'm working with the NetHat Device and want to transfer data ervery 4 ms by using EtherCAT.
At the moment there is the problem that I cannot activate the Distributed Clock, which is deactivated by default on the netHat side (slave).

I have already discovered that there are two solutions for the problem.

1. By using the "NetX Configuration tool"

I would like to configure the module this way, but unfortunately the error "There’s no valid firmware directory found during installation. Would you like to choose it on you own?" already occur during the installation.
Also the manual selection of the directory, which I could find on the "DVD" provided for download, does not fix the problem.

Any idea how to solve this problem? 
(I use "netX Configuration Tool V1.0900" under Windows 10)

2. by sending a set configuration packet to the EtherCAT Slave protocol stack

I can't solve the problem this way. Could somebody send me an example code in which the "Set Configuration Request" is send by the application to the protocol stack to configure the device with configuration parameters ?

Thanks for your help.
Well I don't know if it helps much but we have product called netPI, which includes a netX51 chip (it is the same chip die as netX52 used on netHAT and just has connectivity to external RAM additionally as only difference) that is programmed with the very same packets and for this netPI we have made programming examples public on github.

Here is the sourcode link to a file including a SetConfiguration packet: https://github.com/HilscherAutomation/ne...ndlerECS.c

There is one more thing to know: netHAT is a device that is automatically configured to fixed 32bytes input and 32 byte output data after the installed firmware (*.deb file) has been loaded into netHAT's flash during first start of your application program. This makes it very simple to customers to get it operative and they mustn't care about configuration settings like you do right now.

The 32Byte IO configuration is held in a file named config.nxd that you find in the folder \opt\cifx\deviceconfig\FW\channel0\ next to the firmware file named (X070F00X.nxf for EtherCAT slave in your case) after you installed the *.deb file. So now once you start any application using the driver ... this driver checks whether or not the installed firmware on Linux side is the same as loaded into netHATs FLASH memory. If it is not then it loads it ... but not only the *.nxf file but also the config.nxd file. And then the device is preconfigured by the FLASH contents rather than through an appliction program you have in mind. I am not sure if a post-configuration through "SetConfiguration" packet would be accepted by netHAT if it was already configure through the FLASH memory.

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

Thanks for your quick response.

In the "Protocol API - EtherCAT Slave V4" which is included with the software CD of the NetHat, it is written on page 43, that the EtherCat Slave stack can be configured by using the NetX Configuration Tool.

I tried it several times with different Pc, but always got the same error message (see above).
Also the previous unpacking of the *.deb file and navigating to the actual firmware directory (...\opt\cifx\deviceconfig\FW\channel0\) did not lead to success.

What's the catch? Does the Configuration Tool not support the NetHat device?
Or did I miss a bug?
A word to the manual: it needs to be said that the "Protocol API - EtherCAT Slave V4" manual is a common manual for ECS V4 stack fitting to products supporting netX technology professionally like Hilscher products "cifX", "comX", "netIC" and "netJACK". netHAT on the other hand is a product seen more as a "playground" for netX technology. What I want to tell you is that the manual was not specifically written for the netHAT device but for all the others mentioned initially.

Nevertheless we put the manual on the DVD image since the API interface indeed is indentical between all netX51/52 chip based devices. But for netHAT  - cause we wanted to keep its usage as simple as possible - it was never intended to let customers re-configure it to another IO size or to activate distributed clock feature etc. or anything else. The idea was to deliver a module that has a fixed set of IO data length of 32 bytes input and 32 bytes output no user has to take care about the configuration. Especially if you think of the module supporting not only EtherCAT, but EtherNet/IP and PROFINET etc. as well.

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)

A word to the netX Configuration tool: the tool is an online tool and to get a device configured with it an online connection to a device  is needed always. Usually this happens across a direct serial/USB/dual-port memory connection used from windows side with a corresponding driver installed along with the tool. But as you can imagine an online connection from a windows machine where the tool is installed to a Raspberry Pi with a netHAT module attached is not available. Connections over SSH are not supported. So the tool for netHAT is a dead end since there is no direct "connection" path to the chip.

Again one word to the tool itself and the installation that fails: if you visit the section https://www.hilscher.com/de/support/downloads/ on hilscher's homepage you have several DVD images for devices that need the tool to get configured online. e.g. netIC is one of them. If you download the DVD made for it as a whole https://www.hilscher.com/fileadmin/big_d...5_8602.zip and install the tool from there it will work. The point is that the tool needs a folder "Firmware" and it is searching for it during installation. If not found it will ask for it as seen in your case. And underneath this folder it is searching for one of the subfolder names "netIC", "cifX", "netJACK","comX" where at least one firmware needs to be located in. Then it installs without a problem. The netIC DVD image contains such a folder construction ... but dont' forget what I said before the tool does not support to configure netHAT at all.

You never fail until you stop trying.“, Albert Einstein (1879 - 1955)


Forum Jump:

Users browsing this thread: 1 Guest(s)