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

Skip to content
Snippets Groups Projects
README.md 3.37 KiB
Newer Older
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
# Adwin code for experminet control
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
Here all the ADwin code for the LEOLAB (Experimental Quantum Information) at TU Wien is stored. The Code is used for experiment control with the [*labscript-suite*](https://labscriptsuite.org/). The implementation of the ADwin device in labscript can be found in the [other repository](https://gitlab.tuwien.ac.at/quantuminfo/experiment-control/labscript-suite-userlib).
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
## Filetypes
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
`.bas` Basic code written for ADwin (ADbasic or TiCoBasic)
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
`.TCx` Complied ADwin process from Basic code, `x` is the process number set at compilation time
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
`.TIx` Compiled process for TiCo processors, `x` is the process number set at compilation time
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
`.BAK` Backup of *basic* files (generated by ADwin IDEs)
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
## Output channels
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
The analog output channels for both AOUT-8 modules are combined in one array with size 16, where the module AOUT1 is set to the values with indices 1-8 and AOUT2 to those with indices 9-16. The same is done for the two analog input modules AIN1 and AIN2. 
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
## Variables for Communication with ADwin
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
The global variables in the ADwin can be used for data transfer with the computer. In the list, all used variables in the processes are described. The datatypes are *Long* for all **Par_xx**, *Double* for **FPar_xx**, and *Arrays* for **Data_xx** (usually with datatype *Long*).  
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
### ADwin main processor
|   Name   |            Description              |
|----------|-------------------------------------|
| Par_1    | Process status (running=1, finshed=0) |
| Par_2    | Stop time (in number of process cycles) |
| Par_10   | Tico Process status of *DIO1* at end of shot, running (fine) = 1, stopped (error) = 0 |
| Par_20   | Tico Process status of *DIO2* at end of shot, running (fine) = 1, stopped (error) = 0 |
| Par_13   | Time for current event loop in number of CPU cycles (1ns) |
| Par_15   | Process index, updated every event loop |
| Data_1   | Times for setting new analog output (in number of process cycles) |
| Data_2   | **Analog** output channel where output is updated at time from Data_1 |
| Data_3   | Output value ([-10,10]V digitized to 10 bit integer) for channel from Data_2 at time from Data_1 |
| Data_4   | Times for setting or changing PID channels (in number of process cycles) |
| Data_5   | Analog output channel that is controlled by PID loop staring from time in Data_4 | 
| Data_6   | Analog input channel used as feedback to stabilize channel in Data_5 via PID controller |
| Data_7   | TODO input |
| Data_8   | TODO input |
| Data_9   | TODO input |
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
| Data_10  | Time for digital outputs of DIO1 (in number of *TiCo* process cycles) |
| Data_11  | **Digital** output bitfield for 32 channels of DIO1 at time from Data_10 |
| Data_20  | Time for digital outputs of DIO2 (in number of *TiCo* process cycles) |
| Data_21  | **Digital** output bitfield for 32 channels of DIO2 at time from Data_10 |

### TiCo digital output process (on each DIO32-TiCo module)
|  Name  |            Description              |
|--------|-------------------------------------|
| Par_1  | Output bitfield, from Data_2 |
| Par_2  | Process index of TiCo process|
| Par_3  | Event index, tracks current item of Data_1 and Data_2 |
| Par_20 | Start signal from main process (after 80 TiCo process cycles) |
| Data_1 | Times for digital output, copy of Data_10 or Data_20 from main process |
Schabbauer, Johannes's avatar
Schabbauer, Johannes committed
| Data_2 | Bitfield for digital output, copy of Data_11 or Data_21 from main process |