05-11-2016 01:25 PM
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.
Solved! Go to Solution.
05-12-2016 09:57 AM
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
05-12-2016 10:02 AM
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.
05-24-2016 10:34 AM
Hi Brad,
Do you have any updates on this issue?
05-25-2016 02:33 PM
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
02-20-2023 08:55 AM
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.
André
02-23-2023 12:47 AM
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.
Greetings
Walter
03-17-2023 08:35 AM
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 dd.Data.Root.Clear() 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 dd.ChnCharacterAll() 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 #resampling 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")