DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

generic file load

Solved!
Go to solution

 

Option Explicit
Dim Row, FilePath, Folder
Const ExcelFileName = "curve linear final limits  ECE-AIS.xls"
Const ExcelSheetIdx = 1
Const StpFileName = "curve linear final limits  ECE-AIS.stp"
Call Data.Root.Clear
'get FilePath from dialog
Call FileNameGet("ANY", "FileRead", DataDrvUser, "DAT files (*.dat),*.dat", "", 0, "Select File to Process...")
If DlgState = "IDCancel" Then Call AutoQuit
FilePath = FileDlgName
'Load dat file
FilePath = AutoActPath & "C100227-6.DAT"
Folder = NameSplit(FilePath, "P")
Call DataFileLoad(FilePath)
'import limit channels from Excel file
Call ExcelImport(Folder & ExcelFileName, ExcelSheetIdx, 0, Folder & StpFileName)
'load the VIEW layout to show the data and (eventually) the envelope curves
Call View.LoadLayout(AutoActPath & "TUV.TDV")
'Search for the first Row where the value in channel 2 has exceeded 1.0, add 0s to shift the envelope curves
Row = Find("Ch(2) > 1.0")
IF Row > 0 THEN
  Call ChnAreaInsert0(3, 1, Row+1)
  Call ChnAreaInsert0(4, 1, Row+1)
END IF
'Come to report panel, refresh it to see the 3 curves
Call PicLoad(AutoActPath & "TUV.TDR")
Call PicUpdate(0)

 

 

Hi all, 

In the above script, what ever the dat file i load, the same C100227-6.DAT's is appearing in the graph. I tried doing it for any other file. But getting some errors and cant trace it out.

Can any one tell me how can i make this script to plot graph for any other file other than C100227-6.DAT mentioned in the script.

 

Also please let me know how do i learn loading generic file, generic channel referenceing, All generic things, etc etc. Instead of mentioning a specific file in a script . Any material to learn this available please guide me. 

 

Thanks in advance.

 

Rash

 

0 Kudos
Message 1 of 2
(3,589 Views)
Solution
Accepted by topic author Rash.patel

Hi Rash,

 

Sure, just remove this line from the script:

 

FilePath = AutoActPath & "C100227-6.DAT"

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 2
(3,578 Views)