The FFT plugin performs spectral analysis of one runtime source with limited realtime impact.
Use it when:
The FFT plugin follows the normal plugin load model from Plugin Interface.
Example from the local test material:
epicsEnvSet(ECMC_PLUGIN_CONFIG,"SOURCE=plcs.plc0.static.sineval;DBG_PRINT=0;NFFT=1024;RATE=100;RM_DC=1;RM_LIN=1;APPLY_SCALE=1;MODE=TRIGG;")
${SCRIPTEXEC} ${ecmccfg_DIR}loadPlugin.cmd, "PLUGIN_ID=0,FILE=${ECMC_PLUGIN_FILNAME},CONFIG='${ECMC_PLUGIN_CONFIG}', REPORT=1"
dbLoadRecords(ecmcPluginFFT.template,"P=$(IOC):,INDEX=0,NELM=1024")
Verified config keys from repo examples and the plugin README include:
SOURCEDBG_PRINTNFFTRATERM_DCRM_LINAPPLY_SCALEMODEENABLESCALEBREAKTABLEFor the FFT plugin, PLUGIN_ID is not the same thing as the FFT object INDEX.
The local examples explicitly note that INDEX refers to the FFT object inside the plugin/template layer.
Examples in this repo use sources such as:
ax1.poserrax1.actposecmc.thread.latency.maxec0.s11.mm.analogInputArray03plcs.plc0.static.sinevalSo the plugin can be used with motion, PLC, thread-diagnostic, and process-image style sources.
The normal EPICS-facing interface is the plugin-provided template:
dbLoadRecords(ecmcPluginFFT.template,"P=$(IOC):,INDEX=0,NELM=1024")
This is the preferred path instead of building generic records manually.
The plugin README also verifies that each FFT object creates its own dedicated asyn port:
PLUGIN.FFT<index>This dedicated port is used so the FFT communication path does not reuse the main ecmc asyn port.
The template exposes at least:
The plugin README also documents PLC control through plugin functions such as:
fft_enable(index,enable)So the FFT object can be armed or enabled either from EPICS or from PLC code.