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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | StreamDevice question - trailing characters |
From: | Mark Bennett <[email protected]> |
To: | "[email protected]" <[email protected]> |
Date: | Mon, 12 Jul 2010 17:12:07 +1000 |
I am trying to write a StreamDevice protocol file for a
Thorlabs SC10 shutter Controller and have struck a problem. The protocol to obtain eg. “data” is to send the
string “data?”. The device then responds in three steps: * echoes the request string “data?” followed by a
terminator (CR) * provides the current value (0 or 1) followed by a
terminator (CR) * sends back a prompt string“> “ BUT WITH NO
TERMINATOR I can handle the first two steps: TERMINATOR=CR getData { out “data?”; in “data?”;
in “{0|1}”; } How do I best handle parsing the trailing characters of the prompt
string “> “ which is not terminated? I will be polling the device for multiple pieces of data. Thanks in advance, Dr Mark Bennett Principal Controls Engineer Australian Synchrotron This message and any attachments may contain proprietary or confidential information. If you are not the intended recipient or you received the message in error, you must not use, copy or distribute the message. Please notify the sender immediately and destroy the original message. Thank you. |