03-15-2017 11:25 AM
Hi,
I am trying to copy selected rows of a time channel ('Time') to another time channel ('NewTime').
However, the copied values are different from the original ones. An example is: -
My script is: -
I suspect I am seeing a resolution limit, but then the original channel displays ok....
(1) How can I get an exact copy of an entry?
(2) Is there a more elegant (or more correct) method than that which I have used?
(3) The original channel ('Time') is from measurements with a sample rate of 10 microseconds.
This time channel was created by splitting a recorded waveform using WfChnToChn
The microseconds appear to be 'lost' in the channel display - normal?
I am using Diadem 2015 15.0.2f6347 service pack 2, (64 bit)
Thanks in advance for any help
Thomas
Solved! Go to Solution.
03-16-2017 02:11 AM
Hi mme,
This is one option:
dim oGroupChn, oChnTOld, oChnTNew, iStart, iStop, iLoop, iIdx set oGroupChn = Data.Root.ChannelGroups(1).Channels set oChnTOld = oGroupChn("TimeOld") set oChnTNew = oGroupChn.Add("TimeNew", DataTypeChnDate) iStart = 10 iStop = 100 iIdx = 0 for iLoop = iStart to iStop iIdx = iIdx + 1 oChnTNew(iIdx) = oChnTOld(iLoop) next
Greetings
Walter
03-17-2017 03:26 PM
Hi Thomas,
As of DIAdem 2017, losing microseconds and even tenths of microseconds is normal for DIAdem.
For copying multiple datetime rows from one channel to another, you should try the DataBlCopy() function.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
03-23-2017 01:06 PM
Hi Brad,
Are the microseconds really lost or is it that they are there, but just not visible?
Thanks
Thomas
03-29-2017 10:38 AM
Hi Thomas,
As of DIAdem 2017, the maximum resolution of a DIAdem datetime value is:
#mm/dd/yyyy hh:nn:ss.ffff
So any resolution smaller than a tenth of a millisecond is lost when the data is sent to the Data Portal. R&D is looking into ways of addressing this for future versions of DIAdem, but we have no commitments yet.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-03-2017 11:05 AM
Hi Walter,
Thanks! It works for me. Some resolution as explained by Brad.
Thomas
04-03-2017 11:06 AM
Hi Brad,
Thanks for the explanation. It is clearer now.
Thomas