As per my understanding, you are trying to implement a phase delay in “pulse generator” block, which is currently set by a formula. But, you want it to be dynamically controlled by a “PID controller” block.
The “phase delay” property of “pulse generator” block should be coded before compiling the Simulink model because, it is set during the compile time and there is no way to change it during run time.
However, the objective stated by you can be achieved by the below suggested workarounds:
Case-1: use of “Variable Pulse Delay” block.
The “variable pulse delay” block is found in library: “Mixed-Signal Blockset / Utilities”. It introduces a controllable delay in signal samples. Each sample at the “in” port is delayed by the value at the “delay” port at the time the input sample arrived. You can use it as shown in the below Simulink model:
At the beginning of the simulation, the “out” port is set to the value of the “Initial Input” parameter.
Refer the documentation to explore more about the block:
Case-2: Use “Variable Transport Delay” or “Variable Time Delay” block:
The “Variable Transport Delay” and “Variable Time Delay” blocks appear as two blocks in the Simulink block library. However, they are the same Simulink block with different settings for the “Select delay type” parameter. Refer to the below documentation links for their usage:
1) Variable Transport Delay:
2) Variable time delay:
Below given Simulink model illustrates its usage:
I hope it answers your question !