Experimental Physics and Industrial Control System
Hello,
I'd be grateful for code snippets showing how to put a waveform of values
to a PV. I am able to successfully pvPut other data types, but just not
waveforms. I've tried to match the sytax of caput -a where the first arg
is NELM (or NORD) and then the array is appended after that. I've also
tried just puttting the array of NELM values. Neither worked. No error
messages on the console with +d option set. Recompiling seq-R2-0-11
with DEBUG defined caused a segmentation fault. I didn't investigate
the reason for that.
Versions: epics3.14.8.2 and seq-R2-0-11
Platform: linux-x86
Details: I have a waveform of 21 shorts that I want to put to a PV of
FTVL USHORT with NELM 21.
[cdlx08] /afs/slac/g/lcls/tools/script>caget KLYS:LI20:95:RULE0
KLYS:LI20:95:RULE0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
On the (soft) ioc:
epics> dbpr("KLYS:LI20:95:RULE0",4)
ACKS: NO_ALARM ACKT: YES ASG: ASP: 0x00000000
BKPT: 0x00 BPTR: 0x483eef09 BUSY: 0 DESC: Rule
DISA: 0 DISP: 0 DISS: NO_ALARM DISV: 1
DPVT: 0x00000000 DSET: 0xfc578000 DTYP: Soft Channel EGU: tick
EVNT: 0 FLNK:CONSTANT 0 FTVL: USHORT HOPR: 0
INP:CONSTANT LCNT: 0 LOPR: 0 LSET: 0xc06cf309
MLIS: 0x98adf80988a9f80902000000 MLOK: 0x303eef09
NAME: KLYS:LI20:95:RULE0 NELM: 21 NORD: 21
NSEV: NO_ALARM NSTA: NO_ALARM PACT: 0 PHAS: 0
PINI: YES PPN: 0x00000000 PPNR: 0x00000000 PREC: 0
PRIO: LOW PROC: 0 PUTF: 0 RARM: 0
RDES: 0x20a6e009 RPRO: 0 RSET: 0x203ed800 SCAN: Passive
SDIS:CONSTANT SEVR: NO_ALARM SIML:CONSTANT SIMM: NO
SIMS: NO_ALARM SIOL:CONSTANT SPVT: 0x00000000 STAT: NO_ALARM
TIME: 0x0cd6072760513f19 TPRO: 0 TSE: 0
TSEL:CONSTANT UDF: 0 VAL: 0x00000000
at top before start of state set:
option -a; /* sync op. wait for pvGet/pvPut to complete */
option -c; /* no wait for db connections */
option +d; /* Turn on runtime debug messages */
option +w; /* Display SNC warnings */
#define PDU_RULE_PUT_WF_SIZE 22 /* includes 1 for the NELM */
/* Tempory variable re-used to hold the trigger rule copied from an
updated global rule and assigned to an RTEMS IOC trigger rule that uses it */
short myTriggerRule[PDU_RULE_PUT_WF_SIZE];
assign myTriggerRule to ""; /* MUST do this to get this var into DB Block
per Kuhkee Kim 2010/09/30 */
/* Inside a state */
pvAssign(myTriggerRule,"KLYS:LI20:95:RULE0");
pvMonitor(myTriggerRule);
/* Update the definition of the trigger rule to match the
global rule it is assigned to */
pvPut(myTriggerRule);
pvFlush();
printf("sncpdu: contents of SNL var now put into EPICS PV\n");
sprintf(pvNORD, "%s.NORD",triggerRuleStrings[nn]);
pvAssign(myTriggerRuleNORD,pvNORD);
myTriggerRuleNORD = 21;
pvPut(myTriggerRuleNORD);
pvFlush();
printf("sncpdu: NORD of WF var now put into EPICS PV\n");
printf("sncpdu: running %s changed to ", myTriggerName);
for (kk=0; kk<PDU_RULE_PUT_WF_SIZE; kk++) {
printf("%hu ", myTriggerRule[kk]);
}
printf("\n");
Console output:
sncpdu: contents of SNL var now put into EPICS PV
sncpdu: NORD of WF var now put into EPICS PV
sncpdu: running KLYS:LI20:95:RULE0 changed to 21 0 0 16 0 0 0 0 0 0 64 0 0 0 0 0 0 0 0 0 0 0
I read about calling pvFlush in an earlier tech-talk thread.
Adding it didn't help.
Setting NORD explicitly (like is needed in device support for waveform
record) also did not help. The waveform PV remains unchanged as:
[cdlx08] /afs/slac/g/lcls/tools/script>caget KLYS:LI20:95:RULE0
KLYS:LI20:95:RULE0 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
thanks for any help,
Dayle Kotturi [email protected]
Controls Department office 650-926-4923
SLAC National Accelerator Laboratory fax 650-926-3800
- Replies:
- Re: seq pvPut to a waveform Ben Franksen
- Navigate by Date:
- Prev:
VDCT PostScript problem Eric Norum
- Next:
Re: seq pvPut to a waveform Ben Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: VDCT PostScript problem Matthieu Bec
- Next:
Re: seq pvPut to a waveform Ben Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024