Question: how to create pwl file ltspice?
Answer: Right-click on the symbol in the schematic editor. Click Advanced. Select either PWL(t1, v1, t2, v2…) or PWL File: Depending on your choice in step 3, either enter the PWL values or choose a file.