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: How to output arrary data in EPICS db?
From: Silver <[email protected]>
To: tech-talk <[email protected]>
Date: Wed, 15 May 2013 21:47:10 +0800
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? Tim Mooney

Navigate by Date:
Prev: Regarding database links Himanshu Tyagi
Next: RE: Regarding database links Mark Rivers
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: Regarding database links Pearson, Matthew R.
Next: Re: How to output arrary data in EPICS db? Tim Mooney
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 ·