Hi Mark,
Thanks for pointing out, its working now as expected.
Jignesh
From: Mark Rivers [mailto:rivers at cars.uchicago.edu]
Sent: 27 January 2025 19:56
To: Johnson, Andrew N. <anj at anl.gov>; Jignesh J Patel <jjp at ipr.res.in>
Cc: tech-talk at aps.anl.gov
Subject: Re: concat multiple waveform records
Your acalcout record has typos.
INAA:CA_LINK SST_EFPS_THYR:CURR_WAVE0 NPP NMS
INBB:CA_LINK SST_EFPS_THYR:CURR_WAVE1 NPP NMS
The prefix starts with SST_. But your caget has this: SSST_EFPS_THYR:CURR_WAVE0
Your calcout record links are missing the initial "S", i.e. SST vs SSST.
That is probably why they are CA_LINKS, they are not found in the IOC.
I have tried aCalcout record to concate two arrays as per below configuration. I am not getting concated values in the acalcout record.
epics> dbpr CURR:WAVE 4
A: 0 AA: (nil) ACKS: NO_ALARM ACKT: YES
ADEL: 0 ALST: 0 AMASK: 0 AMEM: 8000
ASG: ASP: (nil) AVAL: 0x7d14b8017eb0
B: 0 BB: (nil)
BKLNK: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
BKPT: 00 C: 0 CACT: 0
CALC: CAT(AA[0,15],BB[0,15]) CC: (nil) CLCV: 0
CSTAT: 0 D: 0 DD: (nil) DESC: userArrayCalc
DISA: 0 DISP: 0 DISS: NO_ALARM DISV: 1
DLYA: 0 DOPT: Use CALC DPVT: (nil) DSET: 0x7d16894a0940
DTYP: Soft Channel E: 0 EE: (nil) EGU:
EVNT: F: 0 FF: (nil) FLNK:CONSTANT 0
G: 0 GG: (nil) H: 0 HH: (nil)
HHSV: NO_ALARM HIGH: 0 HIHI: 0 HOPR: 0
HSV: NO_ALARM HYST: 0 I: 0 IAAV: Ext PV NC
IBBV: Ext PV NC ICCV: Constant IDDV: Constant IEEV: Constant
IFFV: Constant IGGV: Constant IHHV: Constant II: (nil)
IIIV: Constant IJJV: Constant IKKV: Constant ILLV: Constant
INAA:CA_LINK SST_EFPS_THYR:CURR_WAVE0 NPP NMS INAV: Constant
INBB:CA_LINK SST_EFPS_THYR:CURR_WAVE1 NPP NMS INBV: Constant
INCC:CONSTANT INCV: Constant INDD:CONSTANT INDV: Constant
INEE:CONSTANT INEV: Constant INFF:CONSTANT INFV: Constant
INGG:CONSTANT INGV: Constant INHH:CONSTANT INHV: Constant
INII:CONSTANT INIV: Constant INJJ:CONSTANT INJV: Constant
INKK:CONSTANT INKV: Constant INLL:CONSTANT INLV: Constant
INPA:CONSTANT INPB:CONSTANT INPC:CONSTANT INPD:CONSTANT
INPE:CONSTANT INPF:CONSTANT INPG:CONSTANT INPH:CONSTANT
INPI:CONSTANT INPJ:CONSTANT INPK:CONSTANT INPL:CONSTANT
IVOA: Continue normally IVOV: 0 J: 0
JJ: (nil) K: 0 KK: (nil) L: 0
LALM: 0 LCNT: 0 LL: (nil) LLSV: NO_ALARM
LOLO: 0 LOPR: 0 LOW: 0 LSET: 0x5579b3f094f0
LSV: NO_ALARM MDEL: 0
MLIS: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
MLOK: a0 14 f1 b3 79 55 00 00 MLST: 0 NAME: CURR:WAVE
NELM: 250 NEWM: 0 NSEV: NO_ALARM NSTA: NO_ALARM
NUSE: 0 OAV: 0x7d14b8018690 OCAL: OCLV: 0
ODLY: 0 OEVT: 0 OOPT: On Change
ORPC: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
OUT:DB_LINK Final_wave PP NMS OUTV: Local PV OVAL: 0
PA: 0 PAA: (nil) PACT: 0 PAVL: 0x7d14b801a290
PB: 0 PC: 0 PD: 0 PE: 0
PF: 0 PG: 0 PH: 0 PHAS: 0
PI: 0 PINI: NO PJ: 0 PK: 0
PL: 0 PMEM: 8000 POAV: 0x7d14b801aa70
POVL: 0 PPN: (nil) PPNR: (nil) PREC: 2
PRIO: LOW PROC: 1 PUTF: 0 PVAL: 0
RDES: 0x5579b3e2b080
RPCL: 15 02 00 00 00 00 02 0f 00 00 00 7d 16 02 00 00 00 00 02 0f
RPRO: 0 RPVT: 0x5579b3f114d0 RSET: 0x7d16894a0880
SCAN: Passive SDIS:CONSTANT SEVR: NO_ALARM SIZE: NELM
SPVT: (nil) STAT: NO_ALARM TIME: 2025-01-27 16:33:09.134331519
TPRO: 0 TSE: 0 TSEL:CONSTANT UDF: 0
UDFS: INVALID VAL: 0 VERS: 1.4 WAIT: NoWait
epics>
The input array WAVE0/1 values are as per below, I am trying to concate first 15 elements of both array to WAVE record.
acd@dacd-Default-string:~$ caget -a SSST_EFPS_THYR:CURR_WAVE0
SSST_EFPS_THYR:CURR_WAVE0 2025-01-27 16:32:36.102395 125 0 0 0 0 13 27 43 56 68 78 91 100 108 114 123 126 129 127 130 127 127 127 127 129 133 129 126 126 127 129 127 127 129 130 130 127 129 132 132 130 127 134 132 134 134 136 133 133 134 132 133 139 137 137 139 136 137 136 139 137 139 140 140 142 140 143 143 140 142 143 142 143 142 145 146 146 143 143 145 146 143 146 145 148 148 145 149 148 152 148 148 150 148 150 149 150 150 152 152 150 152 152 155 153 152 152 152 153 152 152 156 156 156 156 153 155 153 155 156 158 159 156 158 159 161
dacd@dacd-Default-string:~$ caget -a SSST_EFPS_THYR:CURR_WAVE1
SSST_EFPS_THYR:CURR_WAVE1 2025-01-27 16:32:45.854477 125 159 158 158 158 164 159 159 162 161 161 162 162 159 162 164 165 164 164 164 164 164 165 165 166 165 166 166 168 162 165 168 168 165 166 168 166 166 168 168 168 171 168 169 169 168 166 171 171 171 169 172 169 169 171 169 172 174 171 175 172 171 172 175 172 172 171 174 174 174 175 172 174 175 177 179 175 174 175 175 178 177 178 181 178 178 175 178 178 178 178 178 179 181 179 178 179 179 181 181 182 178 182 179 178 179 179 182 181 181 181 182 184 182 184 182 184 182 185 182 182 184 184 182 184 185
..................................................................
dacd@dacd-Default-string:~$ caget -a CURR:WAVE.AVAL
CURR:WAVE.AVAL 2025-01-27 16:33:09.134332 250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
record(acalcout, "CURR:WAVE") {
field(DESC, "userArrayCalc")
field(INAA, "SST_EFPS_THYR:CURR_WAVE0")
field(INBB, "SST_EFPS_THYR:CURR_WAVE1")
field(PREC, "2")
field(NELM, "250")
field(SCAN, "Passive")
field(CALC, "CAT(AA[0,15],BB[0,15])")
field(OOPT, "On Change")
}
Please suggest the solution.
Hi Jignesh,
I haven’t used it myself, but it looks like the aynApps aCalcout record type should be able to do this, using the CAT operator, although it might not be the most efficient way. The other approach I would look at would be to write a subroutine for the aSub record type to combine your input array values into an output array — this requires you to be able to write C code.
Hope this helps, please reply to tech-talk with any follow-up questions you have.
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
On 1/17/25, 2:13 AM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:
Hi,
I have requirement to concat multiple waveform records received from Modbus device to single waveform.
Please suggest aConcat or joinArray is suitable for this, though I have never used it.
Please guide.
Thanks and best regards,
Jignesh