Skip to content

Commit

Permalink
Mitigate OCP faults
Browse files Browse the repository at this point in the history
This change attempts to mitigate OCP faults when switching presets,
while keeping the loss of responsiveness to a minimum.
  • Loading branch information
jjcarrier committed Dec 19, 2024
1 parent 8890962 commit 6538c27
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libdp100/PowerSupply.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,20 @@ public bool SetOutputToPreset(byte index)
}
else
{
if (index != Output.Preset)
{
// Mitigation measure for OCP false triggers.
// This does not prevent it completely but avoids common occurrences.
// The main continuing issue is seen when switching the output back ON
// after changing to a more restrictive OCP setting when a VI setting
// that is more demanding of current. Something inside the DP100
// requires a settling time to stabilize and it seems like it can take
// upwards to 2-3seconds.
SetOutputOff();
Output.Preset = index;
Thread.Sleep(100);
}

apiMutex.WaitOne();
NullStdOutput();
result = ApiInstance.UseGroup(
Expand Down

0 comments on commit 6538c27

Please sign in to comment.