03-28-2008 07:24 AM - edited 03-28-2008 07:27 AM
03-31-2008 02:02 AM
03-31-2008 04:06 AM
Hi Johannes,
I perform it in script. I wrote that script weeks ago and it worked fine. But now those ghost channels happen to appear.
Here is the code snipped after which the ghost channels appear:
' 4. step: calculate FFT
' ------------------------------------------------------------------------------
FFTINTERVUSER ="LengthStartOverl"
FFTINTERVPARA(1) =16
FFTINTERVPARA(2) =intervalLength
FFTINTERVPARA(3) =1
FFTINTERVOVERL =0 ' Overlap in %
FFTWNDFCT ="Hanning"
FFTWNDPARA =10
FFTWNDCHN ="time"
FFTWNDCORRECTTYP ="periodic"
FFTAVERAGETYPE ="No"
FFTAMPLFIRST ="Amplitude"
FFTAMPL =1
FFTAMPLTYPE ="Ampl.Peak"
FFTCALC =0
FFTAMPLEXT ="No"
FFTPHASE =0
FFTCEPSTRUM =0
Call CHNFFT1("time",P)
' 5. step: transfer function
' ------------------------------------------------------------------------------
FFTINTERVUSER ="LengthStartOverl"
FFTINTERVPARA(1) =16
FFTINTERVPARA(2) =intervalLength
FFTINTERVPARA(3) =1
FFTINTERVOVERL =0
FFTWNDFCT ="Hanning"
FFTWNDPARA =10
FFTWNDCHN ="time"
FFTWNDCORRECTTYP ="periodic"
FFTAVERAGETYPE ="No"
FFTAMPLFIRST ="Amplitude"
FFTAMPL =0
FFTAMPLTYPE ="Ampl.Peak"
FFTCROSSSPECTR =0
FFTCOHERENCE =0
FFTTRANSFCTTYPE ="Spectrum H1"
FFTCROSSPHASE =0
FFTTRANSPHASE =1
Call CHNFFT2("time",keyphasorChn,P)
call msgboxdisp("Index = " & ChnIndex(GlobUsedChn))
call msgboxdisp("GlobUsedChn = " & GlobUsedChn)
HTH, Thanks
Patrick
04-01-2008 09:50 AM
04-02-2008 01:14 AM - edited 04-02-2008 01:16 AM
Hello Johannes,
Thank you for your effort. For me it is clear that you can not generate any ghost channels because I think the code is right and the first month I used it those channels did not appear. A colleague of mine said that those ghost channels often appear in Diadem when using FFT. His "solution" is to delete them afterwards...
That is was I tried now. Here is what I found out. Because their number was not identical to their index I was not able to delete them as long as their index number is higher than the number of maximum channels (memory management settings). I did now increased that value and I am now able to delete them with the follwing function:
For i=(GlobUsedChn*1.5) to 1 step -1
if ChnName(i)="" then
Chndelete(i)
end if
next
I am not pleased with a workaround like that but it works... What might be problem with those ghost channels?
Regards
Patrick
PS: Anyway if those channels happen to appear regularly this should alert you NI-guys.
03-30-2011 03:04 PM
I don't know if you're still having this issue, but for others that may be having it:
I've noticed that if you delete every value in a channel through the script (DataBlDel) commands, the channel loses it's name.
To demonstrate, clear your data portal, create a channel (named whatever you like) and put a single value in it.
Then go to the script tab and run:
Call
DatablDel("1",1,1)The channel will no longer have a name...
This was done in DIAdem 11.1, I don't know about 2010 or older versions.
So if your code has any block deletes, that's where the "ghost channels" are probably coming from.
-Josh
03-31-2011 01:13 AM
Dear Josh,
We solved the problem with the workaround I mentioned above. We are currently transform the code to DIAdem 11.1 and we will see whether this issue will come up again.
Thanks,
Patrick