william Posted April 5, 2019 Share Posted April 5, 2019 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 Link to comment Share on other sites More sharing options...
AzeoTech Posted April 8, 2019 Share Posted April 8, 2019 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) Link to comment Share on other sites More sharing options...
william Posted April 15, 2019 Author Share Posted April 15, 2019 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 Link to comment Share on other sites More sharing options...
AzeoTech Posted April 15, 2019 Share Posted April 15, 2019 For various reasons, NaN is a function in DAQFactory which returns the value NaN, so you need: (pPU_Data3 == NaN()) Link to comment Share on other sites More sharing options...
william Posted April 17, 2019 Author Share Posted April 17, 2019 Thanks That seems to fix it Bill Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.