Class Dynamic
- Namespace
- CsraTestMethods.SupplyCurrent
- Assembly
- CsraTestMethods.dll
[TestClass(Creation.TestInstance)]
[Serializable]
public class Dynamic : TestCodeBase
Overview
TestClass for all dynamic supply current related TestMethods.
Platform Specifics
Uses per test-instance test class object persistence ([TestClass(Creation.TestInstance)] attribute).
- Inheritance
-
TestCodeBaseDynamic
- Inherited Members
-
TestCodeBase.AbortTest()TestCodeBase.DebugBreak()TestCodeBase.TheExecTestCodeBase.TheHdwTestCodeBase.TheProgramTestCodeBase.FlowDomainsTestCodeBase.ShouldRunPreBodyTestCodeBase.ShouldRunBodyTestCodeBase.ShouldRunPostBody
Methods
Baseline(PinList, double, double, double, double, Pattern, int, string)
Performs a predefined number of current measurements synchronized by a Flag stop with the pattern.
[TestMethod]
[Steppable]
[CustomValidation]
public void Baseline(PinList pinList, double forceValue, double measureRange, double clampValue, double waitTime, Pattern pattern, int stops, string setup = "")
Parameters
pinListPinListList of pin or pin group names.
forceValuedoubleThe value to force.
measureRangedoubleThe range for measurement.
clampValuedoubleThe value to clamp.
waitTimedoubleThe wait time after forcing.
patternPatternThe pattern to be executed during the test.
stopsintThe number of stops executing a strobe on the instrument outside of the pattern - need to match with the pattern
setupstringOptional. The name of the setup set to be applied through the setup service.
Details
Test Technique
- to be added
Implementation
The PreBody section applies levels and timing from the test instance context. Optionally, applies the specified config. For all pins specified in the pinList it disconnects any pin electronics, connects the dc path and turns on the gate.
The Body section applies a forceVoltage condition on all pins, sets the measurement mode, starts the pattern and performs a predefined number of current measurements synchronized by a Flag stop. Sets of measurements are made after Flag stop at the specified waitTime.
The PostBody section restores the pin electronics connection for digital pins after gating off and disconnecting the dc path. Finally, a parametric datalog is logged.
Platform Specifics
Supports stepping capability for PreBody/Body/PostBody.
Pre Conditions
- none
Post Conditions
- any dc paths from pins in
pinListare disconnected
Limitations
- support for non-uniform (mixed) instrument types in pinList not yet available
Code Reference
[TestMethod, Steppable, CustomValidation]
public void Baseline(PinList pinList, double forceValue, double measureRange, double clampValue, double waitTime, Pattern pattern,
int stops, string setup = "") {
if (TheExec.Flow.IsValidating) {
TheLib.Validate.Pins(pinList, nameof(pinList), out _pins);
TheLib.Validate.Pattern(pattern, nameof(pattern), out _patternInfo);
TheLib.Validate.InRange(waitTime, 0, 600, nameof(waitTime));
TheLib.Validate.GreaterOrEqual(stops, 1, nameof(stops));
_containsDigitalPins = _pins.ContainsFeature(InstrumentFeature.Digital);
_patternInfo[0].SetFlags = (int)CpuFlag.A;
}
if (ShouldRunPreBody) {
TheLib.Setup.LevelsAndTiming.Apply(true);
Services.Setup.Apply(setup);
if (_containsDigitalPins) TheLib.Setup.Digital.Disconnect(_pins);
TheLib.Setup.Dc.Connect(_pins);
}
if (ShouldRunBody) {
TheLib.Setup.Dc.SetForceAndMeter(_pins, DcOutputMode.ForceVoltage, forceValue, forceValue, clampValue, DcMeterMode.Current, measureRange);
TheLib.Execute.Digital.StartPattern(_patternInfo[0]);
for (int i = 0; i < stops; i++) {
TheLib.Execute.Digital.ContinueToConditionalStop(_patternInfo[0], () => {
TheLib.Execute.Wait(waitTime);
TheLib.Acquire.Dc.Strobe(_pins);
});
}
TheLib.Execute.Digital.WaitPatternDone(_patternInfo[0]);
_pinsMeasuredSamples = TheLib.Acquire.Dc.ReadMeasuredSamples(_pins, stops);
}
if (ShouldRunPostBody) {
TheLib.Setup.Dc.Disconnect(_pins);
if (_containsDigitalPins) TheLib.Setup.Digital.Connect(_pins);
TheLib.Datalog.TestParametric(_pinsMeasuredSamples, forceValue, "V");
}
}