StreamDevice Update and System Enhancements

undefined
 
News from StreamDevice
 
Dirk Zimoch :: Control Systems :: Paul Scherrer Institut
 
EPICS Collaboration Meeting ITER June 2019
 
Flashback: What was StreamDevice again?
 
Modular design allows to
plug in new functionality
#LakeShore 218
Terminator = CR LF;
ReplyTimeout = 1000;
ReadTimeout = 100;
reset {
 out "*RST"; #no reply
 wait 1000;
}
# read in Kelvin
temp_K_1
 {
 out "KRDG? 1";
 in "%f";
}
# read in Celsius
temp_C_1 {
 out "CRDG? 1";
 in "%f";
}
 
record (ai,"$(DEVICE):TEMP_K") {
 field (DTYP,"stream")
 field (INP, "@
LS218.prot
 
temp_K_1
 
LakeShore1
")
 field (EGU, "K")
 field (PREC,"2")
}
 
LS218.prot
 
drvAsynSerialPortConfigure "
LakeShore1
","/dev/ttyS0"
 
EPICS 7 support
New data types: INT64 and UINT64 for arrays (aai, aao, waveform)
New record types: int64in, int64out, lsi, lso
(64 bit I/O probably works only on systems, where 
long
 has 64 bits)
Connection handling (only when supported by asynOctet driver)
Set .STAT to COMM when disconnected
Run 
@init 
handler (again) when reconnecting
Error Messages
Errors switched off after iocInit to prevent message flooding
Controllable with
 var streamError
Repeating asyn errors suppressed (thanks to Benjamin Franksen)
Does not mess with 
asynTraceMask
 any more
 
What's New?
 
GIT: 
https://github.com/paulscherrerinstitute/StreamDevice
Old "master" branch renamed to "2.7", new "master" is version 2.8.
(Was probably not the best idea. Sorry. I did not know what I was doing.)
Documentation: 
https://paulscherrerinstitute.github.io/StreamDevice
Have now a standard 
configure/
 directory
Compatible with "standard EPICS" way to build
Still supports being in external 
<top>/
 directory like before
PSI specific 
GNUmakefile
  calls "standard EPICS" 
Makefile
if no PSI environment is found
Documentation moved to 
docs/
 for github.io compatibility
Directory 
srcSynApps/
 removed
sCalcout record support moved to 
src/
 
Repo and Build system
<top>/
   configure/
   StreamDevice/
         configure/
         Makefile
         
GNUmakefile
         src/
         docs/
 
Dynamic libraries supported
Fixed epicsExport.h and epicsShare* usage (I hope)
Color support for error output like on Linux console
Required some console setup call
Problems to build with VS 2010
Cannot test as I have no VS 2010
No problem with VS 2017
Dropped support for old Cygwin version
Used old cygnus-2.7.2 gcc which fails to compile some code
required preprocessor switches
 
Windows Support
 
Normal regex: 
%/expression/ 
returns a string
E.g. find keyword in long text: 
in "%.
1/(?im)<title>(.*?)<\/title>/";
Regsubst: 
%#/expression/substitution/ 
rewrites input/output
Make strange input readable:
1.23-
 
 
-1.23
 
in "
%#/([^+-])*([+-])/\2\1/
%f";
86+3 
 
 
8.6e+3
 
in "
%#/([0-9])([0-9]*)([-+][0-9]+)/\1.\2e\3/
%f";
Convert certain characters:
Lower case hex checksum
 
out "%0<xor>
%#-2/.*/\L&/
";
Text 1
 
 
TEXT_1
 
out "%s
%#/.*/\U&/%#/ /_/
";
\path\x\y
 
 
/path/x/y
 
out "%s
%/\\/\//
";
Future plan: implement "translate characters" format
%|charset|replacement|
, e.g. 
"%|[a-z] \\|[A-Z]_/|"
 
Regular expressions
 
Error/Debug message handling
Filter messages per record (pattern)
Send messages through driver layer (asyn)
Propagate errors along redirections
Support interlaced arrays (aka tables)
Syntax improvements
Include other protocol files
Call other protocols with parameters
Load-time and run-time calculations ( e.g. 
0x10+$1
,  
"%(VAL*0.01)f"
 )
Conditionals ( e.g. 
$1?"ADDR=\$1"
 )
Change settings dynamically, in particular number of bytes to read (MaxInput)
Support dynamic array sizes, e.g. GPIB "#6008000…"
Other interfaces than asynOctet
records (string fields or char arrays)
sysfs (Linux)
 
 
 
More Future Plans
  1.234
 
4.233
 
3.424
  2.321
 
6.342
 
3.121
  1.122
 
5.324
 
2.134
     ↓             ↓              ↓
record A  record B  record C
 
Motor record support ?
Unicode ?
 
What else?
undefined
 
Many Thanks to the EPICS Community
Thanks to all contributors:
Krisztián Löki
Scott Stubbs
Mark Rivers
Jeong Han Lee
Benjamin Franksen
Mike Westfall
Klemen Vodopivec
Hugo Slepicka
Davide Marcato
(whoever I missed)
Slide Note
Embed
Share

Learn about the latest updates and enhancements in StreamDevice, including new data types, record types, connection handling improvements, and changes in the repository and build system. Discover the support for dynamic libraries on Windows and other key developments for better control system management.

  • StreamDevice
  • Update
  • Enhancements
  • Control System
  • Repository

Uploaded on Aug 05, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. WIR SCHAFFEN WISSEN HEUTE FR MORGEN Dirk Zimoch :: Control Systems :: Paul Scherrer Institut News from StreamDevice EPICS Collaboration Meeting ITER June 2019

  2. Flashback: What was StreamDevice again? record (ai,"$(DEVICE):TEMP_K") { field (DTYP,"stream") field (INP, "@LS218.prot temp_K_1 LakeShore1") field (EGU, "K") field (PREC,"2") } LS218.prot records ... ai bo stringout waveform format converters record interfaces #LakeShore 218 %f Terminator = CR LF; ReplyTimeout = 1000; ReadTimeout = 100; Stream Protocol Parser %b StreamCore reset { out "*RST"; #no reply wait 1000; } protocol files %{ } %< > # read in Kelvin temp_K_1 { out "KRDG? 1"; in "%f"; } %/ / bus interfaces asynDriver Interface StreamDevice # read in Celsius temp_C_1 { out "CRDG? 1"; in "%f"; } bus drivers ? asynDriver serial Modular design allows to plug in new functionality drvAsynSerialPortConfigure "LakeShore1","/dev/ttyS0" TCP buses GPIB

  3. What's New? EPICS 7 support New data types: INT64 and UINT64 for arrays (aai, aao, waveform) New record types: int64in, int64out, lsi, lso (64 bit I/O probably works only on systems, where long has 64 bits) Connection handling (only when supported by asynOctet driver) Set .STAT to COMM when disconnected Run @init handler (again) when reconnecting Error Messages Errors switched off after iocInit to prevent message flooding Controllable with var streamError Repeating asyn errors suppressed (thanks to Benjamin Franksen) Does not mess with asynTraceMask any more

  4. Repo and Build system GIT: https://github.com/paulscherrerinstitute/StreamDevice Old "master" branch renamed to "2.7", new "master" is version 2.8. (Was probably not the best idea. Sorry. I did not know what I was doing.) Documentation: https://paulscherrerinstitute.github.io/StreamDevice Have now a standard configure/ directory Compatible with "standard EPICS" way to build Still supports being in external <top>/ directory like before PSI specific GNUmakefile calls "standard EPICS" Makefile if no PSI environment is found Documentation moved to docs/ for github.io compatibility Directory srcSynApps/ removed sCalcout record support moved to src/ <top>/ configure/ StreamDevice/ configure/ Makefile GNUmakefile src/ docs/

  5. Windows Support Dynamic libraries supported Fixed epicsExport.h and epicsShare* usage (I hope) Color support for error output like on Linux console Required some console setup call Problems to build with VS 2010 Cannot test as I have no VS 2010 No problem with VS 2017 Dropped support for old Cygwin version Used old cygnus-2.7.2 gcc which fails to compile some code required preprocessor switches

  6. Regular expressions Normal regex: %/expression/ returns a string E.g. find keyword in long text: in "%.1/(?im)<title>(.*?)<\/title>/"; Regsubst: %#/expression/substitution/ rewrites input/output Make strange input readable: 1.23- -1.23 in "%#/([^+-])*([+-])/\2\1/%f"; 86+3 8.6e+3 in "%#/([0-9])([0-9]*)([-+][0-9]+)/\1.\2e\3/%f"; Convert certain characters: Lower case hex checksum out "%0<xor>%#-2/.*/\L&/"; Text 1 TEXT_1 out "%s%#/.*/\U&/%#/ /_/"; \path\x\y /path/x/y out "%s%/\\/\//"; Future plan: implement "translate characters" format %|charset|replacement|, e.g. "%|[a-z] \\|[A-Z]_/|"

  7. More Future Plans Error/Debug message handling Filter messages per record (pattern) Send messages through driver layer (asyn) Propagate errors along redirections Support interlaced arrays (aka tables) Syntax improvements Include other protocol files Call other protocols with parameters Load-time and run-time calculations ( e.g. 0x10+$1, "%(VAL*0.01)f" ) Conditionals ( e.g. $1?"ADDR=\$1" ) Change settings dynamically, in particular number of bytes to read (MaxInput) Support dynamic array sizes, e.g. GPIB "#6008000 " Other interfaces than asynOctet records (string fields or char arrays) sysfs (Linux) 1.234 2.321 1.122 record A record B record C 4.233 6.342 5.324 3.424 3.121 2.134

  8. What else? Motor record support ? Unicode ?

  9. Many Thanks to the EPICS Community Thanks to all contributors: Kriszti n L ki Scott Stubbs Mark Rivers Jeong Han Lee Benjamin Franksen Mike Westfall Klemen Vodopivec Hugo Slepicka Davide Marcato (whoever I missed)

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#