wiki:epics/compress

Version 3 (modified by obina, 7 years ago) (diff)

--

compress レコードの使い方

10点のデータを移動平均

record(compress, "test:compAve")
{
    field(DESC, "compress")
    field(INP,  "test:jane CP")
    field(ALG,  "N to 1 Average")
    field(NSAM, "1")
    field(N,    "10")
    field(SCAN, "Passive")
    field(FLNK, "")
}

camonitor してみると、

pfrproc2:~ % camonitor test:compAve
test:compAve                   2012-06-04 22:08:31.000000 5.38322
test:compAve                   2012-06-04 22:08:32.000000 5.30311
test:compAve                   2012-06-04 22:08:33.000000 5.29409
test:compAve                   2012-06-04 22:08:33.000000 5.29909
test:compAve                   2012-06-04 22:08:34.000000 5.38015
test:compAve                   2012-06-04 22:08:35.000000 5.49323

このままでは分かりにくいので、 "N to 1 Average", "N to 1 High Value", "N to 1 Low Value"の3パターンでどのようになるか グラフに描いてみる。

aiのデータから、Circular Buffer(waveform)を作成する。

record(compress, "test:compCircBuf")
{
    field(DESC, "compress")
    field(INP,  "test:jane CP")
    field(ALG,  "Circular Buffer")
    field(NSAM, "10")
    field(SCAN, "Passive")
    field(FLNK, "")
}
pfrproc2:~ % camonitor test:compCircBuf
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.67032 5.5943 5.67055 5.72319 5.67128 5.76206 5.80883 5.87064 5.93594 5.84581
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.5943 5.67055 5.72319 5.67128 5.76206 5.80883 5.87064 5.93594 5.84581 5.74938
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.67055 5.72319 5.67128 5.76206 5.80883 5.87064 5.93594 5.84581 5.74938 5.66817
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.72319 5.67128 5.76206 5.80883 5.87064 5.93594 5.84581 5.74938 5.66817 5.6667
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.67128 5.76206 5.80883 5.87064 5.93594 5.84581 5.74938 5.66817 5.6667 5.57069
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.76206 5.80883 5.87064 5.93594 5.84581 5.74938 5.66817 5.6667 5.57069 5.49197
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.80883 5.87064 5.93594 5.84581 5.74938 5.66817 5.6667 5.57069 5.49197 5.41715
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.87064 5.93594 5.84581 5.74938 5.66817 5.6667 5.57069 5.49197 5.41715 5.47384
test:compCircBuf               2012-06-04 22:08:11.000000 10 5.93594 5.84581 5.74938 5.66817 5.6667 5.57069 5.49197 5.41715 5.47384 5.51437
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.84581 5.74938 5.66817 5.6667 5.57069 5.49197 5.41715 5.47384 5.51437 5.45423
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.74938 5.66817 5.6667 5.57069 5.49197 5.41715 5.47384 5.51437 5.45423 5.55247
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.66817 5.6667 5.57069 5.49197 5.41715 5.47384 5.51437 5.45423 5.55247 5.46537
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.6667 5.57069 5.49197 5.41715 5.47384 5.51437 5.45423 5.55247 5.46537 5.45961
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.57069 5.49197 5.41715 5.47384 5.51437 5.45423 5.55247 5.46537 5.45961 5.53298
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.49197 5.41715 5.47384 5.51437 5.45423 5.55247 5.46537 5.45961 5.53298 5.56679
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.41715 5.47384 5.51437 5.45423 5.55247 5.46537 5.45961 5.53298 5.56679 5.48265
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.47384 5.51437 5.45423 5.55247 5.46537 5.45961 5.53298 5.56679 5.48265 5.51005
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.51437 5.45423 5.55247 5.46537 5.45961 5.53298 5.56679 5.48265 5.51005 5.5402
test:compCircBuf               2012-06-04 22:08:12.000000 10 5.45423 5.55247 5.46537 5.45961 5.53298 5.56679 5.48265 5.51005 5.5402 5.62897

Attachments (3)

Download all attachments as: .zip