Adwin code for experminet control
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. The implementation of the ADwin device in labscript can be found in the other repository.
Filetypes
.bas
Basic code written for ADwin (ADbasic or TiCoBasic)
.TCx
Complied ADwin process from Basic code, x
is the process number set at compilation time
.TIx
Compiled process for TiCo processors, x
is the process number set at compilation time
.BAK
Backup of basic files (generated by ADwin IDEs)
Output channels
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.
Variables for Communication with ADwin
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).
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 |
Par_11 | Start parameter of process for manual programming |
Par_91 | Digital output of DIO1 for manual programming |
Par_92 | Digital output of DIO2 for manual programming |
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 | Times at which recording of each of the 16 AIN channels is started |
Data_8 | Times at which recording of each of the 16 AIN channels is stopped |
Data_9 | Recorded AIN data |
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 |
Data_95 | Analog output of AOUT1 for manual programming |
Data_96 | Analog output of AOUT2 for manual programming |
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 |
Data_2 | Bitfield for digital output, copy of Data_11 or Data_21 from main process |