-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmpvaMonitor.m
More file actions
41 lines (37 loc) · 1.52 KB
/
mpvaMonitor.m
File metadata and controls
41 lines (37 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function [] = mpvaMonitor(pvname)
%
% mpvaMonitor displays the values of given EPICS PV names when it is updated.
%
% mpvaMonitor(pvname)
%
% -----------------------------------------------------------------------------
% Title : mpvaMonitor
% -----------------------------------------------------------------------------
% File : mpvaMonitor.m
% Author : Kuktae Kim, ktkim@slac.stanford.edu
% Created : 2023-11-02
% Last update: 2023-11-02
% -----------------------------------------------------------------------------
% Description:
% Display the values of given EPICS PV names when it is updated.
% -----------------------------------------------------------------------------
% This file is part of matpva. It is subject to the license terms in the
% LICENSE.txt file found in the top-level directory of this distribution
% and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html.
% No part of matpva, including this file, may be copied, modified,
% propagated, or distributed except according to the terms contained in
% the LICENSE.txt file.
% -----------------------------------------------------------------------------
% Check if the input is valid PV
try
mpvaGet(pvname);
catch
msg = 'Please check if pvname is valid or the PV is alive';
error(msg)
end
% Add matpva module directory to the path
path = [getenv('EPICS_EXTENSIONS') '/../matpva/current/'];
% Bring the Python script for the mpvpaMonitor
string = append("python3 ", path, "pva_callback.py ", pvname);
system(string)
end