One question...

Theme: Simulation

How can I edit a model of an optocoupler?
Use the existing 4N28 optocoupler for orientation:

1 1 (Figure 1: Simulation info in the 4N28)

The 4N28 has the subcircuit A4N28 which refers to the subcircuit A4N25. Both are
part of the project or part of the component database. In the data base browser click in menu "Extra" the optiont "Edit global simulation models". In the project, open the simulation by [F9] and go to the item "Model Browser" in menu "Tools":

2 2 (Figure 2: Edit subcircuit A4N25)

For edition double click A4N25 or use the context menu using the right mouse key. Now you can see the actual subcircuit A4N25 with its controlled sources f_ and g_ which cause the actual contactless transfer of the information from the inner LED to the phototransistor. For the syntax please refer to the general Spice documentation.