06-19-2011 11:27 PM
Hi ,
I have a test file in .dat format. Normally we will have 4 channels. Time, Accleration1 and Accleration2, Upper Limit and Lower limit.
Where I plot Time v/s Accleration1 and Accleration2.
In future, test file may contain Accleration 3, Accleration 4, .. Accleration 10. So, how can I make a script to dynamically read the number of channels that are loaded to a data portal and plot all of them on report. (whichever is existing. )
I read in help to use globusedchn. How can i use it in script.
Should I have to use ny looping statements? please help.
06-20-2011 10:06 PM
Hello RSH,
There is a function in DIAdem REPORT to do exactly what you are asking for, which is to dynamically plot n number of channels in a file based on however many channels are contained in a file.
First of all, we need to make sure you data is stored as Waveforms, not channels which is done by using the "Numeric Channels <-> Waveform Channels" function in DIAdem ANALYSIS (this can be done in a Script too):
Once all your channels are Waveforms, we can move on to REPORT.
Go to the Settings menu in "REPORT" and switch on the "Curve Expansion" mode:
I have thre Waveforms loaded called "Noise", Noise1" and "Noise2" in my DataPortal
In your Axis Layout, delete the group reference and add a "*" to the end of the channel name:
Here is the result, which will dynamically add channels based on how many "Noise*" channels are in the DataPortal:
Hope that helps,
Otmar
06-21-2011 01:47 AM - edited 06-21-2011 01:50 AM
Hello Otmar,
I worked out your reply, and working great for my raw channels. If I have any calculations to be done before plotting them, like
Calculations are: Filter, rename, Delete Pre data and post data (keep 0 till 70 data points), I tried this code:
L1 = GlobusedChn ' Assume Number of channels are 3
for intloop = 1 to L1
T1 = ChnName(1)
T2 = ChnName(2)
T3 = ChnName(3)
Call ChnCFCFiltCalc(T1,T2,"/Deceleration 1","CFC_60",0,"EndPoints",10)
Call ChnCFCFiltCalc(T1,T3,"/Deceleration 1","CFC_60",0,"EndPoints",10)
Next
But, I am very weak in programming. How can i aarange this process in any conditional loops??
IF there are 3 channels, dynamically 1 to GlobusedChn must be assigned to T1 till T3 (if GlobusedChn = 3) and do respective alculations and plot.
Does Curve expansion which u said earlier works same for this too??