Experimental Physics and Industrial Control System
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 Dudley, David
- Navigate by Date:
- Prev:
Re: calc VAL field not updating from bi VAL field Tim Mooney
- Next:
Re: calc VAL field not updating from bi VAL field J. Lewis Muir
- 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: Problem when caput to waveform record Andrew Johnson
- Next:
RE: ether_ip problem reading DINT arrays Dudley, David
- 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