Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fab4050ff4 | |||
| f9a1db806c |
4
Db/ecmcPluginDAQ_chX-itmX.template
Normal file
4
Db/ecmcPluginDAQ_chX-itmX.template
Normal file
@@ -0,0 +1,4 @@
|
||||
record(stringin,"$(P)DAQ-${Name}-CH${CH}-${ITEM}-Info") {
|
||||
field(DESC, "${DESC=empty}")
|
||||
field(VAL, "${VAL=empty}")
|
||||
}
|
||||
4
Db/ecmcPluginDAQ_chX.template
Normal file
4
Db/ecmcPluginDAQ_chX.template
Normal file
@@ -0,0 +1,4 @@
|
||||
record(ai,"$(P)DAQ-${Name}-CH${CH}-Type") {
|
||||
field(DESC, "Channel Type")
|
||||
field(VAL, "${TYPE=0}")
|
||||
}
|
||||
@@ -60,7 +60,7 @@ ${SCRIPTEXEC} ${ecmc_plugin_daq_DIR}ecmcDAQAddChannel.cmd, "TYPE=1234"
|
||||
|
||||
### Adding a data item the a channel
|
||||
|
||||
Add a channel to the last created array with ecmcDAQAddDataItem.cmd. The command takes two parameters:
|
||||
Add a channel to the last created array with ecmcDAQAddDataItem.cmd. The command takes three parameters:
|
||||
1. PARAM : Parameter name to specify the data to read from ecmc, ec0.s1.analogInput01, ax1.poserr,...
|
||||
2. FORMAT : Optional formatting of data:
|
||||
```
|
||||
@@ -71,6 +71,9 @@ Add a channel to the last created array with ecmcDAQAddDataItem.cmd. The command
|
||||
The calculated time then would correspond to the first data in the array recived.
|
||||
3 = time_ns_minus_period : Time: Raw value minus one period.
|
||||
```
|
||||
3. SEND_OLD : Optional to send old data (for scalars from previosu cycle, for arrays just one element shift)
|
||||
|
||||
|
||||
### Finalizing a array
|
||||
When the configurations for an array is finalized then the ecmcDAQFinalizeArray.cmd must be called.
|
||||
The command will read the total array size (header plus data) from the plugin and then load the database with the waveform record (with correct NELM). The command takes the array name as a parameter ("NAME").
|
||||
|
||||
@@ -17,3 +17,4 @@
|
||||
|
||||
#- Name , Asyn port name
|
||||
ecmcDAQAddArray(${NAME},ECMC.PLUGIN.DAQ.${NAME})
|
||||
epicsEnvSet(ECMC_DAQ_CURR_CH,-1)
|
||||
|
||||
@@ -12,7 +12,11 @@
|
||||
#-
|
||||
#- Arguments
|
||||
#- TYPE : Type (number of data type)
|
||||
#- NAME : Name of DAQ array object
|
||||
#-
|
||||
#-################################################################################
|
||||
|
||||
ecmcDAQAddChannel(${TYPE})
|
||||
epicsEnvSet(ECMC_DAQ_CURR_ITM,-1)
|
||||
ecmcEpicsEnvSetCalc("ECMC_DAQ_CURR_CH" ,${ECMC_DAQ_CURR_CH=-1}+1,"%02d")
|
||||
dbLoadRecords(ecmcPluginDAQ_chX.template,"P=${ECMC_PREFIX},Name=${NAME},PORT=ECMC.PLUGIN.DAQ.${NAME},CH=${ECMC_DAQ_CURR_CH=00},TYPE=${TYPE=0}")
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
#- 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}'")
|
||||
|
||||
@@ -26,3 +26,5 @@ ecmcEndIf()
|
||||
|
||||
dbLoadRecords(ecmcPluginDAQ.template,"P=${ECMC_PREFIX},Name=${NAME},NELM=${DAQ_NELM},PORT=ECMC.PLUGIN.DAQ.${NAME}")
|
||||
epicsEnvUnset(DAQ_NELM)
|
||||
epicsEnvUnset(ECMC_DAQ_CURR_CH)
|
||||
epicsEnvUnset(ECMC_DAQ_CURR_ITM)
|
||||
|
||||
Reference in New Issue
Block a user