Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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
    duty cycle change1.png
    36.2 KB · Views: 220
  • Duty cycle change1.asc
    3.2 KB · Views: 190
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.
 

New Articles From Microcontroller Tips

Back
Top