01-18-2017 09:49 AM
If I run this script on EXAMPLE date that comes with DIAdem, so 2. ChannelGroup in some Noise:
call ChnWfxUnitConvert(Data.Root.ChannelGroups(2).Channels(1),Data.Root.ChannelGroups(2).Channels(1),"ms")
logfilewrite Data.Root.ChannelGroups(2).Channels(1).Maximum
logfilewrite Data.Root.ChannelGroups(2).Channels(1).Minimum
It rerutns "NOVALUE" and "NOVALUE"
How can I refresh Min and Max props?
Solved! Go to Solution.
01-18-2017 10:29 AM
You did not choose the right method.
call UnitConvert(Data.Root.ChannelGroups(2).Channels(1),Data.Root.ChannelGroups(2).Channels(1),"ms")
will change the channel unit.
If min max is not changed
call ChnCharacter(Data.Root.ChannelGroups(2).Channels(1))
can be used to recalculate the values.
P.S.: If you activate the macro recorder and change the unit in dataportal the command shows up in script.
01-18-2017 11:43 PM
Your metod changes unit of channel, but I need to change X part of waveform channel.
So I used ChnWfxUnitConvert, which does not recalculate characteristic values and ChnCharacter did the job.
Thank you.
01-19-2017 09:45 AM
Hi Radek_Codr,
Just to be clear here, the Channel.Minimum and Channel.Maximum properties, which were previously CMin(Channel) and CMax(Channel), contain the extrema of the Y values of that channel. There is no standard Channel property which stores the maximum X value of a channel. ChnCharacter() will update the Y value extrema properties only.
Brad Turpin
DIAdem Product Support Engineer
National Instruments