ALTADataSet.AddFailure: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:


{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
         Dim ALTADS as New ALTADataSet
         Dim ADS As New ALTADataSet("AddFailure_Example")
 
{{APIComment|Create a Stress Definition. See [[ALTADataSet.AddStressDefinition|AddStressDefinition]] for additional details.}}
ADS.AddStressDefinition("Stress1")


{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
         Dim sp = New ALTAStressProfile("Profile1")
         Dim StressProfile1 As New ALTAStressProfile("StressProfile1")
        sp.RepeatCycle = True
StressProfile1.RepeatCycle = True
        sp.AddSegment(1, 250)
StressProfile1.AddSegment(2, 250)
        sp.AddSegment(2, 300)
StressProfile1.AddSegment(3, 400)
        sp.AddSegment(3, 400)
StressProfile1.AddSegment(4, 500)


{{APIComment|Add values to the raw data.}}
{{APIComment|Add values to the raw data.}}
        ALTADS.AddFailure(1, 1, sp)
ADS.AddFailure(37831.0019792202, 1, 274)
        ALTADS.AddFailure(2, 1, sp)
ADS.AddFailure(54436.8281748317, 1, 274)
        ALTADS.AddFailure(3, 1, sp)
ADS.AddFailure(65819.5877754221, 1, 438)
ADS.AddFailure(65919.5029949395, 1, 438)
ADS.AddFailure(46881.4260078973, 1, 438)
ADS.AddFailure(73214.3647378378, 1, 438)
ADS.AddFailure(89541.7683709142, 1, 190)
ADS.AddFailure(38978.5381681186, 1, 190)
ADS.AddFailure(42334.8989069159, 1, 190)
ADS.AddFailure(9596.18143252851, 1, 190)


{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 3.}}
{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 3.}}
         Dim NumberOfFailures as Integer
         Dim FailureCount As Integer
        NumberOfFailures = ALTADS.FailureCount
FailureCount = ADS.FailureCount

Revision as of 17:41, 11 February 2014


Adds failure times to the data set, using the specified time and number of failures at that time.

Syntax

  • AddFailure( ByVal Value As Double , ByVal NumberInGroup As Integer , ByRef Stress() As Object )
  • AddFailure( ByVal Value As Double , ByVal NumberInGroup As Integer , ByRef Stress1 As Object )
  • AddFailure( ByVal Value As Double , ByVal NumberInGroup As Integer , ByRef Stress1, Stress2 As Object )

Parameters

Value: The exact time of failure.
NumberInGroup: The number of units that failed at the Value time.
Stress(): An array containing numeric stress values or references to added ALTAStressProfiles.
Stress1: A numeric stress value or reference to an added ALTAStressProfile.
Stress2: A numeric stress value or reference to an added ALTAStressProfile.

Usage Example

Declare the ALTADataSet. See New ALTADataSet for additional details.

       Dim ADS As New ALTADataSet("AddFailure_Example")

Create a Stress Definition. See AddStressDefinition for additional details.

ADS.AddStressDefinition("Stress1")

Declare an ALTAStressProfile. See ALTAStressProfile for additional details.

       Dim StressProfile1 As New ALTAStressProfile("StressProfile1")
StressProfile1.RepeatCycle = True
StressProfile1.AddSegment(2, 250)
StressProfile1.AddSegment(3, 400)
StressProfile1.AddSegment(4, 500)

Add values to the raw data.

ADS.AddFailure(37831.0019792202, 1, 274)
ADS.AddFailure(54436.8281748317, 1, 274)
ADS.AddFailure(65819.5877754221, 1, 438)
ADS.AddFailure(65919.5029949395, 1, 438)
ADS.AddFailure(46881.4260078973, 1, 438)
ADS.AddFailure(73214.3647378378, 1, 438)
ADS.AddFailure(89541.7683709142, 1, 190)
ADS.AddFailure(38978.5381681186, 1, 190)
ADS.AddFailure(42334.8989069159, 1, 190)
ADS.AddFailure(9596.18143252851, 1, 190)

Get the number of failures. In this example, NumberOfFailures will be 3.

       Dim FailureCount As Integer
FailureCount = ADS.FailureCount