DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

removing data from channel

Solved!
Go to solution

I have several channels that I would like to remove a fixed number of data points from the start of the channel, basically some data that is recorded during an initialization phase that I don't want included in the data.  Is there an easy way to do this?

The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
0 Kudos
Message 1 of 6
(5,832 Views)
Solution
Accepted by topic author jordankuehn

Hello Jordan,

 

There is a command that allows you to delete values from multiple channels called DataBlDel

 

Command: DataBlDel

Deletes a data block in channels.

Call DataBlDel(ChnNoStr, ChnRow, ValNo, [ValDelOnly])

Input Parameters

ChnNoStr Specifies one or more channels.
Channel list variable

A channel list is a Channel or Channel list object, or a text that refers to one or several channels.
If you use channel numbers or channel number areas to specify a channel list as text, remember that the channels are not always in the order of the channel numbers in the structure view of the Data Portal. If you use channel names to specify a channel area, DIAdem converts these channel names into channel numbers and uses these numbers to specify the channel areas.
For more information about the value range, refer to Channel lists.
Refer to the Channels and Channel References page for more information about the various ways to specify channels.

ChnRow Specifies the row number in a channel.
ValNo Specifies the number of values in a channel.
[ValDelOnly] Specifies whether DIAdem deletes only the channel values or also all properties when deleting all values. The default value is FALSE which specifies that DIAdem also deletes the properties.


Examples are:

 

Call DataBlDel("'[1]/Noise_1' - '[1]/Noise_4'",1,7,1)

 or

 

Call DataBlDel("1-4", 1, 7)

 

In both examples, seven lines of data are deleted from the first four channels in the Data Portal.

 

I hope that helps,

 

     Otmar

Otmar D. Foehner
0 Kudos
Message 2 of 6
(5,819 Views)

Similar problem, but on several channel groups:

 

I try to use DataBlCopy (and other data block operations) to run over different channel groups. However, getting the channel strings right is cumbersome. I try with

 

sChStrSource = "(CH([" & cstr(i) & "]/[" & "cstr(j) & "-CH""" & cstr(i) &"/[        etcetcetc

 

to get the desired channels j from each group i into a string like

 

                      CH(" '[1]/[2]' - '[1]/[5]' ")

 

to pass it to

 

Call DataBlCopy(sChstr, RowNo, ValNo, sChStrTarget

 

But I find myself hoping for a better approach. Maybe I was just to dumb to see something obvious.

 

Michael

0 Kudos
Message 3 of 6
(5,774 Views)
0 Kudos
Message 4 of 6
(5,772 Views)

Hi Michael,

 

You can see in the Help file for DataBlCopy an example of how they add channels that are hard coded. To get a better idea of how to do things programmatically, as you are, you can see the topic on GetChannels. I think the method you have come up with seems fine, but you are welcome to use the tools provided in the reference parameter of GetChannels.

 

In the future, please make a new forum thread and reference related posts instead of adding onto multiple threads which have already been marked as solved. It helps keep things less cluttered when people are trying to search in the future Smiley Happy

 

Cheers, 

KyleP
Applications Engineer
National Instruments
0 Kudos
Message 5 of 6
(5,739 Views)

Forgot to thank Otmar.  That command slipped by me and was exactly what I was looking for.  Thanks!

The Colex Group
Lead Software Engineer
Certified LabVIEW Developer
0 Kudos
Message 6 of 6
(5,734 Views)