URCap control with UR-RTDE

I’m controlling my UR10e robot via UR-RTDE(with external control) with a 2ms cycle from my PC.
And I want to use UR-RTDE to control tools connected to the tool port of UR10e (end-effector).
I have already created URCap software that can be controlled with the UR teach pendant.

I tried controlling my tool through the “sendCustomScript” function provided by ur-rtde.
However, it failed to control my tool while simultaneously controlling the robot in real-time with a 2ms cycle.
I think it can not be used both at once. Or maybe I’m using that function wrong.

To summarize, what I want is a way to simultaneously control the URCap (which I created) via UR-RTDE, along with the robot and my tool attached to the end of the robot.
(After looking up the information, it seems that variables such as output_double_register_X can be used.)

Thank you.