How can we update the value of a modbus waveform record,
programmatically from an acalcout record, or interactively via caput?
We are using EPICS asyn with modbus support to write bits to a PLC.
We use modbus function 15, which writes to the PLC from a waveform
record with DTYP asynInt32ArrayOut - all the output bits are packed
into the waveform. We use a waveform record defined by the
intarray_out.template included in the modbus support. We currently
use a gensub to collect the bits from many bo records and pack them
into the waveform record.
We are investigating using acalcout records instead of a gensub to
collect and pack the bits. We have this working up to where we have
an acalcout record - call it BitArray - whose AVAL field contains the
array of bits we want in our waveform record. All that remains is to
copy BitArray.AVAL into our waveform record - call it CnOutWArray.
How? We have tried various values for BitArray.OUT, including
"CnOutWArray CPP", "CnOutWArray.VAL PP, "CnOutWArray.VAL CA NMS", and
passive or periodic scanning. None of these work, the value of
CnOutWArray remains all zeroes (sometimes integers appear in
the first element only, in an unreproducible way). At the destination
end, CnOutWArray.INP is already assigned in intarray_out.template to
@asyn... so I presume we shouldn't change that.
It would sometimes be helpful to load the waveform interactively, for example by
using caput. The caput -a option only loads the first array element:
$ caput -a CnOutWArray 28 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
Old : CnOutWArray 28 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
New : CnOutWArray 28 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Is there a way to assign all the bits interactively?
Jon Jacky, University of Washington
PS - Here is our acalcout record, BitArray
record(acalcout, "BitArray") {
field(SCAN, ".1 second")
field(NELM, 28)
field(CALC, "AA+BB+CC+DD+EE+FF+GG+HH+II+JJ")
field(OOPT, "On Change")
field(DOPT, "Use CALC")
field(OUT, "CnOutWArray.VAL CA NMS") # recommended in acalcout doc
field(INAA, "BitArray0.AVAL")
field(INBB, "BitArray1.AVAL")
... etc. ...
}
- Replies:
- Re: Loading modbus waveform record from acalcout record (or caput) Tim Mooney
- Re: Loading modbus waveform record from acalcout record (or caput) Tim Mooney
- Navigate by Date:
- Prev:
Re: CAC problem between RTEMS and vxWorks Benjamin Franksen
- Next:
Re: How can I collect data values 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
- Navigate by Thread:
- Prev:
EPICS Collaboration Meeting October 2012 : Agenda update Ilyou Kim
- Next:
Re: Loading modbus waveform record from acalcout record (or caput) Tim Mooney
- 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
|