Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
<== Date ==> <== Thread ==>

Subject: Re: Special characters for Stringout
From: Tim Mooney <mooney@aps.anl.gov>
To: Emmanuel Mayssat <emmanuel_mayssat@lynceantech.com>
Cc: tech-talk@aps.anl.gov
Date: Thu, 18 May 2006 14:04:27 -0500
Emmanuel Mayssat wrote:
Hello,

I use a stingout record to write on my serial port.
The issue is that I want to write non-printable characters or Hex
values.
When in the db files I manually set field(VAL,"\x3A") (hex code for : ),
it prints \x3A... the escape sequence has not been recognized.
Is there a way to pass special characters through pao->val

If you don't find a better way of doing this, you could use an sCalcout record to encode escape sequences and send them to the stringout record. Version 2.6 of the calc module http://www.aps.anl.gov/aod/bcda/synApps/calc/calc.html includes the sCalcout record with the new functions ESC() and TR_ESC(), which translate escape sequences using, respectively, epicsStrSnPrintEscaped() and dbTranslateEscape().

For example, the string-calc expression TR_ESC("\x3a") produces the string ":"

Note that the string-calc software works with null-terminated strings, so you
cannot encode or decode \x0 with this software. For that, I would suggest
Dirk Zimoch's streamDevice
	http://epics.web.psi.ch/software/streamdevice/
or else custom device-support software.

P.S.: Be careful where you point that stingout record.

--
Tim Mooney (mooney@aps.anl.gov) (630)252-5417
Beamline Controls & Data Acquisition Group
Advanced Photon Source, Argonne National Lab


References:
Special characters for Stringout Emmanuel Mayssat

Navigate by Date:
Prev: Special characters for Stringout Emmanuel Mayssat
Next: June Collaboration Meeting Update Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Special characters for Stringout Emmanuel Mayssat
Next: Re: Special characters for Stringout Ralph Lange
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·