Accelerated Life Testing Analysis in Microsoft Excel - Explanation: Difference between revisions
Jump to navigation
Jump to search
Chris Kahn (talk | contribs) No edit summary |
Chris Kahn (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
This article explains some of the API calls in the [http://www.reliasoft.com/synthesis/api/examples/ALTAExample.xlsm Accelerated Life Testing Analysis in Microsoft Excel] example file. For more examples, please see the [[Synthesis_API_Reference#Application_Examples|Example section]] of the API Reference. | This article explains some of the API calls in the [http://www.reliasoft.com/synthesis/api/examples/ALTAExample.xlsm Accelerated Life Testing Analysis in Microsoft Excel] example file. For more examples, please see the [[Synthesis_API_Reference#Application_Examples|Example section]] of the API Reference. | ||
The functions in this example are very similar to the [[Life Data Analysis in Microsoft Excel - Explanation|Weibull++ example]]. After reviewing | The functions in this example and the code structure are very similar to the [[Life Data Analysis in Microsoft Excel - Explanation|Weibull++ example]]. After reviewing the Weibull++ example, note the following differences. | ||
*Inside the CalculateALTA function, a "Use Stress" value is specified before running calculations. This is done by calling the ALTADataSet object's AddStressDefinition and passing a name of the stress and the value. Note that we are checking that the stress value is greater than 0 to provide a useful error message if it is not. | *Inside the CalculateALTA function, a "Use Stress" value is specified before running calculations. This is done by calling the ALTADataSet object's AddStressDefinition and passing a name of the stress and the value. Note that we are checking that the stress value is greater than 0 to provide a useful error message if it is not. | ||
Line 19: | Line 19: | ||
</div> | </div> | ||
*When loading the failure data from the spreadsheet, the ALTADataSet | *When loading the failure data from the spreadsheet, the ALTADataSet object's AddFailure subroutine includes a third parameter to pass the stress values for the failure. Note that although our sheet has only one stress column, you could add additional stress columns which is why the stress value is passed inside an array. | ||
{{APIComment|'Read the Grouped Time to Failures data into the ALTADataSet}} | {{APIComment|'Read the Grouped Time to Failures data into the ALTADataSet}} |
Revision as of 16:10, 12 March 2014
This article explains some of the API calls in the Accelerated Life Testing Analysis in Microsoft Excel example file. For more examples, please see the Example section of the API Reference.
The functions in this example and the code structure are very similar to the Weibull++ example. After reviewing the Weibull++ example, note the following differences.
- Inside the CalculateALTA function, a "Use Stress" value is specified before running calculations. This is done by calling the ALTADataSet object's AddStressDefinition and passing a name of the stress and the value. Note that we are checking that the stress value is greater than 0 to provide a useful error message if it is not.
'Set the Use Stress value Dim useStress As Double useStress = ActiveSheet.Range("F3") If useStress <= 0 Then 'If the use stress value is invalid, then don't continue calculating MsgBox "Enter a use stress. The use stress value must be greater than 0.", vbInformation Call ClearResults Exit Sub End If Call mALTADataSet.AddStressDefinition(ActiveSheet.Range("C2"), , useStress)
- When loading the failure data from the spreadsheet, the ALTADataSet object's AddFailure subroutine includes a third parameter to pass the stress values for the failure. Note that although our sheet has only one stress column, you could add additional stress columns which is why the stress value is passed inside an array.
'Read the Grouped Time to Failures data into the ALTADataSet
Dim i As Integer
Dim StressArray(0) As Variant
For i = 3 To ActiveSheet.Cells(ActiveSheet.Rows.count, 1).End(xlUp).Row - 1
StressArray(0) = ActiveSheet.Cells(i, 3).Value
Call mALTADataSet.AddFailure(Val(ActiveSheet.Cells(i, 1).Value), _
CLng(ActiveSheet.Cells(i, 2).Value), StressArray)
Next