Showing results for 
Search instead for 
Did you mean: 


Go to solution

I have a script that takes uses ChnResampleChnBased. I would like the result channel to replace a channel that is used as one of the input channels (Summary/TempAccel). It appears as if the method partially executes because the "NI_display_mode" property is added to the channel but the channel contents remain unchanged. This bug is not present in Diadem 2014, I am only seeing it in 2015. If I change the name of the result channel to a unique name, the sub routine executes properly. 


Call ChnResampleChnBased(CurrentTestIDStr & "/" & CurveType & "FullCurveDistance","Summary/TempAccel","Summary/TempDistance","Summary/TempAccel","Analog")


Is this a bug that should be fixed? Thanks.

0 Kudos
Message 1 of 8

Hi Need,


Yes, that looks like a bug to me.  I can reproduce your described discrepancy when using the original Y channel as the resulting Y channel vs. creating a new Y channel.  I'll check with R&D and see what they, then let you know.


Brad Turpin

DIAdem Product Support Engineer

National Instrumetns

0 Kudos
Message 2 of 8

Thanks Brad,


It would also be nice to see if R&D thinks that this issue might extend beyond this method. It is particulary troublesome because the subroutine does not throw an exception when it fails in this mannor, making detection all the more difficult.



0 Kudos
Message 3 of 8

Hi Brad,


Do you have any updates on this issue?

0 Kudos
Message 4 of 8
Accepted by topic author NeedDIAdemHelp

Hi Need,


R&D lists this bug with CAR-ID #587157.  It shows as being fixed in the next full release of DIAdem.


Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 8

Hi Brad,


Unfortunately, I am having this exact error using Diadem2020.

Is there anything I can do about this except using a different ResultChannel?


Thanks in advance.



0 Kudos
Message 6 of 8

Hi André,


I have tested the general functionality in DIAdem 2022 Q4 and can not reproduce the problem.

Please, if possible test this behavior with the latest DIAdem version (2022 Q4) and/or provide us an example so that we can reproduce the problem.




0 Kudos
Message 7 of 8

Hi Walter,


sorry for the late reply and thanks for your reply.


Unfortunately, I can't use other versions of Diadem than Diadem2020 (20.1.0f7908 Service Pack 1).

I am working in a big company and therefore have only access to this version.


But I found out that the bug depends on the "ResampleMappingMode":

Overwriting works fine with "Analog", but it doesn't with "Stair".

I've always used "Automatic" and that's why some worked and some didn't.


Here is the code, I've used for testing (Python):

This code fails for me, but it works if you replace "Automatic" with "Analog" in the last line.

But the code also works, if you use "Automatic" and use a different channel as output channel than the input channel.

(Also works: dd.ChnResampleChnBased(oMyTime,oMyChn,oMyNewTime,"example/"+ oMyChn.Name,"Automatic", False, False,"linear"))


Greetings André


# create some data
oMyCG = dd.Data.Root.ChannelGroups.Add("ChannelGroup1")
oMyTime = oMyCG.Channels.Add("time",dd.DataTypeFloat64)
for i in range(1,32):
    oMyTime[i] = (i-1)*0.1

idxEnd = oMyTime.Properties("length").Value + 1
for i in range(1,10):
    oMyChn = oMyCG.Channels.Add("Channel" + str(i),dd.DataTypeFloat64)
    for j in range(1,idxEnd):
        oMyChn[j] = j

# new time channel for resampling
step = 1 #sec.
oMyNewTime = oMyCG.Channels.Add("new_time",dd.DataTypeFloat64)
oMyNewTime.UnitSymbol = "s"
i = 1
oMyNewTime[i] = oMyTime.Minimum
while oMyNewTime[i] + step <= oMyTime.Maximum:
    oMyNewTime[i+1] = oMyNewTime[i] + step 
    i += 1

for oMyChn in oMyCG.Channels:
    if not oMyChn.Name == "time" and not oMyChn.Name == oMyNewTime.Name:
        dd.ChnResampleChnBased(oMyTime,oMyChn,oMyNewTime,oMyChn,"Automatic", False, False,"linear")


0 Kudos
Message 8 of 8