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
c5d39b95
Commit
c5d39b95
authored
Feb 13, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small changes in the printing of analog outputs pinouts
parent
a3e8a24a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
myGUI.py
myGUI.py
+6
-1
wav_coherent.py
wav_coherent.py
+19
-1
No files found.
myGUI.py
View file @
c5d39b95
...
...
@@ -132,7 +132,7 @@ class GuiMainWindow(QMainWindow):
self
.
toolbar
=
myToolbarMenu
(
self
.
win
,
anal_control_signal
.
_registry
)
self
.
toolbar
.
load
(
anal_control_signal
.
_registry
)
print
(
'Defined analog outputs:
\n
'
,
self
.
toolbar
.
aosDicc
.
keys
())
#
print('Defined analog outputs: \n', self.toolbar.aosDicc.keys())
self
.
autosave_timer
=
QTimer
()
self
.
autosave_timer
.
timeout
.
connect
(
lambda
:
self
.
toolbar
.
save
(
anal_control_signal
.
_registry
))
...
...
@@ -144,6 +144,11 @@ class GuiMainWindow(QMainWindow):
ao
.
connectSpinBoxesToDaq
()
print
(
'Analog control pinout:'
)
for
ao
in
anal_control_signal
.
_registry
:
print
(
ao
.
name
+
' -> '
+
'ao'
+
str
(
ao
.
ch
))
###############################################################################
#activate button
...
...
wav_coherent.py
View file @
c5d39b95
...
...
@@ -6,7 +6,7 @@ Created on Wed Feb 6 13:07:39 2019
"""
#import serial
#
import time
import
time
#
#wavCoh=serial.Serial('COM10', timeout=1, rtscts=True)
#wavCoh.close()
...
...
@@ -23,6 +23,21 @@ def read_measurement(wm):
return
a
def
read_measurement_forever
(
wm
):
with
wm
as
w
:
while
(
True
):
w
.
write
(
b
'VAL?
\n
'
)
#time.sleep(0.2)
a
=
w
.
readline
()
.
decode
(
"utf-8"
)
try
:
a
=
a
.
split
(
','
)[
1
]
a
=
a
.
split
(
'
\r
'
)[
0
]
print
(
a
)
except
:
print
(
"wrong value read"
)
time
.
sleep
(
1
)
def
set_unit
(
wm
,
unit
):
"""
...
...
@@ -65,6 +80,9 @@ if __name__ == '__main__':
while
(
1
):
print
(
read_measurement
(
wavCoh
))
time
.
sleep
(
0.5
)
read_measurement_forever
(
wavCoh
)
# print(a[12:20])
# check_unit(wavCoh)
# import os
...
...
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