06-17-2010 10:17 AM
Hi!
I am a new "11.1"-user, unfortunately I have no DIAdem-experience so far!
I have a problem:
---
In work I am measuring forces of a milling process. The forces I am measuring are based on the workpiece. At the end of this message you can find an image which shows what my TDM-file looks like:
- Fv corresponds to Fx,
- Fvn corresponds to Fy,
- Fz = Fz,
- ResultXY = (Fv ^ 2 + FVN ^ 2) ^ (1 / 2)
The problem is that the RELEVANT forces of the milling process are based on the tool (miller). The forces are:
- feed force Ff,
- cutting force Fc and
- passive force Fp
Those are the forces I need to calculate! This is possible, because the tool-reference system and the fixed workpiece-reference system can be transformed into each other depending on the angle Φ:
1.) Fp = -Fx*cos(Φ) - Fy*sin(Φ)
2.) Fc = Fx*sin(Φ) - Fy*cos(Φ)
3.) Ff = Fz
AND NOW MY QUESTION IS: how can I achieve this transformation with the help of a DIAdem-script?
I found the example-script in "view and edit data" --> "dynamic display of statistical parameters in DIAdem-VIEW"! I think a script similar to this one would be perfect:
1) I “drag and drop” my sample-file “test_01.tdm” from the Navigator into the data portal
2) In View I open via “drag and drop” Fv (= Fx), Fvn (= Fy) , Fz and ReslutXY together in one 2D chart
3) Now I would start the (desired) Script "transformation of the forces" which at first jumps (analog to the example of "dynamic display of statistical parameters in DIAdem VIEW") to the current 2-D chart
Code could be:
Call WndShow("VIEW","SHOW")
4) After that a new window opens. In this window you can define the variables "p" and "d" manually. So that it can be calculated the following:
input-angle Φin =-arcsin (p / d),
output-angle Φout = 180 ° + arcsin (p / d)
Code could be:
Call GlobalDim("iMyIntVal, dMyRealVal")
iMyIntVal = 12
dMyRealVal = 0.5
' Open SUD dialog box
' Was dialog box closed with OK?
If SudDlgShow("Input_1",AutoActPath & "VIEW_Statistic") = "IDOk" Then
' Display results of dialog box entry
Call MsgBoxDisp("You set following:@CRLF@" & _
"@CRLF@" & _
" d [mm]: " & vbtab & str(iMyIntVal) & "@CRLF@" &_
" P [mm]: " & vbtab & str(dMyRealVal))
Else
MsgBox "DIAdem aborts."
End If
dim inputangle
dim outputangle
inputangle = -arcsin(dMyRealVal/iMyIntVal)
outputangle = 180+arcsin(dMyRealVal/iMyIntVal)
5) Confirm with OK