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: | RE: Problem in Stream Out of two 8 bit data |
From: | Iain Marcuson via Tech-talk <[email protected]> |
To: | Ashish Sharma <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Mon, 21 Jan 2019 18:28:13 +0000 |
I think the approach would be to use a longout record and change the conversion. You can use little-endian raw output with I believe out “%#02.2r” to send the two least-significant bytes (2.2) as little-endian (#), treating the value as raw and unsigned (0). From: [email protected] <[email protected]>
On Behalf Of Ashish Sharma via Tech-talk Hello, I have a microcontroller based shaft encoder device with its firmware already written. I have its python equivalent on serial protocol to read and write to the device: ##************************************************************ WRITE_KNOB = 121 def read_knob(kn): def write_knob(kn,data): ##******************************************************* My equivalent .proto file for
read is as follows and it is working fine: get_analog_ch0 { But I am unable to write
the data to it. The routine that I am using is:
set_analog_ch0 { The .db file is as follows: record(ai, knob:get:ch_0) { I am not sure whether
waveform or which type of record will suffice here. While using
waveform record, I am unable to write the 2 byte values to the record like the way it is being done in python serial interface code. ps: I am an EPICS newbie. So, please bear with my limited experience. -- |