From 01:00 AM CDT Saturday, June 10 - 04:00 AM CDT Saturday, June 10, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 01:00 AM CDT Saturday, June 10 - 04:00 AM CDT Saturday, June 10, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-19-2014 06:53 AM
Hello!
I have 4 channels in a single channel group. one of the channels is a date/time channel with 3 minute intervals between each row, over about 80 days.
I would like to split the date/time channel into 24 hour periods with each period being the next day and with each period going into a new channel.
When that happens I would like the data in the other 3 channels to be cut off and put into new channels wherever the date channel is cut off.
Thanks,
Ariel
06-19-2014 07:25 AM
Hi,
I don't know your data structure exactly, but this might help:
dim i, length, loops
length = cl("[1]/[1]")
loops = length/480
for i = 1 to loops
Call Data.Root.ChannelGroups.Add("day_" & i, i+1).Activate()
Call Data.Root.ChannelGroups(i+1).Channels.Add("Channel",DataTypeFloat64,1)
Call Data.Root.ChannelGroups(i+1).Channels.Add("Channel1",DataTypeFloat64,2)
Call Data.Root.ChannelGroups(i+1).Channels.Add("Channel2",DataTypeFloat64,3)
Call Data.Root.ChannelGroups(i+1).Channels.Add("Channel3",DataTypeFloat64,4)
Call DataBlCopy("'[1]/[1]' - '[1]/[4]'",480*(i-1)+1, 480,"'["&i+1&"]/Channel' - '["&i+1&"]/Channel3'",1)
next
Regards
Simyfren
06-19-2014 07:27 AM
PS:
the magic number 480 means that you need 480 rows for one day.
Simyfren