edwardw / P-Channel MOSFET

Files

Pins

Symbol

PCB

Open in Flux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const gateTerminalId = "d4705b32-ebd5-e041-cb38-748831726582"; //gate
const drainTerminalId = "b50a105a-0fa7-3419-f176-24e4103e029f"; //drain
const sourceTerminalId = "470f452b-3deb-a180-5510-3fe7b2058e85"; //source
const gateTerminal = flux.getNodeById(gateTerminalId, "elementTerminal"); 
const drainTerminal = flux.getNodeById(drainTerminalId, "elementTerminal");
const sourceTerminal = flux.getNodeById(sourceTerminalId, "elementTerminal");
const gateVoltage = flux.createOutputNode("gate-voltage");
const drainVoltage = flux.createOutputNode("drain-voltage");
const sourceVoltage = flux.createOutputNode("source-voltage");
// Setup Event
flux.on("setup", () => {
    flux.simulationModel =  simModel();
});
// Before Event
flux.on("beforeStep", () => {
    flux.simulationModel =  simModel();
});
// Calculation Event
flux.on("afterStep", () => {
        
    gateVoltage.name = "Vg";
    gateVoltage.value = Number(gateTerminal?.voltage);
    gateVoltage.unit = "V";
    
    drainVoltage.name = "Vd";
    drainVoltage.value = Number(drainTerminal?.voltage);
Design view of P-Channel MOSFETDesign view of P-Channel MOSFET
Enter to Rename, Shift+Enter to Preview

Reviews