Hi Geyang,
I'm guessing there's a typo in your message, and the record $(id):waveform
is actually an aao record, because the waveform record has neither OUT nor FTVA
fields. If so, the problem may be
field(FTVA, "SHORT")
because the aao record field that specifies the data type is FTVL.
Tim
----- Original Message -----
> From: "Silver" <[email protected]>
> To: "tech-talk" <[email protected]>
> Sent: Wednesday, May 15, 2013 8:47:10 AM
> Subject: How to output arrary data in EPICS db?
>
> hi, :
>
> I am using simens plc driver by dirk and want to write array data to
> plc. The array is read from a data file on disk. So I use sub record
> or gensub to get array. The db file is as following:
> record(genSub,"$(id):gensub")
> {
> field(SCAN, "Passive")
> field(INAM, "genSubArrayInit")
> field(SNAM, "genSubArrayOut")
> field(OUTA, "$(id):waveform.VAL")
> field(FTVA, "SHORT")
> field(NOVA, "12")
> }
> record(waveform,"$(id):waveform")
> {
> field(FTVA, "SHORT")
> field(NELM, "12")
> }
> The vala field of genSub record is a pointer to arrary data, I set it
> to waveform record’s val field. then use caget can get the array.
> But waveform is an input record, so I want to use aao record to
> implement the function. Kindly, dirk added aao support to the s7-plc
> driver. If use "caput –a xx xxx xxx", the aao record can write the
> array to hardware.
> So I change the db file like this:
> record(genSub,"$(id):gensub")
> {
> field(SCAN, "Passive")
> field(INAM, "genSubArrayInit")
> field(SNAM, "genSubArrayOut")
> field(OUTA, "$(id):aao.VAL")
> field(FTVA, "SHORT")
> field(NOVA, "12")
> # field(FLNK,"$(id):aao")
> }
> record(waveform,"$(id):waveform")
> {
> field(SCAN, "I/O Intr")
> field(DTYP,"S7plc")
> field(OUT,"@Siemens_S7: 0/200 'T=SHORT'")
> field(FTVA, "SHORT")
> field(NELM, "12")
> }
> But the IOC corrupted by Segement Default error. Seems there is a
> pointer error somewhere. I also tried to write a small code by using
> ezca library to write the array to aao record directly, it failed
> too. But the same code of ezcaPut can write array to waveform
> record.
> So, what’s the difference between waveform and aao in this case? Can
> anyone help me?
> Ps, I searched the tech-talk, Andy Foster said he has written a
> waveform out record long long ago, but the download url is invalid.
>
>
>
>
>
> --------------
> Best wishes
> Geyang 2013-05-15
>
>
- Replies:
- Re: How to output arrary data in EPICS db? Dirk Zimoch
- References:
- How to output arrary data in EPICS db? Silver
- Navigate by Date:
- Prev:
Re: Open multiple OPI Hugo Slepicka
- Next:
Re: mmio in epics base Andrew Johnson
- 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:
How to output arrary data in EPICS db? Silver
- Next:
Re: How to output arrary data in EPICS db? Dirk Zimoch
- 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
|