const anodeTerminalUid = "9b43137e-5678-604b-097b-07055b46b0c6";
const cathodeTerminalUid = "8d0d6e5c-9570-643c-7237-cd6c714368b5";
const anodeTerminal = flux.getNodeById(anodeTerminalUid, "elementTerminal");
const cathodeTerminal = flux.getNodeById(cathodeTerminalUid, "elementTerminal");
if (!anodeTerminal || !cathodeTerminal) {
throw new Error("Oops! Couldn't find terminals");
}
const anodeVoltageOutput = flux.createOutputNode("Vanode");
anodeVoltageOutput.name = "Vanode";
anodeVoltageOutput.unit = "V";
const cathodeVoltageOutput = flux.createOutputNode("Vcathode");
cathodeVoltageOutput.name = "Vcathode";
cathodeVoltageOutput.unit = "V";
const voltagePeakToPeakOutput = flux.createOutputNode("vptop");
voltagePeakToPeakOutput.name = "Vp-p";
voltagePeakToPeakOutput.unit = "V";
const currentOutput = flux.createOutputNode("current");
currentOutput.name = "Current";
currentOutput.unit = "A";
const rmsOutput = flux.createOutputNode("vrms");
rmsOutput.name = "Vrms";