Recommended Posts

I sometimes get bad data collected in the channel data base.

Is there a way to delete specific data from the channel data log. In the attached file I want to delete "NaN", row 53 and "98" row 48.

Thanks

Bill

channel_data.pdf

Share this post


Link to post
Share on other sites

No, Channels are designed so that you can't remove data.  You would need to copy it and clean up the data, or simply clean up the data before it gets to the channel.   To copy it to another channel (say a Test channel with 0 Timing), you could do in a sequence:

private tempData = PU_Rain_C
tempData.removeAt(53,1) // note that I remove the higher index data first
tempData.removeAt(48,1) 
myNewChannel.clearHistory()
myNewChannel.addValue(tempData)

 

Share this post


Link to post
Share on other sites

I have a filter in the sequence:
PU_data3 = parse(datain,3,",")
            //? PU_data3
            if((PU_data3 > PU_RAIN_C[0]) || (PU_data3 == PU_RAIN_C[0]))
               PU_data3.time = systime()
               PU_RAIN_C.addValue(PU_data3)                    //pick out RAIN COUNTS
            ? "RAIN = " + PU_data3
            endif

 

But this filter does not catch NaN

I tried the following :

PU_data3 = parse(datain,3,",")
            //? PU_data3
            if((PU_data3 > PU_RAIN_C[0]) || (PU_data3 == PU_RAIN_C[0]) || (PU_data3 == NaN))
               PU_data3.time = systime()
               PU_RAIN_C.addValue(PU_data3)                    //pick out RAIN COUNTS
            ? "RAIN = " + PU_data3
            endif

and I get the following error.

C1085 Function without parenthesis: X_ONE_SEQUENCE Line 262

any suggestions appreciated

Thanks

Bill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now