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

Subject: RE: Packed Data Message Formats With Fixed-Length Strings
From: Iain Marcuson <[email protected]>
To: "Mooney, Tim M." <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 9 Nov 2016 12:52:09 +0000
Thanks.  My trouble was reading the input into a waveform record.  I discovered I could do that with the %r format in Stream Device.  Now in CSS BOY, I can display the waveform as a string and see the results.

Iain.

> -----Original Message-----
> From: Mooney, Tim M. [mailto:[email protected]]
> Sent: Tuesday, November 08, 2016 12:12 PM
> To: Iain Marcuson <[email protected]>; tech-
> [email protected]
> Subject: RE: Packed Data Message Formats With Fixed-Length Strings
> 
> Hi Iain,
> 
> I think I would do this with an aSub record: read the input into a waveform
> record; configure an aSub record input to be an array of char, and point the
> input link at the waveform record's VAL field; and write an aSub routine to
> parse it.
> 
> Tim Mooney ([email protected]) (630)252-5417 Beamline Controls Group
> (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab
> 
> 
> ________________________________________
> From: [email protected] [[email protected]] on
> behalf of Iain Marcuson [[email protected]]
> Sent: Tuesday, November 08, 2016 10:46 AM
> To: [email protected]
> Subject: Packed Data Message Formats With Fixed-Length Strings
> 
> I am writing EPICS code to interface with a custom device.  The device
> protocol is fixed-length messages.  I can read and write the message
> parameters with Stream Device, and have done so successfully except for
> the fixed-length string, which I have had to bypass in assorted ways.
> 
> The output command message has the Python struct format "ii128s12i".  The
> input message has the Python struct format "128s12ii".  The "12i" refers to 12
> parameters, passed or returned.
> 
> My two questions are:
> 
> 1) How can I parse the fixed-length string?  The normal string-handling
> routines fail either because of terminator characters in the string or because
> the string is two long.
> 2) I handle the parameters by having a PV for each parameter, and a
> separate "group" of PVs for each command.  Is this best practice?
> 
> Thank you,
> 
> Iain Marcuson.



References:
Packed Data Message Formats With Fixed-Length Strings Iain Marcuson
RE: Packed Data Message Formats With Fixed-Length Strings Mooney, Tim M.

Navigate by Date:
Prev: Re: motor6-10 Matt Newville
Next: Re: motor6-10 Michael Davidsaver
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Packed Data Message Formats With Fixed-Length Strings Mooney, Tim M.
Next: Re: Packed Data Message Formats With Fixed-Length Strings 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  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·