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  2016  2017  2018  2019  2020  <20212022  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  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: StreamDevice response parsing and redirection
From: "Zimoch Dirk \(PSI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: Josh Fiddler <[email protected]>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 11 Nov 2021 10:55:32 +0000
I have implemented a bit sum. Pushed as version 2.8.22.
Use either %<bitsum> or %<bitsum8> for a one byte sum, %<bitsum16> for a 2 byte sum or %<bitsum32> for a 4 byte sum. (If
the sum is too large for its representation, the higher bytes will be dropped, as usual.)
I hope I implemented it correct ;-)

Dirk

On Thu, 2021-11-11 at 05:11 -0500, Josh Fiddler wrote:
> Dirk: thanks. 
> 
> On Thu, Nov 11, 2021 at 3:28 AM Zimoch Dirk (PSI) <dirk.zimoch at psi.ch> wrote:
> 
> Yes. Just the byte sequence. I just used the representation for convenience. 
> 
> > .. or isn't this the string "A1 61 00 00 00 05 DC 02 58 00 11 00 0D" but really only the byte squence?
> > 
> > In that case:
> > I do not have a bitsum yet. But if I had, it would look like:
> 
> Okay. A bitsum method isn’t implemented. Hmmm. But this is helpful nonetheless. 
> > 
> > terminator = 0x0d;
> > set_A_AND_I {
> >     out 0xa1 0x61 0x00 0x00 0x00 "%2r%(\$1:CURRENT)2r%<bitsum>";
> >     in  0xa1 0x0a 0x00 0x00 0x00 "%=2r%(\$1:CURRENT)=2r%<bitsum>";
> > }
> > 
> 
> I think you got it. 
> > I use redirection for the second value (current) while taking the first (voltage) from the active record. The reply
> > is
> > checked for correctness with %= against the current settings. (I hope I understood this right.)
> 
> Any thoughts on the extraction of specific bytes from the response? An ‘aai’ record perhaps?
> 
> > > > The response would contain the same first 2 bytes, with the 3rd now 0A to show is a response. In the parameter
> > > > response, the 4th and 5th bytes represent the system state when each is converted to a binary representation,
> > and
> > > > each
> > > > bit indicates some status. 
> > > > 
> > > > The ask:
> > > > 
> > > > How can I extract this information and use it?  Should I use record redirection to put the values and
> > formatters? 
> > > > 
> > > > Could someone point me in the right direction? 
> > > > 
> > > > Thanks for reading. 
> > > > 
> > > > I also have another question here that I could use some help with 
> > > > Search: "StreamDevice checksum Methods"
> 
> Thanks again. 
> 
> Josh
> -- 
> 
> 	Josh FiddlerFusion Technician: Controls and Data
> +1-450-245-1065www.f.energy Linkedin

References:
StreamDevice response parsing and redirection Josh Fiddler via Tech-talk
Re: StreamDevice response parsing and redirection Zimoch Dirk (PSI) via Tech-talk
Re: StreamDevice response parsing and redirection Zimoch Dirk (PSI) via Tech-talk

Navigate by Date:
Prev: Re: StreamDevice response parsing and redirection Zimoch Dirk (PSI) via Tech-talk
Next: ADLightField start LightField failed GONG Yu via Tech-talk
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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice response parsing and redirection Zimoch Dirk (PSI) via Tech-talk
Next: ADLightField start LightField failed GONG Yu via Tech-talk
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  <20212022  2023  2024 
ANJ, 11 Nov 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·