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  2013  <20142015  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  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Streamdevice extract bytestream
From: Dirk Zimoch <[email protected]>
To: [email protected]
Date: Thu, 09 Jan 2014 09:15:58 +0100
On 09.01.2014 00:43, [email protected] wrote:
I'm using StreamDevice to receive unsolicited bytestream messages from a device with the message format: 0x10 0x02 ... data ... 0x10 0x03 CRC-bytes.

In my protocol file, I have:
Terminator = DLE ETX;
ExtraInput = Ignore;

getSerial {
	out "\x10\x02\x11\x11\x01";

	#message tag is \x11
	in "\x10\x02\x21\x11%(\$1:serial.VAL)0r";
}

however it is only storing a single byte into the serial record. How do I extract multiple bytes?


"Multiple bytes" like in array of bytes or like in "32 bit integer"?

32 bit integer: "%4r"
32 bit float: "%4R"
32 bit little endian integer: "%#4r"

BTW: ExtraInput = Ignore; is almost always a bad idea because it hides some errors. Better read and check everything, including the CRC.

Dirk




References:
Streamdevice extract bytestream Stanley.He

Navigate by Date:
Prev: Streamdevice extract bytestream Stanley.He
Next: Re: Sequencer Installation error Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Streamdevice extract bytestream Stanley.He
Next: Streamdevice extract bytestream Stanley.He
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·