DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete data from a channel after a value is encountered

Hello,

 

I'm trying to delete data in a channel after a tigger value is encountered. I know the ChnAreaDel or DataBlDel function can do this, but it seems they delete all data prior to the trigger value.

 

So, is there another function with this capability?

 

Thanks,

0 Kudos
Message 1 of 5
(6,259 Views)

Hi CV,

 

I think you should look into the Calculate() function for programmatic use, or the Calculation Manager for interactive use.  Is the trigger value in the same channel or in a different channel?  Does the trigger value happen once or multiple times?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 5
(6,244 Views)

Hi Brad,

 

Yes, the trigger value is in the same channel and happens just once. Basically, I was looking to just cut out the unessary data in the channel that was collected during the data acquisition.

 

I will probably set-up a trigger in the Labview program later on, but this was just set-up by manually stopping the data acquisition.

 

I'll look into your suggestions, but I was hoping there was a channel function but I guess not.

 

Thanks for the hints.

0 Kudos
Message 3 of 5
(6,230 Views)

Hi CVfactor,

 

Do you want to cut out the values before the trigger or after the trigger?  If you want to cut the values after, it's particularly easy to remove them by defining the channel to have a shorter channel length.  Otherwise you have to call a function to remove the values before the trigger.  Is this channel a waveform channel, or does it use a Time or other X channel for XY graphing, etc.?  If so, and if you want to remove the values before the trigger, then you'll need to delete them from the Time channel and maybe others in the same group as well.

 

I can help with all this,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 5
(6,197 Views)

Hi CVfactor,

 

I just re-read the title of your post.  In that case the data "removal" is particularly simple.  Since the trigger happens only once, you can use the ChnFind() command to determine the row in which it occurs.  In the code below I'm using a ">=" operator, but if it's an exact value you're looking for you can really use the "=" operator instead.

 

L1 = CNo("[1]/Date") ' Trigger Channel
R1 = 63555540480 ' Trigger value
Row = ChnFind("Ch(L1) >= R1")
ChnLength(L1) = Row

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 5 of 5
(6,193 Views)