Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
total_control_app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Drechsler
total_control_app
Commits
cb4fcddb
Commit
cb4fcddb
authored
Feb 11, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes. Now it loads every time it starts
parent
149c417c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
myGUI.py
myGUI.py
+1
-0
myWidgets.py
myWidgets.py
+13
-9
wav_coherent.py
wav_coherent.py
+4
-2
No files found.
myGUI.py
View file @
cb4fcddb
...
...
@@ -129,6 +129,7 @@ class GuiMainWindow(QMainWindow):
#############Toolbar and initial loading of config ############################
toolbar
=
myToolbarMenu
(
self
.
win
,
anal_control_signal
.
_registry
)
toolbar
.
load
(
anal_control_signal
.
_registry
)
print
(
'Defined analog outputs:
\n
'
,
toolbar
.
aosDicc
.
keys
())
###############################################################################
#here I connect the spinboxes to the daq analog outputs:
...
...
myWidgets.py
View file @
cb4fcddb
...
...
@@ -145,14 +145,14 @@ class anal_control_signal(QWidget):
normalized
=
True
,
normalization_constant
=
float
(
self
.
scan_feedfoward_sb
.
val
)
)
self
.
scan_array_feedfoward_gen
=
scanFunctions
.
yield_scan_array
(
self
.
scan_array_feedfoward
)
import
pylab
as
plt
plt
.
figure
()
plt
.
plot
(
self
.
scan_array
,
label
=
'scan'
)
plt
.
plot
(
self
.
scan_array_feedfoward
,
label
=
'feedfoward'
)
plt
.
legend
()
plt
.
xlabel
(
'u.a'
),
plt
.
ylabel
(
'Voltaje [V]'
)
plt
.
show
()
#
import pylab as plt
#
plt.figure()
#
plt.plot(self.scan_array, label = 'scan')
#
plt.plot(self.scan_array_feedfoward, label = 'feedfoward')
#
plt.legend()
#
plt.xlabel('u.a'), plt.ylabel('Voltaje [V]')
#
plt.show()
#
if
first_value
>
float
(
self
.
scan_sb_stop
.
val
)
or
first_value
<
float
(
self
.
scan_sb_start
.
val
):
details
=
'Remember remember the fifth of November.'
+
'
\n
'
+
'Also remember that scan starts from the value of the corresponding spin box'
...
...
@@ -273,7 +273,11 @@ class coherentWM(QWidget):
try
:
wavCoh
=
serial
.
Serial
(
'COM11'
,
timeout
=
1
,
rtscts
=
True
)
wavCoh
.
close
()
wav_coherent
.
read_measurement
(
wavCoh
)
wavemeter_ok
=
True
print
(
'coherent wavemeter connected'
)
except
:
show_warning
(
'Coherent wavemeter not connected'
)
...
...
@@ -284,7 +288,7 @@ class coherentWM(QWidget):
lcd
=
QLCDNumber
()
lcd
.
setDigitCount
(
1
0
)
lcd
.
setDigitCount
(
1
1
)
lcd
.
display
(
"00000000 0"
)
wav_coherent
.
set_unit
(
wavCoh
,
b
'F'
)
...
...
wav_coherent.py
View file @
cb4fcddb
...
...
@@ -18,8 +18,10 @@ def read_measurement(wm):
w
.
write
(
b
'VAL?
\n
'
)
#time.sleep(0.2)
a
=
w
.
readline
()
.
decode
(
"utf-8"
)
a
=
a
.
split
(
','
)[
1
]
a
=
a
.
split
(
'
\r
'
)[
0
]
return
a
[
12
:
20
]
return
a
def
set_unit
(
wm
,
unit
):
...
...
@@ -53,7 +55,7 @@ if __name__ == '__main__':
wavCoh
=
serial
.
Serial
(
'COM11'
,
timeout
=
1
,
rtscts
=
True
)
wavCoh
.
close
()
set_unit
(
wavCoh
,
b
'
V
'
)
set_unit
(
wavCoh
,
b
'
F
'
)
print
(
read_measurement
(
wavCoh
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment