Quantcast
Channel: Infineon Forums
Viewing all articles
Browse latest Browse all 9892

XMC4800 EtherCAT high speed sync event

$
0
0
Hi Mophong,
I've just reviewed the behaviour and did not find any issue.

So first i have addad a DIGITAL_IO output APP and assigned pin 2.14 to this APP on the XMC4300 Relax Kit.
This pin I toggle inside APPL_Application of the example application:
void APPL_Application(void)
{

process_app(&OUT_GENERIC0x7000,&IN_GENERIC0x6000);
DIGITAL_IO_ToggleOutput(&DIGITAL_IO_0);
}

After copying the xml-file to the PLC, I restart TwinCAT and rescan the bus.

I've implemented a small PLC-program with two boolean variables which I assign a button as input (IN_GENERIC/IN_GEN_Bit1) and LED1 as output (OUT_GENERIC/OUT_GEN_Bit1)
Basically I just toggle the LED in the PLC-program. However the cycle time I monitor on the P2.14. So the LED is just nice to have as a visual indicator.

After enabling DC-sync:
Attachment 2896

Setting cycle time of base cycle to e.g. 125us:
Attachment 2898

Setting 1 cycle for your task:
Attachment 2897

I see on the oscilloscope the 125us cycle time of the pin-toggling:
Attachment 2899

The cycle time of the device is limited by the default setting for the SSC code generation inside the SSC-Tool.
By default this limitation is set to 125us. But this default value you can modify to your specific limitations (processing time).
As I do not really process anything, I have adjusted it to a value below 50us. With this setting, you can also set the cycle time to 50us inside TwinCAT without problem:
Attachment 2900

Could you please point out in detail at which point this fails for you?

Thanks

Michael

Viewing all articles
Browse latest Browse all 9892

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>