Hi,
is it already (or when will it be) possible to use Distributed Clocks for synchronizing on a cifx50 slave (I'm using firmware version 0.97.1 build 2 right now)? I'm asking because I've seen some flags in the stack configuration field of the warmstart parameters in the slave protocol API (MSK_ECAT_DPM_WARMSTART_STACK_CFG_ENABLE_DC_MODE_[1-4]). But these are still reserved.
regards
Thomas
Thanks for your reply.
So, using the method you described, would it be possible to synchronize an application to the bus cycle?
What I actually want to do is sychronize a Linux realtime task (probably RTAI) using the C-Toolkit to the bus cycle benefiting from the accuracy off the DC (ideally by using an interrupt from the cifX50).
regards
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
That interrupt provided via the DPM would still have some us of jitter in it. So, if you need to have sub-microsecond accuracy, it would require the SYNC pins which are not provided on the cifX50RE.
However, it is possible to use the IRQ for those synchronization purposes. If the particular update configuration has been set.
Hi,
sorry for my late reply, but up until recently I wasn't able to get down to experimenting with the cifX card. And it took me some time to get things up and running. What I now have is: a cifx card (fw: 2.0.10) working under Linux with the C-Toolkit in interrupt and polling mode. The card gets initialized with information from a XML file (PDOs+IO sizes, IDs) using a little libxml2 parser. The XML is the same used in the master, so configuration changes have to be done only once (and only in the XML). This seems to work quite well.
Now back to the DCs.
The indication ECAT_ESM_ALCONTROL_CHANGE_IND will deliver the required DC configuration which has to be checked and used.
In addition, the configuration has to be placed into the ECAT_DPM-task by the packet ECAT_DPM_SET_UPDATE_CFG_REQ.
I experimented a bit with the DC settings in the master and the stack and pdi config in the warmstart parameters. I even unmasked all interrupts sources on the card with no success.
So my question is, what steps must be taken, to get an interrupt from DCs (using the C-Toolkit)?
Thanks in advance and best regards
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Hi th_elste,
the indications can be used as long as the actual Register packet has been send.
This is a requirement as not all application may like certain configuration like particular SYNC cycle configurations.
The SynC Unit is only generating the interrupts to the ARM. These get relayed by a particular configuration with ECAT_DPM_SET_UPDATE_CFG_REQ, so that it is possible to get the handshakes only exchanged back by the netX in case e.g. a SYNC0 or Sm2 Event and so on has been encountered.
If the ECAT_DPM_SET_UPDATE_CFG_REQ configures the Sm2 for SYNC0 coupled and disables host-side triggered update. The Handshakes of the area reflecting the master output data will be toggled back to the host only if a SYNC0 event has been encountered.
Please keep in your mind, that the C-Toolkit does not support IRQs in the current version.
Hello AJ,
thank you for your reply.
The SynC Unit is only generating the interrupts to the ARM. These get relayed by a particular configuration with ECAT_DPM_SET_UPDATE_CFG_REQ
Please keep in your mind, that the C-Toolkit does not support IRQs in the current version.
Best regards
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
please check the Hilscher web page for the latest manuals.
Hi,
sorry, but maybe I'm still looking in the wrong place, but a checked the web page (again and again), and the only relevant thing I can find ist the "EtherCAT Slave Protocol API" rev 7, and the "netX DPM Interface manual" rev 5. And the only ECAT_DPM packets described in there are: ECAT_DPM_WARMSTART, and ECAT_DPM_SET_IO_SIZE. No SET_UPDATE_CFG whatsoever.
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
the bBusSyncTrigger is currently not used.
/******************************************************************************
* Packet: ECAT_DPM_SET_UPDATE_CFG_REQ/ECAT_DPM_SET_UPDATE_CFG_CNF
*
* Remarks: for use together with Confirmed AlStatus services to control internal update handling on state change PreOp->SafeOp and on 0x1c32/0x1c33 writes handled by host
*/
/* request packet */
typedef __PACKED_PRE struct ECAT_DPM_SET_UPDATE_CFG_REQ_DATA_Ttag
{
/* Host update on Sm2 enabled */
TLR_BOOLEAN8 fHostTriggeredUpdateOnSm2Enabled;
/* Host update on Sm3 enabled */
TLR_BOOLEAN8 fHostTriggeredUpdateOnSm3Enabled;
/* Device update trigger mode for Sm2 (see ECAT_DPM_SET_UPDATE_CFG_MODE_*) */
TLR_UINT8 bDeviceTriggeredUpdateOnSm2Mode;
/* Device update trigger mode for Sm3 (see ECAT_DPM_SET_UPDATE_CFG_MODE_*) */
TLR_UINT8 bDeviceTriggeredUpdateOnSm3Mode;
/* Device update trigger mode for Bus-Sync handshake
* (see ECAT_DPM_SET_UPDATE_CFG_MODE_*)
* (except ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_FREERUN and ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_SELF)
*/
TLR_UINT8 bBusSyncTrigger;
} __PACKED_POST ECAT_DPM_SET_UPDATE_CFG_REQ_DATA_T;
/* value of fHostTriggeredUpdateOnSm* will be ignored on particular Sm and automatically enabled */
#define ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_FREERUN 0
/* self-triggered means its own event e.g. Sm2 update on Sm2 event */
#define ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_SELF 1
/* update is handled on Sync0 event */
#define ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_SYNC0 2
/* update is handled on Sync1 event */
#define ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_SYNC1 3
/* update is handled on Sm2 event */
#define ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_SM2 34
/* update is handled on Sm3 event */
#define ECAT_DPM_SET_UPDATE_CFG_MODE_MODE_SM3 35
typedef struct ECAT_DPM_SET_UPDATE_CFG_REQ_Ttag
{
TLR_PACKET_HEADER_T tHead;
ECAT_DPM_SET_UPDATE_CFG_REQ_DATA_T tData;
} ECAT_DPM_SET_UPDATE_CFG_REQ_T;
/* confirmation packet */
typedef struct ECAT_DPM_SET_UPDATE_CFG_CNF_Ttag
{
TLR_PACKET_HEADER_T tHead;
} ECAT_DPM_SET_UPDATE_CFG_CNF_T;
Hi,
thanks for the packet description. Now I only need the packets cmd id. Could you please post it, too?
Thanks
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
#define ECAT_DPM_SET_UPDATE_CFG_REQ 0x00002CCC
This is defined in the Ecs_Public.h :wink:
Thank you.
This is defined in the Ecs_Public.h
elste@pluto$ grep -Insr ECAT_DPM_SET_UPDATE_CFG_REQ header/firmware/ C-Toolkit_V0930_org/ elste@pluto$
Not in any, that is available to me. And believe me, I think I downloaded everything in the netX dowload section at least twice the last few days, :).
Regards
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
maybe this is located to your used version of the stack. Are you still using the version 0.97.1 build 2?
You should get in contact with Hilscher to get an update of the stack.
No, I'm currently using 2.0.10 (but I only got one single firmware file from support and no header files).
Additionally I've a CD with 2.0.0, containing the API and all the headers. But the SET_UPDATE symbol is nowhere defined there. So this already seems outdated (The card with this CD was bought only a month ago, btw.)
So why not put something like a "stack support packet" with the api and information about the firmware version to use it with on the homepage, to avoid all the versioning issues? I think even a changelog of the stack firmwares would already be very helpful, if it is not possible to allow a direct download of the api with or without the current firmware version.
Regards
Thomas
Hilscher Gesellschaft fuer Systemautomation mbH
Yeah, that would be a good idea. Hilscher should catch this idea and put it onto their web page.
Hi,
I've been following this thread a while because I would like to use the distributed clock mechanism of ethercat with a CIFX50-slave too. However, I'm not sure if I understood what was the conclusion of the thread: is it possible or not? If yes, is it also possible if I want to do it without diving into C-Toolkit / driver development?
My problem is that I want to synchronize the system time of a PLC (ethercat master) with the system time of another PC (ethercat slave). So, as a fallback solution I could also use an additional Ethernet Link and synchronize using an sntp server and an sntp client (simple network time protocol).
kind regards
Hilscher Gesellschaft für Systemautomation mbH
Hi,
the synchronization mechanism provided by the DC is meant for providing a common time reference.
This common time reference is used to produce SYNC signals and interrupts on the EtherCAT slave controller. So, if you need a specific time point in every bus cycle, the Sync Unit will provide that.
However, it is NOT linked to the clock of your PC.
Even though, it is possible to read the DC systime directly from the Esc, there is currently no field accessible via DPM providing that System Time to the host.
The actual common time reference start is set up on behalf of the master. The slave cannot influence what value the System Time has for a specific time point.
Greets,
code-small
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hi,
those flags are not implemented. However starting with V2.1.1.0 it is possible to do the required handling for switching DC modes on the host side.
To get those values related to the DC configuration, it is required to use Confirmed AL Status Services.
The indication ECAT_ESM_ALCONTROL_CHANGE_IND will deliver the required DC configuration which has to be checked and used. In addition, the configuration has to be placed into the ECAT_DPM-task by the packet ECAT_DPM_SET_UPDATE_CFG_REQ.
The version V0.97.1 build 2 does not support that.