Hi Scott, Thanks for the reply, I didn't quite know how to use what you suggested.
Here's a better example of what I am after.
e.g I need to calculate the lead of a spring (or pitch for single start), all I have is the Ø and the angle of the helix.
Here's the equation I have, but it still isn't quite working, I think it's because of VB using Radians, not degrees (not sur though it's just what I've read)
I feel it's so close......
'Lead=PI*Ø/Tan of Angle
Helix=GetUserDRO(1201)'read helix angle
Ø=GetUserDRO(1202)'read Ø
SetOEMDRO (1203,0)'Set DRO 1203 to 0
Radians=Tan(Helix)
Degrees=(Radians*180)/3.141592654
If GetUserDRO(1201) Then
If GetUserDRO(1202) Then
SetOEMDRO (1203,3.141592654*Ø/Tan(Degrees)) 'Set DRO 1203 to Answer
Else
Message "Invalid Parameter"
End If
Else
Message "Invalid Parameter"
End If