EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Fwd: Re: Fix length of exponent in Streamdevice %E
From: "Florian Feldbauer" <[email protected]>
To: "EPICS Tech Talk" <[email protected]>
Date: 27 Mar 2013 16:00:22 +0100

Hi Pete,

yes I tried this and it works! Thanks!

  Florian

On 03/27/2013 03:36 PM, [email protected] wrote:
Have you tried using the width field - ie:
    in  "\${1}1034006%6E%*u";

Pete

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Florian Feldbauer
Sent: 27 March 2013 09:05
To: EPICS Tech Talk
Subject: Fix length of exponent in Streamdevice %E

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         |
----------------------------------------



--
----------------------------------------
| 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         |
----------------------------------------




Navigate by Date:
Prev: Re: Re: anyone using MOXA's embedded computer UC8410 as softioc? Silver
Next: RE: Re: anyone using MOXA's embedded computer UC8410 as softioc? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Fix length of exponent in Streamdevice %E peter.owens
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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·