Why I cannot change Ton of pulse signal with if?

Hi,

Why I cannot change Ton of pulse signal in one of the manner below? Or how could I change Ton from 0.4/100k to 0.6/100k when time >2.5m?

test2.qsch (3.5 KB)

Maybe need to change to exponential notation 100e3 instead of 100k, especially when you are doing some math

Tried, does not work

You can only enter static value (param) into V-source (so no if else)
For B-source, i dont know if time>2.5m can work, or should you replace it with time>2.5e3

Does not work either

formula, node voltage and current are <expression> and generally only be used in behavioral device such as Behavioral sources, arbitrary capacitance device or inductance device…
There is no method to change parameter of PULSE voltage source during simulation. You need to build a circuit (for example comparator with sawtooth) to change duty of pulse.