Example Program Drafts

Showing results for 
Search instead for 
Did you mean: 

Automated Slope Calculation with DIAdem Script


This script programmatically calculates the average slope between two defined channel values, which may be useful for e.g. determining the Youngs Modulus using Hookes Law.
Tensile Test (the slope of the linear range is called "Youngs Modulus")



  • We iterate through the channel until a measurement exceeds a start value (e.g. y = 2). We then store this pair of numbers as [x0,y0].
  • From hereon, we iterate through the channel until the stop value has been reached (e.g. y = 17). We also store this pair of number as [x1,y1].
  • Finally, we calculate the slope which is defined as slope = (y1 - y0) / (x1 - x0).
  • As a bonus, we check if the start and stop value have ever been reached. If not, an error message is returned.


Hardware and Software Requirements

DIAdem Base 2011 (or compatible)


Steps to Implement or Execute Code

1. Unzip Slopes Thresholds - DIA2011.zip

2. Run Slopes Thresholds.VBS


Additional Information or References


Tensile Testing - Leaving Certificate Engineering Notes

Eric H.
Applications Engineering
National Instruments