Experimental Physics and
| |||||||||||||||
|
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
| ||||||||||||||
ANJ, 27 Jul 2016 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |