-
Notifications
You must be signed in to change notification settings - Fork 8
/
ReadVariables.m
30 lines (20 loc) · 980 Bytes
/
ReadVariables.m
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
function [ValueOut]=ReadVariables(maPort)
%ValueOut is a vector of 5 measurements taken from the LabTestExperiment,
%aka: Ppv, Pload, Pneigh_sell, Pbat, and Pgrid
%we need to set up a path for each variable that we import/read from the measurements taken from the LabTestExperiment
%variable paths
PathToRead = 'Model Root/TEST/PowerControl1/5Hz Filter/Out1'; %Ppv
ValueOut.Pdc1 = maPort.Read(PathToRead);
%variable paths
PathToRead = 'Model Root/TEST/PowerControl2/5Hz Filter/Out1'; %Pload
ValueOut.Pdc2 = maPort.Read(PathToRead);
%variable paths
PathToRead = 'Model Root/TEST/PowerControl3/5Hz Filter/Out1'; %Pneig_sell
ValueOut.Pdc3= maPort.Read(PathToRead);
%variable paths
PathToRead = 'Model Root/TEST/PowerControl4/5Hz Filter/Out1'; %Pbat
ValueOut.Pdc4 = maPort.Read(PathToRead);
%variable paths
PathToRead = 'Model Root/TEST/Data acquisition/5Hz Filter/Out1'; %Pgrid - the sluck inverter
ValueOut.Pdc5 = maPort.Read(PathToRead);
end