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
1fb32ee7
Commit
1fb32ee7
authored
Dec 17, 2018
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
un poco mas prolijo el init del feedfoward
parent
3dc19186
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
myGUI.py
myGUI.py
+2
-1
myWidgets.py
myWidgets.py
+7
-7
No files found.
myGUI.py
View file @
1fb32ee7
...
...
@@ -101,7 +101,8 @@ class GuiMainWindow(QMainWindow):
self
.
piezoB397
=
anal_control_signal
(
'piezoB397'
,
7
,
out_step
=
0.01
)
self
.
piezoA866
=
anal_control_signal
(
'piezoA866'
,
14
,
out_minimum
=
0
,
out_maximum
=
4
,
out_step
=
0.01
)
self
.
piezoB866
=
anal_control_signal
(
'piezoB866'
,
6
,
out_step
=
0.01
)
self
.
piezoA423
=
anal_control_signal
(
'piezoA423'
,
1
,
out_step
=
0.01
,
feedfoward_channel
=
0
)
self
.
piezoA423
=
anal_control_signal
(
'piezoA423'
,
1
,
out_step
=
0.01
,
feedfoward
=
True
)
self
.
piezoA423
.
set_scan_feedfoward_analog_out
(
0
)
self
.
trapDCA
=
anal_control_signal
(
'DC A'
,
2
)
self
.
trapDCB
=
anal_control_signal
(
'DC B'
,
3
)
...
...
myWidgets.py
View file @
1fb32ee7
...
...
@@ -20,14 +20,15 @@ import scanFunctions
class
anal_control_signal
(
QWidget
):
_registry
=
[]
def
__init__
(
self
,
name
,
channel
,
out_minimum
=
-
10
,
out_maximum
=
10
,
out_step
=
0.1
,
feedfoward
_channel
=
0
):
def
__init__
(
self
,
name
,
channel
,
out_minimum
=
-
10
,
out_maximum
=
10
,
out_step
=
0.1
,
feedfoward
=
False
):
super
()
.
__init__
()
self
.
_registry
.
append
(
self
)
self
.
name
=
name
self
.
ch
=
channel
self
.
feedfoward_channel
=
feedfoward_channel
self
.
is_feedwoward_enabled
=
feedfoward
self
.
initial_value
=
0
...
...
@@ -40,8 +41,6 @@ class anal_control_signal(QWidget):
self
.
sb
=
pg
.
SpinBox
(
value
=
self
.
initial_value
,
bounds
=
[
self
.
min
,
self
.
max
],
step
=
self
.
step
,
siPrefix
=
self
.
siPrefix
,
suffix
=
self
.
suffix
)
try
:
self
.
AO
=
daq_AO
(
self
.
ch
)
if
feedfoward_channel
==
0
:
self
.
AO_feedfoward
=
daq_AO
(
self
.
feedfoward_channel
)
except
:
show_warning
(
'Analog output
%
i not found. Daq might not be connected'
%
self
.
ch
)
...
...
@@ -105,7 +104,7 @@ class anal_control_signal(QWidget):
self
.
scan_step
=
next
(
self
.
scan_array_gen
)
self
.
AO
.
set_out
(
self
.
scan_step
)
if
self
.
scan_feedfoward_button
.
isChecked
():
if
self
.
is_feedwoward_enabled
and
self
.
scan_feedfoward_button
.
isChecked
():
self
.
scan_feedfoward_step
=
next
(
self
.
scan_array_feedfoward_gen
)
self
.
AO_feedfoward
.
set_out
(
self
.
scan_feedfoward_step
)
...
...
@@ -150,6 +149,7 @@ class anal_control_signal(QWidget):
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
()
...
...
@@ -169,8 +169,8 @@ class anal_control_signal(QWidget):
def
set_scan_feedfoward_analog_out
(
self
,
analogOut
):
self
.
scan_feedfoward_analogOut
=
analogOut
def
set_scan_feedfoward_analog_out
(
self
,
feedfoward_channel
):
self
.
AO_feedfoward
=
daq_AO
(
feedfoward_channel
)
...
...
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