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(
<<Set Folder( "E:\Reports\_ Software\JMP Learning\6 - FRF plotter for FEA\" ),
<<Set Show Hidden( 0 ),
<<Set Subfolders( 0 ),
<<Set Name Filter
//==========================================================================
// Manual input #2: the name of the FRF data (need to keep the colon)
//==========================================================================
("
ccf_23101106.frf;
ccf_23101703.frf;
ccf_23101701.frf;
"),
<<Set Name Enable( 1 ),
<<Set Size Filter( {90190, 90190} ),
<<Set Size Enable( 0 ),
<<Set Date Filter( {3761729046.157, 3761730593.651} ),
<<Set Date Enable( 0 ),
<<Set Add File Name Column( 1 ),
<<Set Add File Size Column( 0 ),
<<Set Add File Date Column( 0 ),
<<Set Import Mode( "CSVData" ),
<<Set Charset( "Best Guess" ),
<<Set Stack Mode( "Stack Similar" ),
<<Set CSV Has Headers( 1 ),
<<Set CSV Allow Numeric( 1 ),
<<Set CSV First Header Line( 1 ),
<<Set CSV Number Of Header Lines( 1 ),
<<Set CSV First Data Line( 7 ), // First row starts from row #7
<<Set CSV EOF Comma( 0 ),
<<Set CSV EOF Tab( 0 ),
<<Set CSV EOF Space( 0 ),
<<Set CSV EOF Spaces( 1 ),
<<Set CSV EOF Other( "" ),
<<Set CSV EOL CRLF( 1 ),
<<Set CSV EOL CR( 1 ),
<<Set CSV EOL LF( 1 ),
<<Set CSV EOL Semicolon( 0 ),
<<Set CSV EOL Other( "" ),
<<Set CSV Quote( "\!"" ),
<<Set CSV Escape( "" ),
<<Set XML Method( "guess" ),
<<Set XML Guess( "huge" ),
<<Set XML Settings( XML Settings() ),
<<Set JSON Method( "guess" ),
<<Set JSON Guess( "huge" ),
<<Set JSON Settings( JSON Settings() ),
<<Set Import Callback( Empty() )
) << 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);
);