EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: How to output arrary data in EPICS db?
From: Dirk Zimoch <[email protected]>
To: [email protected]
Date: Thu, 16 May 2013 09:29:30 +0200
On 15.05.2013 17:49, Tim Mooney wrote:
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

If if is an aao (which I had just now implemented for Geyang), two things may happen:
1) My code may be wrong. I had no time to test aao.
2) EPICS versions before 3.14.12 have a bug in aai and aao records that caused a crash if any db link points to it (input or output).

Dirk



----- 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






References:
Re: How to output arrary data in EPICS db? Tim Mooney

Navigate by Date:
Prev: RE: [Bug 1179642] Re: race condition when destroying subscripion in preemptive callback mode application Hill, Jeff
Next: bug in xxx_registerRecordDeviceDriver.cpp on Windows Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: How to output arrary data in EPICS db? Tim Mooney
Next: Open multiple OPI Lucas Jose Monteiro Carvalho
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·