Hi folks,
I have three FRF (txt style) files to be imported into JMP, and I had the following script to import and process the data. I have one description table that has three description items, which need to be assigned to the FRF data table in an ascending order. For example:
z-ht_0.414 needs to be assigned to ccf_23101106.FRF
z-ht_0.464 needs to be assigned to ccf_23101703.FRF
z-ht_0.514 needs to be assigned to ccf_23101701.FRF
The problem of my script ends up opening ccf_23101703 later than ccf_23101701. As a result, the z-ht_0.514 is assigned to the second data table ccf_23101703 instead of the third data table ccf_23101701. It shows that ccf_101703 is the data table window opened last, but in my script, ccf_101703 should be the second data table window opened. Can anyone help explain this weird thing and provide a solution to my question? I have copied my script below and attached the raw data. Please let me know if you need further information. Thanks.
/-----------------------------------------------------------------------------------------------------------------
Names Default To Here( 1 );
Clear Globals();
Description = New Table( "Description",
Add Rows( 0 ),
New Column( "Descriptioin", Character, set values( {
//==========================================================================
// Manual input #1: the description of the FRF data (need to keep the colon)
//==========================================================================
"z-ht_0.414",
"z-ht_0.464",
"z-ht_0.514"
} ))
);
FRF_file_num = N Rows( Description);
dtList = Multiple File Import(
<
<
<
<
//==========================================================================
// Manual input #2: the name of the FRF data (need to keep the colon)
//==========================================================================
( "
ccf_23101106.frf;
ccf_23101703.frf;
ccf_23101701.frf;
" ),
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
) << Import Data;
//==========================================================================
// Process the raw FRF data table for each indivdual FRF data
//==========================================================================
For(i = 1, i<= FRF_file_num, i++,
dtList[i] << Set Window Size( 880, 400 );
dtList[i] << Move Window( 1600, 0+i*20 );
Column( dtList[i], 1 ) << setname( "Null" );
Column( dtList[i], 2 ) << setname( "Freq kHz" );
Column( dtList[i], 3 ) << setname( "Disp 1" );
Column( dtList[i], 4 ) << setname( "FRF Phase" );
Column( dtList[i], 5 ) << setname( "Disp 2" );
Column( dtList[i], 6 ) << setname( "Phase 2" );
Column( dtList[i], 7 ) << setname( "FRF Gain" );
Column( dtList[i], 8 ) << setname( "Description" );
Nrow = N Rows( dtList[i] );
For( j = 1, j <= Nrow, j++,
dtList[i][j, 2] = dtList[i][j, 2] / 1000;
dtList[i][j, 7] = 20 * Log10( dtList[i][j, 3] / dtList[i][1, 3] );
dtList[i][j, 8] = Description [i, 1];
);
dtList[i]:Null << Set Selected;
dtList[i]:Disp 1 << Set Selected;
dtList[i]:Disp 2 << Set Selected;
dtList[i]:Phase 2 << Set Selected;
dtList[i] << Delete Columns();
//Wait (2);
);
/-----------------------------------------------------------------------------------------------------------------