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  <20122013  2014  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: ether_ip problem reading DINT arrays
From: "Dudley, David" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 30 May 2012 18:30:46 +0000
This is related to another bug I'm fixing right now.

Should have a fix soon (within a day or two), along with enhancements and corrections to the MBBI, MBBO, MBBIDirect, and MBBODirect records.

If you're not reading any discrete BOOLs from the PLC, you can immediately revert to ether-ip-2.19 which was before the bug was introduced, but that package won't read discrete BOOLs unless they are in a Boolean array.

David

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bob Gunion
Sent: Wednesday, May 30, 2012 1:55 PM
To: [email protected]
Subject: ether_ip problem reading DINT arrays

I am writing a soft ioc to talk with an Allen-Bradley CompactLogix L33ER PLC.  Everything works fine except I cannot read elements of a DINT array.  I have a tag is defined in the PLC as "DINTs" with a type like DINT[4], and records like:

record(ai, "TEST_DINT0")
{
	field(SCAN, ".1 second")
	field(DTYP, "EtherIP")
	field(INP, "@plc DINTs[0]")
}
record(ai, "TEST_DINT1")
{
	field(SCAN, ".1 second")
	field(DTYP, "EtherIP")
	field(INP, "@plc DINTs[1]")
}
record(ai, "TEST_DINT2")
{
	field(SCAN, ".1 second")
	field(DTYP, "EtherIP")
	field(INP, "@plc DINTs[2]")
}
record(ai, "TEST_DINT3")
{
	field(SCAN, ".1 second")
	field(DTYP, "EtherIP")
	field(INP, "@plc DINTs[3]")
}

By cranking up the debugging output I can see the proper values being read by the scanner, but they never make it into the RVAL field of the pvs.  If I specify four separate tags (DINT0, DINT1, etc), the values do make it into the pvs.  So there's a problem with specifying the array element.

Digging through the code, I have found that the analyze_link function in devEtherIP.c detects the element index specification and, on line 899, sets pvt->special |= SPCO_INDEX_INCLUDED.  In ai_read (line 1139 of the same file), the tag value is retrieved into the pv only if pvt->special < SPCO_PLC_ERRORS; otherwise the record is marked as UDF.  This looks like a bug, unless I'm doing something wrong.

Is anyone else using this package to read arrays of DINTs (or REALs, etc)?  Am I missing something?

Thanks,
Bob Gunion


Replies:
Re: ether_ip problem reading DINT arrays Bob Gunion
References:
ether_ip problem reading DINT arrays Bob Gunion

Navigate by Date:
Prev: Re: calc VAL field not updating from bi VAL field J. Lewis Muir
Next: Re: Proposed change in asyn - request for comments Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: ether_ip problem reading DINT arrays Bob Gunion
Next: Re: ether_ip problem reading DINT arrays Bob Gunion
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·