Subject: |
Fix length of exponent in Streamdevice %E |
From: |
"Florian Feldbauer" <[email protected]> |
To: |
"EPICS Tech Talk" <[email protected]> |
Date: |
27 Mar 2013 10:05:29 +0100 |
Dear all,
I'm trying to read out a Pfeiffer TCP350 via serial interface. This
device controls a vacuum pump and a vacuum gauge.
To request data from the device the ascii sting looks like this:
3 digits address
2 digits action ("00" for reading)
3 digits parameter number
2 digits data length
"=?" as data
and 3 digit checksum followed by CR.
The reply looks the same except, that data contains the actual value.
The checksum is the sum of all ASCII characters modulo 256 and this
converted to a 3 digit ascii string.
E.g.: the sum of all ASCII chars is 786, 786%256 = 18, than the checksum
would be "018".
Now I have the following problem. I want to read out the pressure
measured by the gauge using streamDevice.
The value is transmitted as exponential.
I have the following protocol:
out "\${1}0034002=?\${2}";
in "\${1}1034006%E%*u";
$1 is the module address, $2 the (hardcoded) checksum for the data request.
Here are some examples of the reply from the device
00110340061.6E-1039 where 1.6E-1 is the value, 039 the checksum
00110340065.6E-4046 where 5.6E-4 is the value, 046 the checksum
00110340064.3E-4042 where 4.3E-4 is the value, 042 the checksum
Using above protocol leads to an error because streamDevice reads the
checksum
as a part of the exponent. Is there a way to tell streamDevice that the
exponent is only one digit (+sign) long?
Or that the whole value has always 6 digits?
Best regards,
Florian
--
----------------------------------------
| Dr. Florian Feldbauer |
| |
| Helmholtz-Institut Mainz / |
| Johannes Gutenberg-Universität Mainz |
| Johann-Joachim-Becher-Weg 45 |
| D-55128 Mainz |
| |
| Office: 01/217 |
| Phone: (+49)6131 / 39-25829 |
----------------------------------------
- Replies:
- RE: Fix length of exponent in Streamdevice %E peter.owens
- Navigate by Date:
- Prev:
Re: alarm handler silence one hour button James F Ross
- Next:
anyone using MOXA's embedded computer UC8410 as softioc? Silver
- 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: alarm handler silence one hour button James F Ross
- Next:
RE: Fix length of exponent in Streamdevice %E peter.owens
- 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
|