EPC timing, elapsed time
-
Hi, I have a question related to the EPC block.
Let's suppose I have an external program to be called and executed by EPC block. I used example "\0202-11_EPC_Generic_Linux_Script" , made some modifications and made it run under windows, using epc_script.bat where windows syntax is given to run particular external program (*.EXE file).
I was wondering how much time is spent on execution so I concentrated on analysis of BUSY output of EPC block.
It seems like BUSY signal is ON for quite a long time.
Then I made a special extreme variant where epc_script.bat is completely empty so that it does not do anything when launched.
In my executive I used tick=0.01, ntick0=2. However, BUSY signal stays ON for 250-300 miliseconds each time EPC runs the script which does nothing (also, ifns and ofns are empty).
Is it OK? Which activities occure during this time? -
@stepan-ozana Little update: Under Linux, using RPi, it behaves much better. BUSY signal stays ON for 2 task periods.
-
Hi @stepan-ozana,
The delay you're observing in Windows is likely due to process prioritization and interruption handling, which are less efficient and harder to control compared to a Linux-based system like Debian or Raspberry Pi OS. In Linux, you have better control over how processes are scheduled and managed, allowing the system to run more smoothly and minimizing the BUSY signal duration. Windows, on the other hand, tends to introduce more overhead when executing external processes, even if the script itself does nothing, due to the way it handles process management at the system level.
Additionally, our systems on Raspberry Pi use a real-time kernel, which further improves the timing and responsiveness of processes. That's why we recommend running time-critical processes on Debian-based systems.
Cheers,
Jan