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  <20172018  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  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: StreamDevice hexa checksum in lowercase characters
From: "Paduan Donadio, Marcio" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 7 Sep 2017 04:31:20 +0000

Thank you, Keenan!


It worked perfectly.


It is ugly, but I put the string in a variable, like this:


low_case = "%#/A/a/%#/B/b/%#/C/c/%#/D/d/%#/E/e/%#/F/f/";


out STX "590000%01<sum>" $low_case;


Best regards,


Márcio.



De: Lang, Keenan C. <[email protected]>
Enviado: quarta-feira, 6 de setembro de 2017 14:48
Para: Paduan Donadio, Marcio; [email protected]
Assunto: Re: StreamDevice hexa checksum in lowercase characters
 

If this is running on an operating system that has the PCRE library, you can enable the streams regex converter 


http://epics.web.psi.ch/software/streamdevice/doc/setup.html

epics.web.psi.ch
Setup 1. Prerequisites. StreamDevice requires either EPICS base R3.14.6 or higher or EPICS base R3.13.7 or higher. How to use StreamDevice on EPICS R3.13 is described ...


This will allow you to find and replace substrings before the string gets outputted. Unfortunately, the result looks a bit ugly:


out STX "590000%01<sum>%#/A/a/%#/B/b/%#/C/c/%#/D/d/%#/E/e/%#/F/f/";


From: [email protected] <[email protected]> on behalf of Paduan Donadio, Marcio <[email protected]>
Sent: Wednesday, September 6, 2017 1:14:44 PM
To: [email protected]
Subject: StreamDevice hexa checksum in lowercase characters
 

I have a TC-720 temperature controller that needs to receive an hexadecimal checksum:


Protocol file: 

(...)
read_low_alarm1
{
        out STX "590000%01<sum>";
        in STX "%4x%01<sum>";
}

(...)


The output was:

*5900002E\r


The problem is: that final "E" must be "e" lowercase, or the equipment return an error code. How can I make <sum> output a lowercase character?


Thank you,


Márcio Paduan Donadio
Control Systems Engineer
SLAC National Accelerator Laboratory
Advanced Instrumentation for Research Division
2575 Sand Hill Rd
Menlo Park CA 94025
Office (650) 926-5007​



References:
StreamDevice hexa checksum in lowercase characters Paduan Donadio, Marcio
Re: StreamDevice hexa checksum in lowercase characters Lang, Keenan C.

Navigate by Date:
Prev: Re: StreamDevice hexa checksum in lowercase characters Lang, Keenan C.
Next: Re: C++ multi threaded application. Giacomo S.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice hexa checksum in lowercase characters Lang, Keenan C.
Next: cannot read ioc PVs with caget Antal, Szabolcs
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·