Experimental Physics and Industrial Control System
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 ([email protected]) (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
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- 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
<2006>
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024