Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ess-public-screens
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ics-software
ess-public-screens
Commits
4078faeb
Commit
4078faeb
authored
4 years ago
by
Emanuele Laface
Browse files
Options
Downloads
Patches
Plain Diff
Fixes on MCU screens
parent
70bfe31c
No related branches found
Branches containing commit
Tags
1.6.1
Tags containing commit
No related merge requests found
Pipeline
#41416
passed
4 years ago
Stage: check
Stage: build
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
PythonServer/screens/mcu.py
+75
-55
75 additions, 55 deletions
PythonServer/screens/mcu.py
WebSites/mcu/css/ess.css
+3
-2
3 additions, 2 deletions
WebSites/mcu/css/ess.css
WebSites/mcu/dashboard.json
+132
-74
132 additions, 74 deletions
WebSites/mcu/dashboard.json
with
210 additions
and
131 deletions
PythonServer/screens/mcu.py
+
75
−
55
View file @
4078faeb
...
...
@@ -2,9 +2,34 @@ import epics
import
json
import
time
import
sys
import
requests
import
pandas
import
datetime
from
threading
import
Thread
def
get_from_archiver
(
pv
,
start_date
,
end_date
):
try
:
url
=
"
http://archiver-utgard.cslab.esss.lu.se:17668/retrieval/data/getData.json?pv=ncount({})&from={}&to={}
"
.
format
(
pv
,
start_date
,
end_date
)
entries
=
int
(
requests
.
get
(
url
).
json
()[
0
][
"
data
"
][
0
][
"
val
"
])
url
=
"
http://archiver-utgard.cslab.esss.lu.se:17668/retrieval/data/getData.json?pv=nth_{}({})&from={}&to={}
"
.
format
(
int
(
entries
//
100
),
pv
,
start_date
,
end_date
)
r
=
requests
.
get
(
url
).
json
()[
0
][
"
data
"
]
raw_data
=
pandas
.
DataFrame
.
from_dict
(
r
)
return
list
(
zip
(
(
raw_data
[
"
secs
"
]
*
1000
).
astype
(
"
int
"
)
+
(
raw_data
[
"
nanos
"
]
/
1e6
).
astype
(
"
int
"
),
round
(
raw_data
[
"
val
"
],
3
),
)
)
except
Exception
:
return
[]
class
mcuScreen
(
Thread
):
def
__init__
(
self
,
stop_signal
):
Thread
.
__init__
(
self
)
...
...
@@ -20,71 +45,65 @@ class mcuScreen(Thread):
"
LabS-VIP:Chop-Drv-0101:Park_Stat
"
,
]
array_points
=
200
time_interval
=
24
*
3600
/
array_points
# 1 day
intervals
=
{
"
2w
"
:
24
*
14
,
"
1w
"
:
24
*
7
,
"
2d
"
:
24
*
2
,
"
1d
"
:
24
}
epics_dict
=
{}
for
pv
in
pvs
:
epics_dict
[
pv
]
=
epics
.
PV
(
pv
,
auto_monitor
=
True
)
history
=
{}
for
pv
in
pvs
:
history
[
pv
]
=
{
"
counter
"
:
0
,
"
timestamp
"
:
[
0
],
"
value
"
:
[
0
],
"
start
"
:
time
.
time
(),
}
json_dict
=
{}
counter
=
0
while
not
self
.
stop_signal
.
isSet
():
try
:
json_dict
=
{}
for
pv
in
epics_dict
:
json_dict
[
pv
]
=
{}
if
epics_dict
[
pv
].
connected
:
json_dict
[
pv
][
"
units
"
]
=
epics_dict
[
pv
].
units
json_dict
[
pv
][
"
timestamp
"
]
=
epics_dict
[
pv
].
timestamp
value
=
epics_dict
[
pv
].
value
if
type
(
value
)
==
float
:
json_dict
[
pv
][
"
value
"
]
=
round
(
value
,
3
)
else
:
json_dict
[
pv
][
"
value
"
]
=
value
if
(
pv
==
"
LabS-VIP:Chop-Drv-0101:Spd_Stat
"
or
pv
==
"
LabS-VIP:Chop-Drv-0101:Spd_SP
"
or
pv
==
"
LabS-VIP:Chop-Drv-0101:MtrTmp_Stat
"
):
history
[
pv
][
"
timestamp
"
][
0
]
=
int
(
time
.
time
()
*
1000
)
history
[
pv
][
"
value
"
][
0
]
=
round
(
(
history
[
pv
][
"
value
"
][
0
]
*
history
[
pv
][
"
counter
"
]
+
json_dict
[
pv
][
"
value
"
]
)
/
(
history
[
pv
][
"
counter
"
]
+
1
),
3
,
)
history
[
pv
][
"
counter
"
]
+=
1
if
(
history
[
pv
][
"
timestamp
"
][
0
]
>
(
history
[
pv
][
"
start
"
]
+
time_interval
)
*
1000
):
history
[
pv
][
"
timestamp
"
].
insert
(
0
,
int
(
time
.
time
()
*
1000
)
if
(
pv
==
"
LabS-VIP:Chop-Drv-0101:Spd_Stat
"
or
pv
==
"
LabS-VIP:Chop-Drv-0101:Spd_SP
"
or
pv
==
"
LabS-VIP:Chop-Drv-0101:MtrTmp_Stat
"
):
if
counter
%
600
==
0
:
if
pv
not
in
json_dict
:
json_dict
[
pv
]
=
{}
for
interval
in
intervals
:
start_date
=
(
datetime
.
datetime
.
now
()
-
datetime
.
timedelta
(
hours
=
intervals
[
interval
])
).
isoformat
()
+
"
Z
"
end_date
=
datetime
.
datetime
.
now
().
isoformat
()
+
"
Z
"
json_dict
[
pv
][
interval
]
=
get_from_archiver
(
pv
,
start_date
,
end_date
)
history
[
pv
][
"
value
"
].
insert
(
0
,
json_dict
[
pv
][
"
value
"
])
history
[
pv
][
"
counter
"
]
=
1
history
[
pv
][
"
start
"
]
=
time
.
time
()
if
len
(
history
[
pv
][
"
timestamp
"
])
>
array_points
:
history
[
pv
][
"
timestamp
"
].
pop
(
array_points
)
history
[
pv
][
"
value
"
].
pop
(
array_points
)
json_dict
[
pv
][
"
array
"
]
=
list
(
zip
(
history
[
pv
][
"
timestamp
"
],
history
[
pv
][
"
value
"
])
)
counter
=
0
else
:
if
epics_dict
[
pv
].
connected
:
if
"
live
"
not
in
json_dict
[
pv
]:
json_dict
[
pv
][
"
live
"
]
=
[]
value
=
epics_dict
[
pv
].
value
if
type
(
value
)
==
float
:
json_dict
[
pv
][
"
value
"
]
=
round
(
value
,
3
)
else
:
json_dict
[
pv
][
"
value
"
]
=
value
timestamp
=
int
(
time
.
time
()
*
1000
)
if
type
(
value
)
==
float
:
json_dict
[
pv
][
"
live
"
].
append
(
(
timestamp
,
round
(
value
,
3
))
)
if
len
(
json_dict
[
pv
][
"
live
"
])
>
100
:
json_dict
[
pv
][
"
live
"
].
pop
(
100
)
else
:
json_dict
[
pv
][
"
units
"
]
=
"
n.c.
"
json_dict
[
pv
][
"
timestamp
"
]
=
""
json_dict
[
pv
][
"
value
"
]
=
""
json_dict
[
pv
]
=
{}
if
epics_dict
[
pv
].
connected
:
json_dict
[
pv
][
"
units
"
]
=
epics_dict
[
pv
].
units
json_dict
[
pv
][
"
timestamp
"
]
=
epics_dict
[
pv
].
timestamp
value
=
epics_dict
[
pv
].
value
if
type
(
value
)
==
float
:
json_dict
[
pv
][
"
value
"
]
=
round
(
value
,
3
)
else
:
json_dict
[
pv
][
"
value
"
]
=
value
else
:
json_dict
[
pv
][
"
units
"
]
=
"
n.c.
"
json_dict
[
pv
][
"
timestamp
"
]
=
""
json_dict
[
pv
][
"
value
"
]
=
""
tmp_json
=
json
.
dumps
(
json_dict
)
tmp_json
=
tmp_json
.
replace
(
"
NaN
"
,
"
0
"
)
...
...
@@ -95,6 +114,7 @@ class mcuScreen(Thread):
print
(
sys
.
exc_info
())
time
.
sleep
(
1
)
time
.
sleep
(
0.5
)
counter
+=
1
for
pv
in
epics_dict
:
epics_dict
[
pv
].
clear_auto_monitor
()
...
...
This diff is collapsed.
Click to expand it.
WebSites/mcu/css/ess.css
+
3
−
2
View file @
4078faeb
...
...
@@ -94,9 +94,10 @@ overflow: hidden;
border-radius
:
50%
;
width
:
22px
;
height
:
22px
;
border
:
2px
solid
#
49707e
!important
;
border
:
2px
solid
#
cef4ff
!important
;
float
:
left
;
background-color
:
#0b2d3c
!important
;
background-color
:
#FF1818
!important
;
box-shadow
:
0px
0px
15px
#FF4040
;
margin-right
:
8px
!important
;
}
...
...
This diff is collapsed.
Click to expand it.
WebSites/mcu/dashboard.json
+
132
−
74
View file @
4078faeb
{
"version"
:
1
,
"header_image"
:
""
,
"allow_edit"
:
fals
e
,
"allow_edit"
:
tru
e
,
"plugins"
:
[],
"panes"
:
[
{
...
...
@@ -24,105 +24,102 @@
{
"type"
:
"html"
,
"settings"
:
{
"html"
:
"datasources[
\"
Clock
\"
][
\"
numeric_value
\"
]; // trick to trigger the update
\n
var cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');
\n
document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML =
\"\"
;
\n
if (cols == 4){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size: 50px; color:#ffffff !important; position: relative; bottom: 35px; left:
15
0px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
>Mini Chopper in Utgård Lab</div></img></div>
\"
;
\n
}
\n
if (cols == 3){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size:
40
px; color:#ffffff !important; position: relative; bottom: 45px; left:
10
0px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
>Mini Chopper in Utgård Lab</div></img></div>
\"
;
\n
}
\n\n
if (cols == 2){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size: 2
4
px; color:#ffffff !important; position: relative; bottom:
5
5px; left:
3
0px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
>Mini Chopper in Utgård Lab</div></img></div>
\"
;
\n\n
}
\n
if (cols == 1){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size: 30px; color:#ffffff !important; position: relative; bottom: 55px; left: 30px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
></div></img></div>
\"
;
\n\t
document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML =
\"
Mini Chopper in Utgård Lab
\"
;
\n
}
\n\n
return text"
,
"html"
:
"datasources[
\"
Clock
\"
][
\"
numeric_value
\"
]; // trick to trigger the update
\n
var cols = document.getElementsByClassName('gs_w')[0].getAttribute('data-sizex');
\n
document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML =
\"\"
;
\n
if (cols == 4){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size: 50px; color:#ffffff !important; position: relative; bottom: 35px; left:
10
0px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
>Mini Chopper in Utgård Lab</div></img></div>
\"
;
\n
}
\n
if (cols == 3){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size:
35
px; color:#ffffff !important; position: relative; bottom: 45px; left:
6
0px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
>Mini Chopper in Utgård Lab</div></img></div>
\"
;
\n
}
\n\n
if (cols == 2){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size: 2
0
px; color:#ffffff !important; position: relative; bottom:
6
5px; left:
2
0px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
>Mini Chopper in Utgård Lab</div></img></div>
\"
;
\n\n
}
\n
if (cols == 1){
\n
text =
\"
<div style=
\\\"
position: static; margin-top: -15px;
\\\"
><img src=
\\\"
../img/ess-logo.svg
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
><div class=
\\\"
tw-value
\\\"
style=
\\\"
font-size: 30px; color:#ffffff !important; position: relative; bottom: 55px; left: 30px;
\\\"
title=
\\\"
Designed by Emanuele Laface with PyEpics and Freeboard. Graphics by Dirk Nordt.
\\\"
></div></img></div>
\"
;
\n\t
document.getElementsByClassName('gs_w')[0].firstElementChild.firstElementChild.innerHTML =
\"
Mini Chopper in Utgård Lab
\"
;
\n
}
\n\n
return text"
,
"height"
:
2
}
}
]
},
{
"title"
:
"
Warning and Alarms
"
,
"title"
:
"
Motor Temperature
"
,
"width"
:
1
,
"row"
:
{
"1"
:
25
,
"2"
:
25
,
"3"
:
25
,
"4"
:
7
,
"7"
:
7
"1"
:
21
,
"2"
:
21
,
"3"
:
21
,
"4"
:
21
,
"5"
:
1
,
"11"
:
21
},
"col"
:
{
"1"
:
1
,
"2"
:
1
,
"3"
:
1
,
"4"
:
4
,
"7"
:
4
"4"
:
1
,
"5"
:
5
,
"11"
:
10
},
"col_width"
:
1
,
"col_width"
:
3
,
"widgets"
:
[
{
"type"
:
"ragIndicator"
,
"settings"
:
{
"title"
:
"Ref Alarm"
,
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Ref_Alrm
\"
][
\"
value
\"
]"
,
"green_text"
:
"Ok"
,
"amber_text"
:
"Warning"
}
},
{
"type"
:
"ragIndicator"
,
"type"
:
"flot_extended_plugin"
,
"settings"
:
{
"title"
:
"Comm Alarm"
,
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Comm_Alrm
\"
][
\"
value
\"
]"
,
"green_text"
:
"Ok"
,
"amber_text"
:
"Alarm"
"plot_type"
:
"line"
,
"legend"
:
true
,
"height"
:
4
,
"value"
:
"var series = document.getElementById(
\"
time-series
\"
).value;
\n
data = [
\n
{label: 'Temperature', data: datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:MtrTmp_Stat
\"
][series]},
\n
];
\n
freeboard.showLoadingIndicator(false);
\n
return data;"
,
"x_timestamp"
:
true
,
"zoom"
:
""
}
}
]
},
{
"title"
:
"
Speed
"
,
"title"
:
"
Time Selector
"
,
"width"
:
1
,
"row"
:
{
"1"
:
31
,
"2"
:
25
,
"3"
:
25
,
"4"
:
13
,
"7"
:
13
"1"
:
7
,
"2"
:
7
,
"3"
:
7
,
"4"
:
7
,
"5"
:
7
,
"7"
:
7
,
"8"
:
7
,
"9"
:
7
},
"col"
:
{
"1"
:
1
,
"2"
:
2
,
"3"
:
2
,
"4"
:
4
,
"7"
:
4
"2"
:
1
,
"3"
:
1
,
"4"
:
1
,
"5"
:
1
,
"7"
:
1
,
"8"
:
1
,
"9"
:
1
},
"col_width"
:
1
,
"col_width"
:
3
,
"widgets"
:
[
{
"type"
:
"text_widget"
,
"settings"
:
{
"title"
:
"Actual Speed"
,
"size"
:
"regular"
,
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_Stat
\"
][
\"
value
\"
]"
,
"animate"
:
true
}
},
{
"type"
:
"text_widget"
,
"type"
:
"html"
,
"settings"
:
{
"title"
:
"Set Point"
,
"size"
:
"regular"
,
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_SP
\"
][
\"
value
\"
]"
,
"animate"
:
true
"html"
:
"<script>
\n
function setDatasource(event) {
\n\t\t
freeboard.showLoadingIndicator(true);
\n\t
};
\n
</script>
\n
<div style=
\"
position:relative;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;
\"
>
\n
<select style=
\"
padding:0px 0px
\"
onchange=
\"
setDatasource()
\"
id=
\"
time-series
\"
>
\n
<option value=
\"
2w
\"
>Two Weeks</option>
\n
<option value=
\"
1w
\"
>One Week</option>
\n
<option value=
\"
2d
\"
>Two Days</option>
\n
<option value=
\"
1d
\"
>One Day</option>
\n
<option value=
\"
live
\"
>Live</option>
\n
</select>
\n
</div>"
,
"height"
:
1
}
}
]
},
{
"title"
:
"Motor Speed"
,
"width"
:
1
,
"row"
:
{
"1"
:
7
,
"2"
:
7
,
"3"
:
7
,
"4"
:
7
,
"7"
:
1
"1"
:
11
,
"2"
:
11
,
"3"
:
11
,
"4"
:
11
,
"5"
:
1
,
"7"
:
1
,
"9"
:
1
,
"10"
:
1
},
"col"
:
{
"1"
:
1
,
"2"
:
1
,
"3"
:
1
,
"4"
:
1
,
"7"
:
7
"5"
:
5
,
"7"
:
5
,
"9"
:
5
,
"10"
:
5
},
"col_width"
:
3
,
"widgets"
:
[
...
...
@@ -132,49 +129,110 @@
"plot_type"
:
"line"
,
"legend"
:
true
,
"height"
:
4
,
"value"
:
"data = [
\n
{label:
\"
Actual Speed
\"
, data: datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_Stat
\"
][
\"
array
\"
]},
\n
{label:
\"
Set Point
\"
, data: datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_SP
\"
][
\"
array
\"
]}
\n
]
\n
return data;"
,
"value"
:
"var series = document.getElementById(
\"
time-series
\"
).value;
\n
data = [
\n
{label: 'Actual Speed', data: datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_Stat
\"
][series]},
\n
{label: 'Set Point', data: datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_SP
\"
][series]},
\n
];
\n
freeboard.showLoadingIndicator(false);
\n
return data;"
,
"xticks"
:
"6"
,
"x_timestamp"
:
true
,
"zoom"
:
""
}
}
]
},
{
"title"
:
"Warning and Alarms"
,
"width"
:
1
,
"row"
:
{
"1"
:
31
,
"2"
:
31
,
"3"
:
31
,
"4"
:
7
,
"5"
:
7
,
"6"
:
7
,
"7"
:
7
,
"8"
:
7
,
"9"
:
7
,
"11"
:
7
,
"12"
:
7
},
"col"
:
{
"1"
:
1
,
"2"
:
1
,
"3"
:
1
,
"4"
:
4
,
"5"
:
2
,
"6"
:
2
,
"7"
:
2
,
"8"
:
2
,
"9"
:
2
,
"11"
:
2
,
"12"
:
2
},
"col_width"
:
1
,
"widgets"
:
[
{
"type"
:
"ragIndicator"
,
"settings"
:
{
"title"
:
"Ref Alarm"
,
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Ref_Alrm
\"
][
\"
value
\"
]"
,
"green_text"
:
"Ok"
,
"amber_text"
:
"Warning"
}
},
{
"type"
:
"
flot_extended_plugin
"
,
"type"
:
"
indicator
"
,
"settings"
:
{
"plot_type"
:
"line"
,
"legend"
:
true
,
"height"
:
4
,
"value"
:
"data = [
\n
{label:
\"
Motor Status
\"
, data: datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:MtrTmp_Stat
\"
][
\"
array
\"
]},
\n
]
\n
return data;"
,
"x_timestamp"
:
true
,
"zoom"
:
""
"title"
:
"Comm Alarm"
,
"value"
:
"!datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Comm_Alrm
\"
][
\"
value
\"
]"
,
"on_text"
:
"Ok"
,
"off_text"
:
"Alarm"
}
}
]
},
{
"title"
:
"S
tatus
"
,
"title"
:
"S
peed
"
,
"width"
:
1
,
"row"
:
{
"1"
:
37
,
"2"
:
31
,
"3"
:
25
,
"4"
:
19
,
"9"
:
33
"3"
:
31
,
"4"
:
13
,
"6"
:
7
,
"7"
:
7
,
"8"
:
7
,
"11"
:
7
,
"12"
:
7
},
"col"
:
{
"1"
:
1
,
"2"
:
1
,
"3"
:
3
,
"2"
:
2
,
"3"
:
2
,
"4"
:
4
,
"9"
:
4
"6"
:
3
,
"7"
:
3
,
"8"
:
3
,
"11"
:
3
,
"12"
:
3
},
"col_width"
:
1
,
"widgets"
:
[
{
"type"
:
"text_widget"
,
"settings"
:
{
"title"
:
"Actual Speed"
,
"size"
:
"regular"
,
"value"
:
"value = datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Park_Stat
\"
][
\"
value
\"
]
\n
if (value == 0){
\n
return
\"
Not Parked
\"\n
}
\n\n
if (value == 1){
\n
return
\"
Parked
\"\n
}
\n\n
if (value == 2){
\n
return
\"
Parking
\"\n
}"
,
"animate"
:
true
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_Stat
\"
][
\"
value
\"
]"
,
"animate"
:
true
,
"units"
:
""
}
},
{
"type"
:
"text_widget"
,
"settings"
:
{
"title"
:
"Set Point"
,
"size"
:
"regular"
,
"value"
:
"datasources[
\"
MCU
\"
][
\"
LabS-VIP:Chop-Drv-0101:Spd_SP
\"
][
\"
value
\"
]"
,
"animate"
:
true
,
"units"
:
""
}
}
]
...
...
@@ -200,4 +258,4 @@
}
],
"columns"
:
4
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment