01-16-2014 12:48 PM
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,
01-16-2014 08:37 PM
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
01-17-2014 05:12 AM
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.
01-18-2014 10:21 AM
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
01-18-2014 11:33 AM
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