Change execution time of the function process app XMC4800 in DAVE and 500 frames/s

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User18526
Level 2
Level 2
I've a new question that I think you could solve it. I'm trying to modify the time of ejecution cycle of the function process app instead of 2 ms by default to for example: 250us. I don't know where I can change it. Maybe in DAVE code of the example EtherCAT_XMC4800 or in TwinCAT? Besides, it is possible to change the number 500 frames/s to other number in TwinCAT?

Thank you very much for everything beforehand.

A greeting.
0 Likes
6 Replies
User16529
Level 4
Level 4
First solution authored
Do you mean you want to change the DC cycle time?
0 Likes
User18526
Level 2
Level 2
Yes, I want to get 250 us instead of the 4 ms that comes by default in Twincat. In Device 1 -> Adapter, in Freerun Cycle (ms) the 4 ms can be lowered to 1ms, but I want to lower more, I want to lower to 250us for example. However, it does not leave less than 1 ms.
In Real-time -> Settings, in Base Time I can put the 250us but I check with the oscilloscope and the time does not go down, it still gives me 1 ms, something must be added? Only with the I / O Idle Task can not be done and you have to add a PLC Task?
On the other hand, I have observed the following measuring with the oscilloscope: when setting 1ms, 3ms and 5 ms it works at those times. But when setting 2ms it works at 1 ms, when setting 4ms it works at 2ms and at 6ms it works at 3 ms.
Janet would you know how to solve these little doubts?
Thanks for all beforehand.
0 Likes
User16529
Level 4
Level 4
First solution authored
Ok, I see the Freerun Cycle, but i don't know how to change it.
I use the DC-sync mode in Box 1 -> DC, then I put the value of DC in the User Defined filed. In this way I change the transmission frequency of the ethercat frame. But I don't know if this is what you need
0 Likes
User18526
Level 2
Level 2
Hi Janet, in Box 1 -> DC, only Synchron appears in Operation Mode, I give Advanced Settings, I give Enable -> User defined: I put 250 but in Box 1 -> Online, it appears in State: ERR PREOP INIT.
However, in Box 1 -> DC -> Advanced configuration, if I leave it as default without the tick in Activate, in Box 1 -> Online, it appears in Status: PREOP that then when you hit the button: Toggle Free Run State already shows me OP.
Can you measure a pulse in the oscilloscope of less than 1 ms?
Thanks for all beforehand. Very friendly.
0 Likes
User16529
Level 4
Level 4
First solution authored
You cannot set a DC sync time low as you want, because you have to respect the minimum value allowed by your system. If you set a DC sync time lower than the minimum, you get a sync error and the state machine will stuck in preop.
Try a value higher than 250us, e.g. 600us.
And check this two things first:
- in the DAVE project check in the coeappl.c file if you have these values

*---------------------------------------------
- 0x1C00
-----------------------------------------------*/

/**
* \brief 0x1C00 (Sync manager type) variable to handle the object data
*
* SI 0 : 4 (4 SyncManagers available)
* SI1 (SM0): Mailbox Out (0x1)
* SI2 (SM1): Mailbox In (0x2)
* SI3 (SM2): Process data Out (0x3)
* SI4 (SM3): Process data In (0x4)
*
*/
/*ECATCHANGE_START(V5.12)*/
TOBJ1C00 sSyncmanagertype = {0x04, {0x0201, 0x0403}};
/*ECATCHANGE_END(V5.12)*/


- in your ESI file check if there is this section



Synchron
SM-Synchron
#x0


DC
DC-Synchron
#x300
0
0


0 Likes
User18526
Level 2
Level 2
Thank you very much Janet.
But what I want to achieve is that the sending and receiving of the EtherCAT packets, when measured with Wireshark, are less than 1 ms. I have managed to measure that when I put in Freerun Cycle: 1 ms the sending is done every 1 ms and the reception also every 1 ms. However, I want to get delivery times of 250 us and reception also of 250 us. How can I do it?
Thank you very much for everything beforehand.
Very kind Janet.
0 Likes