From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete "ghost"-channels?

Hi all,
 
I have the following problem: After performing an FFT, Diadem (9.1) creates me several ghost channels: These channels are empty, have no name and their number is not equal to their index.
 
Now first of all: Why do does channels appear?
 
Or: How can I delete them? I tried the following:
 
for i=GlobUsedChn to 1 step -1
   if chnname(i)="" then
      chndelete(i)
   end if
next
 
But because the number and index are not equal that delets only some of them.
 
Regards
Patrick
 
PS: sorry for my edit-war
  


Message Edited by flupa on 03-28-2008 01:27 PM
0 Kudos
Message 1 of 7
(3,921 Views)
Hello Patrick,

do you perform the FFT in Analysis or Script module?

If in script, could you send me a code snippet that would let me reproduce the problem?

Thank you,
Johannes

NI Germany 649024
0 Kudos
Message 2 of 7
(3,897 Views)

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

0 Kudos
Message 3 of 7
(3,889 Views)
Hello Patrick,

I wasn't able to reproduce the generation of "ghost" channels.

Could you attach a short script and a data file that causes those channels to be generated?

Thank you,
Johannes

AE, NI Germany
0 Kudos
Message 4 of 7
(3,868 Views)

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.



Message Edited by flupa on 04-02-2008 08:16 AM
0 Kudos
Message 5 of 7
(3,848 Views)

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

0 Kudos
Message 6 of 7
(3,074 Views)

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

0 Kudos
Message 7 of 7
(3,070 Views)