From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Doing 2 unique HIC calculations in a data file that has two impacts

We use DIAdem to analyze data from a crash box which is installed on our Indy Cars. It is not uncommon to have two impacts which both require a HIC calculation for reporting purposes. It looks like the HIC function looks for the peak of the channel used for the calculation. Thus if you zoom in on the car impact channel that does not have the peak of the channel used for the HIC calculation. The HIC calculated number does not correlate with the car impact graph. We have script files that analyze the data and draw the appropriate graphs. The data sets are 1.5 minutes in length and we typically zoom down to about a 200msec window for graphing. I would like the calculations like HIC and Delta V to be confined to the data in the window determined by the cursors used for the zooming of the window. The work around has been to edit the data into 2 data sets each of which contains an impact. However due to the speed that we like to get the data to the Doctors having to manually edit the data into two data sets is not desirable.

0 Kudos
Message 1 of 4
(3,950 Views)
Hello!

Verry interesting problem! Working on our DIAdem based crash analyse system X-Crash I had not yet this requirement.

Let me see how to solve this task. I don't think that a fully automated solution will be as reliable as it should be. The human pattern recogniation system (eye/brain) will be necessary to find the relevant parts in your data.
DIAdem VIEW can assist you to get your result faster. You can use the band cursor in DIAdem to select the area you want to use and than run a script to cut&copy this part into new channels. Than you can make your calculations on this data.

The code (for DIAdem 9 or better) shows how to cut&copy the data into a new channelgroup. If you define a keyboard short cut to this script you have only to select the data area and then press a key to get your result for one impact. You can store the results of all impacts in a variable to send all values to the doctor.

Note: The Code is in a second reply because it was to long for one reply!


Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 4
(3,934 Views)
Option Explicit
 
Dim
i
Dim dX1
Dim dX2
Dim nStartRow
Dim nEndRow
Dim dSampleInterval : dSampleInterval =
0.0001
 
' remove temporary channelgroup if exist
If GroupIndexGet("DATA_PART") > 0 Then
Call
GroupDel(GroupIndexGet(
"DATA_PART"))
End If
 
' X1/X2 order might be wrong
If View.ActiveSheet.Cursor.X1 < View.ActiveSheet.Cursor.X2 Then
dX1 = View.ActiveSheet.Cursor.X1
dX2 = View.ActiveSheet.Cursor.X2
Else
dX1 = View.ActiveSheet.Cursor.X2
dX2 = View.ActiveSheet.Cursor.X1
End If
 
' convert time values to channel row index (simple way)
nStartRow = dX1 / dSampleInterval + 1
nEndRow = dX2 / dSampleInterval + 1
 
' create new temporary channelgroup and set it as default
GroupCreate("DATA_PART")
GroupDefaultSet(GroupIndexGet(
"DATA_PART"))
 
' copy the defined block from the first channelgroup
For i=1 to GroupChnCount(1)
' create target channel
Call ChnAlloc( ChnName("[1]/[" & i & "]"),nEndRow - nStartRow + 1)
' copy data block
Call DataBlCopy("'[1]/[" & i & "]'",nStartRow,nEndRow,"'" & "DATA_PART/[" & i & "]'",1)
Next
 
' calculate HIC in new group
Call ChnXYZAbsValue("DATA_PART/11HEAD0000H3ACXP", "DATA_PART/11HEAD0000H3ACYP", "DATA_PART/11HEAD0000H3ACZP", "DATA_PART/11HEAD0000H3ACRA")
Call ChnHICCalc(
"DATA_PART/time", "DATA_PART/11HEAD0000H3ACRA", true, true, true)
 
' do something with the HIC
MsgBox "HIC(1) = " & HICRes(1,1)
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 3 of 4
(3,931 Views)

Thank you for your response. With some hints from your code I was able to get our HICs calculated correctly. I was trying to use the block copy function but did not understand what to do once the data was copied. Creating the new channel group was the secret. We already had a script written that would allow me to zoom in on the crash impulse in view and then update the time axis on the 6 graphs in report that we print for the doctors. Since we were already doing the manual parsing of the data as you mentioned in your first response we already had the cursor coordinates need to create the channel group.

Thanks again for your help

Jeff

0 Kudos
Message 4 of 4
(3,856 Views)