Channel Access in Matlab
Channel Access in Matlab. What is matlab?. Matlab is a programming language designed for data analysis. It comes with an integrated development environment. Includes help, debugging and some GUI functionality. It can be extended with self written functions and libraries.
Channel Access in Matlab
E N D
Presentation Transcript
Channel Access in Matlab Advanced EPICS Training, Dirk Zimoch 2008
What is matlab? • Matlab is a programming language designed for data analysis. • It comes with an integrated development environment. • Includes help, debugging and some GUI functionality. • It can be extended with self written functions and libraries. • We provide an EPICS interface for matlab. • Support from the controls section is only rudimentary. Advanced EPICS Training, Dirk Zimoch 2008
EPICS access in matlab • Start matlab: matlab • Read value caget 'ARIDI-PCT:CURRENT' • returns structure: val, sevr, stat, time, sevr_str, stat_str, time_str • status, severity, timestamp available as numbers and as strings • Write value caput 'channel', value • Create monitor is not yet supported. Advanced EPICS Training, Dirk Zimoch 2008
Problems with matlab and EPICS • Why do I get "Undefined function or method 'caget'"? • Check environment variable MATLABPATH echo $MATLABPATH /usr/local/epics/extensions/mca:/usr/local/epics/extensions/lib/SL3-x86 • Check that EPICS is installed in /usr/local/epics. • Why does matlab sometimes crash on exit after using EPICS? • I don't know, but it seems to be harmless. • Why is the timestamp wrong by 1 or 2 hours? • IOC time is UTC, not local (summer) time. • I don't know how to handle time zones in matlab. Do you? Advanced EPICS Training, Dirk Zimoch 2008
Where can I learn more about matlab? • Start matlab and click on MATLAB help • Look at www.mathworks.de • Ask one of the matlab experts • Thomas Schilcher • Mirek Dach • For the basic matlab-EPICS interface see ics-web1.sns.ornl.gov/~kasemir/mca • For the caget, caput, camon wrapper functions ask • Dirk Zimoch Advanced EPICS Training, Dirk Zimoch 2008