Cyclic interrupt faster than 10 ms

Hello,
for our current application, we would like to evaluate certain constraint conditions in a cyclic interval as fast as possible (we are aiming for something like 4-6 ms) to use the result in a SearchL command. However, the conditions contain some calculations so using a simple CyclicBool would not work. We tried using timed interrupts with an ITimer and a TRAP routine, but the minimum cyclic time here is 100ms for cyclic interrupts. Even if we use the Single attribute, we can only go down to 10ms. The conditions itselfs highly depend on the program we are running, so hardcoding them in a background task is probably not an option either.

Finally, we came up with a bit of a silly approach now: We use a background task to update a persistent variable every 6 ms and subscribe to this variable using an IPers in our foreground task, so our TRAP routine gets called periodically with that frequency. This seems to work, but we do have some concerns about the performance cost of this approach.
Is it likely that this will have a negative impact on the robots runtime performance? And is there a better way to do this?

TLDR; Is there a feasible way to cyclically call TRAP routines faster than 10 ms?

Thanks & Kind Regards

Comments

Sign In or Register to comment.