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  2014  2015  <20162017  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  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: streamdevice question
From: geyang <[email protected]>
To: tech-talk <[email protected]>
Date: Wed, 27 Jul 2016 00:18:05 +0800 (CST)
hi,

I want to use streamdevice to communicate with a device. Each time send 256 floats (1024 bytes). The valid data part is changeable. For the rest parts will be filled with 0xffffffff (4 bytes). So I defined a waveform record like this:

record(waveform, "data")

{

  field(DTYP, "stream")

  field(SCAN, "Passive")

  field(NELM, "256")

  field(FTVL, "FLOAT")

  field(INP, "@psc.proto set_array  terminal")

}

The proto file as following:

set_array {

    MaxInput = 4;

    out "%4R";

    in "%(crc.VAL)4r"

}

Then use python to create a data list like this as the count of 0xffffffff is different each time:

[3.14,3.14, 0xffffffff,0xffffffff, 0xffffffff,0xffffffff,…],

cothread to caput the list to pv.

But the 0xffffffff will be converted to float 4294967295 and send to device as 0x4F800000 by streamdevice.

How to write the protocol file? Thanks a lot for your help.

Best wishes,
Geyang 2016/07/27



 


Replies:
Re: streamdevice question Eric Norum

Navigate by Date:
Prev: RE: Inconsistency in devAsynOctet for stringout and waveform records Mark Rivers
Next: Re: streamdevice question Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS-Arduino Serial Communication via Asyn-Stream Drivers Hulusi Öz
Next: Re: streamdevice question Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 27 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·