***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ADwin
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Quantuminfo
Experiment Control
ADwin
Commits
5ad76cce
Commit
5ad76cce
authored
1 year ago
by
Schabbauer, Johannes
Browse files
Options
Downloads
Patches
Plain Diff
Improve setting AOUT values at start and end of run (do not set to zero at end).
parent
a6abea96
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ADbasic_program_buffered.bas
+14
-8
14 additions, 8 deletions
ADbasic_program_buffered.bas
with
14 additions
and
8 deletions
ADbasic_program_buffered.bas
+
14
−
8
View file @
5ad76cce
...
@@ -158,12 +158,18 @@ init:
...
@@ -158,12 +158,18 @@ init:
NEXT i
NEXT i
'=========================== INITIALIZE AOUTS ==========================
'=========================== INITIALIZE AOUTS ==========================
'Initialize set values of all output channels
'
Initialize set values of all output channels
FOR i=1 TO AOUTNO
FOR i=1 TO AOUTNO
set_target[i]=
DATA_3[i] 'The initial output values are always given for all channels
set_target[i]=
ZERO
set_pid[i]=0 'At beginning all PIDs off
set_pid[i]=0 'At beginning all PIDs off
NEXT i
NEXT i
' Set outputs to values at t=0, if given
FOR i=1 TO AOUTNO
IF (DATA_1[i]=0) THEN
set_target[DATA_2[i]] = DATA_3[i]
ENDIF
NEXT i
'Write analog out values
'Write analog out values
P2_Write_DAC8(AOUT1,set_target,1)
P2_Write_DAC8(AOUT1,set_target,1)
P2_Write_DAC8(AOUT2,set_target,9)
P2_Write_DAC8(AOUT2,set_target,9)
...
@@ -317,11 +323,11 @@ EVENT:
...
@@ -317,11 +323,11 @@ EVENT:
IF(nextPidTime <= processIdx) Then
IF(nextPidTime <= processIdx) Then
DO
DO
inc pidIdx
inc pidIdx
i = DATA_5[pidIdx]
i = DATA_5[pidIdx]
' output channel index
set_pid[i] = DATA_6[pidIdx]
set_pid[i] = DATA_6[pidIdx]
pid_sum[i] = 0 'act_values[DATA_6[pidIdx]]-N
pid_sum[i] = 0 'act_values[DATA_6[pidIdx]]-N
pid_prev_dError[i] = 0
pid_prev_dError[i] = 0
i = DATA_6[pidIdx]
i = DATA_6[pidIdx]
' input/PID channel index
pid_P[i] = DATA_25[pidIdx]
pid_P[i] = DATA_25[pidIdx]
pid_I[i] = DATA_26[pidIdx]
pid_I[i] = DATA_26[pidIdx]
pid_D[i] = DATA_27[pidIdx]
pid_D[i] = DATA_27[pidIdx]
...
@@ -361,9 +367,9 @@ FINISH:
...
@@ -361,9 +367,9 @@ FINISH:
P2_TiCo_Stop_Process(PTR_TICO2,1)
P2_TiCo_Stop_Process(PTR_TICO2,1)
'Set values of all output channels to 0V
'Set values of all output channels to 0V
for i=1 to AOUTNO
'
for i=1 to AOUTNO
set_output[i]=ZERO
'
set_output[i]=ZERO
next i
'
next i
'Write analog out values
'Write analog out values
P2_Write_DAC8(AOUT1,set_output,1)
P2_Write_DAC8(AOUT1,set_output,1)
...
...
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