EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: RE: StreamDevice protocol question
From: "Shepherd, EL \(Emma\)" <[email protected]>
To: <[email protected]>
Date: Fri, 24 Aug 2007 09:44:57 +0100
Thanks Rodney:

> Personally, when a command is echoed back, I try to match, instead of
skipping, the characters as an added error check.  

I agree, this would be the best option but the number I am sending out
is the record value, and I don't know how to retrieve this to match it
in the input statement as well.  Does anyone
know if this is possible?

I tried the other format converters you suggested as well. %*[^E]
doesn't work.  %*i.%*i does work for the first number in the message but
not for the second (even when they are exactly the same numbers) - in
this case I get the error message:

2007/08/24 08:34:01.777 BLXXI-EA-LED-01:CH1SENDOUTPUT: Input "00" does
not match format %*i

This seems to suggest that the matching is somehow dependent on the
location in the message...?  I also tried %*s to match the entire string
but this doesn't work either.

I have found a combination that works however: in
"RC1C0V%*i.%*iE%*[.0-9]";

So I have a solution to this particular problem, but would still like to
find out whether this really is a bug or not...


Emma


> -----Original Message-----
> From: Rodney R. Porter [mailto:[email protected]] 
> Sent: 23 August 2007 20:01
> To: Shepherd, EL (Emma); [email protected]
> Subject: Re: StreamDevice protocol question
> 
> 
> Emma, 
> This sounds like a bug/feature.  You might try %*[^E] instead 
> of %*[.0-9] and see if that works.  It looks like your second 
> example is trying to send 2 values to the same PV, which is 
> probably not well defined.  Depending on how your input can 
> vary, you could also try %*4c or %*i.%*i to skip the input.  
> 
> Personally, when a command is echoed back, I try to match, 
> instead of skipping, the characters as an added error check.  
> Usually this means copying part of your output statement into 
> your input statement.  This is difficult if the number is a 
> variable, as opposed to a constant.
> -- 
> Rodney R. Porter
> 
> X-Ray Nanoprobe Software Engineer
> Advanced Photon Source Sector 26
> Center for Nanoscale Materials
> Argonne National Laboratory
> 
> 
> On 8/23/07 4:29 AM, "Shepherd, EL (Emma)" 
> <[email protected]>
> wrote:
> 
> > Hi,
> > 
> > I've been battling with a Streams protocol and thought I 
> would ask for 
> > some advice from the experts!
> > 
> > I have the following input from my Streams device: "RC1C0V0.00E2.50"
> > 
> > Now this is just an echo of a command I have sent so 
> instead of saving 
> > the information I want to use the * modifier to simply skip the 
> > floating point numbers, like so:
> > 
> > in "RC1C0V%*[.0-9]E%*f";
> > 
> > (NB: I am using a charset instead of %f for the first 
> number since the 
> > E character could be interpreted as an exponent).
> > 
> > This doesn't work, and I get the following Streams error:
> > 
> > 2007/08/23 09:07:49.260 BLXXI-EA-LED-01:CH1SENDOUTPUT: Input 
> > "RC1C0V0.00E2.50" too short. No match for "E"
> > 
> > However, if I remove the * modifiers and put field names there 
> > instead, it works fine:
> > 
> > in "RC1C0V%(MYRECORD.VAL)[.0-9]E%(MYRECORD.VAL)f";
> > 
> > If I leave the field name in for the first number and %*f for the 
> > second I get the following error:
> > 
> > 2007/08/23 09:25:25.632 BLXXI-EA-LED-01:CH1SENDOUTPUT: Input "2.50" 
> > does not match format %*f
> > 
> > 
> > Any ideas why I am not able to use the * flag in these cases?
> > 
> > Thanks,
> > 
> > Emma
> > 
> > 
> > 
> > <DIV><FONT size="1" color="gray">This e-mail and any 
> attachments may 
> > contain confidential, copyright and or privileged material, and are 
> > for the use of the intended addressee only. If you are not the 
> > intended addressee or an authorised recipient of the 
> addressee please 
> > notify us of receipt by returning the e-mail and do not use, copy, 
> > retain, distribute or disclose the information in or 
> attached to the 
> > e-mail. Any opinions expressed within this e-mail are those of the 
> > individual and not necessarily of Diamond Light Source Ltd. Diamond 
> > Light Source Ltd. cannot guarantee that this e-mail or any 
> attachments 
> > are free from viruses and we cannot accept liability for any damage 
> > which you may sustain as a result of software viruses which may be 
> > transmitted in or with the message. Diamond Light Source Limited 
> > (company no. 4375679). Registered in England and Wales with its 
> > registered office at Diamond House, Harwell Science and Innovation 
> > Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom </FONT></DIV>
> > 
> 
> 
<DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
</FONT></DIV> 


References:
Re: StreamDevice protocol question Rodney R. Porter

Navigate by Date:
Prev: Re: COMEDI EPICS driver support? Stefan Heim
Next: Network plug and play epics devices Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice protocol question Rodney R. Porter
Next: Re: StreamDevice protocol question Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·