300 likes | 346 Views
Explore MATLAB functions for EPICS system control with LabCA, AIDA, and more. Understand PVs modeling and monitoring for efficient data retrieval. Unlock possibilities beyond with resources like time and money.
E N D
MATLABLCLS Control Interface Sergei Chevtsov, 02-07-2007
PDF Guide http://lcls-dev/tiki-index.php?page=Matlab_Programmers_Guide Sergei Chevtsov, 02-07-2007
Contents • Overview • LabCA • AIDA • Beyond Sergei Chevtsov, 02-07-2007
Contents • Overview • LabCA • AIDA • Beyond Sergei Chevtsov, 02-07-2007
Overview EPICS SLC Matlab (32 bit Linux, prod network) Sergei Chevtsov, 02-07-2007
Overview EPICS SLC Presentation scope Matlab (32 bit Linux, prod network) Sergei Chevtsov, 02-07-2007
Overview PVs Model Matlab (32 bit Linux) Sergei Chevtsov, 02-07-2007
Overview PVs Model LabCA AIDA Matlab (32 bit Linux) Sergei Chevtsov, 02-07-2007
Contents • Overview • LabCA • AIDA • Beyond Sergei Chevtsov, 02-07-2007
LabCA PVs Model LabCA AIDA Matlab (32 bit Linux) Sergei Chevtsov, 02-07-2007
LabCA • Matlab functions • Names begin with “lca” Most commonly used: • lcaGet • lcaPut • lcaSetMonitor/lcaNewMonitorValue Sergei Chevtsov, 02-07-2007
lcaGet [value, timestamp] = lcaGet(pv) Gets PV value, e.g. >> lcaGet('MIKE:BEAM') ans = 'ON' Sergei Chevtsov, 02-07-2007
lcaPut lcaPut(pv, value) Sets PV value, e.g. >> lcaPut('MIKE:BEAM', 'OFF') Sergei Chevtsov, 02-07-2007
Why monitors? PVs Sergei Chevtsov, 02-07-2007
Why monitors? PVs for i=1:n get; Repeated data retrieval Sergei Chevtsov, 02-07-2007
Why monitors? PVs • …but no new data yet • network overload • complex algorithms for i=1:n get; Sergei Chevtsov, 02-07-2007
Why monitors? PVs for i=1:n waitAndGet; Wait until new data, then retrieve it Sergei Chevtsov, 02-07-2007
lcaSetMonitor lcaSetMonitor(pv) Sets PV monitor, e.g. >> lcaSetMonitor('MIKE:BEAM') Sergei Chevtsov, 02-07-2007
lcaNewMonitorValue flag = lcaNewMonitorValue(pv) Returns whether a new PV value available, e.g. >> lcaNewMonitorValue('MIKE:BEAM') ans = 1 Sergei Chevtsov, 02-07-2007
Contents • Overview • LabCA • AIDA • Beyond Sergei Chevtsov, 02-07-2007
AIDA PVs Model LabCA AIDA Matlab (32 bit Linux) Sergei Chevtsov, 02-07-2007
AIDA • Matlab functions • Names begin with “aida” Most commonly used: • aidalist • aidaget Sergei Chevtsov, 02-07-2007
aidalist aidalist(device, attribute) Lists attributes of the specified device (use % as wildcard), e.g. >> aidalist('QUAD:LI01:221', 'Z%') chevtsov@flora's password: QUAD:LI01:221 Z QUAD:LI01:221 ZTIM ans = 0 Sergei Chevtsov, 02-07-2007
aidaget aidaget(‘<device>//<attribute>’) Gets value of the specified device attribute e.g. >> aidaget('QUAD:LI01:221//ZTIM') ans = -2.8622e+12 Sergei Chevtsov, 02-07-2007
Contents • Overview • LabCA • AIDA • Beyond Sergei Chevtsov, 02-07-2007
Beyond We give you the wheel, you build the vehicle. Sergei Chevtsov, 02-07-2007
Beyond Resources: time, money etc. Sergei Chevtsov, 02-07-2007
Beyond Sergei Chevtsov, 02-07-2007
Beyond Sergei Chevtsov, 02-07-2007
The end Thank you Sergei Chevtsov, 02-07-2007