DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

script for transformation of milling forces: workpiece-reference to tool-reference system (in english now)

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

6) Now you can set a left and a right cursor (analog to the example of "dynamic display of statistical parameters in DIAdem VIEW")! Where:
left cursor = input-angle,
right cursor = output-angle
-> so that you get an interval which is defined in every point of the X-axis (for example if the interval encloses 140 measuring points, my step size would be ( IΦinI + IΦoutI ) / (140)!)

Code: ????????? Need Help!!!

7) Confirm with OK

😎 Calculation of the forces

Code: ????????? Need Help!!!

9) You get an Excel-file with the following columns:
Angle I Fp I Fc I Frad = (Fp ^ 2 + Fc ^ 2) ^ (1 / 2) I Ff

Code: ????????? Need Help!!!

---
I am grateful for any help!

 

 

0 Kudos
Message 1 of 1
(3,705 Views)