Thank you Eric,
I needed both modifications:
1) char debus[40]; ==> string debus;
(which I did not try before)
And
2) sprintf ==> strcpy
(which I had tried already)
Christian
-----Ursprüngliche Nachricht-----
Von: Eric Norum [mailto:[email protected]]
Gesendet: Mittwoch, 25. Februar 2009 17:18
An: Gerke, Christian
Cc: [email protected]
Betreff: Re: Snl strings
Declare the variable as a string:
.
.
string currentState;
assign currentState to "{P}ClockScanStateSI";
.
.
.
strcpy(currentState, "Scan P0 phase");
pvPut(currentState);
On Feb 25, 2009, at 10:07 AM, Gerke, Christian wrote:
> Hi
>
> For EPICS 3.13 and SNL 1.9.5 how do I send a string from a snl program
> to a stringin-record?
>
> I tried:
>
> char debus[40];
> assign debus to "KS2:SNL:KUE:DEBUS_stringin";
> sprintf(debus,"HDTemp init");
> pvPut(debus);
>
> As a result the stringin VAL field contains "72" (the ascii code of
> "H",
> the frist string character) which is not quite what I want.
>
> Is there a problem with strings (character arrays) in snl or the
> stringin record?
> Or is there something wrong with my approach?
>
> Christian
>
> ___________________________________________________________________
>
> Christian Gerke
> Deutsches Elektronen Synchrotron DESY
> Mitarbeiter der Gruppe MKS2
> http://www-mks2.desy.de
> Tel +49 40 8998-4028
> Fax +49 40 8994-4028
> [email protected]
> ___________________________________________________________________
>
--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793
- Replies:
- Re: AW: Snl strings Eric Norum
- References:
- Snl strings Gerke, Christian
- Re: Snl strings Eric Norum
- Navigate by Date:
- Prev:
Re: use and utility of permissive record Emmanuel Mayssat
- Next:
Re: AW: Snl strings Eric Norum
- 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:
Re: Snl strings Eric Norum
- Next:
Re: AW: Snl strings Eric Norum
- 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
|