IF statement in LTspice

Flyback

Well-Known Member
Hi,
The attached doesnt work in changing the duty cycle. Do you know the syntax which will unlock the required action?
 

Attachments

  • duty cycle change1.png
    36.2 KB · Views: 82
  • Duty cycle change1.asc
    3.2 KB · Views: 73
You are applying the "if" statement to a parameter during the simulation. Parameters MUST have an assigned value BEFORE the start of the simulation. You cannot use the if statement to change the value of a parameter during the simulation. You need to generate the changing duty cycle in another way.

A behavioral source might be the ticket.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…