I think that it would work if you just left off the width -- "%.2f"
On May 26, 2010, at 8:45 AM, Burkhard Kolb wrote:
> Hi Dirk,
> I am just writing protocol files for a Lauda chiller unit (RE 304 and RE 306).
> http://www.lauda.de/hosting/lauda/website_en.nsf/urlnames/kaeltethermostate_produkte
> It requires floats as parameters in a special way:
> Example "OUT SP 00 20.01"
> The parameter here can range from 1 to 3 digits in front and 2 digits behind the
> decimal point.
> If I use %6.2f it will work for "120.01", but will write " 20.01" in case of the
> value "20.01".
> The extra blank will cause the unit to flag the command as error.
> I can use the "-" modifier to get rid of the leading space...
> But then the string sent looks like "20.01 " and the unit will again
> complain. Can I suppress leading and trailing spaces?
> Cheers, Burkhard
> --
> Dr. Burkhard Kolb
> Tel +49 6159 712667
> GSI Helmholtzzentrum für Schwerionenforschung GmbH
> Planckstraße 1 | D-64291 Darmstadt | www.gsi.de
>
> Gesellschaft mit beschränkter Haftung
> Sitz der Gesellschaft: Darmstadt
> Handelsregister: Amtsgericht Darmstadt, HRB 1528
>
> Geschäftsführung: Professor Dr. Dr. h.c. Horst Stöcker, Christiane Neumann, Dr. Hartmut Eickhoff
> Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph
> Stellvertreter: Ministerialdirigent Dr. Rolf Bernhard
>
>
>
>
>
--
Eric Norum
[email protected]
- Replies:
- Re: stream device formatting question Burkhard Kolb
- References:
- stream device formatting question Burkhard Kolb
- Navigate by Date:
- Prev:
stream device formatting question Burkhard Kolb
- Next:
Re: labCA and EPICS_CA_MAX_ARRAY_BYTES Matt Newville
- 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:
stream device formatting question Burkhard Kolb
- Next:
Re: stream device formatting question Burkhard Kolb
- 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
|