30 lines
1.8 KiB
Batchfile
30 lines
1.8 KiB
Batchfile
|
|
#==============================================================================
|
|
# ecmcDAQAddDataItem.cmd
|
|
#-------------- Information:
|
|
#- Description: ecmc_plugin_daq ecmcDAQAddDataItem.cmd
|
|
#- Add a DAQ-dataitem to the last added DAQ-channel object
|
|
#-
|
|
#- by Anders Sandström, Paul Scherrer Institute, 2024
|
|
#- email: anders.sandstroem@psi.ch
|
|
#-
|
|
#-###############################################################################
|
|
#-
|
|
#- Arguments
|
|
#- PARAM : Parameter to add (ec0.s1.positionActual01)
|
|
#- FORMAT: Optional formatting of data
|
|
#- 0 = raw (default) : Take raw value (do not apply special format)\n");
|
|
#- 1 = time_micro_s : Time: Recalc 64bit nano seconds to 32 bit micro second counter\n");
|
|
#- 2 = time_micro_s_minus_period : Time: Recalc 64bit nano seconds to 32 bit micro second counter minus one ec-period.\n");
|
|
#- Useful for oversampling slaves where normally the nextsync time is available.\n");
|
|
#- The calculated time then would correspond to the first data in the array recived.\n");
|
|
#- 3 = time_ns_minus_period : Time: Raw value minus one period.\n");
|
|
#- SEND_OLD : 1 = Send one element old data (for scalars from last cycle, for arrays shift one element), defaults to 0 (send fresh data)
|
|
#- NAME : Name of DAQ array object
|
|
#-
|
|
#-################################################################################
|
|
|
|
ecmcDAQAddItem(${PARAM},${FORMAT=0},${SEND_OLD=0})
|
|
ecmcEpicsEnvSetCalc("ECMC_DAQ_CURR_ITM" ,${ECMC_DAQ_CURR_ITM=-1}+1,"%02d")
|
|
dbLoadRecords(ecmcPluginDAQ_chX-itmX.template,"P=${ECMC_PREFIX},Name=${NAME},PORT=ECMC.PLUGIN.DAQ.${NAME},CH=${ECMC_DAQ_CURR_CH=00},ITEM=${ECMC_DAQ_CURR_ITM=00},VAL=${PARAM=empty},DESC='FORMAT=${FORMAT=0},SEND_OLD=${SEND_OLD=0}'")
|