Normally the the EPICS PVs will update at a lower rate than the EtherCAT master rate. However it’s possible to configure the system so that the records update at a custom rate (integer of the EtherCAT rate).
The PV sampling rate is controlled by the global ECMC_SAMPLE_RATE_MS macro. The Macro can be set with the following wrapper:
${SCRIPTEXEC} ${ecmccfg_DIR}setRecordUpdateRate.cmd "RATE_MS=1"
All records loaded after “setRecordUpdateRate.cmd” is issued will be updated with the new rate.
The rate can be restored with:
${SCRIPTEXEC} ${ecmccfg_DIR}restoreRecordUpdateRate.cmd
All records loaded after “restoreRecordUpdateRate.cmd” is issued will be updated with the default rate.
Another alternative is to use the MACROS macro when adding a slave. In this case the T_SMP_MS macro should be set:
${SCRIPTEXEC} ${ecmccfg_DIR}addSlave.cmd, "SLAVE_ID=12,HW_DESC=EL7031,MACROS='T_SMP_MS=1'"
For triggering processing with forward links in the EPICS layer a dedicated named ${P}:MCU-Updated can be used. In order to set the FLNK and processing rate the “setProcHook.cmd” should be used. The command takes two optional macros:
${SCRIPTEXEC} ${ecmccfg_DIR}setProcHook.cmd "PROC_HOOK=TEST:TRIGG.PROC,T_SMP_HOOK_MS=1"