Voltecx is in beta. The macOS build comes first; Windows and Linux packages are still being tested.Beta. macOS comes first; Windows and Linux are still in testing. What's new
Documentation

8. Problems and quick fixes (beta)

When you make a mistake, Voltecx tries to say four things: what is wrong, where, what to try, and, when it can, it offers a one-click fix.

The Problems tab

The bottom panel has three tabs: Scope, Problems and Design. The Problems tab shows the number of problems in a badge beside its name, red when one of them is an error and amber for warnings; hover it for the counts in words. It never opens by itself: a blocked or failed run leaves the tab you were on and says on the status line how many errors there are. Click that line (or the tab) to read them. View > Problems opens the tab too.

Each problem is one line, as in VS Code's Problems view:

  • an icon for the severity (the shape differs for each level, so colour is not the only cue): error (the run cannot work), warning (it probably does not do what you want) and info;
  • a message in plain language;
  • the rule's code, muted, at the end of the line (param.out_of_range);
  • a Fix button when Voltecx knows a safe change, shown on the row under the pointer or picked.

Hover a row for its title and the hint on what to try. On a wide panel the picked problem is spelled out on the right: what happened, where, what to try and its fixes.

The tab's actions are icons at the right of the panel's tab row: Copy as JSON, Filter Problems (show or hide errors, warnings, suspect results and notes; Only the Selected Part; Hide All Warnings; Include All) and More Actions (group by severity or by part).

Here a run is blocked by an error (a gate that nothing drives), and the list also holds a warning (an inductance of 100 H) and a note.

The Problems tab, marked 1 to 4

  1. The tab, with the number of problems.
  2. A problem, picked (its code ends the line).
  3. Fix: and what it changes, beside the picked problem.
  4. The part it names, outlined on the schematic.

Click a row to select and zoom to the part or pin it names. Parts and pins with problems get a red (error) or amber (warning) outline on the schematic. The Properties panel marks a bad field with a red border and one line under it, and this applies to tEnd and maxStep too.

When you press Run (F5), Voltecx checks the circuit first. Errors stop the run, and the status bar says how many must be fixed. Warnings only appear in the status bar. An error from the run itself stays in the list until the circuit changes; an undo does not bring it back.

Fix is an ordinary command. It makes exactly one undo step. Press Cmd+Z to take it back.

Pressing Fix on "Value out of range" sets L1 to 100 µH. The row goes, the other rows stay, and the count on the tab drops from 3 to 2.

After Fix, marked 1 to 2

  1. L1 now reads 100 µH.
  2. The tab, one problem fewer.

Exclude a problem or ignore a rule

Some findings are on purpose: a pin left open, a signal kept for later. Right-click the row and choose Exclude This Problem. The row leaves the list; with nothing left the line reads No problems found. · 1 excluded. Ignore Problems of This Kind hides every finding of that rule. Both are saved in the circuit file, so they stay hidden when you or a colleague open it again, and each is one undo step.

An excluded finding only covers that rule at that place. The same rule on another part or pin still shows, and if the part is renamed the finding counts as new and shows again. Include All in the Filter Problems menu brings back everything that was excluded or ignored.

When a reviewed circuit's warnings crowd out what is left, Hide All Warnings in the same menu leaves every warning out of the list, its counts and the status bar at once. Errors and notes still show, and a rule you raised to an error still shows. While it is on, a line under the list counts the warnings it hides, and its Show warnings link turns it off. The switch is saved in the circuit and is one undo step; turn it off again there, in the menu, or with Include All.

The list you read is the only thing that changes. design.auto, the Test Bench and the assistant still see every finding at its own severity. From a script, problem.exclude {code, where, note} waives one finding with a note, problem.include brings it back, problem.setSeverity {code, severity} reports a rule as error, warning, info or ignore (default undoes it), problem.hideWarnings {on} is the Hide All Warnings switch, and circuit.problems {includeExcluded: true} lists what was waived, with the notes.

Jump to the part

An error that names a part or a net, such as a singular matrix at X1.C9 or a floating node, carries a link: Show {part} on the schematic. It appears in the console and in the agent panel. Click it: Voltecx enters the subsystem that holds the part, selects the part and highlights the net, so you do not have to search for a flattened name. Scripts get the same place from the where field of the problem, which gains a subsystem path.

A run error in the console and its link followed, marked 1 to 3

  1. The link under the error in the console: Show X1 › y on the schematic.
  2. Voltecx has entered the subsystem island (instance X1) that holds the node: the bar above the canvas shows the path and ‹ Back leads out.
  3. C8, a part on the node, is selected and the net is highlighted.

Notes from an import

An import lists what it did not carry over exactly. Problems shows these notes in groups, the worst first:

  • Values not defined: a value is missing, and the run cannot start.
  • Files not found: an include or a symbol file was not there.
  • Parts left out: parts that were not imported.
  • Parts simplified: parts that were read as a simpler part.
  • Settings ignored: simulation settings Voltecx does not use.
  • Nets tied to ground
  • How the run starts
  • Other notes

Each group has an icon for its severity, a title with the number of notes, and a line that says what it means. Open a group to see a chip for each part it names (a click selects the part and zooms to it) and the notes word for word. A note that no group matches stays in Other notes, so nothing is dropped. After an import, the status line gives one summary, for example imported buck.asc: 1 stop the run, 2 to check, 1 notes, and Problems opens when something needs a look. The number on the tab counts these groups, and a value that is not defined turns it red.

A result that cannot be right

After every run, Voltecx looks over the recorded waveforms once. A node voltage or a part's current that jumped a millionfold in one step, or any value that is not a number, is listed in Problems as a Suspect result warning on that node or part, with the time. That sample is rounding in the solver, or an ideal switch cutting an inductor's current, not your circuit: do not read numbers near that time. Run again with the reference solver (Simulation > Settings, "solver": "reference") and compare. The warning stays until the next run.

Every run also keeps an energy account: what the sources delivered, what the resistors, switches and other lossy parts dissipated, and how much more or less the inductors and capacitors hold at the end. When more than 5 % of the energy the run moved is missing from that account, Problems shows a Suspect result warning on the inductor or capacitor whose own energy (½·C·v², ½·L·i²) strays most from what flowed into it, with the time window where most of it happened. A part that can only dissipate (a resistor, a switch, or a controlled source that senses its own terminals and so acts as a conductance) and delivered more than 5 % of that energy gets the warning too: it made energy no source delivered, which usually means a negative value or a gain with the wrong sign. Controlled and behavioural sources, C blocks and batteries put energy in by design and are counted with the sources. A circuit with a part whose energy the run cannot read from its values alone (a machine, a saturating or core-linked inductor, a voltage-dependent capacitance, a dynamic-level MOSFET) is not checked, and gets no warning.

Common problems

What you see What it means What to do
Missing ground No pin is on net 0, so the voltages have no reference Place a ground (key G) and wire it
Floating or unconnected pin A part's pin is not wired Wire it, or remove the part
Net with one pin A wire goes nowhere Connect the other end, or delete the wire
Gate not driven A switch's gate pin is open, or its signal has no source Fix (Place PWM): a PWM block at half duty and 100 kHz on the gate, as a starting point; or connect your own control block
No dead time in a half bridge The two switches of a leg can conduct together Add a deadtime block in the gate path
Voltage source and capacitor in a loop Two ideal elements force the same voltage Add a small series resistance
Inductor and current source cut set An ideal inductor in series with an ideal current source Add a parallel resistance
Singular matrix The circuit has no unique solution. The message names the node or element Look at that node. It is usually a floating node or a loop of ideal sources
Switches that will not settle Two switches fight over a node Use a smaller step, the reference solver, or add a snubber
Forced or skipped steps (solver.forcedSteps, after a run) The fast solver accepted steps it could not check, or passed over steps without solving them. The message gives the counts, the time window and the part or node named most often Fix 1 halves maxStep; Fix 2 switches to the reference solver to compare; or add a snubber across the part named
Solvers may disagree (solver.parityGap, after a fast run) A warning when the circuit is an example the fast and reference solvers are known to disagree on (the message names the issue that tracks it); a note on the dead-time block when a dead time is shorter than maxStep, so it falls inside one step Fix 1 switches to the reference solver; for the dead time, Fix 2 sets maxStep to the dead time
Unknown variable (Vi) The name is not a circuit variable. Voltecx suggests Vin Accept the suggestion
Value far outside the usual range (100 H) Probably a unit slip. Voltecx suggests 100u Accept the suggestion, or keep the value if you meant it
Duty or modulation outside 0 to 1 A PWM input that can never work Fix the source of the duty value
maxStep above one fiftieth of a period The step is too coarse for the fastest source Lower maxStep (chapter 4)
Symbols drawn on top of each other (CTRL and VinSense) An old file or an import left two symbols on one spot, hiding pins and wires Press Fix (Move apart): the second one moves to the nearest free spot
A control signal drawn as a long wire through the power stage (hint) A gate signal, a sensed value or a duty crosses the power parts as a wire Fix 1 draws that net as labels; Fix 2 runs Tidy Schematic (chapter 3)
Foster stages out of order, or a Zth curve that falls or runs backwards A data-sheet table pasted in the wrong order or misread Fix: sort the stages, or sort and flatten the curve (chapter 4)
Zth fit misses the curve by more than 5 % Too few terms for the curve, or a misread point Fix: fit with more terms, or check the points
Run too short for steady state tEnd ends before the circuit settles Raise tEnd, or use simulation.steadyState

Forced or skipped steps

The fast solver shortens a step to locate a diode or switch that changes state inside it. When a shorter step does not solve, it keeps the longer step that did, and the commutation stays somewhere inside that step. A variable step whose error stays over the tolerance even at the shortest step is taken again with backward Euler, without the check. Both are forced steps. A step to an event that is shorter than the shortest refinement and does not solve is passed over: the clock moves to the event and the circuit holds its state. That is an unsolved step. Neither solver ever accepts a step whose switch states or operating points did not settle: that stops the run with an error.

After a run, Problems shows the warning Forced or skipped steps (solver.forcedSteps) when more than 1 % of the steps were forced or any step was unsolved. The waveforms are still drawn through those instants, but they were not solved as intended there. The run summary of simulation.run has the counts in stepEvents: rejected, forced, unsolved, minStep, window and worst. Counting the steps changes no value of the run. The reference solver steps on its grid, so it reports no forced or unsolved step.

Unknown names

If you mistype a command, a component or a pin, the message adds a "did you mean" suggestion. If no circuit is open, a Fix opens a new one.

From a script or an assistant

  • circuit.problems lists the static problems. With {"run": true} it adds the findings of a short simulation (shoot-through, ringing, growing oscillation).
  • problem.fix applies a fix by its code or index.
  • A failing command over serve returns the usual error message plus a problem object with the same hint and fixes, so an assistant can repair its own mistake.
  • circuit.apply makes several edits (add, connect, set a parameter, remove) as one all-or-nothing step.

Limits in the beta: the desktop app's own control channel still returns plain text errors without the problem object. Hints are in English in both languages.

Report a problem

When Voltecx gets something wrong, Help > Report a Problem (or the Report button on a command error in Problems) files it as an issue for the Voltecx team. It opens the feedback window on the kind Problem (see Send Feedback below; picking another kind there keeps what you typed). It is opt-in, and nothing leaves your computer until you send it:

  1. Describe what you did and what you expected. Clear Include the circuit file to leave the circuit out.
  2. The window shows exactly what will be sent: the title, the labels and the whole text, with your note, the error, the Voltecx version, the operating system and the circuit file. Every path and your user name are replaced by <path> and <user>.
  3. Tick I have read what will be sent, then press Send Report. Any change to the report clears the tick, so you confirm what is actually sent.

The report goes to a Voltecx relay that files the issue; the app holds no GitHub account or token. A build made without a relay address greys the item out. An assistant can open the window, read the report and write the note (ui.dialog.list, ui.dialog.respond), but it cannot send it: only your own click does. help.reportPreview returns the same report and never sends anything.

Help > Send Feedback opens the same window on the kind Idea: send an idea or praise in your own words, through the same relay. Picking Problem turns it into the problem report above. Write your message, and optionally give a rating from 1 to 5 and an email address for a reply. The window says what is sent (your message, the kind, the rating, the Voltecx version and the system) and shows it exactly as it will go out, with paths and your user name taken out. The email address is kept on the Voltecx server only to reply to you; it is never put in the GitHub issue. To show us what you mean, tick Attach a screenshot of the Voltecx window: Voltecx takes a picture of its window (without the feedback window) and shows it before anything is sent. The picture shows everything in the window, your circuit included; the Voltecx server keeps it for 90 days for the Voltecx team only. Tick I have read what will be sent, then press Send. The same feedback sent twice, or the same crash reported from several computers, becomes one issue with a count, not many. help.feedbackPreview returns the same object and never sends anything.

Look deeper

For problems that no rule names (the waveform looks wrong, but the circuit runs), the workflow is in docs/workflows/debugging.md. It starts from the symptom: what to measure, the common causes, and how to reproduce the problem in Voltecx.