*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 7a89b610 authored by Schabbauer, Johannes's avatar Schabbauer, Johannes
Browse files

Removed remiaing code from AIN storage rate from ADwin code (we don't use that...

Removed remiaing code from AIN storage rate from ADwin code (we don't use that anymore because of higher workoad)
parent 3aa1976f
No related branches found
No related tags found
1 merge request!2PID and timing improvements
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
' Info_Last_Save = QI-ADWIN QI-ADWIN\labuser ' Info_Last_Save = QI-ADWIN QI-ADWIN\labuser
'<Header End> '<Header End>
#include adwinpro_all.inc #include adwinpro_all.inc
Import Math.LIC
' Array Size Settings ' Array Size Settings
' TODO: check these values in labscript_devices files ' TODO: check these values in labscript_devices files
...@@ -55,7 +54,6 @@ DIM DATA_30[MAX_PID_EVENTS] AS LONG 'PID start values ...@@ -55,7 +54,6 @@ DIM DATA_30[MAX_PID_EVENTS] AS LONG 'PID start values
DIM DATA_7[AINNO] AS LONG 'Start times for channel recording DIM DATA_7[AINNO] AS LONG 'Start times for channel recording
DIM DATA_8[AINNO] AS LONG 'End times for channel recording DIM DATA_8[AINNO] AS LONG 'End times for channel recording
DIM DATA_9[AINNO] AS LONG 'Gain modes for AIN channels DIM DATA_9[AINNO] AS LONG 'Gain modes for AIN channels
DIM DATA_19[AINNO] AS LONG 'Storage rate for AIN channels
DIM DATA_199[A_IN_BUFFER+16] AS LONG 'Recorded Data - add padding at the end to ensure no overflow happens DIM DATA_199[A_IN_BUFFER+16] AS LONG 'Recorded Data - add padding at the end to ensure no overflow happens
DIM ain_index[AINNO] AS LONG 'Index of the data acquisition for each channel, to have the values sorted DIM ain_index[AINNO] AS LONG 'Index of the data acquisition for each channel, to have the values sorted
...@@ -104,7 +102,6 @@ DIM set_target[AOUTNO] AS LONG ' Set values to be written to AOUTs ...@@ -104,7 +102,6 @@ DIM set_target[AOUTNO] AS LONG ' Set values to be written to AOUTs
DIM set_output[AOUTNO] AS LONG ' Set values to be written to AOUTs DIM set_output[AOUTNO] AS LONG ' Set values to be written to AOUTs
DIM set_pid[AOUTNO] AS LONG ' PID selection for each AOUT DIM set_pid[AOUTNO] AS LONG ' PID selection for each AOUT
DIM act_values[PIDNO] AS LONG ' Analog values measured from AINs DIM act_values[PIDNO] AS LONG ' Analog values measured from AINs
DIM ain_rate[AINNO] AS LONG ' How often should the AIN value be stored for each channel, combined with DATA_7 and DATA_8
'========================================================================= '=========================================================================
...@@ -208,13 +205,8 @@ init: ...@@ -208,13 +205,8 @@ init:
'Determine indices for analog data acquisition 'Determine indices for analog data acquisition
ain_index[1] = 1 ain_index[1] = 1
ain_rate[1] = Round(1e9 / PROCESSDELAY / DATA_19[1])
FOR i=2 TO AINNO FOR i=2 TO AINNO
ain_index[i] = ain_index[i-1] + ((DATA_8[i-1] - DATA_7[i-1]) / ain_rate[i-1]) ain_index[i] = ain_index[i-1] + DATA_8[i-1] - DATA_7[i-1]
IF (Mod(DATA_8[i-1] - DATA_7[i-1],ain_rate[i-1]) <> 0) THEN
ain_index[i] = ain_index[i] + 1
ENDIF
ain_rate[i] = Round(1e9 / PROCESSDELAY / DATA_19[i])
NEXT i NEXT i
...@@ -307,10 +299,8 @@ EVENT: ...@@ -307,10 +299,8 @@ EVENT:
FOR i=1 to AINNO FOR i=1 to AINNO
IF(processIdx < DATA_8[i]) THEN IF(processIdx < DATA_8[i]) THEN
IF (processIdx >= DATA_7[i]) THEN IF (processIdx >= DATA_7[i]) THEN
' IF (Mod(processIdx-DATA_7[i], ain_rate[i]) = 0) THEN
DATA_199[ain_index[i]]=act_values[i] DATA_199[ain_index[i]]=act_values[i]
inc ain_index[i] inc ain_index[i]
' ENDIF
ENDIF 'processIdx > DATA_7[i] ENDIF 'processIdx > DATA_7[i]
ENDIF 'processIdx <= DATA_8[i] ENDIF 'processIdx <= DATA_8[i]
NEXT i NEXT i
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment